Exit Origin.
VB: Function Exit As Boolean
C++: bool Exit
C#: bool Exit
A boolean value with true indicating Origin exited and false indicating it did not exit.
Private Sub ExitOrigin() Dim bExit As Boolean bExit = True If app.IsModified Then If MsgBox("Project is modified." & vbNewLine & "Do you still want to exit?", vbYesNo) = vbNo Then bExit = False End If End If If bExit Then bExit = app.Exit End If If bExit Then MsgBox ("Origin exited") Else MsgBox ("Origin is still running") End If End Sub
using Origin; // allow using Exit without having to write Origin.Exit static void ExitOrigin() { bool bExit = true; ApplicationSI app = new Origin.ApplicationSI(); if (app.IsModified) { Console.WriteLine("Project modified.\nDo you still want to exit? (Y/N)"); ConsoleKeyInfo keyInfo; keyInfo = Console.ReadKey(); if (keyInfo.KeyChar != 'Y' && keyInfo.KeyChar != 'y') bExit = false; } if (bExit) bExit = app.Exit(); if (bExit) Console.WriteLine("Origin Exited"); else Console.WriteLine("Origin is still running"); Console.ReadKey(); }
import OriginExt as O app = O.Application(); app.Visible = app.MAINWND_SHOW app.Exit()
8.0SR2