private void BtnOpen_OnClick(object sender, RoutedEventArgs e) { var fbd = new FolderBrowserDialog(); fbd.ShowDialog(); string folderPath = fbd.SelectedPath; if (string.IsNullOrEmpty(folderPath)) { System.Windows.MessageBox.Show("Invalid folder selected"); return; } var mpw = new ManageProjectWindow(folderPath) { Owner = this }; mpw.ShowDialog(); }
private void BtnCreate_OnClick(object sender, RoutedEventArgs e) { Properties.Settings.Default.Reload(); string appDirectory = (string)Properties.Settings.Default["AppDirectory"]; using (StreamWriter sw = new StreamWriter(Path.Combine(appDirectory, projName, "Layout.txt"))) { foreach (var line in ItemList) { sw.WriteLine(line); } } ManageProjectWindow mpw = new ManageProjectWindow(Path.Combine(appDirectory, projName)) { Owner = this }; mpw.ShowDialog(); this.Close(); }