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); }
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(); } }
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(); } } }
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); } }
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(); } }
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 ); }