Exemple #1
0
 void OnBackendStopped(object ob, EventArgs args)
 {
     // The backend process crashed, try to restart it
     Backend           = null;
     backendController = new ApplicationBackendController(this, channelId);
     backendController.StartBackend();
     OnBackendChanged(true);
 }
		public IsolatedApplication (IsolationMode mode)
		{
			if (mode == IsolationMode.None)
				throw new ArgumentException ("mode");
			channelId = RegisterRemotingChannel (mode);
			backendController = new ApplicationBackendController (this, channelId);
			backendController.StartBackend ();
			OnBackendChanged (false);
		}
Exemple #3
0
 public IsolatedApplication(IsolationMode mode)
 {
     if (mode == IsolationMode.None)
     {
         throw new ArgumentException("mode");
     }
     channelId         = RegisterRemotingChannel(mode);
     backendController = new ApplicationBackendController(this, channelId);
     backendController.StartBackend();
     OnBackendChanged(false);
 }
Exemple #4
0
        internal override void RestartBackend()
        {
            // The backend process needs to be restarted.
            // This is done in background.

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    // Start the new backend
                    ApplicationBackendController newController = new ApplicationBackendController(this, channelId);
                    newController.StartBackend();
                    Gtk.Application.Invoke(newController, EventArgs.Empty, OnNewBackendStarted);
                } catch {
                    // FIXME: show an error message
                }
            });
        }
		void OnBackendStopped (object ob, EventArgs args)
		{
			// The backend process crashed, try to restart it
			Backend = null;
			backendController = new ApplicationBackendController (this, channelId);
			backendController.StartBackend ();
			OnBackendChanged (true);
		}
		internal override void RestartBackend ()
		{
			// The backend process needs to be restarted.
			// This is done in background.
				
			ThreadPool.QueueUserWorkItem (delegate {
				try {
					// Start the new backend
					ApplicationBackendController newController = new ApplicationBackendController (this, channelId);
					newController.StartBackend ();
					Gtk.Application.Invoke (newController, EventArgs.Empty, OnNewBackendStarted);
				} catch {
					// FIXME: show an error message
				}
			});
		}