public void ShowOptionsUI() { AssemblyLoadingGuard.Protect(); DXDialogWindow dialogWindow = new DXDialogWindow("Options", MessageBoxButton.OKCancel); dialogWindow.Content = new EditOptionsControl() { DataContext = this.options }; if (dialogWindow.ShowDialog() == true) { ConfigSerializer.SaveOptions(this.options); } else { this.options = ConfigSerializer.GetOptions(); } }
void OnCustomizeMergeFields(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { CustomizeMergeFieldsControl control = new CustomizeMergeFieldsControl(mergeFieldsNamesInfo); DXDialogWindow window = new DXDialogWindow(); window.Content = control; window.Title = "Customize merge fields"; window.Width = 400; window.Height = 400; window.FooterButtons.Add(new DialogButton() { Content = "OK", IsDefault = true, DialogResult = MessageResult.OK }); window.Owner = Window.GetWindow(this); window.WindowStartupLocation = WindowStartupLocation.CenterOwner; window.WindowStyle = WindowStyle.ToolWindow; window.ShowDialog(); }
public void StartAuthentication() { LoginView loginView = new LoginView(); LoginViewModel loginViewModel = (LoginViewModel)loginView.DataContext; UICommand loginCommand = new UICommand { Caption = "Login", IsCancel = false, IsDefault = true, Command = loginViewModel.LoginCommand }; DXDialogWindow dialogWindow = new DXDialogWindow("Login", new List <UICommand> { loginCommand }); dialogWindow.Width = 300; dialogWindow.Height = 300; dialogWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; dialogWindow.ResizeMode = System.Windows.ResizeMode.NoResize; dialogWindow.Content = loginView; dialogWindow.ShowDialogWindow(); }
public void ShowOptionsUI() { AssemblyLoadingGuard.Protect(); DXDialogWindow dialogWindow = new DXDialogWindow("Options", MessageBoxButton.OKCancel); dialogWindow.Content = new EditOptionsControl() { DataContext = this.options }; if (dialogWindow.ShowDialog() == true) { ConfigSerializer.SaveOptions(this.options); } else { this.options = ConfigSerializer.GetOptions(); } }