コード例 #1
0
            void it_Click(object sender, EventArgs e)
            {
                var btn  = (ToolStripItem)sender;
                var item = (Item)btn.Tag;

                UsageStats.Usage("context_online_help", "url", item.Link);
                System.Diagnostics.Process.Start(item.Link);
            }
コード例 #2
0
ファイル: UsageStats.cs プロジェクト: janproch/datadmin
 public void Send()
 {
     if (EventType == null)
     {
         return;
     }
     lock (this)
     {
         if (m_isSent)
         {
             return;
         }
         UsageStats.Usage(CreateRecord());
         m_isSent = true;
     }
 }
コード例 #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");
 }