private void RenameThisGroup_Click(object sender, RoutedEventArgs e) { var pd = new TextPromptWindow(); pd.Owner = System.Windows.Application.Current.MainWindow; var fd = MyListView.SelectedItems[0] as FilterVM; pd.UserString = fd.DisplayString; if ((bool)pd.ShowDialog()) { MyDataFile.ClockVMCollection.Model.Groups.Rename( fd.DisplayString, pd.UserString); ReloadGroups(); } }
internal static string ShowAddNewGroupPrompt(DataFile df) { var p = new TextPromptWindow(); p.Owner = System.Windows.Application.Current.MainWindow; bool r; r = (bool)p.ShowDialog(); if (r) { if (p.UserString != "") { df.ClockVMCollection.Model.Groups.Add(p.UserString); return(p.UserString); } } return(null); }