Пример #1
1
 private void renameCurrentToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Prompt prompt = new Prompt("Please select new tab name", "Type new tab name:", tab.SelectedTab.Text);
     if (prompt.ShowDialog() == DialogResult.OK) tab.SelectedTab.Text = prompt.Result;
 }
Пример #2
1
 private void renameCurrentTab_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     Prompt prompt = new Prompt("Please select new tab name", "Type new tab name:", tab.SelectedTab.Text);
     if (prompt.ShowDialog() == DialogResult.OK) tab.SelectedTab.Text = prompt.Result;
 }
Пример #3
-1
 private void setDownloadSpeedToToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Prompt prompt = new Prompt("Please type valid integer value", "Type new download speed for all tabs:", "100");
     if (prompt.ShowDialog() == DialogResult.OK)
     {
         int value;
         try
         {
             value = int.Parse(prompt.Result);
         }
         catch
         {
             MessageBox.Show("Invalid value!\nTry again!", "Error");
             return;
         }
         foreach (TabPage tabb in tab.TabPages)
         {
             if (GetTabType(tabb) == TabType.RatioMaster) ((RM)tabb.Controls[0]).updateTextBox(((RM)tabb.Controls[0]).downloadRate, value.ToString());
         }
     }
 }