Esempio n. 1
0
 private void OnPreparedExpand(IAsyncResult res)
 {
     try
     {
         try
         {
             m_node.EndLoadChildren(res);
             m_tree.Tree.BeginUpdate();
             m_expanding = false;
             FillChildren();
             Expand();
             RefreshSelf();
             m_node.NotifyExpanded();
         }
         finally
         {
             m_tree.Tree.EndUpdate();
         }
     }
     catch (Exception e)
     {
         Errors.Report(e);
     }
     ProcessRegister.RemoveBackgroundTask("s_expand");
 }
Esempio n. 2
0
 void LoadedData(IAsyncResult async)
 {
     try
     {
         async.StandaloneEndInvoke();
         Controls.ShowError(false, null, ControlVisibility);
     }
     catch (Exception e)
     {
         HandleError(e);
     }
     Controls.ShowProgress(false, null, ControlVisibility);
     ProcessRegister.RemoveBackgroundTask("s_loading_data");
     ShowDataInGui();
     m_isLoading = false;
 }
Esempio n. 3
0
 private void Connected(IAsyncResult async)
 {
     try
     {
         m_connecting = false;
         m_conn.EndOpen(async);
         UsageStats.Usage("dbconnect",
                          "dialect", m_conn.Dialect != null ? m_conn.Dialect.DialectName : "",
                          "dbversion", m_conn.SystemConnection != null ? m_conn.SystemConnection.ServerVersion : "",
                          "type", m_conn.SystemConnection != null ? m_conn.SystemConnection.GetType().FullName : m_conn.GetType().FullName);
         //Properties["connected"] = "1";
         DispatchChangedProperties();
         CallRefresh();
         OnConnect();
     }
     catch (Exception e)
     {
         Errors.Report(e);
         m_conn.BeginClose(Async.CreateInvokeCallback(RealNode.Invoker, (AsyncCallback)Disconnected));
         CallRefresh();
     }
     ProcessRegister.RemoveBackgroundTask("s_connect");
 }