protected override async Task OnApplicationClosingEvent(ApplicationClosingEventArgs e) { // *** // *** Release the LFIX client. // *** await this.DeinitializeLifxClient(); }
private void Doc_DocumentClosing(object sender, ApplicationClosingEventArgs e) { UIApplication uiapp = sender as UIApplication; uiapp.ViewActivated -= new EventHandler <ViewActivatedEventArgs>(Application_ViewActivated); TaskDialog.Show("R", "Unsuscribing"); }
private void EventAppClosing(object sender, ApplicationClosingEventArgs arg) { if (onCitrix) { InstallerTrigger.Activated = false; } ReguralUpdate(); }
/// <summary> /// Closes the current application. The actual implementation depends on the final target framework. /// </summary> /// <returns><c>true</c> if the application is closed; otherwise <c>false</c>.</returns> public bool CloseApplication() { var eventArgs = new ApplicationClosingEventArgs(); ApplicationClosing.SafeInvoke(this, eventArgs); if (eventArgs.Cancel) { return(false); } ApplicationClosed.SafeInvoke(this); return(true); }
private async void OnApplicationClosing(object sender, ApplicationClosingEventArgs e) { if (!forceClose) { e.Cancel = true; if (isClosing) { return; } isClosing = true; if (await CloseDocuments()) { forceClose = true; await Task.Yield(); navigationService.CloseApplication(); forceClose = false; } isClosing = false; } }
internal static void OnApplicationClosing(object sender, ApplicationClosingEventArgs e) { //var doc = RhinoDoc.ActiveDoc; //if (doc?.Modified ?? false) //{ // string docTitle = doc.Name ?? "Untitled"; // switch (Eto.Forms.MessageBox.Show // ( // "Save changes to " + docTitle + "?", // RhinoApp.Name, // e.Cancellable ? Eto.Forms.MessageBoxButtons.YesNoCancel : Eto.Forms.MessageBoxButtons.YesNo, // Eto.Forms.MessageBoxType.Question // )) // { // case Eto.Forms.DialogResult.Yes: // var docFileName = doc.Path; // if (docFileName is null) // { // using (var dialog = new Eto.Forms.SaveFileDialog()) // { // dialog.FileName = docTitle; // dialog.Filters.Add(new Eto.Forms.FileFilter("Rhino 3D Model", new string[] { "3dm" })); // if (dialog.ShowDialog(MainWindow) != Eto.Forms.DialogResult.Ok) // return /*Result.Cancelled*/; // if (Path.HasExtension(dialog.FileName)) // docFileName = dialog.FileName; // else // docFileName = Path.ChangeExtension(dialog.FileName, dialog.CurrentFilter.Extensions[0]); // } // } // doc.WriteFile(docFileName, new Rhino.FileIO.FileWriteOptions()); break; // case Eto.Forms.DialogResult.No: break; // case Eto.Forms.DialogResult.Cancel: e.Cancel(); return/* Result.Cancelled*/; // } //} }
/// <summary> /// Handler for ApplicationClosing event. /// </summary> private void ApplicationOnClosing(object source, ApplicationClosingEventArgs args) { try { //change InSessionOnly to Never foreach (var addin in addins.AddinCollection) { if (addin.ToolLoadType != LoadType.ThisSessionOnly) { continue; } // (Konrad) Override plug-in settings, remove it from current session and serialize addin.ToolLoadType = LoadType.Never; RemovePlugin(addin); } SettingUtil.WriteConfig(settingPath, addins); } catch (Exception ex) { Log.AppendLog(LogMessageType.EXCEPTION, ex.Message); } }
/// <summary> /// What to do when the application is closing.) /// </summary> void a_ApplicationClosing(object sender, ApplicationClosingEventArgs e) { }
void a_ApplicationClosing(object sender, ApplicationClosingEventArgs e) { throw new NotImplementedException(); }
protected virtual Task OnApplicationClosingEvent(ApplicationClosingEventArgs e) { return(Task.FromResult(0)); }
private void AppClosing(object sender, ApplicationClosingEventArgs args) { App.DocumentCreated -= DocCreatedEvent; App.DocumentCreating -= DocCreatingEvent; UiApp.ApplicationClosing -= AppClosing; }
private void ApplicationClosingEventHandler(object sender, ApplicationClosingEventArgs e) { ApplicationClosing(); }
private void AppClosing(object sender, ApplicationClosingEventArgs args) { Uiapp.ViewActivated -= ViewActivated; Uiapp.ApplicationClosing -= AppClosing; }