public override void OnClosed(ClosedEventArgs e) { UserSettings.Instance.Fields.StartCountDurringExit = UserSettings.Instance.Fields.StartCount; TerminalWindow.CloseIfOpen(); if (PrinterConnectionAndCommunication.Instance.CommunicationState != PrinterConnectionAndCommunication.CommunicationStates.PrintingFromSd) { PrinterConnectionAndCommunication.Instance.Disable(); } //Close connection to the local datastore PrinterConnectionAndCommunication.Instance.HaltConnectionThread(); SlicingQueue.Instance.ShutDownSlicingThread(); ApplicationController.Instance.OnApplicationClosed(); Datastore.Instance.Exit(); if (RestartOnClose) { string appPathAndFile = System.Reflection.Assembly.GetExecutingAssembly().Location; string pathToAppFolder = Path.GetDirectoryName(appPathAndFile); ProcessStartInfo runAppLauncherStartInfo = new ProcessStartInfo(); runAppLauncherStartInfo.Arguments = "\"{0}\" \"{1}\"".FormatWith(appPathAndFile, 1000); runAppLauncherStartInfo.FileName = Path.Combine(pathToAppFolder, "Launcher.exe"); runAppLauncherStartInfo.WindowStyle = ProcessWindowStyle.Hidden; runAppLauncherStartInfo.CreateNoWindow = true; Process.Start(runAppLauncherStartInfo); } base.OnClosed(e); }
private async void CremaHost_Closed(object sender, ClosedEventArgs e) { this.isOpened = false; Trace.WriteLine("CremaHost_Closed"); await this.Dispatcher.InvokeAsync(() => { this.IsOpened = false; this.EndProgress(); if (e.Reason != CloseReason.None) { this.ErrorMessage = e.Message; } else { this.ProgressMessage = e.Message; } if (this.IsLoaded == true) { this.dataBaseName = null; this.IsLoaded = false; this.OnUnloaded(EventArgs.Empty); } this.address = null; this.Refresh(); this.OnClosed(EventArgs.Empty); this.cremaHost.SaveConfigs(); }); }
public override void OnClosed(ClosedEventArgs e) { SaveOnClosing(); UserSettings.Instance.Fields.SetBool(TerminalWindowLeftOpen, terminalWasOpenOnAppClose); base.OnClosed(e); }
private void searchLookUpEdit1_Closed(object sender, ClosedEventArgs e) { var re = GetLuValues(); this.searchLookUpEdit1.EditValue = string.Join(",", re[1].ToArray()); // name this.searchLookUpEdit1.ToolTip = string.Join(",", re[0].ToArray()); // id }
private void CremaHost_Closed(object sender, ClosedEventArgs e) { if (e.Reason == CloseReason.Shutdown) { this.Cancel(); } }
protected virtual void OnClosed(ClosedEventArgs e) { if (this.Closed != null) { this.Closed(this, e); } }
public override void OnClosed(ClosedEventArgs e) { basicBody?.Close(); unregisterEvents?.Invoke(this, null); instance = null; base.OnClosed(e); }
void RadialMenu_Closed(object sender, ClosedEventArgs e) { text = new TextView(con); text.SetTextColor(Color.Black); textFrame.AddView(text, 0); text.Text = "RadialMenu is Closed"; }
public override void OnClosed(ClosedEventArgs e) { if (unregisterEvents != null) { unregisterEvents(this, null); } }
private void SearchLookupEditCity_Closed(object sender, ClosedEventArgs e) { //Normal is when a user selects a value if (e.CloseMode == PopupCloseMode.Normal) { //CustomSearchLookUpEdit box = (CustomSearchLookUpEdit)sender; if (SearchLookupEditCity.EditValue != null) { string value = SearchLookupEditCity.EditValue.ToString(); var city = _context.CITYCOD.FirstOrDefault(s => s.CODE == value); if (string.IsNullOrEmpty(TextEditTown.Text)) { TextEditTown.EditValue = city.NAME; } //If the city is linked to a state and/or country, default the state and/or country for the city if (!string.IsNullOrEmpty(city?.State_Code)) { SearchLookupEditState.EditValue = city.State_Code; } if (!string.IsNullOrEmpty(city?.Country_Code)) { SearchLookupEditCountry.EditValue = city.Country_Code; } } } }
private async void CremaHost_Closed(object sender, ClosedEventArgs e) { await this.Dispatcher.InvokeAsync(() => { this.dataBaseButton.Visibility = System.Windows.Visibility.Hidden; }); }
/// <summary> /// Performs post editor /// Needed so datasource would be updated imediately /// (by default it happens when user navigates to another record) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void repositoryItemGridLookUpEdit_Closed(object sender, ClosedEventArgs e) { BaseView mainView = ((GridControl)((GridLookUpEdit)sender).Parent).MainView; mainView.PostEditor(); mainView.UpdateCurrentRow(); }
private static void VolumeShelf_Closed(object sender, ClosedEventArgs e) { // note that the component is thrown away when the shelf is closed by the user _volumeShelf.Closed -= VolumeShelf_Closed; _volumeShelf = null; _volumeComponent = null; }
private static void RoiAnalysisShelf_Closed(object sender, ClosedEventArgs e) { // note that the component is thrown away when the shelf is closed by the user _roiAnalysisShelf.Closed -= RoiAnalysisShelf_Closed; _roiAnalysisShelf = null; _roiAnalysisComponent = null; }
public override void OnClosed(ClosedEventArgs e) { ActiveSliceSettings.MaterialPresetChanged -= ActiveSliceSettings_MaterialPresetChanged; unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
private void RadialMenu_Closed(object sender, ClosedEventArgs e) { _radialMenu.Visibility = ViewStates.Invisible; _blurringView.Visibility = ViewStates.Invisible; _menuButton.Enabled = true; }
public override void OnClosed(ClosedEventArgs e) { unregisterEvents?.Invoke(this, null); instance = null; base.OnClosed(e); onCloseCallback(); }
public override void OnClosed(ClosedEventArgs e) { if (!haveResponded) { responseCallback?.Invoke(false); } base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (backgroundWorker != null) { backgroundWorker.CancelAsync(); } base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { printer.Bed.RendererOptions.PropertyChanged -= RendererOptions_PropertyChanged; printer.Bed.LoadedGCodeChanged -= Bed_LoadedGCodeChanged; unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
private void lookUpEdit_Closed(object sender, ClosedEventArgs e) { BindingSource ss = this.ValueControl.Properties.DataSource as BindingSource; if (ss != null) { ss.RemoveFilter(); } }
public override void OnClosed(ClosedEventArgs e) { printItemWrapper.SlicingDone -= sliceItem_Done; if (unregisterEvents != null) { unregisterEvents(this, null); } base.OnClosed(e); }
private void popupContainerEdit1_Closed(object sender, ClosedEventArgs e) { if (e.CloseMode == PopupCloseMode.Immediate) { buttonActionOpenPopup = false; popupTimer = new System.Threading.Timer( new TimerCallback(PopupTimerCallback), null, 100, Timeout.Infinite); } }
public override void OnClosed(ClosedEventArgs e) { unregisterEvents?.Invoke(this, null); printer.Bed.GCodeRenderer?.Dispose(); printer.Bed.LoadedGCodeChanged -= LoadedGCodeChanged; base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { PrintItemWrapper.SlicingOutputMessage -= PrintItem_SlicingOutputMessage; if (unregisterEvents != null) { unregisterEvents(this, null); } base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (checkForPermissionTimer != null) { checkForPermissionTimer.Dispose(); } unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (e.OsEvent) { PrinterConnectionAndCommunication.Instance.MacroCancel(); } unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (currentEePromSettings != null) { currentEePromSettings.SettingAdded -= NewSettingReadFromPrinter; } unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (e.OsEvent) { printer.Connection.MacroCancel(); } unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
public override void OnClosed(ClosedEventArgs e) { if (activePrintPreviewImage.ItemWrapper != null) { activePrintPreviewImage.ItemWrapper.SlicingOutputMessage -= PrintItem_SlicingOutputMessage; } unregisterEvents?.Invoke(this, null); base.OnClosed(e); }
private static void OnClipboardShelfClosed(object sender, ClosedEventArgs e) { IShelf clipboardShelf = (IShelf) sender; clipboardShelf.Closed -= OnClipboardShelfClosed; foreach (KeyValuePair<IDesktopWindow, IShelf> pair in _clipboardShelves) { if (pair.Value == clipboardShelf) { _clipboardShelves.Remove(pair.Key); break; } } }
void OnClosed(object sender, ClosedEventArgs e) { ContainerEdit.Dispose(); this.containerEdit = null; State = ColumnCustomizationState.None; }
private void Shelf_Closed(object sender, ClosedEventArgs e) { //_shelf.Closed -= Shelf_Closed; _shelf = null; }
private void repositoryItemComboBox_Closed(object sender, ClosedEventArgs e) { gridViewPrintProducts.CloseEditor(); }
private void OnShelfClosed(object sender, ClosedEventArgs e) { // We need to cache the owner DesktopWindow (_desktopWindow) because this tool is an // ImageViewer tool, disposed when the viewer component is disposed. Shelves, however, // exist at the DesktopWindow level and there can only be one of each type of shelf // open at the same time per DesktopWindow (otherwise things look funny). Because of // this, we need to allow this event handling method to be called after this tool has // already been disposed (e.g. viewer workspace closed), which is why we store the // _desktopWindow variable. //trigger an import of the Renamed files. LocalDataStoreServiceClient client = new LocalDataStoreServiceClient(); client.Open(); try { FileImportRequest request = new FileImportRequest(); request.BadFileBehaviour = BadFileBehaviour.Move; request.FileImportBehaviour = FileImportBehaviour.Move; request.FilePaths = _filePaths; request.Recursive = false; client.Import(request); client.Close(); } catch { client.Abort(); throw; } _shelf.Closed -= OnShelfClosed; _shelf = null; }
private void OnShelfClosed(object sender, ClosedEventArgs e) { // We need to cache the owner DesktopWindow (_desktopWindow) because this tool is an // ImageViewer tool, disposed when the viewer component is disposed. Shelves, however, // exist at the DesktopWindow level and there can only be one of each type of shelf // open at the same time per DesktopWindow (otherwise things look funny). Because of // this, we need to allow this event handling method to be called after this tool has // already been disposed (e.g. viewer workspace closed), which is why we store the // _desktopWindow variable. _shelf.Closed -= OnShelfClosed; _shelf = null; }
private void DocumentClosedEventHandler(object sender, ClosedEventArgs e) { DocumentManager.UnregisterDocument(this); EventsHelper.Fire(_closed, this, e); }
private void repositoryItemComboBoxProductName_Closed(object sender, ClosedEventArgs e) { advBandedGridView.CloseEditor(); }
private void repositoryItemDateEditNull_Closed(object sender, ClosedEventArgs e) { advBandedGridViewPublication.CloseEditor(); ((BindingList<Insert>)gridControlPublication.DataSource).ResetBindings(); }
private void OnRepositoryItemPopupContainerEditProgramClosed(object sender, ClosedEventArgs e) { advBandedGridView.CloseEditor(); }
private void OnShelfClosed(object sender, ClosedEventArgs e) { _shelves[_desktopWindow].Closed -= OnShelfClosed; _shelves.Remove(_desktopWindow); _desktopWindow = null; }
private void repositoryItemComboBoxStatus_Closed(object sender, ClosedEventArgs e) { gridViewSchedules.CloseEditor(); }
private void OnStatusComboBoxClosed(object sender, ClosedEventArgs e) { gridViewSchedules.CloseEditor(); }
private void OnRepositoryItemComboBoxClosed(object sender, ClosedEventArgs e) { advBandedGridView.CloseEditor(); }
/// <summary> /// Performs post editor /// Needed so datasource would be updated imediately /// (by default it happens when user navigates to another record) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void LookUpEdit_Closed(object sender, ClosedEventArgs e) { ((GridControl) ((LookUpEdit) sender).Parent).MainView.PostEditor(); ((GridControl) (sender as LookUpEdit).Parent).MainView.UpdateCurrentRow(); }