예제 #1
0
        private async void ThemeRename(object sender, RoutedEventArgs e)
        {
            string OName = SelectedTheme.Name;

            Dialogs.Rename R = new Dialogs.Rename(SelectedTheme);
            await Popups.ShowDialog(R);

            if (R.Canceled)
            {
                return;
            }

            Manager.Save(SelectedTheme);
            Manager.Remove(OName);
        }
예제 #2
0
 private void menuRename_Click(object sender, EventArgs e)
 {
     using (var rn = new Dialogs.Rename(Core.CurrentOperation.GetCurrentElement()))
     {
         if (rn.ShowDialog() == DialogResult.OK)
         {
             Core.CurrentOperation.GetCurrentElement().NewName = rn.GetNewName();
         }
         else
         {
             Core.CurrentOperation.GetCurrentElement().NewName = null;
         }
         ov.Refresh();
         pv.Refresh();
     }
 }
예제 #3
0
        private async void WidgetRename_Click(object sender, RoutedEventArgs e)
        {
            FrameworkElement Elem = ( FrameworkElement )sender;

            if (Elem.DataContext is WidgetView WV)
            {
                string         OName        = WV.Name;
                Dialogs.Rename RenameDialog = new Dialogs.Rename(WV);
                await Popups.ShowDialog(RenameDialog);

                if (OName != WV.Name)
                {
                    SaveConfigs();
                }
            }
        }
예제 #4
0
        private async void Rename(object sender, RoutedEventArgs e)
        {
            string OName = SelectedItem.Name;

            Dialogs.Rename RenameBox = new Dialogs.Rename(SelectedItem);
            await Popups.ShowDialog(RenameBox);

            if (RenameBox.Canceled)
            {
                return;
            }

            string NewName = SelectedItem.Name;

            if (SelectedItem.Value is CryptAES)
            {
                AESMgr.RenameAuth(OName, NewName);
            }
            else
            {
                TokMgr.RenameAuth(OName, NewName);
            }
        }
예제 #5
0
파일: MainForm.cs 프로젝트: karno/Typict
 private void menuRename_Click(object sender, EventArgs e)
 {
     using(var rn = new Dialogs.Rename(Core.CurrentOperation.GetCurrentElement()))
     {
         if (rn.ShowDialog() == DialogResult.OK)
             Core.CurrentOperation.GetCurrentElement().NewName = rn.GetNewName();
         else
             Core.CurrentOperation.GetCurrentElement().NewName = null;
         ov.Refresh();
         pv.Refresh();
     }
 }
예제 #6
0
        private async void ThemeRename( object sender, RoutedEventArgs e )
        {
            string OName = SelectedTheme.Name;
            Dialogs.Rename R = new Dialogs.Rename( SelectedTheme );
            await Popups.ShowDialog( R );
            if ( R.Canceled ) return;

            Manager.Save( SelectedTheme );
            Manager.Remove( OName );
        }