Exemple #1
0
 public static void InsertStatistic(string appName, string plugin, string command, string version, string doc)
 {
     Task.Run(() =>
     {
         try
         {
             using (var pg = new C_PluginStatisticTableAdapter())
             {
                 pg.Insert(appName, plugin ?? string.Empty, command ?? string.Empty, version ?? string.Empty,
                           doc ?? string.Empty, Environment.UserName, DateTime.Now, null, Path.GetFileName(doc));
             }
         }
         catch (Exception ex)
         {
             Logger.Log.Error(ex, "PluginStatisticsHelper Insert.");
         }
     });
 }
 public static void PluginStart(CommandStart command)
 {
     Task.Run(() =>
     {
         if (General.IsCadManager()) return;
         try
         {
             var pg = new C_PluginStatisticTableAdapter();
             pg.Insert("AutoCAD", command.Plugin, command.CommandName,
                 FileVersionInfo.GetVersionInfo(command.Assembly.Location).ProductVersion,
                 command.Doc, Environment.UserName, DateTime.Now);
         }
         catch (Exception ex)
         {
             Logger.Log.Error(ex, "PluginStatisticsHelper.PluginStart");
         }
     });
 }