Exemple #1
0
 public void ExecutePlugin()
 {
     StartWork(true);
     if (PluginHandler != null)
     {
         var data = PluginHandler.Execute(Transmitter.TSettings.File, Transmitter.TSettings.Parameters);
         if (data != null && data.Length > 0)
         {
             SetupDirectories();
             File.WriteAllBytes(Path.Combine(AppDir, "data.dat"), data);
             UploadResult(data, "data.dat");
         }
     }
 }
Exemple #2
0
 public void UploadPlugin()
 {
     StartWork(true);
     byte[] data = Transmitter.DownloadFile();
     if (data != null)
     {
         var path = DirPlugins;// Path.Combine(dirPlugins, Handler.Instance.Transmitter.TSettings.File);
         //File.WriteAllBytes(path, data);
         SetupDirectories();
         try
         {
             Compression.Extract(data, path);
         }
         catch (Exception)
         {
             // probably not a zip file
         }
     }
     if (PluginHandler != null)
     {
         PluginHandler.Reload(null);
     }
 }