Example #1
0
        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();
            }
        }
Example #2
0
        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);
        }