예제 #1
0
 private void checkBox_tracker_enabled_CheckedChanged(object sender, EventArgs e)
 {
     Settings.TrackerEnabled = checkBox_tracker_enabled.Checked;
     Settings.Save();
     if (Settings.TrackerEnabled)
     {
         if (File.Exists("node.dll") || File.Exists($@"{Environment.GetEnvironmentVariable("windir")}\node.dll"))
         {
             TrackerForm       = new TrackerForm(this);
             TrackerFormLoaded = true;
             TrackerForm.Show();
         }
         else
         {
             TrackerFormLoaded = false;
             checkBox_tracker_enabled.Enabled = false;
             ShowNotification("notification-dll-missing", "node.dll");
             Task.Factory.StartNew(() =>
             {
                 WebApi.Download($"http://svn.diemoe.net/ff14_diemoe/tags/DFAssist_CN/dll/node.dll", $@"{Environment.GetEnvironmentVariable("windir")}\node.dll", true, nodedll_callback);
             });
         }
     }
     else
     {
         tracker_close();
     }
     button_tracker_open.Enabled = TrackerFormLoaded;
 }
예제 #2
0
 private void nodedll_callback()
 {
     Settings.NodeVersion = Global.NODE_NEED;
     Settings.Save();
     this.Invoke(() =>
     {
         TrackerForm       = new TrackerForm(this);
         TrackerFormLoaded = true;
         TrackerForm.Show();
         checkBox_tracker_enabled.Enabled = true;
         button_tracker_open.Enabled      = TrackerFormLoaded;
     });
 }