System.Windows.Forms.Form F = new System.Windows.Forms.Form();
F.Text = "Укажите или замените прокси";
F.Width=430; //- задает ширину формы в пикселях
F.Height=250; //- задает высоту формы в пикселях
F.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
F.BringToFront();
//создаем кнопку Далее
System.Windows.Forms.Button button = new System.Windows.Forms.Button();
//задаем имя чекбоксам
button.Text = "Сохранить";
//положение в окне
button.Location = new System.Drawing.Point(20,160);
//размер кнопочки
button.Size=new System.Drawing.Size(80, 25);
//кидаем на форму
F.Controls.Add(button);
button.Click+= delegate(object sender, System.EventArgs e)
{
F.Close();
};
//текст напротив окна
System.Windows.Forms.Label label1 = new System.Windows.Forms.Label();
label1.Text = "IP";
label1.Location = new System.Drawing.Point(280,40);
label1.Font = new Font("Arial", 15, FontStyle.Italic);
label1.AutoSize=true;
F.Controls.Add(label1);
//создаем richтекстбокс IP Proxy
System.Windows.Forms.RichTextBox rtboxIP = new System.Windows.Forms.RichTextBox();
//указываем местоположение
rtboxIP.Location = new System.Drawing.Point(20,40);
//указываем размеры в пикселях
rtboxIP.Width =255;
rtboxIP.Height = 25;
//крепим на форму
F.Controls.Add(rtboxIP);
//Устанавливаем значение
rtboxIP.Text=project.Variables["proxy"].Value;
//текст напротив окна
System.Windows.Forms.Label label2 = new System.Windows.Forms.Label();
label2.Text = "Логин";
label2.Location = new System.Drawing.Point(280,70);
label2.Font = new Font("Arial", 15, FontStyle.Italic);
label2.AutoSize=true;
F.Controls.Add(label2);
//создаем richтекстбокс login Proxy
System.Windows.Forms.RichTextBox rtboxlog = new System.Windows.Forms.RichTextBox();
//указываем местоположение
rtboxlog.Location = new System.Drawing.Point(20,70);
//указываем размеры в пикселях
rtboxlog.Width =255;
rtboxlog.Height = 25;
//крепим на форму
F.Controls.Add(rtboxlog);
//Устанавливаем значение
rtboxlog.Text=project.Variables["proxylog"].Value;
//текст напротив окна
System.Windows.Forms.Label label3 = new System.Windows.Forms.Label();
label3.Text = "Пароль";
label3.Location = new System.Drawing.Point(280,100);
label3.Font = new Font("Arial", 15, FontStyle.Italic);
label3.AutoSize=true;
F.Controls.Add(label3);
//создаем richтекстбокс Pass proxy
System.Windows.Forms.RichTextBox rtboxpass = new System.Windows.Forms.RichTextBox();
//указываем местоположение
rtboxpass.Location = new System.Drawing.Point(20,100);
//указываем размеры в пикселях
rtboxpass.Width =255;
rtboxpass.Height = 25;
//крепим на форму
F.Controls.Add(rtboxpass);
//Устанавливаем значение
rtboxpass.Text=project.Variables["proxypass"].Value;
//текст напротив окна
System.Windows.Forms.Label label4 = new System.Windows.Forms.Label();
label4.Text = "Порт";
label4.Location = new System.Drawing.Point(280,130);
label4.Font = new Font("Arial", 15, FontStyle.Italic);
label4.AutoSize=true;
F.Controls.Add(label4);
//создаем richтекстбокс Port Proxy
System.Windows.Forms.RichTextBox rtboxport = new System.Windows.Forms.RichTextBox();
//указываем местоположение
rtboxport.Location = new System.Drawing.Point(20,130);
//указываем размеры в пикселях
rtboxport.Width =255;
rtboxport.Height = 25;
//крепим на форму
F.Controls.Add(rtboxport);
//Устанавливаем значение
rtboxport.Text=project.Variables["proxyport"].Value;
//запускаем форму
F.ShowDialog();
//забираем введенные значения в переменные
project.Variables["proxy"].Value = rtboxIP.Text;
project.Variables["proxylog"].Value = rtboxlog.Text;
project.Variables["proxypass"].Value = rtboxpass.Text;
project.Variables["proxyport"].Value = rtboxport.Text;
project.Variables["proxyzenno"].Value = "http://"+""+rtboxlog.Text+":"+rtboxpass.Text+"@"+rtboxIP.Text+":"+rtboxport.Text;
return 1;