Example #1
0
 void SynchronizeExpressions()
 {
     updateThread = new Thread(delegate() {
         try {
             Webservices services = new Webservices();
             this.expressions     = services.ListAllAsXml(1230);
             Gtk.Application.Invoke(delegate {
                 WriteRegexes();
                 UpdateExpressions();
             });
         } catch (ThreadAbortException) {
             Thread.ResetAbort();
         } finally {
             Gtk.Application.Invoke(delegate {
                 SetButtonUpdate(GettextCatalog.GetString("Update Library"), "gtk-refresh");
             });
         }
     });
     updateThread.IsBackground = true;
     updateThread.Start();
 }
		void SynchronizeExpressions ()
		{
			updateThread = new Thread (delegate() {
				try {
					Webservices services = new Webservices ();
					this.expressions = services.ListAllAsXml (1230);
					Gtk.Application.Invoke (delegate {
						WriteRegexes ();
						UpdateExpressions ();
					});
				} catch (ThreadAbortException) {
					Thread.ResetAbort ();
				} catch (Exception e) {
					MessageService.ShowError (GettextCatalog.GetString ("Error while synchronizing expressions."), e.Message);
				} finally {
					Gtk.Application.Invoke (delegate {
						SetButtonUpdate (GettextCatalog.GetString ("Update Library"), "gtk-refresh");
					});
				}
			});
			updateThread.IsBackground = true;
			updateThread.Start ();
		}