-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainForm.Menu.cs
More file actions
633 lines (557 loc) · 25.8 KB
/
Copy pathMainForm.Menu.cs
File metadata and controls
633 lines (557 loc) · 25.8 KB
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
#nullable enable
using RALogicEditor.Forms;
using RALogicEditor.Models;
using RALogicEditor.Parsers;
using RALogicEditor.Services;
using RALogicEditor.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace RALogicEditor
{
public partial class MainForm
{
#region File Menu
private void openToolStripMenuItem_Click(object? sender, EventArgs e)
{
if (!ConfirmDiscardChanges()) return;
using var ofd = new OpenFileDialog { Filter = "JSON Files (*.json)|*.json|Text Files (*.txt)|*.txt|All Files (*.*)|*.*" };
if (ofd.ShowDialog() == DialogResult.OK)
{
// Clear search when opening a new file to prevent confusion
txtAssetSearch.Text = "";
LoadFiles(ofd.FileName);
}
}
private void saveToolStripMenuItem_Click(object? sender, EventArgs e)
{
if (_projectRepo.LocalData == null && _projectRepo.ServerData == null) return;
codeNoteEditor.CommitChanges();
// Determine Path
string savePath = _currentUserFilePath;
if (string.IsNullOrEmpty(savePath) && !string.IsNullOrEmpty(_currentFilePath))
{
string dir = Path.GetDirectoryName(_currentFilePath) ?? "";
string fileName = Path.GetFileNameWithoutExtension(_currentFilePath);
if (fileName.EndsWith("-Notes")) fileName = fileName.Substring(0, fileName.Length - 6);
savePath = Path.Combine(dir, $"{fileName}-User.txt");
}
if (string.IsNullOrEmpty(savePath))
{
using var sfd = new SaveFileDialog { Filter = "Text Files (*.txt)|*.txt" };
if (sfd.ShowDialog() != DialogResult.OK) return;
savePath = sfd.FileName;
}
// Create Auto-Backup (.bak)
try
{
if (File.Exists(savePath))
{
string fileName = Path.GetFileName(savePath);
string gameIdStr = new string(fileName.TakeWhile(char.IsDigit).ToArray());
string backupRoot = Path.Combine(Application.StartupPath, "Backups");
string gameBackupDir = string.IsNullOrEmpty(gameIdStr) ? backupRoot : Path.Combine(backupRoot, gameIdStr);
if (!Directory.Exists(gameBackupDir)) Directory.CreateDirectory(gameBackupDir);
string timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
File.Copy(savePath, Path.Combine(gameBackupDir, $"{fileName}.{timestamp}.bak"), true);
}
}
catch { }
// Save via Serializer
try
{
_projectRepo.EnsureLocalDataExists();
string fileContent = _fileSerializer.Serialize(
_projectRepo.ServerData?.Title ?? "Game Title",
_projectRepo.LocalData,
_projectRepo.GetMergedList<RaAchievement>(false),
_projectRepo.GetMergedList<RaLeaderboard>(true),
_projectRepo
);
File.WriteAllText(savePath, fileContent);
_currentUserFilePath = savePath;
_projectRepo.SaveRichPresence();
_projectRepo.Metadata.Save();
// Reset session dirty flag
_isDirty = false;
MessageBox.Show("Saved to " + savePath);
}
catch (Exception ex) { MessageBox.Show($"Error saving: {ex.Message}"); }
}
private void UpdateRecentMenu()
{
recentToolStripMenuItem.DropDownItems.Clear();
foreach (var entry in _recentFiles.Files)
{
string text = string.IsNullOrEmpty(entry.GameTitle) ? entry.Path : $"{entry.GameTitle} | {entry.Path}";
var item = new ToolStripMenuItem(text);
string path = entry.Path;
item.Click += (s, args) =>
{
if (ConfirmDiscardChanges())
{
// Clear search when loading from recent too
txtAssetSearch.Text = "";
LoadFiles(path);
}
};
recentToolStripMenuItem.DropDownItems.Add(item);
}
}
#endregion
#region Asset Actions (New, Clone, Delete, Move)
private void NewAsset_Click(object? sender, EventArgs e)
{
_projectRepo.EnsureLocalDataExists();
PushMainUndo();
// Auto-increment ID based on highest existing LOCAL ID, not visual grid
int newId = 111000001;
if (_projectRepo.LocalData != null)
{
var localIds = _projectRepo.LocalData.Achievements.Select(a => a.ID)
.Concat(_projectRepo.LocalData.Leaderboards.Select(l => l.ID))
.ToList();
if (localIds.Any())
{
int max = localIds.Max();
newId = (max < 111000000) ? 111000001 : max + 1;
}
}
bool leaderboard = cmbAssetType.SelectedIndex == 1;
if (leaderboard)
{
_projectRepo.LocalData!.Leaderboards.Add(new RaLeaderboard { ID = newId, Title = "New Leaderboard", State = AssetState.Local, Category = "Local" });
}
else
{
_projectRepo.LocalData!.Achievements.Add(new RaAchievement { ID = newId, Title = "New Achievement", State = AssetState.Local, Category = "Local" });
}
if (cmbSource.SelectedItem?.ToString() != "New") cmbSource.SelectedItem = "New";
_isDirty = true;
ReloadDataView();
// Select the newly created item
foreach (DataGridViewRow row in achievementGrid.Rows)
{
if (row.Tag is IAssetItem item && item.ID == newId)
{
row.Selected = true;
LoadSelectedAsset();
break;
}
}
}
private void DuplicateAsset_Click(object? sender, EventArgs e)
{
if (achievementGrid.SelectedRows.Count == 0) return;
_projectRepo.EnsureLocalDataExists();
PushMainUndo();
var selectedRows = achievementGrid.SelectedRows.Cast<DataGridViewRow>().Where(r => r.Tag is IAssetItem).OrderBy(r => r.Index).ToList();
// FIX: Auto-increment ID based on highest existing LOCAL ID, not visual grid
int nextId = 111000001;
if (_projectRepo.LocalData != null)
{
var localIds = _projectRepo.LocalData.Achievements.Select(a => a.ID)
.Concat(_projectRepo.LocalData.Leaderboards.Select(l => l.ID))
.ToList();
if (localIds.Any())
{
int max = localIds.Max();
nextId = (max >= 111000000) ? max + 1 : 111000001;
}
}
List<int> newIds = new List<int>();
foreach (var row in selectedRows)
{
if (row.Tag is IAssetItem source)
{
if (source is RaAchievement ra)
{
var c = ra.Clone(); c.Title += " (Copy)"; c.ID = nextId++; c.State = AssetState.Local; c.Category = "Local";
_projectRepo.LocalData!.Achievements.Add(c); newIds.Add(c.ID);
}
else if (source is RaLeaderboard rl)
{
var c = rl.Clone(); c.Title += " (Copy)"; c.ID = nextId++; c.State = AssetState.Local; c.Category = "Local";
_projectRepo.LocalData!.Leaderboards.Add(c); newIds.Add(c.ID);
}
}
}
cmbSource.SelectedItem = "New";
_isDirty = true;
ReloadDataView();
achievementGrid.ClearSelection();
List<int> indicesToSelect = new List<int>();
foreach (DataGridViewRow row in achievementGrid.Rows)
{
if (row.Tag is IAssetItem item && newIds.Contains(item.ID)) indicesToSelect.Add(row.Index);
}
if (indicesToSelect.Count > 0)
{
achievementGrid.CurrentCell = achievementGrid.Rows[indicesToSelect.Min()].Cells[0];
foreach (int idx in indicesToSelect) achievementGrid.Rows[idx].Selected = true;
}
}
private void DeleteAsset_Click(object? sender, EventArgs e)
{
if (achievementGrid.SelectedRows.Count == 0 || _projectRepo.LocalData == null) return;
PushMainUndo();
foreach (DataGridViewRow row in achievementGrid.SelectedRows)
{
if (row.Tag is IAssetItem item && item.State == AssetState.Local)
{
if (item is RaAchievement ra) _projectRepo.LocalData.Achievements.Remove(ra);
else if (item is RaLeaderboard rl) _projectRepo.LocalData.Leaderboards.Remove(rl);
}
}
_isDirty = true;
ReloadDataView();
}
private void ResetAsset_Click(object? sender, EventArgs e)
{
if (achievementGrid.SelectedRows.Count == 0 || _projectRepo.LocalData == null) return;
PushMainUndo();
foreach (DataGridViewRow row in achievementGrid.SelectedRows)
{
if (row.Tag is IAssetItem item && item.State == AssetState.Modified)
{
if (item is RaAchievement ra)
{
var loc = _projectRepo.LocalData.Achievements.FirstOrDefault(x => x.ID == ra.ID);
if (loc != null) _projectRepo.LocalData.Achievements.Remove(loc);
}
else if (item is RaLeaderboard rl)
{
var loc = _projectRepo.LocalData.Leaderboards.FirstOrDefault(x => x.ID == rl.ID);
if (loc != null) _projectRepo.LocalData.Leaderboards.Remove(loc);
}
}
}
_isDirty = true;
ReloadDataView();
LoadSelectedAsset();
}
private void MoveAssetUp_Click(object? sender, EventArgs e) => MoveAsset(-1);
private void MoveAssetDown_Click(object? sender, EventArgs e) => MoveAsset(1);
private void MoveAsset(int direction)
{
if (achievementGrid.SelectedRows.Count == 0 || _projectRepo.LocalData == null) return;
var allRows = achievementGrid.Rows.Cast<DataGridViewRow>().OrderBy(r => r.Index).ToList();
if (allRows.Count == 0) return;
var selectedIndices = achievementGrid.SelectedRows.Cast<DataGridViewRow>()
.Select(r => r.Index)
.OrderBy(i => i)
.ToList();
if (direction < 0 && selectedIndices.Min() == 0) return;
if (direction > 0 && selectedIndices.Max() >= allRows.Count - 1) return;
// Only local items can be reordered
foreach (int idx in selectedIndices)
{
if (allRows[idx].Tag is IAssetItem item && item.State != AssetState.Local) return;
}
PushMainUndo();
// Extract items in current visual order
var workingList = allRows.Select(r => r.Tag as IAssetItem).ToList();
// Move logic on the list directly
if (direction < 0) // Up
{
foreach (int idx in selectedIndices)
{
var item = workingList[idx];
workingList.RemoveAt(idx);
workingList.Insert(idx - 1, item);
}
}
else // Down
{
for (int i = selectedIndices.Count - 1; i >= 0; i--)
{
int idx = selectedIndices[i];
var item = workingList[idx];
workingList.RemoveAt(idx);
workingList.Insert(idx + 1, item);
}
}
// Reconstruct LocalData lists sequentially based on the new visual order
// This renumbers all local IDs to ensure they stay sorted in the file
var localItemsInOrder = workingList.Where(x => x != null && x.State == AssetState.Local).ToList();
_projectRepo.LocalData.Achievements.Clear();
_projectRepo.LocalData.Leaderboards.Clear();
int currentId = 111000001;
foreach (var item in localItemsInOrder)
{
if (item == null) continue;
item.ID = currentId++;
if (item.IsLeaderboard && item is RaLeaderboard lb)
_projectRepo.LocalData.Leaderboards.Add(lb);
else if (item is RaAchievement ach)
_projectRepo.LocalData.Achievements.Add(ach);
}
_isDirty = true;
ReloadDataView();
// Restore Selection (based on Object Reference, not ID)
achievementGrid.ClearSelection();
var objectsToSelect = new HashSet<IAssetItem>();
foreach (int idx in selectedIndices)
{
if (allRows[idx].Tag is IAssetItem it) objectsToSelect.Add(it);
}
List<int> newIndices = new List<int>();
foreach (DataGridViewRow row in achievementGrid.Rows)
{
if (row.Tag is IAssetItem item && objectsToSelect.Contains(item))
{
newIndices.Add(row.Index);
}
}
if (newIndices.Count > 0)
{
achievementGrid.CurrentCell = achievementGrid.Rows[newIndices.Min()].Cells[0];
foreach (int idx in newIndices) achievementGrid.Rows[idx].Selected = true;
}
}
private void RestoreOrder_Click(object? sender, EventArgs e)
{
// Remove sort glyphs to indicate default natural order
foreach (DataGridViewColumn col in achievementGrid.Columns)
{
col.HeaderCell.SortGlyphDirection = SortOrder.None;
}
// Reload will clear rows and re-add them in natural order natively from the File
ReloadDataView();
}
private void RenumberLocalIDs_Click(object? sender, EventArgs e)
{
if (_projectRepo.LocalData == null) return;
bool hasLocal = _projectRepo.LocalData.Achievements.Any() || _projectRepo.LocalData.Leaderboards.Any();
if (!hasLocal) return;
PushMainUndo();
int currentId = 111000001;
foreach (var ach in _projectRepo.LocalData.Achievements) ach.ID = currentId++;
foreach (var lb in _projectRepo.LocalData.Leaderboards) lb.ID = currentId++;
_isDirty = true;
ReloadDataView();
}
#endregion
#region Tools & View Options
private void viewDiffToolStripMenuItem_Click(object? sender, EventArgs e)
{
if (achievementGrid.SelectedRows.Count != 1) return;
var row = achievementGrid.SelectedRows[0];
if (row.Tag is IAssetItem localItem && localItem.State == AssetState.Modified)
{
if (_projectRepo.ServerData == null) return;
IAssetItem? serverItem = null;
foreach (var s in _projectRepo.ServerData.Sets)
{
if (localItem.IsLeaderboard) serverItem = s.Leaderboards.FirstOrDefault(x => x.ID == localItem.ID);
else serverItem = s.Achievements.FirstOrDefault(x => x.ID == localItem.ID);
if (serverItem != null) break;
}
if (serverItem != null)
{
using (var diff = new AssetDiffForm(serverItem, localItem)) diff.ShowDialog();
}
}
}
private void RevertRegion_Click(object? sender, EventArgs e)
{
var regions = new HashSet<string>();
var selectedAssets = achievementGrid.SelectedRows.Cast<DataGridViewRow>()
.Select(r => r.Tag as IAssetItem).Where(a => a != null).ToList();
if (selectedAssets.Count == 0) return;
foreach (var asset in selectedAssets)
{
IAssetStrategy strategy = asset!.IsLeaderboard ? new LeaderboardStrategy() : new AchievementStrategy();
var segments = strategy.ParseLogic(asset.Logic);
foreach (var groupList in segments.Values)
{
_projectRepo.Metadata.ApplyNamesToAsset(asset.ID, groupList);
foreach (var g in groupList)
{
var match = Regex.Match(g.GroupName, @"\((.*?)\)");
if (match.Success) regions.Add(match.Groups[1].Value);
}
}
}
if (regions.Count == 0) { MessageBox.Show("No region-specific groups found."); return; }
using (var form = new RevertRegionForm(regions.ToList()))
{
if (form.ShowDialog() != DialogResult.OK) return;
string targetRegion = form.SelectedRegion;
PushMainUndo();
int count = 0;
foreach (var item in selectedAssets)
{
EnsureAssetIsLocal(item!);
IAssetItem? localItem = item!.IsLeaderboard
? _projectRepo.LocalData!.Leaderboards.FirstOrDefault(x => x.ID == item.ID)
: _projectRepo.LocalData!.Achievements.FirstOrDefault(x => x.ID == item.ID);
if (localItem == null) continue;
IAssetStrategy strategy = localItem.IsLeaderboard ? new LeaderboardStrategy() : new AchievementStrategy();
var segments = strategy.ParseLogic(localItem.Logic);
bool modified = false;
foreach (var segKey in segments.Keys.ToList())
{
var groups = segments[segKey];
_projectRepo.Metadata.ApplyNamesToAsset(localItem.ID, groups);
var targetGroup = groups.FirstOrDefault(g => g.GroupName.Contains($"({targetRegion})"));
if (targetGroup != null)
{
while (targetGroup.Conditions.Count > 0 && targetGroup.Conditions[0].Flag == "Pause If")
targetGroup.Conditions.RemoveAt(0);
var newCore = new AchievementConditionGroup { GroupName = "Core", Conditions = targetGroup.Conditions };
segments[segKey] = new List<AchievementConditionGroup> { newCore };
modified = true;
_projectRepo.Metadata.UpdateAssetGroups(localItem.ID, segments[segKey]);
}
}
if (modified)
{
localItem.Logic = strategy.BuildLogic(segments);
count++;
}
}
_isDirty = true;
ReloadDataView();
if (_selectedAsset != null) LoadSelectedAsset();
MessageBox.Show($"Reverted {count} assets to {targetRegion}.");
}
}
private void RevertRichPresence_Click(object? sender, EventArgs e)
{
if (_rpMetadata.CurrentBackup == null) { MessageBox.Show("No backup found."); return; }
if (MessageBox.Show($"Revert to state from {_rpMetadata.CurrentBackup.Timestamp}?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
try
{
_projectRepo.RichPresence = RichPresenceParser.Parse(_rpMetadata.CurrentBackup.OriginalScript);
_isDirty = true;
MessageBox.Show("Reverted.");
}
catch (Exception ex) { MessageBox.Show($"Error: {ex.Message}"); }
}
}
private void ViewRpDiff_Click(object? sender, EventArgs e)
{
if (_projectRepo.RichPresence == null) return;
string ExtractDisplaySection(string rpScript)
{
if (string.IsNullOrEmpty(rpScript)) return "";
var lines = rpScript.Replace("\r", "").Split('\n');
var sb = new StringBuilder();
bool inDisplay = false;
foreach (var line in lines)
{
if (line.Trim().StartsWith("Display:")) { inDisplay = true; continue; }
if (inDisplay) { if (line.Trim().StartsWith("Lookup:") || line.Trim().StartsWith("Format:")) break; sb.AppendLine(line); }
}
return sb.ToString().Trim();
}
string current = ExtractDisplaySection(_projectRepo.RichPresence.ToString());
string path = _projectRepo.RichPresenceFilePath;
string original = File.Exists(path) ? ExtractDisplaySection(File.ReadAllText(path)) : "";
using (var form = new TextDiffForm("RP Diff", original, current)) form.ShowDialog();
}
private void LogicOptimizerToolStripMenuItem_Click(object? sender, EventArgs e)
{
if (_currentDisplayList.Count == 0) return;
var assetsToOptimize = new List<IAssetItem>();
foreach (var item in _currentDisplayList)
{
if (item.State == AssetState.Synced)
{
IAssetItem clone = item.IsLeaderboard ? ((RaLeaderboard)item).Clone(false) : ((RaAchievement)item).Clone(false);
clone.State = AssetState.Synced;
assetsToOptimize.Add(clone);
}
else assetsToOptimize.Add(item);
}
using (var form = new LogicOptimizerForm(assetsToOptimize)) form.ShowDialog();
_projectRepo.EnsureLocalDataExists();
bool anyChanges = false;
foreach (var item in assetsToOptimize)
{
if (item.State == AssetState.Modified)
{
if (!IsAssetInLocalStore(item))
{
if (item.IsLeaderboard) _projectRepo.LocalData!.Leaderboards.Add((RaLeaderboard)item);
else _projectRepo.LocalData!.Achievements.Add((RaAchievement)item);
anyChanges = true;
}
else anyChanges = true;
}
}
if (anyChanges)
{
_isDirty = true;
ReloadDataView();
if (_selectedAsset != null) SelectAssetInGrid(_selectedAsset);
}
}
private bool IsAssetInLocalStore(IAssetItem item)
{
if (_projectRepo.LocalData == null) return false;
if (item.IsLeaderboard) return _projectRepo.LocalData.Leaderboards.Any(l => l.ID == item.ID);
return _projectRepo.LocalData.Achievements.Any(a => a.ID == item.ID);
}
#endregion
#region Global Commands (Undo/Redo/Reload)
private void Undo_Click(object? sender, EventArgs e)
{
if (triggerEditor.ContainsFocus) triggerEditor.Undo();
else UndoMain();
}
private void Redo_Click(object? sender, EventArgs e)
{
if (triggerEditor.ContainsFocus) triggerEditor.Redo();
else RedoMain();
}
private void Reload_Click(object? sender, EventArgs e)
{
if (string.IsNullOrEmpty(_currentFilePath)) return;
if (!ConfirmDiscardChanges()) return;
// Preserve selection
int selectedId = -1;
if (achievementGrid.SelectedRows.Count > 0 && achievementGrid.SelectedRows[0].Tag is IAssetItem item)
selectedId = item.ID;
// Preserve current view filters (Source, Category, AssetType)
int savedSource = cmbSource.SelectedIndex;
int savedCategory = cmbCategory.SelectedIndex;
int savedType = cmbAssetType.SelectedIndex;
LoadFiles(_currentFilePath);
// Restore filters
if (savedType >= 0 && savedType < cmbAssetType.Items.Count && cmbAssetType.SelectedIndex != savedType)
{
cmbAssetType.SelectedIndex = savedType;
}
if (savedCategory >= 0 && savedCategory < cmbCategory.Items.Count && cmbCategory.SelectedIndex != savedCategory)
{
cmbCategory.SelectedIndex = savedCategory;
}
if (savedSource >= 0 && savedSource < cmbSource.Items.Count && cmbSource.SelectedIndex != savedSource)
{
cmbSource.SelectedIndex = savedSource;
}
// Restore row selection
if (selectedId != -1)
{
foreach (DataGridViewRow row in achievementGrid.Rows)
{
if (row.Tag is IAssetItem i && i.ID == selectedId)
{
row.Selected = true;
achievementGrid.CurrentCell = row.Cells[0];
LoadSelectedAsset();
break;
}
}
}
}
#endregion
}
}