private void OnClosed(object sender, WindowClosedEventArgs e) { RadWindow win = (RadWindow)sender; observacionesResult = win.DialogResult; observacionesDelete = win.PromptResult; }
void ExitDlg_Closed(object sender, WindowClosedEventArgs e) { if (ExitDlg.ModalResult == ModalResult.Yes) { ThisApp.Exit(); } }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.applyCallback = null; this.Owner = null; }
private void OnRadConfirmClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { this.GoTo(url); } }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.replaceCurrentImageCallback = null; this.Owner = null; }
} // ShowModal #endregion #region Close /// <summary> /// Close /// </summary> public virtual void Close() { // Raise on closing event. WindowClosingEventArgs ex = new WindowClosingEventArgs(); OnClosing(ex); // If an event does not deny the closing... if (!ex.Cancel) { // Remove the event link to prevent garbage. UserInterfaceManager.InputSystem.KeyDown -= InputKeyDown; // Restore previous modal window. UserInterfaceManager.ModalWindow = lastModal; if (lastModal != null) lastModal.Focused = true; else UserInterfaceManager.FocusedControl = null; Hide(); // Raise on closed event. WindowClosedEventArgs ev = new WindowClosedEventArgs(); OnClosed(ev); // If an event does not change the dispose property. if (ev.Dispose) Dispose(); } } // Close
public static WindowClosedEventArgs ShowConfirm(string alertText, Action <bool> action = null, string header = "Подтвердите действие") { WindowClosedEventArgs result = null; System.Windows.Application.Current.Dispatcher.Invoke(() => { var dp = new DialogParameters { Content = alertText, Header = header, DialogStartupLocation = WindowStartupLocation.CenterScreen }; if (!((System.Windows.Application.Current.MainWindow == null) || (System.Windows.Application.Current.MainWindow.Visibility != System.Windows.Visibility.Visible))) { dp.Owner = System.Windows.Application.Current.MainWindow; } if (action == null) { dp.Closed = new EventHandler <WindowClosedEventArgs>((s, e) => { result = e; }); } else { dp.Closed = new EventHandler <WindowClosedEventArgs>((s, e) => { action(e.DialogResult.Value); }); } dp.OkButtonContent = "Да"; dp.CancelButtonContent = "Нет"; RadWindow.Confirm(dp); }); return(result); }
private static void OnConfirmClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == false) { Process.GetCurrentProcess().Kill(); } }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.spellCheckingUIManager = null; this.Owner = null; }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { if (this.OnWindowClosed != null) { OnWindowClosed(this.DialogResult.HasValue ? this.DialogResult.Value : false); } }
/// <summary> /// Description: Valida la confirmación del cierre de la aplicación /// </summary> private void OnConfirmClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { Application.Current.Shutdown(); } }
private void WindowClosed(object sender, WindowClosedEventArgs e) { if (sender is TaskDialog) { btnTasks[0].Enabled = true; btnTasks[0].Focused = true; } else if (sender is TaskControls) { btnTasks[1].Enabled = true; btnTasks[1].Focused = true; } else if (sender is TaskAutoScroll) { btnTasks[2].Enabled = true; btnTasks[2].Focused = true; } else if (sender is Window && (sender as Window).Name == "frmMain") { btnTasks[3].Enabled = true; btnTasks[3].Focused = true; } else if (sender is TaskEvents) { btnTasks[4].Enabled = true; btnTasks[4].Focused = true; } e.Dispose = true; }
private void dialogIniciarSesion_Closed(object sender, WindowClosedEventArgs e) { if (usuarioValido == null) { this.Close(); } }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { this.Owner = null; this.originalImageInline = null; this.originalInline = null; this.replaceCurrentInlineCallback = null; }
void win_Closed(object sender, WindowClosedEventArgs e) { _mrsClient = new RetailSystemClient(); _mrsClient.Endpoint.Address = new System.ServiceModel.EndpointAddress(Internal.Utilities.GetMetriconRetailSystemWcfClientEndpointUrl()); _mrsClient.GetEstimateDisclaimerUpdateDetailsCompleted += new EventHandler <GetEstimateDisclaimerUpdateDetailsCompletedEventArgs>(_mrsClient_GetEstimateDisclaimerUpdateDetailsCompleted); _mrsClient.GetEstimateDisclaimerUpdateDetailsAsync(_estimateRevisionId); }
private void Window_Closed(object sender, WindowClosedEventArgs e) { if (WindowClosed != null) { WindowClosed(sender, null); } }
private void OnClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { var textbox = "EjecutoresCalendarizados" + e.PromptResult.ToString(); DAL.Datos datos = new DAL.Datos(); // datos.GuardarPOM(textbox); // datos.CrearBaseDatos(textbox); //datos.CrearNuevoPOT(textbox); //new POM(Convert.ToDecimal(4)); //FALTA REDIERCIONAR A PAGINA DE POM /* DataTable dtPOM = datos.ObtenerIdPOM(textbox).Tables[0]; * decimal idPOM = 0; * foreach (DataRow row in dtPOM.Rows) * { * idPOM = Convert.ToDecimal(row["Id"]); * } * * MainFrame.NavigationService.Navigate(new POM(Convert.ToDecimal(idPOM)));*/ } }
private void ListWindow_Closed(object sender, WindowClosedEventArgs e) { foreach (MarkerMapElement obj in _currentMapElementList) { obj.RemoveFromMap(); } }
protected override void OnClosed(WindowClosedEventArgs args) { var newArgs = new WindowClosedEventArgs { DialogResult = this.dialogResult, PromptResult = this.Numeric.Value.ToString() }; base.OnClosed(newArgs); }
private void OnClosed(object sender, WindowClosedEventArgs e) { RadWindow.Alert(new DialogParameters { Content = String.Format("DialogResult: {0}, PromptResult: {1}", e.DialogResult, e.PromptResult), Owner = Application.Current.MainWindow }); }
private void OnCloseConfirm(object sender, WindowClosedEventArgs e) { if (e.DialogResult.Value) { this.Save(); } this.CloseTemplate(this.SelectedTemplate); }
private void mDialog_Closed(object sender, WindowClosedEventArgs e) { if (OnClose != null) { OnClose(this, System.EventArgs.Empty); } ExitScreen(); }
void tmp_Closed(object sender, WindowClosedEventArgs e) { List(); if (MapList.Items.Count > 0) { MapList.ItemIndex = 0; (MapList.Items[MapList.ItemIndex] as MapListItem).sb.Color = Color.LightGreen; } }
private async void OnDeleteConfirmClosed(object sender, WindowClosedEventArgs e) { var result = e.DialogResult; if (result == true && viewModel.SelectedItem != null) { await viewModel.Delete(viewModel.SelectedItem.WatchId); } }
/// <summary> /// /// </summary> private void OnClosed(object sender, WindowClosedEventArgs e) { var result = e.DialogResult; if (result == true) { Save(); } }
private void OnLoadingState(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { LocalDataSourceSerializer provider = new LocalDataSourceSerializer(); provider.Deserialize(this.pivotGrid.DataProvider, this.lastSerializadProvider); this.EnsureLoadState(); } }
private void OnPromptClosed(object sender, WindowClosedEventArgs e) { if (e.PromptResult != null && e.PromptResult != string.Empty) { this.ViewModel = new ChatViewModel(e.PromptResult); this.DataContext = this.ViewModel; this.myChat.CurrentAuthor = this.ViewModel.CurrentAuthor; } }
private void OnDeleteConfirmation(object sender, WindowClosedEventArgs args) { bool shouldDelete = args.DialogResult.HasValue ? args.DialogResult.Value : false; if (shouldDelete) { this.DeleteBookmarks(); } }
private void OnSaveConfirm(object sender, WindowClosedEventArgs e) { if (e.DialogResult.Value) { var template = this.SelectedTemplate; var path = Properties.Settings.Default.RepTemplates + "\\" + template.Name + ".xml"; File.Delete(path); this.SaveTemplateAsFile(template, path); } }
private void TzPlaybackWindow_Closed(object sender, WindowClosedEventArgs e) { ContainerManager.PlayBackBodyContainer.Visibility = Visibility.Collapsed; ContainerManager.Map.Visibility = Visibility.Visible; foreach (WindowBase item in RadWindowManager.Current.GetWindows()) { item.Visibility = Visibility.Visible; } }
void ValidationWin_Closed(object sender, WindowClosedEventArgs e) { RadWindow window = this.ParentOfType <RadWindow>(); if (window != null) { window.DialogResult = true; window.Close(); } }
void win_Closed(object sender, WindowClosedEventArgs e) { RadWindow dlg = (RadWindow)sender; bool? result = dlg.DialogResult; if (result.HasValue && result.Value) { ((NotesTemplateViewModel)LayoutRoot.DataContext).SearchNotesTemplate(); } }
void item_confirm_close(object sender, WindowClosedEventArgs e) { RadWindow dlg = (RadWindow)sender; bool? confirm = dlg.DialogResult; if ((bool)confirm) { ((NotesTemplateViewModel)LayoutRoot.DataContext).RemoveNoteTemplateItemFromTemplate(pag); } }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { using (IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForAssembly()) { using (StreamWriter srWriter = new StreamWriter(new IsolatedStorageFileStream("isotest", FileMode.Create, isolatedStorage))) { srWriter.WriteLine(this.GetNormalSizeAndPosition().ToString()); srWriter.Flush(); } } }
private void OnPromptClosed(object sender, WindowClosedEventArgs e) { RadWindow.Alert(new DialogParameters { Content = String.Format("DialogResult: {0}, PromptResult: {1}", e.DialogResult, e.PromptResult), Owner = Application.Current.MainWindow }); if (e.PromptResult != null && e.PromptResult != string.Empty) { this.employeeName.Text = e.PromptResult; } }
private void OnExpressionWindowClosed(object sender, WindowClosedEventArgs e) { ExpressionEditorWindow window = (ExpressionEditorWindow)sender; if (window.DialogResult == true) { this.GridView.GroupDescriptors.Clear(); GroupDescriptorBase descriptor = CreateGenericGroupDescriptor(window.ExpressionEditor.Expression); this.GridView.GroupDescriptors.Add(descriptor); SetExpressionText(descriptor, window.ExpressionEditor.ExpressionText); } }
private void OnExpressionWindowClosed(object sender, WindowClosedEventArgs e) { ExpressionEditorWindow window = (ExpressionEditorWindow)sender; if (window.DialogResult == true) { GridViewExpressionColumn column = (GridViewExpressionColumn)this.GridView.Columns["ExpressionColumn"]; if (column.Expression != window.ExpressionEditor.Expression) { column.ClearFilters(); column.Expression = window.ExpressionEditor.Expression; } this.lastExpressionText = window.ExpressionEditor.ExpressionText; } }
private void OnConfirmClosed(object sender, WindowClosedEventArgs e) { RadWindow.Alert(new DialogParameters { Content = String.Format("DialogResult: {0}, PromptResult: {1}", e.DialogResult, e.PromptResult), Owner = Application.Current.MainWindow }); if (e.DialogResult == true) { if (this.femalePhoto.Visibility == Visibility.Visible) { this.femalePhoto.Visibility = Visibility.Collapsed; this.malePhoto.Visibility = Visibility.Visible; this.employeeName.Text = "Dan Brinke"; } else { this.malePhoto.Visibility = Visibility.Collapsed; this.femalePhoto.Visibility = Visibility.Visible; this.employeeName.Text = "Maria Ferero"; } } }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.replaceCurrentImageCallback = null; this.Owner = null; }
private void OnClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { usersToReset.Password = defaultPassword; } }
private void OnConfirmClosed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { this.Employees.Remove(this.EditedEmployee); } }
private void PopupWindowOnWindowClosed(object sender, WindowClosedEventArgs windowClosedEventArgs) { Closed(); }
private void BankAccountWindowClosed(object sender, WindowClosedEventArgs e) { if (bankAccountWindow.Tag is BankAccountDTO) { var bankAccount = bankAccountWindow.Tag as BankAccountDTO; PaymentNotice.BankAccountId = bankAccount.BankAccountId; PaymentNotice.BankAccountName = bankAccount.Account + "/" + bankAccount.Bank + bankAccount.Branch; } }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { UpdateSuggestionsOperationId = Guid.Empty; LoadDictionaryOperationId = Guid.Empty; if (Owner == null) return; Owner.Focus(); }
/// <summary> /// 弹出窗体关闭时,取消相应饼图的弹出项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void radwindow_Closed(object sender, WindowClosedEventArgs e) { RadWindow radwindow = sender as RadWindow; Grid grid = new Grid(); if (radwindow.Name == "Age") { grid = this.AgePieGrid; } //更改对应饼图的突出显示 foreach (var item in (grid.Children[0] as RadPieChart).Series[0].DataPoints) { item.IsSelected = false; } //更改对应饼图的标签大小 foreach (var item in ((grid.Children[1] as ScrollViewer).Content as StackPanel).Children) { System.Windows.Shapes.Rectangle rectangle = (item as StackPanel).Children[0] as System.Windows.Shapes.Rectangle; rectangle.Width = 15; rectangle.Height = 15; } }
/// <summary> /// Raises the <see cref="E:Closed"/> event. /// </summary> /// <param name="args"> /// The <see cref="T:Telerik.Windows.Controls.WindowClosedEventArgs"/> instance containing the event data. /// </param> protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); if (_richTextBox != null) { _richTextBox.Document.Selection.Clear(); } _spellCheckingUIManager = null; _richTextBox = null; Owner = null; if (_tcs != null) { var isCanceled = DialogResult != true; _tcs.TrySetResult(new SpellCheckingResult(isCanceled)); } }
void rw_Closed(object sender, WindowClosedEventArgs e) { var temp = sender as ResolutionWindow; if (temp == null) return; if(temp.DialogResult==null || temp.DialogResult == false) return; var a = temp.DataContext as OutputTemplate; OutputTemplates.Add(a); MenuItemsList.Items.Add(new RadMenuItem {Name = a.TemplateName, Tag = 1, IsCheckable = true,StaysOpenOnClick = true}); OnPropertyChanged("MenuItemsList"); }
void Dialog_Closed(object sender, WindowClosedEventArgs e) { if (e.DialogResult == true) { this.SubmitChanges(); } }
private void PrepayPayscheduleChildViewClosed(object sender, WindowClosedEventArgs e) { if (PrepayPayscheduleChildView.Tag != null) { EngineMaintainInvoice = PrepayPayscheduleChildView.Tag as EngineMaintainInvoiceDTO; EngineMaintainInvoices.AddNew(EngineMaintainInvoice); } }
/// <summary> /// 机龄配置窗体关闭后刷新饼图的事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void window_Closed(object sender, WindowClosedEventArgs e) { RadWindow window = sender as RadWindow; if (window.Tag != null && Convert.ToBoolean(window.Tag)) { if (SelectedTime != "所选时间") { AgeWindow.Close(); DateTime time = Convert.ToDateTime(SelectedTime).AddMonths(1).AddDays(-1); CreateFleetAgeCollection(SelectedType, time); } window.Tag = false; } }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { if (_tcs != null) { var isCanceled = DialogResult != true; _tcs.TrySetResult(new SpellCheckingResult(isCanceled)); } if (Owner == null) return; Owner.Focus(); }
/// <summary> /// 弹出窗体关闭时,取消相应饼图的弹出项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void radWindows_Closed(object sender, WindowClosedEventArgs e) { RadWindow radwindow = sender as RadWindow; Grid grid = new Grid(); if (radwindow.Name == "opertationHistoryWindow") { grid = this.AircraftPieGrid; } else if (radwindow.Name == "totalOpertationWindow" || radwindow.Name == "totalPlanHistoryWindow") { grid = this.SeatPieGrid; this.totalOpertationWindow.Close(); this.totalPlanHistoryWindow.Close(); } else if (radwindow.Name == "planHistoryWindow") { grid = this.LoadPieGrid; } //更改对应饼图的突出显示 foreach (var item in (grid.Children[0] as RadPieChart).Series[0].DataPoints) { item.IsSelected = false; } //更改对应饼图的标签大小 foreach (var item in ((grid.Children[1] as ScrollViewer).Content as StackPanel).Children) { System.Windows.Shapes.Rectangle rectangle = (item as StackPanel).Children[0] as System.Windows.Shapes.Rectangle; rectangle.Width = 15; rectangle.Height = 15; } }
void WindowClosed(object sender, WindowClosedEventArgs e) { if (sender is TaskDialog) { btnTasks[0].Enabled = true; btnTasks[0].Focused = true; } else if (sender is TaskControls) { btnTasks[1].Enabled = true; btnTasks[1].Focused = true; } else if (sender is TaskAutoScroll) { btnTasks[2].Enabled = true; btnTasks[2].Focused = true; } else if (sender is Window && (sender as Window).Name == "frmMain") { btnTasks[3].Enabled = true; btnTasks[3].Focused = true; } else if (sender is TaskEvents) { btnTasks[4].Enabled = true; btnTasks[4].Focused = true; } e.Dispose = true; }
void win_Closed(object sender, WindowClosedEventArgs e) { e.Dispose = true; }
private void RadWindow_Closed(object sender, WindowClosedEventArgs e) { Bass.BASS_Free(); }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.applyCallback = null; this.Owner = null; }
void rw_Closed(object sender, WindowClosedEventArgs e) { RecordTable table = this.related.Table; var changes = table.CreateChangeSet(); if (changes.HasChanges) { DialogParameters pars = new DialogParameters(); pars.Header = String.Empty; pars.Content = "Submit Changes ?"; pars.Closed = this.Dialog_Closed; RadWindow.Confirm(pars); } }
protected override void OnClosed(WindowClosedEventArgs args) { base.OnClosed(args); this.Clear(); }
/// <summary> /// 弹出窗体关闭时,取消相应饼图的弹出项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void RadwindowClosed(object sender, WindowClosedEventArgs e) { var radWindow = sender as RadWindow; var grid = new Grid(); if (radWindow != null && radWindow.Name.Equals("Regional", StringComparison.OrdinalIgnoreCase)) { grid = _regionalPieGrid; } else if (radWindow != null && radWindow.Name.Equals("Type", StringComparison.OrdinalIgnoreCase)) { grid = _typePieGrid; } //更改对应饼图的突出显示 foreach (var item in ((RadPieChart) grid.Children[0]).Series[0].DataPoints) { item.IsSelected = false; } //更改对应饼图的标签大小 ((RadLegend) grid.Children[1]).Items.ToList().ForEach(p => p.IsHovered = false); }
protected override void OnClosed(WindowClosedEventArgs args) { var newArgs = new WindowClosedEventArgs { DialogResult = this.dialogResult, PromptResult = this.Numeric.Value.ToString() }; base.OnClosed(newArgs); }