コード例 #1
0
        private void OnBackupFilesFound(string[] files)
        {
            if (files.Length > 0)
            {
                Freeze("Choose a file in another window");
                FilesListWindow win = new FilesListWindow(this, files, RestoreBackup)
                {
                    Owner = this
                };
                win.Show();
                win.Focus();
                win.Closed += (s, e) => Freeze(false);
            }
            else
            {
                Error($"There is no backup files. Make a first backup!");
            }

            void RestoreBackup(string path)
            {
                try
                {
                    Patcher.RestoreBackup(path);
                    OnSelectFile(Patcher.FilePath);
                }
                catch (Exception ex)
                {
                    ThrowException(ex);
                }
            }
        }
コード例 #2
0
        private void OnFilesFound(string[] files)
        {
            //Alert(string.Join("\n", files));

            if (files.Length > 0)
            {
                Freeze("Choose a file in another window");
                FilesListWindow win = new FilesListWindow(this, files, OnSelectFile) { Owner = this };
                win.Show();
                win.Focus();
                win.Closed += (s, e) => Freeze(false);
            }
            else
            {
                MessageHelper.Error($"There is no {EditorFileName}. Try choose another folder");
            }
        }