forked from ArduPilot/MissionPlanner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ZZZLibShims.cs
910 lines (712 loc) · 19.4 KB
/
ZZZLibShims.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Scripting.Hosting;
using MissionPlanner;
using MissionPlanner.Utilities;
using SkiaSharp;
namespace tlogThumbnailHandler
{
public class tlogThumbnailHandler
{
public static string queuefile = "queue.txt";
}
}
namespace Microsoft.Scripting.Hosting
{
public sealed class ScriptSource
{
public object Execute(ScriptScope scope)
{
throw new NotImplementedException();
}
}
public sealed class ScriptEngine
{
public ScriptSource CreateScriptSourceFromString(string scriptsrc)
{
throw new NotImplementedException();
}
public void SetSearchPaths(object paths)
{
throw new NotImplementedException();
}
public ScriptScope CreateScope()
{
throw new NotImplementedException();
}
public ICollection<string> GetSearchPaths()
{
throw new NotImplementedException();
}
public ScriptRuntime Runtime { get; set; }
public TService GetService<TService>(params object[] args) where TService : class
{
throw new NotImplementedException();
}
public ScriptSource CreateScriptSourceFromFile(string filename)
{
throw new NotImplementedException();
}
}
public sealed class ExceptionOperations
{
public string FormatException(Exception p0)
{
throw new NotImplementedException();
}
}
public sealed class ScriptScope
{
public void SetVariable(string name, object value)
{
throw new NotImplementedException();
}
}
public sealed class ScriptRuntime
{
public void Shutdown()
{
throw new NotImplementedException();
}
public void LoadAssembly(Assembly ass)
{
throw new NotImplementedException();
}
public ScriptIO IO { get; set; }
}
public sealed class ScriptIO
{
public void SetErrorOutput(MemoryStream memoryStream, StringRedirectWriter outputWriter)
{
throw new NotImplementedException();
}
public void SetOutput(MemoryStream memoryStream, StringRedirectWriter outputWriter)
{
throw new NotImplementedException();
}
}
}
namespace Microsoft.Scripting.Runtime
{
public sealed class OperationFailed
{
public static readonly OperationFailed Value = new OperationFailed();
private OperationFailed()
{
}
}
}
namespace Microsoft.Scripting.Utils
{
public static class ContractUtils
{
public static void RequiresNotNull(object value, string paramName)
{
if (value == null)
{
throw new ArgumentNullException(paramName);
}
}
}
}
public delegate int GetInt();
namespace IronPython.Runtime
{
}
namespace IronPython.Runtime.Operations
{
}
namespace SharpAdbClient
{[Flags]
public enum UnixFileMode
{
TypeMask = 0x8000,
Socket = 0xC000,
SymbolicLink = 0xA000,
Regular = 0x8000,
Block = 0x6000,
Directory = 0x4000,
Character = 0x2000,
FIFO = 0x1000
}
public class AdbClient
{
public static IAdbClient Instance { get; set; }
}
public class AdbServer
{
public static AdbServer Instance { get; set; }
public void StartServer(string adbExe, bool b)
{
}
}
public class DeviceData
{
}
public class ConsoleOutputReceiver
{
}
public class FileStatistics
{
public UnixFileMode FileMode { get; set; }
public DateTime Time { get; set; }
}
public class SyncService: IDisposable
{
public SyncService(DeviceData device)
{
throw new NotImplementedException();
}
public void Push(Stream stream, string dataFtpInternalApm, int p2, DateTime now, CancellationToken none)
{
}
public FileStatistics Stat(string dataFtpInternalApmStartArdupilotSh)
{
throw new NotImplementedException();
}
public void Pull(string etcInitDRcsModeDefault, MemoryStream stream, CancellationToken none)
{
throw new NotImplementedException();
}
public void Dispose()
{
}
}
public interface IAdbClient
{
string Connect(DnsEndPoint p0);
List<DeviceData> GetDevices();
void ExecuteRemoteCommand(string mountORemountRw, DeviceData device, ConsoleOutputReceiver consoleOut);
void KillAdb();
}
}
namespace IronPython.Hosting
{
public class Python
{
public static ScriptEngine CreateEngine(Dictionary<string, object> options = null)
{
throw new NotImplementedException();
}
}
}
public class OpenGLtest: UserControl
{
public static OpenGLtest instance;
public MissionPlanner.Utilities.Vector3 rpy;
public MissionPlanner.Utilities.Vector3 Velocity;
public PointLatLngAlt LocationCenter { get; set; }
public List<Locationwp> WPs { get; set; }
}
public class OpenGLtest2: OpenGLtest
{
public static OpenGLtest2 instance;
}
namespace DotSpatial.Data{}
namespace DotSpatial.Projections{
public class ProjectionInfo
{
public void ParseEsriString(string readLine)
{
throw new NotImplementedException();
}
}
public class FeatureSet:IFeatureSet
{
public static IFeatureSet Open(string file)
{
throw new NotImplementedException();
}
public void CopyTableSchema(DataTable sourceTable)
{
throw new NotImplementedException();
}
public void FillAttributes()
{
throw new NotImplementedException();
}
public List<int> Find(string filterExpression)
{
throw new NotImplementedException();
}
public void InitializeVertices()
{
throw new NotImplementedException();
}
public void InvalidateVertices()
{
throw new NotImplementedException();
}
public bool RemoveShapeAt(int index)
{
throw new NotImplementedException();
}
public void RemoveShapesAt(IEnumerable<int> indices)
{
throw new NotImplementedException();
}
public void Save()
{
throw new NotImplementedException();
}
public void SaveAs(string fileName, bool overwrite)
{
throw new NotImplementedException();
}
public List<int> SelectIndexByAttribute(string filterExpression)
{
throw new NotImplementedException();
}
public void UpdateExtent()
{
throw new NotImplementedException();
}
public int NumRows()
{
throw new NotImplementedException();
}
public bool AttributesPopulated
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public DataTable DataTable
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public string Filename
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public bool IndexMode
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
double[] IFeatureSet.Vertex
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
double[] IFeatureSet.Z
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public double[] M
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public bool VerticesAreValid => throw new NotImplementedException();
public event EventHandler VerticesInvalidated;
public List<string> GetColumnNames(string xlsFilePath)
{
throw new NotImplementedException();
}
public IFeatureSet Join(string xlsFilePath, string localJoinField, string xlsJoinField)
{
throw new NotImplementedException();
}
public void AddFid()
{
throw new NotImplementedException();
}
public void CopyFeatures(IFeatureSet source, bool copyAttributes)
{
throw new NotImplementedException();
}
public IFeatureSet CopySubset(List<int> indices)
{
throw new NotImplementedException();
}
public IFeatureSet CopySubset(string filterExpression)
{
throw new NotImplementedException();
}
public void CopyTableSchema(IFeatureSet source)
{
throw new NotImplementedException();
}
public IEnumerable Features
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public object Vertex
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public double Z
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
List<Feature> IFeatureSet.Features { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
}
public interface IFeatureSet
{
bool AttributesPopulated
{
get;
set;
}
DataTable DataTable
{
get;
set;
}
string Filename
{
get;
set;
}
bool IndexMode
{
get;
set;
}
double[] Vertex
{
get;
set;
}
double[] Z
{
get;
set;
}
double[] M
{
get;
set;
}
bool VerticesAreValid
{
get;
}
List<Feature> Features { get; set; }
event EventHandler VerticesInvalidated;
List<string> GetColumnNames(string xlsFilePath);
IFeatureSet Join(string xlsFilePath, string localJoinField, string xlsJoinField);
void AddFid();
void CopyFeatures(IFeatureSet source, bool copyAttributes);
IFeatureSet CopySubset(List<int> indices);
IFeatureSet CopySubset(string filterExpression);
void CopyTableSchema(IFeatureSet source);
void CopyTableSchema(DataTable sourceTable);
void FillAttributes();
[Obsolete("Use SelectIndexByAttribute(filterExpression) instead.")]
List<int> Find(string filterExpression);
void InitializeVertices();
void InvalidateVertices();
bool RemoveShapeAt(int index);
void RemoveShapesAt(IEnumerable<int> indices);
void Save();
void SaveAs(string fileName, bool overwrite);
List<int> SelectIndexByAttribute(string filterExpression);
void UpdateExtent();
int NumRows();
}
public class Feature
{
public List<Coord> Coordinates { get; set; }
public Feature Geometry { get; set; }
}
public class Coord
{
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
}
public class Reproject
{
public static void ReprojectPoints(double[] xyarray, double[] zarray, ProjectionInfo pStart, ProjectionInfo pEsriEnd, int i, int i1)
{
throw new NotImplementedException();
}
}
public class KnownCoordinateSystems
{
public class Geographic
{
public class World
{
public static ProjectionInfo WGS1984;
}
}
}
}
namespace DotSpatial.Symbology {}
namespace SkiaSharp.Views.Desktop
{
[DefaultEvent("PaintSurface")]
[DefaultProperty("Name")]
public class SKControl : Control
{
private readonly bool designMode;
private Bitmap bitmap;
[Bindable(false)]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[EditorBrowsable(EditorBrowsableState.Never)]
public SKSize CanvasSize
{
get
{
if (bitmap != null)
{
return new SKSize(bitmap.Width, bitmap.Height);
}
return SKSize.Empty;
}
}
[Category("Appearance")]
public event EventHandler<SKPaintSurfaceEventArgs> PaintSurface;
public SKControl()
{
DoubleBuffered = true;
SetStyle(ControlStyles.ResizeRedraw, value: true);
designMode = (base.DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime);
}
protected override void OnPaint(PaintEventArgs e)
{
if (!designMode)
{
base.OnPaint(e);
SKImageInfo info = CreateBitmap();
if (info.Width != 0 && info.Height != 0)
{
BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, base.Width, base.Height), ImageLockMode.WriteOnly, bitmap.PixelFormat);
using (SKSurface sKSurface = SKSurface.Create(info, bitmapData.Scan0, bitmapData.Stride))
{
OnPaintSurface(new SKPaintSurfaceEventArgs(sKSurface, info));
sKSurface.Canvas.Flush();
}
bitmap.UnlockBits(bitmapData);
e.Graphics.DrawImage(bitmap, 0, 0);
}
}
}
protected virtual void OnPaintSurface(SKPaintSurfaceEventArgs e)
{
this.PaintSurface?.Invoke(this, e);
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
FreeBitmap();
}
private SKImageInfo CreateBitmap()
{
SKImageInfo result = new SKImageInfo(base.Width, base.Height, SKImageInfo.PlatformColorType, SKAlphaType.Premul);
if (bitmap == null || bitmap.Width != result.Width || bitmap.Height != result.Height)
{
FreeBitmap();
if (result.Width != 0 && result.Height != 0)
{
bitmap = new Bitmap(result.Width, result.Height, PixelFormat.Format32bppPArgb);
}
}
return result;
}
private void FreeBitmap()
{
if (bitmap != null)
{
bitmap.Dispose();
bitmap = null;
}
}
}
}
namespace MissionPlanner.Log
{
public partial class LogIndex : Form
{
}
}
namespace System.Windows.Forms
{
public class WebBrowser : Control
{
public bool CanGoBack { get; internal set; }
public object Url { get; set; }
public bool CanGoForward { get; set; }
public string DocumentText { get; set; }
public HtmlDocument Document { get; set; }
public event EventHandler<WebBrowserNavigatingEventArgs> Navigating;
public event EventHandler<WebBrowserNavigatedEventArgs> Navigated;
public void Navigate(Uri authorizeUri)
{
}
public void GoBack()
{
}
public void GoForward()
{
}
public void Navigate(string authorizeUri)
{
}
}
public class HtmlDocument
{
public void InvokeScript(string script)
{
}
}
public class WebBrowserNavigatedEventArgs : EventArgs
{
public Uri Url;
}
public class WebBrowserNavigatingEventArgs : EventArgs
{
public Uri Url;
public bool Cancel;
}
}
namespace GDAL {
internal class GDALProvider
{
internal static GDALProvider Instance;
internal double opacity = 1.0;
}
}
public class GdalConfiguration
{
public static void ConfigureGdal()
{
}
public static void ConfigureOgr()
{
}
}
public class GdiGraphics: Graphics
{
public GdiGraphics(SKSurface surface) : base(surface)
{
}
public GdiGraphics(IntPtr handle, int width, int height) : base(handle, width, height)
{
}
public GdiGraphics(Graphics fromImage): base(fromImage.Surface)
{
}
}
public class SkiaGraphics: Graphics
{
public SkiaGraphics(SKSurface surface) : base(surface)
{
}
public SkiaGraphics(IntPtr handle, int width, int height) : base(handle, width, height)
{
}
}
namespace System.Speech.Synthesis
{
public class PromptBuilder
{
private CultureInfo currentUICulture;
private string text;
public PromptBuilder(CultureInfo currentUICulture)
{
this.currentUICulture = currentUICulture;
}
public void AppendText(string text)
{
this.text = text;
}
public static implicit operator string(PromptBuilder d) => d.text;
}
public class SpeechSynthesizer
{
public SynthesizerState State { get; set; }
public void SpeakAsyncCancelAll()
{
}
public void Dispose()
{
}
public void SpeakAsync(string text)
{
}
}
public enum SynthesizerState
{
Ready,
Speaking
}
}
namespace System.Management
{
public class ObjectQuery
{
private string v;
public ObjectQuery(string v)
{
this.v = v;
}
}
public class ManagementObjectSearcher : IDisposable
{
private ObjectQuery query;
public ManagementObjectSearcher(ObjectQuery query)
{
this.query = query;
}
public IEnumerable<ManagementObject> Get()
{
return new List<ManagementObject>();
}
public void Dispose()
{
}
}
public class ManagementObject
{
public PropertyDataCollection Properties = new PropertyDataCollection();
public class PropertyDataCollection : ICollection
{
public IEnumerator<extratype> GetEnumerator()
{
yield return new extratype();
}
public extratype this[string pnpdeviceid]
{
get { return null; }
}
public void CopyTo(Array array, int index)
{
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public int Count { get; }
public bool IsSynchronized { get; }
public object SyncRoot { get; }
}
public class extratype
{
public object Name { get; set; }
public object Value { get; set; }
}
}
}