コード例 #1
0
 private void Button_Troubleshooting_Click(object sender, EventArgs e)
 {
     if (TroubleshootingWindow.self == null)
     {
         this.Hide();
         TroubleshootingWindow window = new TroubleshootingWindow();
         window.ShowDialog();
         this.Show();
     }
     else
     {
         if (TroubleshootingWindow.self.WindowState == FormWindowState.Minimized)
         {
             TroubleshootingWindow.self.WindowState = FormWindowState.Normal;
         }
         else
         {
             TroubleshootingWindow.self.Show();
         }
     }
 }
コード例 #2
0
 public TroubleshootingWindow()
 {
     InitializeComponent();
     #region Localizing
     this.Text = L18n.Get("TroubleshootingWindow", "Troubleshooting_name");
     this.groupClients.Text = L18n.Get("TroubleshootingWindow", "GroupBox_groupClients");
     this.groupNetwork.Text = L18n.Get("TroubleshootingWindow", "GroupBox_groupNetwork");
     this.labelWarning.Text = L18n.Get("TroubleshootingWindow", "Label_labelWarning");
     this.btnClearCache.Text = L18n.Get("TroubleshootingWindow", "Button_btnClearCache");
     this.btnClearShared.Text = L18n.Get("TroubleshootingWindow", "Button_btnClearShared");
     this.btnIncreaseCache.Text = L18n.Get("TroubleshootingWindow", "Button_btnIncreaseCache");
     this.btnOpenPorts.Text = L18n.Get("TroubleshootingWindow", "Button_btnOpenPorts");
     this.btnSetNetworkThrottling.Text = L18n.Get("TroubleshootingWindow", "Button_btnSet");
     this.btnSetTcpAck.Text = L18n.Get("TroubleshootingWindow", "Button_btnSet");
     this.btnResetNetworkThrottling.Text = L18n.Get("TroubleshootingWindow", "Button_btnReset");
     this.btnResetTcpAck.Text = L18n.Get("TroubleshootingWindow", "Button_btnReset");
     this.labelTcpAck.Text = L18n.Get("TroubleshootingWindow", "Label_labelTcpAck");
     this.labelNetworkThrottling.Text = L18n.Get("TroubleshootingWindow", "Label_labelNetworkThrottling");
     #endregion
     if (Browsers.GetClientByString(SettingsManager.client_name) != Clients.Firefox 
     || Browsers.GetClientByString(SettingsManager.client_name) != Clients.IE)
     {
         btnIncreaseCache.Visible = false;
     }
     labelWarning.Text += Browsers.GetClientLocalizedName(Browsers.GetClientByString(SettingsManager.client_name));
     toolTipForTcp.SetToolTip(this.labelTcpAck, L18n.Get("TroubleshootingWindow", "Tooltip_TcpAck"));
     toolTipForThrottling.SetToolTip(this.labelNetworkThrottling, L18n.Get("TroubleshootingWindow", "Tooltip_NetworkThrottling"));
     if(SettingsManager.lang == "ru")
     {
         linkToWikiArticle.LinkClicked += (o, e) =>
             System.Diagnostics.Process.Start(@"https://ru.tankiwiki.com/Экспериментальное_решение_проблем_с_лагами_и_дисконнектами");
     }
     else
     {
         linkToWikiArticle.Visible = false;
     }
     self = this;
 }
コード例 #3
0
 private void TroubleshootingWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     self = null;
 }