-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmLibrary.cs
2822 lines (2726 loc) · 113 KB
/
frmLibrary.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
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Decompiled with JetBrains decompiler
// Type: OculusTrayTool.frmLibrary
// Assembly: OculusTrayTool, Version=0.87.8.0, Culture=neutral, PublicKeyToken=null
// MVID: E8946A27-16D6-4BF6-9D7B-70CB25A977E0
// Assembly location: C:\Program Files (x86)\Oculus Tray Tool\OculusTrayTool.exe
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OculusTrayTool.My;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SQLite;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
#nullable disable
namespace OculusTrayTool
{
[DesignerGenerated]
public class frmLibrary : Form
{
private IContainer components;
private ImageList imageListLarge;
public static ImageList icons = new ImageList();
private ImageList ImgListOverlay;
private string steam_assets;
private string backupPath;
private bool changeMade;
private List<string> steamExes;
private Resizer rs;
private bool isReading;
private bool scrapeDone;
private bool libraryLoaded;
public Dictionary<string, string> ManualStartProfiles;
private bool removeOK;
public int LocalDBVersion;
public int IconsLocalDBVersion;
private Thread GetIcons;
public SQLiteConnection Steamcnn;
public SQLiteConnection Iconscnn;
private int offset;
private bool isOpen;
private bool IconsisOpen;
private int dbCount;
private bool isSearch;
private bool lvShrunk;
private string selectedLink;
private int ShrinkSize;
private ListView lvToShrink;
private bool NoIconSet;
private bool BrowseForIcons;
private SQLiteConnection cnn;
private List<string> IconGameList;
public List<string> DisplayNameList;
public frmLibrary()
{
this.FormClosing += new FormClosingEventHandler(this.Library_FormClosing);
this.Load += new EventHandler(this.Library_Load);
this.ResizeBegin += new EventHandler(this.Library_ResizeBegin);
this.imageListLarge = new ImageList();
this.ImgListOverlay = new ImageList()
{
ImageSize = new Size(64, 64)
};
this.steam_assets = Application.StartupPath + "\\SteamVRAssets";
this.backupPath = Application.StartupPath + "\\backup";
this.changeMade = false;
this.steamExes = new List<string>();
this.rs = new Resizer();
this.isReading = false;
this.scrapeDone = false;
this.libraryLoaded = false;
this.ManualStartProfiles = new Dictionary<string, string>();
this.removeOK = false;
this.Client = new WebClient();
this.Steamcnn = new SQLiteConnection();
this.Iconscnn = new SQLiteConnection();
this.offset = 0;
this.isSearch = false;
this.lvShrunk = false;
this.ShrinkSize = 0;
this.NoIconSet = false;
this.BrowseForIcons = false;
this.cnn = new SQLiteConnection();
this.IconGameList = new List<string>();
this.DisplayNameList = new List<string>();
this.InitializeComponent();
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmLibrary));
this.ContextMenuStrip2 = new ContextMenuStrip(this.components);
this.ReEnableAppToolStripMenuItem = new ToolStripMenuItem();
this.ShowAppInLibraryAndProfilesToolStripMenuItem = new ToolStripMenuItem();
this.ContextMenuStrip1 = new ContextMenuStrip(this.components);
this.ToolStripMenuItem3 = new ToolStripMenuItem();
this.ToolStripMenuItem2 = new ToolStripMenuItem();
this.ToolStripSeparator2 = new ToolStripSeparator();
this.ToolStripMenuItem4 = new ToolStripMenuItem();
this.ToolStripMenuItem5 = new ToolStripMenuItem();
this.ToolStripMenuItem6 = new ToolStripMenuItem();
this.ToolStripSeparator3 = new ToolStripSeparator();
this.ToolStripMenuItem7 = new ToolStripMenuItem();
this.ToolStripMenuItem8 = new ToolStripMenuItem();
this.ToolStripSeparator1 = new ToolStripSeparator();
this.ToolStripMenuItem1 = new ToolStripMenuItem();
this.ToolStripMenuItem9 = new ToolStripMenuItem();
this.RemoveProfileToolStripMenuItem = new ToolStripMenuItem();
this.ToolTip1 = new ToolTip(this.components);
this.GroupBox1 = new GroupBox();
this.TextBox1 = new TextBox();
this.Button2 = new Button();
this.Label6 = new Label();
this.GroupBox2 = new GroupBox();
this.MenuStrip1 = new MenuStrip();
this.OptionsToolStripMenuItem = new ToolStripMenuItem();
this.AddSteamVRToolStripMenuItem = new ToolStripMenuItem();
this.ShowToolStripMenuItem = new ToolStripMenuItem();
this.ShowRemoved3rdPartyAppsToolStripMenuItem = new ToolStripMenuItem();
this.ShowIgnoredAppsToolStripMenuItem = new ToolStripMenuItem();
this.RefreshLibraryToolStripMenuItem = new ToolStripMenuItem();
this.SortingToolStripMenuItem = new ToolStripMenuItem();
this.AscendingToolStripMenuItem = new ToolStripMenuItem();
this.DescendingToolStripMenuItem = new ToolStripMenuItem();
this.DotNetBarTabcontrol1 = new DotNetBarTabcontrol();
this.TabPage1 = new TabPage();
this.PicturePlay = new PictureBox();
this.ListView1 = new ListView();
this.ContextMenuStrip2.SuspendLayout();
this.ContextMenuStrip1.SuspendLayout();
this.MenuStrip1.SuspendLayout();
this.DotNetBarTabcontrol1.SuspendLayout();
this.TabPage1.SuspendLayout();
((ISupportInitialize) this.PicturePlay).BeginInit();
this.SuspendLayout();
this.ContextMenuStrip2.Items.AddRange(new ToolStripItem[2]
{
(ToolStripItem) this.ReEnableAppToolStripMenuItem,
(ToolStripItem) this.ShowAppInLibraryAndProfilesToolStripMenuItem
});
this.ContextMenuStrip2.Name = "ContextMenuStrip2";
this.ContextMenuStrip2.Size = new Size(246, 48);
this.ReEnableAppToolStripMenuItem.Enabled = false;
this.ReEnableAppToolStripMenuItem.Name = "ReEnableAppToolStripMenuItem";
this.ReEnableAppToolStripMenuItem.Size = new Size(245, 22);
this.ReEnableAppToolStripMenuItem.Text = "Re-Enable App";
this.ReEnableAppToolStripMenuItem.Visible = false;
this.ShowAppInLibraryAndProfilesToolStripMenuItem.Name = "ShowAppInLibraryAndProfilesToolStripMenuItem";
this.ShowAppInLibraryAndProfilesToolStripMenuItem.Size = new Size(245, 22);
this.ShowAppInLibraryAndProfilesToolStripMenuItem.Text = "Show App in Library and Profiles";
this.ContextMenuStrip1.Items.AddRange(new ToolStripItem[13]
{
(ToolStripItem) this.ToolStripMenuItem3,
(ToolStripItem) this.ToolStripMenuItem2,
(ToolStripItem) this.ToolStripSeparator2,
(ToolStripItem) this.ToolStripMenuItem4,
(ToolStripItem) this.ToolStripMenuItem5,
(ToolStripItem) this.ToolStripMenuItem6,
(ToolStripItem) this.ToolStripSeparator3,
(ToolStripItem) this.ToolStripMenuItem7,
(ToolStripItem) this.ToolStripMenuItem8,
(ToolStripItem) this.ToolStripSeparator1,
(ToolStripItem) this.ToolStripMenuItem1,
(ToolStripItem) this.ToolStripMenuItem9,
(ToolStripItem) this.RemoveProfileToolStripMenuItem
});
this.ContextMenuStrip1.Name = "ContextMenuStrip1";
this.ContextMenuStrip1.Size = new Size(242, 242);
this.ToolStripMenuItem3.Image = (Image) OculusTrayTool.My.Resources.Resources.refresh_16;
this.ToolStripMenuItem3.Name = "ToolStripMenuItem3";
this.ToolStripMenuItem3.Size = new Size(241, 22);
this.ToolStripMenuItem3.Text = "Replace Icons";
this.ToolStripMenuItem3.Visible = false;
this.ToolStripMenuItem2.Image = (Image) OculusTrayTool.My.Resources.Resources.Icon_View;
this.ToolStripMenuItem2.Name = "ToolStripMenuItem2";
this.ToolStripMenuItem2.Size = new Size(241, 22);
this.ToolStripMenuItem2.Text = "Show Properties";
this.ToolStripSeparator2.Name = "ToolStripSeparator2";
this.ToolStripSeparator2.Size = new Size(238, 6);
this.ToolStripMenuItem4.Name = "ToolStripMenuItem4";
this.ToolStripMenuItem4.Size = new Size(241, 22);
this.ToolStripMenuItem4.Text = "Hide App in Library";
this.ToolStripMenuItem5.Name = "ToolStripMenuItem5";
this.ToolStripMenuItem5.Size = new Size(241, 22);
this.ToolStripMenuItem5.Text = "Hide App in Library and Profiles";
this.ToolStripMenuItem6.Name = "ToolStripMenuItem6";
this.ToolStripMenuItem6.Size = new Size(241, 22);
this.ToolStripMenuItem6.Text = "Ignore App";
this.ToolStripSeparator3.Name = "ToolStripSeparator3";
this.ToolStripSeparator3.Size = new Size(238, 6);
this.ToolStripMenuItem7.Image = (Image) componentResourceManager.GetObject("ToolStripMenuItem7.Image");
this.ToolStripMenuItem7.Name = "ToolStripMenuItem7";
this.ToolStripMenuItem7.Size = new Size(241, 22);
this.ToolStripMenuItem7.Text = "Launch App";
this.ToolStripMenuItem8.Name = "ToolStripMenuItem8";
this.ToolStripMenuItem8.Size = new Size(241, 22);
this.ToolStripMenuItem8.Text = "Launch App with options..";
this.ToolStripSeparator1.Name = "ToolStripSeparator1";
this.ToolStripSeparator1.Size = new Size(238, 6);
this.ToolStripMenuItem1.Image = (Image) OculusTrayTool.My.Resources.Resources.Icon_Edit;
this.ToolStripMenuItem1.Name = "ToolStripMenuItem1";
this.ToolStripMenuItem1.Size = new Size(241, 22);
this.ToolStripMenuItem1.Text = "Create Profile...";
this.ToolStripMenuItem9.Image = (Image) OculusTrayTool.My.Resources.Resources.Icon_Edit;
this.ToolStripMenuItem9.Name = "ToolStripMenuItem9";
this.ToolStripMenuItem9.Size = new Size(241, 22);
this.ToolStripMenuItem9.Text = "Edit Profile...";
this.RemoveProfileToolStripMenuItem.Image = (Image) OculusTrayTool.My.Resources.Resources.Icon_Delete;
this.RemoveProfileToolStripMenuItem.Name = "RemoveProfileToolStripMenuItem";
this.RemoveProfileToolStripMenuItem.Size = new Size(241, 22);
this.RemoveProfileToolStripMenuItem.Text = "Remove Profile";
this.ToolTip1.AutoPopDelay = 10000;
this.ToolTip1.InitialDelay = 200;
this.ToolTip1.ReshowDelay = 100;
this.GroupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.GroupBox1.Location = new Point(12, 30);
this.GroupBox1.Name = "GroupBox1";
this.GroupBox1.Size = new Size(1000, 5);
this.GroupBox1.TabIndex = 14;
this.GroupBox1.TabStop = false;
this.TextBox1.Location = new Point(68, 44);
this.TextBox1.Name = "TextBox1";
this.TextBox1.Size = new Size(149, 20);
this.TextBox1.TabIndex = 20;
this.Button2.FlatStyle = FlatStyle.Flat;
this.Button2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
this.Button2.ForeColor = Color.DodgerBlue;
this.Button2.Location = new Point(223, 43);
this.Button2.Name = "Button2";
this.Button2.Size = new Size(48, 22);
this.Button2.TabIndex = 21;
this.Button2.Text = "Go";
this.Button2.UseVisualStyleBackColor = true;
this.Label6.AutoSize = true;
this.Label6.Font = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
this.Label6.ForeColor = Color.DodgerBlue;
this.Label6.Location = new Point(13, 47);
this.Label6.Name = "Label6";
this.Label6.Size = new Size(49, 15);
this.Label6.TabIndex = 22;
this.Label6.Text = "Search:";
this.GroupBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
this.GroupBox2.Location = new Point(12, 71);
this.GroupBox2.Name = "GroupBox2";
this.GroupBox2.Size = new Size(1000, 5);
this.GroupBox2.TabIndex = 15;
this.GroupBox2.TabStop = false;
this.MenuStrip1.AutoSize = false;
this.MenuStrip1.BackColor = Color.Transparent;
this.MenuStrip1.Dock = DockStyle.None;
this.MenuStrip1.Items.AddRange(new ToolStripItem[2]
{
(ToolStripItem) this.OptionsToolStripMenuItem,
(ToolStripItem) this.SortingToolStripMenuItem
});
this.MenuStrip1.Location = new Point(9, 3);
this.MenuStrip1.Name = "MenuStrip1";
this.MenuStrip1.Size = new Size(152, 25);
this.MenuStrip1.TabIndex = 33;
this.MenuStrip1.Text = "MenuStrip1";
this.OptionsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[5]
{
(ToolStripItem) this.AddSteamVRToolStripMenuItem,
(ToolStripItem) this.ShowToolStripMenuItem,
(ToolStripItem) this.ShowRemoved3rdPartyAppsToolStripMenuItem,
(ToolStripItem) this.ShowIgnoredAppsToolStripMenuItem,
(ToolStripItem) this.RefreshLibraryToolStripMenuItem
});
this.OptionsToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem";
this.OptionsToolStripMenuItem.Size = new Size(61, 21);
this.OptionsToolStripMenuItem.Text = "Options";
this.AddSteamVRToolStripMenuItem.BackColor = Color.White;
this.AddSteamVRToolStripMenuItem.Enabled = false;
this.AddSteamVRToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.AddSteamVRToolStripMenuItem.Name = "AddSteamVRToolStripMenuItem";
this.AddSteamVRToolStripMenuItem.Size = new Size(236, 22);
this.AddSteamVRToolStripMenuItem.Text = "Add SteamVR";
this.ShowToolStripMenuItem.BackColor = Color.White;
this.ShowToolStripMenuItem.CheckOnClick = true;
this.ShowToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.ShowToolStripMenuItem.Name = "ShowToolStripMenuItem";
this.ShowToolStripMenuItem.Size = new Size(236, 22);
this.ShowToolStripMenuItem.Text = "Show Hidden 3rd Party Apps";
this.ShowRemoved3rdPartyAppsToolStripMenuItem.BackColor = Color.White;
this.ShowRemoved3rdPartyAppsToolStripMenuItem.CheckOnClick = true;
this.ShowRemoved3rdPartyAppsToolStripMenuItem.Enabled = false;
this.ShowRemoved3rdPartyAppsToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.ShowRemoved3rdPartyAppsToolStripMenuItem.Name = "ShowRemoved3rdPartyAppsToolStripMenuItem";
this.ShowRemoved3rdPartyAppsToolStripMenuItem.Size = new Size(236, 22);
this.ShowRemoved3rdPartyAppsToolStripMenuItem.Text = "Show Removed 3rd Party Apps";
this.ShowRemoved3rdPartyAppsToolStripMenuItem.Visible = false;
this.ShowIgnoredAppsToolStripMenuItem.BackColor = Color.White;
this.ShowIgnoredAppsToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.ShowIgnoredAppsToolStripMenuItem.Name = "ShowIgnoredAppsToolStripMenuItem";
this.ShowIgnoredAppsToolStripMenuItem.Size = new Size(236, 22);
this.ShowIgnoredAppsToolStripMenuItem.Text = "Show Ignored Apps";
this.RefreshLibraryToolStripMenuItem.BackColor = Color.White;
this.RefreshLibraryToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.RefreshLibraryToolStripMenuItem.Name = "RefreshLibraryToolStripMenuItem";
this.RefreshLibraryToolStripMenuItem.Size = new Size(236, 22);
this.RefreshLibraryToolStripMenuItem.Text = "Refresh Library";
this.SortingToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[2]
{
(ToolStripItem) this.AscendingToolStripMenuItem,
(ToolStripItem) this.DescendingToolStripMenuItem
});
this.SortingToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.SortingToolStripMenuItem.Name = "SortingToolStripMenuItem";
this.SortingToolStripMenuItem.Size = new Size(57, 21);
this.SortingToolStripMenuItem.Text = "Sorting";
this.AscendingToolStripMenuItem.BackColor = Color.White;
this.AscendingToolStripMenuItem.CheckOnClick = true;
this.AscendingToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.AscendingToolStripMenuItem.Name = "AscendingToolStripMenuItem";
this.AscendingToolStripMenuItem.Size = new Size(136, 22);
this.AscendingToolStripMenuItem.Text = "Ascending";
this.DescendingToolStripMenuItem.BackColor = Color.White;
this.DescendingToolStripMenuItem.CheckOnClick = true;
this.DescendingToolStripMenuItem.ForeColor = Color.DodgerBlue;
this.DescendingToolStripMenuItem.Name = "DescendingToolStripMenuItem";
this.DescendingToolStripMenuItem.Size = new Size(136, 22);
this.DescendingToolStripMenuItem.Text = "Descending";
this.DotNetBarTabcontrol1.Alignment = TabAlignment.Left;
this.DotNetBarTabcontrol1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
this.DotNetBarTabcontrol1.Controls.Add((Control) this.TabPage1);
this.DotNetBarTabcontrol1.ItemSize = new Size(43, 85);
this.DotNetBarTabcontrol1.Location = new Point(12, 82);
this.DotNetBarTabcontrol1.Multiline = true;
this.DotNetBarTabcontrol1.Name = "DotNetBarTabcontrol1";
this.DotNetBarTabcontrol1.SelectedIndex = 0;
this.DotNetBarTabcontrol1.Size = new Size(1011, 488);
this.DotNetBarTabcontrol1.SizeMode = TabSizeMode.Fixed;
this.DotNetBarTabcontrol1.TabIndex = 24;
this.TabPage1.BackColor = Color.White;
this.TabPage1.Controls.Add((Control) this.PicturePlay);
this.TabPage1.Controls.Add((Control) this.ListView1);
this.TabPage1.Location = new Point(89, 4);
this.TabPage1.Name = "TabPage1";
this.TabPage1.Padding = new Padding(3);
this.TabPage1.Size = new Size(918, 480);
this.TabPage1.TabIndex = 0;
this.TabPage1.Text = "Library";
this.PicturePlay.Anchor = AnchorStyles.Top | AnchorStyles.Right;
this.PicturePlay.BackColor = Color.Transparent;
this.PicturePlay.BackgroundImageLayout = ImageLayout.None;
this.PicturePlay.ContextMenuStrip = this.ContextMenuStrip1;
this.PicturePlay.Location = new Point(683, 0);
this.PicturePlay.Name = "PicturePlay";
this.PicturePlay.Size = new Size(250, 90);
this.PicturePlay.TabIndex = 1;
this.PicturePlay.TabStop = false;
this.PicturePlay.Visible = false;
this.ListView1.BorderStyle = BorderStyle.None;
this.ListView1.ContextMenuStrip = this.ContextMenuStrip2;
this.ListView1.Dock = DockStyle.Fill;
this.ListView1.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
this.ListView1.ForeColor = Color.DodgerBlue;
this.ListView1.HideSelection = false;
this.ListView1.Location = new Point(3, 3);
this.ListView1.MultiSelect = false;
this.ListView1.Name = "ListView1";
this.ListView1.Size = new Size(912, 474);
this.ListView1.TabIndex = 3;
this.ListView1.UseCompatibleStateImageBehavior = false;
this.AutoScaleDimensions = new SizeF(6f, 13f);
this.AutoScaleMode = AutoScaleMode.Font;
this.BackColor = Color.White;
this.ClientSize = new Size(1024, 584);
this.Controls.Add((Control) this.MenuStrip1);
this.Controls.Add((Control) this.DotNetBarTabcontrol1);
this.Controls.Add((Control) this.GroupBox2);
this.Controls.Add((Control) this.Label6);
this.Controls.Add((Control) this.Button2);
this.Controls.Add((Control) this.TextBox1);
this.Controls.Add((Control) this.GroupBox1);
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
this.MainMenuStrip = this.MenuStrip1;
this.MinimumSize = new Size(1040, 623);
this.Name = nameof (frmLibrary);
this.ShowIcon = false;
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Game Library";
this.ContextMenuStrip2.ResumeLayout(false);
this.ContextMenuStrip1.ResumeLayout(false);
this.MenuStrip1.ResumeLayout(false);
this.MenuStrip1.PerformLayout();
this.DotNetBarTabcontrol1.ResumeLayout(false);
this.TabPage1.ResumeLayout(false);
((ISupportInitialize) this.PicturePlay).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
internal virtual ListView ListView1
{
get => this._ListView1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
MouseEventHandler mouseEventHandler = new MouseEventHandler(this.ListView1_MouseMove);
ListView listView1_1 = this._ListView1;
if (listView1_1 != null)
listView1_1.MouseMove -= mouseEventHandler;
this._ListView1 = value;
ListView listView1_2 = this._ListView1;
if (listView1_2 == null)
return;
listView1_2.MouseMove += mouseEventHandler;
}
}
[field: AccessedThroughProperty("ToolTip1")]
internal virtual ToolTip ToolTip1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ContextMenuStrip ContextMenuStrip1
{
get => this._ContextMenuStrip1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
CancelEventHandler cancelEventHandler = new CancelEventHandler(this.ContextMenuStrip1_Opening);
EventHandler eventHandler = new EventHandler(this.ContextMenuStrip1_MouseLeave);
ContextMenuStrip contextMenuStrip1_1 = this._ContextMenuStrip1;
if (contextMenuStrip1_1 != null)
{
contextMenuStrip1_1.Opening -= cancelEventHandler;
contextMenuStrip1_1.MouseLeave -= eventHandler;
}
this._ContextMenuStrip1 = value;
ContextMenuStrip contextMenuStrip1_2 = this._ContextMenuStrip1;
if (contextMenuStrip1_2 == null)
return;
contextMenuStrip1_2.Opening += cancelEventHandler;
contextMenuStrip1_2.MouseLeave += eventHandler;
}
}
[field: AccessedThroughProperty("ToolStripMenuItem3")]
internal virtual ToolStripMenuItem ToolStripMenuItem3 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem ToolStripMenuItem2
{
get => this._ToolStripMenuItem2;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem2_Click);
ToolStripMenuItem toolStripMenuItem2_1 = this._ToolStripMenuItem2;
if (toolStripMenuItem2_1 != null)
toolStripMenuItem2_1.Click -= eventHandler;
this._ToolStripMenuItem2 = value;
ToolStripMenuItem toolStripMenuItem2_2 = this._ToolStripMenuItem2;
if (toolStripMenuItem2_2 == null)
return;
toolStripMenuItem2_2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem4
{
get => this._ToolStripMenuItem4;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem4_Click);
ToolStripMenuItem toolStripMenuItem4_1 = this._ToolStripMenuItem4;
if (toolStripMenuItem4_1 != null)
toolStripMenuItem4_1.Click -= eventHandler;
this._ToolStripMenuItem4 = value;
ToolStripMenuItem toolStripMenuItem4_2 = this._ToolStripMenuItem4;
if (toolStripMenuItem4_2 == null)
return;
toolStripMenuItem4_2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem7
{
get => this._ToolStripMenuItem7;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem7_Click);
ToolStripMenuItem toolStripMenuItem7_1 = this._ToolStripMenuItem7;
if (toolStripMenuItem7_1 != null)
toolStripMenuItem7_1.Click -= eventHandler;
this._ToolStripMenuItem7 = value;
ToolStripMenuItem toolStripMenuItem7_2 = this._ToolStripMenuItem7;
if (toolStripMenuItem7_2 == null)
return;
toolStripMenuItem7_2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem8
{
get => this._ToolStripMenuItem8;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem8_Click);
ToolStripMenuItem toolStripMenuItem8_1 = this._ToolStripMenuItem8;
if (toolStripMenuItem8_1 != null)
toolStripMenuItem8_1.Click -= eventHandler;
this._ToolStripMenuItem8 = value;
ToolStripMenuItem toolStripMenuItem8_2 = this._ToolStripMenuItem8;
if (toolStripMenuItem8_2 == null)
return;
toolStripMenuItem8_2.Click += eventHandler;
}
}
internal virtual PictureBox PicturePlay
{
get => this._PicturePlay;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
MouseEventHandler mouseEventHandler = new MouseEventHandler(this.PicturePlay_MouseUp);
PictureBox picturePlay1 = this._PicturePlay;
if (picturePlay1 != null)
picturePlay1.MouseUp -= mouseEventHandler;
this._PicturePlay = value;
PictureBox picturePlay2 = this._PicturePlay;
if (picturePlay2 == null)
return;
picturePlay2.MouseUp += mouseEventHandler;
}
}
internal virtual ContextMenuStrip ContextMenuStrip2
{
get => this._ContextMenuStrip2;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
CancelEventHandler cancelEventHandler = new CancelEventHandler(this.ContextMenuStrip2_Opening);
ContextMenuStrip contextMenuStrip2_1 = this._ContextMenuStrip2;
if (contextMenuStrip2_1 != null)
contextMenuStrip2_1.Opening -= cancelEventHandler;
this._ContextMenuStrip2 = value;
ContextMenuStrip contextMenuStrip2_2 = this._ContextMenuStrip2;
if (contextMenuStrip2_2 == null)
return;
contextMenuStrip2_2.Opening += cancelEventHandler;
}
}
[field: AccessedThroughProperty("ReEnableAppToolStripMenuItem")]
internal virtual ToolStripMenuItem ReEnableAppToolStripMenuItem { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("GroupBox1")]
internal virtual GroupBox GroupBox1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual TextBox TextBox1
{
get => this._TextBox1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
KeyEventHandler keyEventHandler = new KeyEventHandler(this.TextBox1_KeyDown);
TextBox textBox1_1 = this._TextBox1;
if (textBox1_1 != null)
textBox1_1.KeyDown -= keyEventHandler;
this._TextBox1 = value;
TextBox textBox1_2 = this._TextBox1;
if (textBox1_2 == null)
return;
textBox1_2.KeyDown += keyEventHandler;
}
}
internal virtual Button Button2
{
get => this._Button2;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.Button2_Click);
Button button2_1 = this._Button2;
if (button2_1 != null)
button2_1.Click -= eventHandler;
this._Button2 = value;
Button button2_2 = this._Button2;
if (button2_2 == null)
return;
button2_2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("Label6")]
internal virtual Label Label6 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem ToolStripMenuItem1
{
get => this._ToolStripMenuItem1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem1_Click);
ToolStripMenuItem toolStripMenuItem1_1 = this._ToolStripMenuItem1;
if (toolStripMenuItem1_1 != null)
toolStripMenuItem1_1.Click -= eventHandler;
this._ToolStripMenuItem1 = value;
ToolStripMenuItem toolStripMenuItem1_2 = this._ToolStripMenuItem1;
if (toolStripMenuItem1_2 == null)
return;
toolStripMenuItem1_2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem9
{
get => this._ToolStripMenuItem9;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem9_Click);
ToolStripMenuItem toolStripMenuItem9_1 = this._ToolStripMenuItem9;
if (toolStripMenuItem9_1 != null)
toolStripMenuItem9_1.Click -= eventHandler;
this._ToolStripMenuItem9 = value;
ToolStripMenuItem toolStripMenuItem9_2 = this._ToolStripMenuItem9;
if (toolStripMenuItem9_2 == null)
return;
toolStripMenuItem9_2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("ToolStripSeparator1")]
internal virtual ToolStripSeparator ToolStripSeparator1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("ToolStripSeparator2")]
internal virtual ToolStripSeparator ToolStripSeparator2 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("GroupBox2")]
internal virtual GroupBox GroupBox2 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem ShowAppInLibraryAndProfilesToolStripMenuItem
{
get => this._ShowAppInLibraryAndProfilesToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ShowAppInLibraryAndProfilesToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._ShowAppInLibraryAndProfilesToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._ShowAppInLibraryAndProfilesToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._ShowAppInLibraryAndProfilesToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("DotNetBarTabcontrol1")]
internal virtual DotNetBarTabcontrol DotNetBarTabcontrol1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("TabPage1")]
internal virtual TabPage TabPage1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("MenuStrip1")]
internal virtual MenuStrip MenuStrip1 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("OptionsToolStripMenuItem")]
internal virtual ToolStripMenuItem OptionsToolStripMenuItem { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem AddSteamVRToolStripMenuItem
{
get => this._AddSteamVRToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.AddSteamVRToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._AddSteamVRToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._AddSteamVRToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._AddSteamVRToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ShowToolStripMenuItem
{
get => this._ShowToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ShowToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._ShowToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._ShowToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._ShowToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("ShowRemoved3rdPartyAppsToolStripMenuItem")]
internal virtual ToolStripMenuItem ShowRemoved3rdPartyAppsToolStripMenuItem { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
[field: AccessedThroughProperty("SortingToolStripMenuItem")]
internal virtual ToolStripMenuItem SortingToolStripMenuItem { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem AscendingToolStripMenuItem
{
get => this._AscendingToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.AscendingToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._AscendingToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._AscendingToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._AscendingToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem DescendingToolStripMenuItem
{
get => this._DescendingToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.DescendingToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._DescendingToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._DescendingToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._DescendingToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem RefreshLibraryToolStripMenuItem
{
get => this._RefreshLibraryToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.RefreshLibraryToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._RefreshLibraryToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._RefreshLibraryToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._RefreshLibraryToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ShowIgnoredAppsToolStripMenuItem
{
get => this._ShowIgnoredAppsToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ShowIgnoredAppsToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._ShowIgnoredAppsToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._ShowIgnoredAppsToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._ShowIgnoredAppsToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem5
{
get => this._ToolStripMenuItem5;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem5_Click);
ToolStripMenuItem toolStripMenuItem5_1 = this._ToolStripMenuItem5;
if (toolStripMenuItem5_1 != null)
toolStripMenuItem5_1.Click -= eventHandler;
this._ToolStripMenuItem5 = value;
ToolStripMenuItem toolStripMenuItem5_2 = this._ToolStripMenuItem5;
if (toolStripMenuItem5_2 == null)
return;
toolStripMenuItem5_2.Click += eventHandler;
}
}
internal virtual ToolStripMenuItem ToolStripMenuItem6
{
get => this._ToolStripMenuItem6;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.ToolStripMenuItem6_Click);
ToolStripMenuItem toolStripMenuItem6_1 = this._ToolStripMenuItem6;
if (toolStripMenuItem6_1 != null)
toolStripMenuItem6_1.Click -= eventHandler;
this._ToolStripMenuItem6 = value;
ToolStripMenuItem toolStripMenuItem6_2 = this._ToolStripMenuItem6;
if (toolStripMenuItem6_2 == null)
return;
toolStripMenuItem6_2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("ToolStripSeparator3")]
internal virtual ToolStripSeparator ToolStripSeparator3 { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
internal virtual ToolStripMenuItem RemoveProfileToolStripMenuItem
{
get => this._RemoveProfileToolStripMenuItem;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.RemoveProfileToolStripMenuItem_Click);
ToolStripMenuItem toolStripMenuItem1 = this._RemoveProfileToolStripMenuItem;
if (toolStripMenuItem1 != null)
toolStripMenuItem1.Click -= eventHandler;
this._RemoveProfileToolStripMenuItem = value;
ToolStripMenuItem toolStripMenuItem2 = this._RemoveProfileToolStripMenuItem;
if (toolStripMenuItem2 == null)
return;
toolStripMenuItem2.Click += eventHandler;
}
}
[field: AccessedThroughProperty("Client")]
private virtual WebClient Client { get; [MethodImpl(MethodImplOptions.Synchronized)] set; }
private static string ByteArrayToString(byte[] ba)
{
return BitConverter.ToString(ba).Replace("-", "");
}
private static byte[] GetBytes(SQLiteDataReader reader)
{
byte[] buffer = new byte[2048];
long fieldOffset = 0;
using (MemoryStream memoryStream = new MemoryStream())
{
long target;
while (frmLibrary.InlineAssignHelper<long>(ref target, reader.GetBytes(0, fieldOffset, buffer, 0, buffer.Length)) > 0L)
{
memoryStream.Write(buffer, 0, checked ((int) target));
checked { fieldOffset += target; }
}
return memoryStream.ToArray();
}
}
private static T InlineAssignHelper<T>(ref T target, T value)
{
target = value;
return value;
}
public static void SetDoubleBuffering(Control control, bool value)
{
typeof (Control).GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic).SetValue((object) control, (object) value, (object[]) null);
}
private void GetOculusLibrary(string p)
{
frmLibrary.SetDoubleBuffering((Control) this.ListView1, true);
this.PicturePlay.Visible = false;
if (Globals.dbg)
Log.WriteToLog("Entering GetOculusLibrary");
if (System.IO.File.Exists(Application.StartupPath + "\\data.sqlite"))
{
if (Globals.dbg)
Log.WriteToLog("Opening database copy");
try
{
if (this.cnn.State == ConnectionState.Closed)
{
this.cnn = new SQLiteConnection("Data Source=" + Application.StartupPath + "\\data.sqlite");
this.cnn.Open();
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
Exception exception = ex;
Log.WriteToLog("Failed to open database copy: " + exception.Message);
int num = (int) Interaction.MsgBox((object) ("Failed to open database copy: " + exception.Message), MsgBoxStyle.Critical, (object) "Error opening database");
FrmMain.fmain.AddToListboxAndScroll("Failed to open database copy: " + exception.Message);
MyProject.Forms.FrmMain.hasError = true;
ProjectData.ClearProjectError();
return;
}
if (Globals.dbg)
Log.WriteToLog("Parsing Manifests in " + p);
SQLiteCommand sqLiteCommand = new SQLiteCommand(this.cnn);
this.ListView1.BeginUpdate();
string[] files = Directory.GetFiles(p, "*.mini");
int index1 = 0;
while (index1 < files.Length)
{
string path = files[index1];
JObject jobject = JObject.Parse(System.IO.File.ReadAllText(path));
string str1 = p.Replace("\\Manifests", "") + "\\Software";
string str2 = jobject.SelectToken("canonicalName").ToString();
string Left = jobject.SelectToken("appId").ToString();
string str3 = str1 + "\\" + str2 + "\\" + jobject.SelectToken("launchFile").ToString().Replace("/", "\\");
string str4 = MySettingsProperty.Settings.OculusPath.TrimEnd('\\') + "\\CoreData\\Software\\StoreAssets\\" + str2 + "_assets";
string str5 = str4 + "\\small_landscape_image.jpg";
if (!System.IO.File.Exists(str5))
{
Log.WriteToLog("Could not find game icon '" + str5 + "', looking in the other library paths");
string[] strArray = Strings.Split(MySettingsProperty.Settings.LibraryPath, ",");
int index2 = 0;
while (index2 < strArray.Length)
{
str4 = strArray[index2].TrimEnd('\\') + "\\Software\\StoreAssets\\" + str2 + "_assets";
str5 = str4 + "\\small_landscape_image.jpg";
if (System.IO.File.Exists(str5))
{
Log.WriteToLog("Found game icon at '" + str5 + "'");
break;
}
checked { ++index2; }
}
}
if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(Left, "", false) != 0)
{
StringBuilder stringBuilder = new StringBuilder();
try
{
sqLiteCommand.CommandText = "Select value from Objects WHERE hashkey='" + Left + "' AND typename='Application'";
using (SQLiteDataReader reader = sqLiteCommand.ExecuteReader())
{
if (reader.HasRows)
{
while (reader.Read())
{
byte[] bytes = frmLibrary.GetBytes(reader);
stringBuilder.Append(Encoding.Default.GetString(bytes));
}
}
else
goto label_44;
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
Exception exception = ex;
Log.WriteToLog("Failed to read database entry for appId '" + Left + "': " + exception.Message);
FrmMain.fmain.AddToListboxAndScroll("Failed to read database entry for appId '" + Left + "': " + exception.Message);
MyProject.Forms.FrmMain.hasError = true;
ProjectData.ClearProjectError();
return;
}
string str6 = Regex.Replace(stringBuilder.ToString(), "[^A-Za-z0-9\\-/]", ":").Replace(":::", ":").Replace("::", ":");
string str7 = "display:name::";
string str8 = Conversions.ToInteger(MyProject.Forms.FrmMain.OculusAppVersion) < 118 ? ":grouping" : ":display:short:description";
int num1 = str6.IndexOf(str7);
int num2 = str6.IndexOf(str8);
if (num1 > -1 && num2 > -1)
{
string str9 = Strings.Mid(str6, checked (num1 + str7.Length + 1), checked (num2 - num1 - str7.Length)).Replace(":", " ").TrimEnd(':').TrimEnd(' ');
string text = str9.Remove(checked (str9.Length - 1));
if (this.ListView1.FindItemWithText(text) == null)
{
if (System.IO.File.Exists(str5))
{
using (Image image = Image.FromFile(str5))
this.imageListLarge.Images.Add(str3, image);
}
else
this.imageListLarge.Images.Add(str3, (Image) OculusTrayTool.My.Resources.Resources.removed_app);
this.ListView1.Items.Add(new ListViewItem(text, str3)
{