Beispiel #1
0
        private void NewDevice_Load(object sender, EventArgs e)
        {
            G.sourceSQL   = G.defautSQL;
            G.curTab      = "TYPE";
            NewVariable   = new NewVariable(fm1);
            G.pNewDevice  = new Point(this.Width, this.Height);
            this.Location = new Point(fm1.Location.X + 10, fm1.Location.Y + 80);
            this.TopMost  = true;
            cbVia.Items.Clear();
            cbVia.DisplayMember = "Text";
            cbVia.ValueMember   = "Value";
            cbVia.Items.Add(new { Text = "USB", Value = "0" });
            cbVia.Items.Add(new { Text = "SERIALPORT", Value = "1" });
            cbVia.Items.Add(new { Text = "ENTHERNET", Value = "2" });

            cbVia.SelectedIndex = 0;
            LoadData(G.curTab);
            G.spicReview.X = picReview.Width;
            G.spicReview.Y = picReview.Height;

            /*
             * cbArea.Items.Clear();
             * cbArea.DisplayMember = "Text";
             * cbArea.ValueMember = "Value";
             * cbArea.Items.Add(new { Text = "R", Value = "0" });
             * cbArea.Items.Add(new { Text = "MR", Value = "1" });
             * cbArea.Items.Add(new { Text = "DM", Value = "2" });
             * cbArea.Items.Add(new { Text = "EM", Value = "3" });
             * cbArea.Items.Add(new { Text = "FM", Value = "4" });
             * cbArea.Items.Add(new { Text = "W", Value = "5" });
             * cbArea.SelectedIndex = 0;
             */
        }
Beispiel #2
0
        private void FormLoad()
        {
            NewDevice        = new NewDevice(this);
            NewVariable      = new NewVariable(this);
            G.pPen           = new Point(0, 0);
            cbTab.DataSource = Enum.GetValues(typeof(typeVariable));
            bm = new Bitmap(picMap.Width, picMap.Height);
            IPHostEntry ip = Dns.GetHostByName(Dns.GetHostName());

            G.AddIPLoacal = ip.AddressList[0].ToString();
            txtIPMC.Text  = G.AddIPLoacal;
            G.pForm1      = this.Location;
            G.sForm1      = new Point(this.Width, this.Height);
            Data.LoadSQLITE LoadSQL = new Data.LoadSQLITE(PicMap.Width);
            picMap.Invalidate();
        }