Пример #1
0
        public static async Task LoadDifference(bool updateMode = false)
        {
            FWindow.FMain.MI_LoadOnePAK.IsEnabled      = false;
            FWindow.FMain.MI_LoadAllPAKs.IsEnabled     = false;
            FWindow.FMain.MI_BackupPAKs.IsEnabled      = false;
            FWindow.FMain.MI_DifferenceMode.IsEnabled  = false;
            FWindow.FMain.MI_UpdateMode.IsEnabled      = false;
            FWindow.FMain.AssetPropertiesBox_Main.Text = string.Empty;
            FWindow.FMain.ViewModel             = srt = new SortedTreeViewWindowViewModel();
            FWindow.FMain.ImageBox_Main.Source  = null;
            ListBoxUtility.FilesListWithoutPath = null;
            FWindow.FMain.ListBox_Main.Items.Clear();
            umIsOk = false;

            FWindow.FMain.TreeView_Main.IsEnabled = false;
            await Task.Run(async() =>
            {
                PAKEntries.PAKToDisplay = new Dictionary <string, FPakEntry[]>();
                DebugHelper.WriteLine($".PAKs: User is loading difference at {PAK_PATH}\\");

                LoadPAKFiles(true);
                await LoadBackupFile(updateMode);
            }).ContinueWith(TheTask =>
            {
                TasksUtility.TaskCompleted(TheTask.Exception);
                DebugHelper.WriteLine($".PAKs: Loaded difference at {PAK_PATH}\\");
            });
        }
Пример #2
0
        public static async Task LoadOnePAK()
        {
            FWindow.FMain.MI_LoadOnePAK.IsEnabled      = false;
            FWindow.FMain.MI_LoadAllPAKs.IsEnabled     = false;
            FWindow.FMain.MI_BackupPAKs.IsEnabled      = false;
            FWindow.FMain.MI_DifferenceMode.IsEnabled  = false;
            FWindow.FMain.MI_UpdateMode.IsEnabled      = false;
            FWindow.FMain.AssetPropertiesBox_Main.Text = string.Empty;
            FWindow.FMain.ViewModel             = srt = new SortedTreeViewWindowViewModel();
            FWindow.FMain.ImageBox_Main.Source  = null;
            ListBoxUtility.FilesListWithoutPath = null;
            FWindow.FMain.ListBox_Main.Items.Clear();

            await Task.Run(() =>
            {
                PAKEntries.PAKToDisplay = new Dictionary <string, FPakEntry[]>();
                DebugHelper.WriteLine($".PAKs: User is loading {PAK_PATH}\\{FWindow.FCurrentPAK}");
                new UpdateMyProcessEvents($"{PAK_PATH}\\{FWindow.FCurrentPAK}", "Loading").Update();

                LoadPAKFiles();
                FillTreeView();
            }).ContinueWith(TheTask =>
            {
                TasksUtility.TaskCompleted(TheTask.Exception);
                DebugHelper.WriteLine($".PAKs: Loaded {PAK_PATH}\\{FWindow.FCurrentPAK}");
            });

            FWindow.FMain.MI_LoadOnePAK.IsEnabled     = true;
            FWindow.FMain.MI_LoadAllPAKs.IsEnabled    = true;
            FWindow.FMain.MI_BackupPAKs.IsEnabled     = true;
            FWindow.FMain.MI_DifferenceMode.IsEnabled = true;
        }
Пример #3
0
        public static async Task LoadAllPAKs()
        {
            FWindow.FMain.MI_LoadOnePAK.IsEnabled      = false;
            FWindow.FMain.MI_LoadAllPAKs.IsEnabled     = false;
            FWindow.FMain.MI_BackupPAKs.IsEnabled      = false;
            FWindow.FMain.MI_DifferenceMode.IsEnabled  = false;
            FWindow.FMain.MI_UpdateMode.IsEnabled      = false;
            FWindow.FMain.AssetPropertiesBox_Main.Text = string.Empty;
            FWindow.FMain.ViewModel             = srt = new SortedTreeViewWindowViewModel();
            FWindow.FMain.ImageBox_Main.Source  = null;
            ListBoxUtility.FilesListWithoutPath = null;
            FWindow.FMain.ListBox_Main.Items.Clear();

            await Task.Run(() =>
            {
                PAKEntries.PAKToDisplay = new Dictionary <string, FPakEntry[]>();

                LoadPAKFiles(true);
                FillTreeView(true);
            }).ContinueWith(TheTask =>
            {
                TasksUtility.TaskCompleted(TheTask.Exception);
            });

            FWindow.FMain.MI_LoadOnePAK.IsEnabled     = true;
            FWindow.FMain.MI_LoadAllPAKs.IsEnabled    = true;
            FWindow.FMain.MI_BackupPAKs.IsEnabled     = true;
            FWindow.FMain.MI_DifferenceMode.IsEnabled = true;
        }
Пример #4
0
 public SortedTreeView()
 {
     InitializeComponent();
     ViewModel = new SortedTreeViewWindowViewModel()
     {
         Items = { new TreeViewModel(1) }
     };
 }