/// <summary> Run the shell. </summary> public void Run() { if (_appContext == IntPtr.Zero) { Console.WriteLine(CLASS_NAME + "::Run () ERROR: Application context pointer is zero."); return; } if (_shell == IntPtr.Zero) { Console.WriteLine(CLASS_NAME + "::Run () ERROR: Application shell pointer is zero."); return; } try { // Register a "configure notify action" to application context, translate the "configure notify action", add/overwrite // the shell widget's translation table and set windows manager protocol hook for the shell widget. // This must be can *** BEFORE *** XtRealizeWidget (). RegisterConfigureNotifyAction(_appContext, this.ConfigureNotifyAction); Xtlib.XtRealizeWidget(_shell); SetShellIcon(IconPath); // Register a "delete window action" to application context, translate the "delete window action", add/overwrite // the shell widget's translation table and set windows manager protocol hook for the shell widget. // This must be done *** AFTER *** XtRealizeWidget (). RegisterDeleteWindowAction(_appContext, this.DeleteWindowAction); Xtlib.XtAppMainLoop(_appContext); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } }