public SettingsWindow() { InitializeComponent(); SavedDataReader.OpenMode mode = SavedDataReader.Mode; if (mode == SavedDataReader.OpenMode.current) { usePrHome.IsChecked = true; } else if (mode == SavedDataReader.OpenMode.lastUsed) { usePrev.IsChecked = true; } else { useCustomDirs.IsChecked = true; List <String> dirs = SavedDataReader.GetSavedStartingDirsFromXml().ToList(); leftPathTextBox.Text = dirs[0]; rightPathTextBox.Text = dirs[1]; } ReloadCustomAssociations(); }
public static void InitilalDirs() { List <String> fileStartPaths = SavedDataReader.GetSavedStartingDirsFromXml().ToList(); SavedDataReader.LoadUserDefinedFileAssociations(); String leftPath = fileStartPaths[0]; if (!Directory.Exists(leftPath)) { leftPath = Directory.GetCurrentDirectory(); SavedDataReader.SetSavedStartingDirsToXml(SavedDataReader.OpenMode.lastUsed, leftPath, Side.Left); } String rightPath = fileStartPaths[1]; if (!Directory.Exists(rightPath)) { rightPath = Directory.GetCurrentDirectory(); SavedDataReader.SetSavedStartingDirsToXml(SavedDataReader.OpenMode.lastUsed, rightPath, Side.Right); } File_Containers.FileDualContainer.ChooseContainer(Side.Left).GoToDirectory(leftPath); File_Containers.FileDualContainer.ChooseContainer(Side.Right).GoToDirectory(rightPath); }