private void ButtonAccept_OnClick(object sender, RoutedEventArgs e) { try { if (MainWindow.Method == "--current") { FolderHandling folder = new FolderHandling(MainWindow.path, new CurrentDirectory()); folder.Process(); MainWindow.methodWindow.Close(); } if (MainWindow.Method == "--all") { FolderHandling folder = new FolderHandling(MainWindow.path, new AllSubfolders()); folder.Process(); MainWindow.methodWindow.Close(); } } catch (Exception ex) { // Отловленная ошибка появится в окне вывода Visual Studio. Debugger.Log(0, "", $"Ошибка в методе-обработчике события ButtonAccept_OnClick. Ошибка: {ex}"); LogErrorAsync(ex); } }
internal void Update() { IniReader.WriteValue("QuickList", "FolderHandling", FolderHandling.ToString(), IniFile); IniReader.WriteValue("QuickList", "FileInfo", FileInfo.ToString(), IniFile); IniReader.WriteValue("QuickList", "ForceShellMedia", ForceShellMedia ? "1" : "0", IniFile); IniReader.WriteValue("QuickList", "FileReaderParallelism", FileReaderParallelism.ToString(), IniFile); if (ExcludedFilenames?.Count > 0) { IniReader.WriteValue("QuickList", "ExcludedFilenames", string.Join(":", ExcludedFilenames), IniFile); } }