예제 #1
0
        public Options(MainForm p)
        {
            InitializeComponent();
            parent = p;
            trackBar1.Value = parent.speed1;
            trackBar2.Value = parent.speed2 / 500;
            textBox1.Text = trackBar1.Value.ToString();
            parallelMode.Checked = parent.isParallel;

            textBox6.Text = fileON = parent.picON;
            textBox7.Text = fileOFF = parent.picOFF;

            //string path = System.IO.Directory.GetCurrentDirectory();
            //textBox3.Text = path;
            textBox3.Text = parent.servPath;

            if ((trackBar2.Value / 2.0) >= 60)
            {
                double secs = trackBar2.Value / 2.0;
                int mins = (int)Math.Round(secs) / 60;
                textBox4.Text = mins.ToString();
                speed2 = (secs * 1000).ToString();
                textBox5.Text = (secs % 60).ToString();
                label6.Text = "минут";
                textBox5.Visible = true;
                label7.Visible = true;
            }
            else
            {
                textBox4.Text = (trackBar2.Value / 2.0).ToString();
                speed2 = (Convert.ToDouble(textBox4.Text) * 1000).ToString();
                label6.Text = "сек";
                textBox5.Visible = false;
                label7.Visible = false;
            }
        }
예제 #2
0
 public AsynchronousSocketListener(MainForm main)
 {
     parent = main;
 }
예제 #3
0
 public ServerConstructor(MainForm p)
 {
     parent = p;
     parent.success = false;
     InitializeComponent();
 }