Example #1
0
        public UCMain(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;

            string path = formFrame.configManage.FileDir + @"\main_btn_down.png";
            if(File.Exists(path))
            {
                bmBtnDown = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\main_btn_up.png";
            if(File.Exists(path))
            {
                bmBtnUp = new Bitmap(path);
            }

            pbRun.Image = bmBtnUp;
            pbCalib.Image = bmBtnUp;
            pbHandDebug.Image = bmBtnUp;
            pbTongji.Image = bmBtnUp;
            pbParam.Image = bmBtnUp;
            pbZero.Image = bmBtnUp;
            pbExit.Image = bmBtnUp;
            //panelBody = new PanelBody();
            //panelBody.Init(formFrame, 12, 22, 606, 387);
            //panelBody.Init(formFrame, 12, 22, 604, 385);
            //Controls.Add(panelBody);
        }
Example #2
0
        public UCCalib(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            string path = formFrame.configManage.FileDir + @"\main_btn_down.png";
            if (File.Exists(path))
            {
                bmBtnDown = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\main_btn_up.png";
            if (File.Exists(path))
            {
                bmBtnUp = new Bitmap(path);
            }

            pbClear.Image = bmBtnUp;
            pbZero.Image = bmBtnUp;
            pbCalib.Image = bmBtnUp;
            pbExit.Image = bmBtnUp;

            //timer.Interval = configManage.cfg.paramFormWeight.Interval;
            timer.Interval = 200;
            timer.Tick += new EventHandler(timer_Tick);
            timer.Enabled = false;
        }
Example #3
0
        public FormInput(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.SetAckVisible(true);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            listScreen.Add(" 0 ");
            listScreen.Add(" 1 ");
            listScreen.Add(" 2 ");
            listScreen.Add(" 3 ");
            listScreen.Add(" 4 ");
            listScreen.Add("+/-");
            listScreen.Add("<- ");

            listScreen.Add(" 5 ");
            listScreen.Add(" 6 ");
            listScreen.Add(" 7 ");
            listScreen.Add(" 8 ");
            listScreen.Add(" 9 ");
            listScreen.Add(" . ");
            listScreen.Add("CE");
        }
Example #4
0
 public UCRadioOnline(FormFrame f)
 {
     InitializeComponent();
     formFrame = f;
     ucButtons = new UCButtons(f, this.pnRight);
     ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
     this.pnRight.Controls.Add(ucButtons);
 }
Example #5
0
 public UCSetMenu(FormFrame f)
     : base(f)
 {
     ucButtons.RegisterBtnEvent(ClickUp, ClickDown, null, null,null);
     InitPage();
     GetPageTotal();
     ShowPage(0);
 }
Example #6
0
 public FormCalib(FormFrame f)
 {
     InitializeComponent();
     formFrame = f;
     formStyle = new FormStyle();
     formStyle.SetStyle(f, this);
     formStyle.ucButtons.SetAckText(cstrCalib);
     Init();
 }
Example #7
0
        public UCStatus(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            pbAlarm.Visible = false;
            pbFault.Visible = false;
            pbLock.Visible = false;
            pbConnect.Visible = false;
            pbGprs.Visible = false;
            pbGps.Visible = false;

            Timer tm = new Timer();
            tm.Interval = 1000;
            tm.Tick += new EventHandler(tm_Tick);
            tm.Enabled = true;

            #region ����ԭʼͼƬ ע�͵�
            ////GPRSͼƬ����
            //Bitmap bmGprs = (Bitmap)this.pbGprs.Image;
            //for (int w = 0; w < bmGprs.Width; w++)
            //{
            //    for (int h = 0; h < bmGprs.Height; h++)
            //    {
            //        Color backColor = ((Bitmap)this.pbBackground.Image).GetPixel(500, 3 + h);
            //        Color pixelColor = bmGprs.GetPixel(w, h);

            //        //if ((pixelColor.R < 50) && (pixelColor.G < 50) && (pixelColor.B < 50))
            //        if (pixelColor.R == 0)
            //        {
            //            bmGprs.SetPixel(w, h, Color.FromArgb(0, 0, 0));
            //        }
            //        else
            //        {
            //            bmGprs.SetPixel(w, h, backColor);
            //        }
            //    }
            //}
            //this.pbGprs.Image = bmGprs;
            ////connectͼƬ����
            //Bitmap bmConnect = (Bitmap)this.pbConnect.Image;
            //for (int w = 0; w < bmConnect.Width; w++)
            //{
            //    for (int h = 0; h < bmConnect.Height; h++)
            //    {
            //        Color backColor = ((Bitmap)this.pbBackground.Image).GetPixel(500, 3 + h);
            //        Color pixelColor = bmConnect.GetPixel(w, h);

            //        if ((pixelColor.R > 220) && (pixelColor.G > 220) && (pixelColor.B > 220))
            //        {
            //            bmConnect.SetPixel(w, h, backColor);
            //        }
            //    }
            //}
            //this.pbConnect.Image = bmConnect;
            #endregion
        }
Example #8
0
        public UCList(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            timer.Interval = 1000;
            timer.Tick += new EventHandler(timer_Tick);
        }
Example #9
0
        public FormWireless(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            bmAckUp = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_up.png");
            bmAckDown = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_down.png");

            bmReturnUp = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_up.png");
            bmReturnDown = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_down.png");

            pbAck.Image = bmAckUp;
            pbReturn.Image = bmReturnUp;
        }
Example #10
0
        public static DialogResult Show(FormFrame f,string _str, string _time)
        {
            _msgBox = new FormXZJParam(f);
            _msgBox.button1.Focus();
            _msgBox.textBox1.Text = _str;
            _msgBox.textBox2.Text = _time;

            _buttonResult = DialogResult.Cancel;
            _msgBox.Left = (800 - _msgBox.Width) / 2;
            _msgBox.Top = (600 - _msgBox.Height) / 2;

            _msgBox.ShowDialog();
            return _buttonResult;
        }
Example #11
0
        public UCRun(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            if (focusBox == null)
            {
                focusBox = new List<TextBox>();
                focusBox.Add(textBox5);
                focusBox.Add(textBox6);
                focusBox.Add(textBox7);
                focusBox.Add(textBox8);
                focusBox.Add(textBox9);
                focusBox.Add(textBox10);
                focusBox.Add(textBox11);
                focusBox.Add(textBox12);
                focusBox.Add(textBox13);
                focusBox.Add(textBox14);

            }
            headInfos.Add(new HeadUIInfo(1, Color.Green, "M")); //参与组合
            headInfos.Add(new HeadUIInfo(2, Color.Red, "R")); //等待组合
            headInfos.Add(new HeadUIInfo(3, Color.Black, "U")); //进料斗故障
            headInfos.Add(new HeadUIInfo(4, Color.Black, "D")); //称重斗故障
            headInfos.Add(new HeadUIInfo(5, Color.Black, "S")); //模块故障
            headInfos.Add(new HeadUIInfo(6, Color.Black, "B")); //驱动卡故障
            headInfos.Add(new HeadUIInfo(7, Color.Black, "I")); //斗禁用
            headInfos.Add(new HeadUIInfo(8, Color.Blue, "Y")); //超重强排
            headInfos.Add(new HeadUIInfo(9, Color.Blue, "L")); //多次不参与组合强排
            headInfos.Add(new HeadUIInfo(10, Color.Blue, "P")); //开机自检通过

            string path = formFrame.configManage.FileDir + @"\main_btn_down.png";
            if (File.Exists(path))
            {
                bmBtnDown = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\main_btn_up.png";
            if (File.Exists(path))
            {
                bmBtnUp = new Bitmap(path);
            }

            pbStart.Image = bmBtnUp;
            pbStop.Image  = bmBtnUp;
            pbExit.Image = bmBtnUp;
            pbSimu.Image = bmBtnUp;
            //timer1.Interval = 1000;
            //timer1.Tick += new EventHandler(timer1_Tick);
            //timer1.Enabled = true;
        }
Example #12
0
        public FormPicture(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;

            pic_total = getFileCount(formFrame.configManage.FileDir + @"\formula\");
            pic_total_page = (pic_total + pbx_number - 1) / pbx_number;

            int left = (Width - pbx_row_number * pb_width + 5 - 100) / 2;
            int top = 10;// (Height - pbx_col_number * pb_height + 5 - 100) / 2;
            Bitmap bmp = GetBitmap(formFrame.configManage.FileDir + @"\north_btn_up.png");
            for (int i = 0; i < pbx_number; i++)
            {
                PictureBox pb = new PictureBox();
                pb.Width = pb_width;
                pb.Height = pb_height;

                pb.Left = left + (i % pbx_row_number) * (pb.Width + 5);
                pb.Top  = top + (i / pbx_col_number) * (pb.Height + 5);

                pb.SizeMode = PictureBoxSizeMode.StretchImage;
                pb.MouseDown += pictureBox_MouseDown;
                //pb.Image = bmp;
                pb.Tag = i+1;
                pbx.Add(pb);
                this.Controls.Add(pb);
            }
            load_pic(0);

            string path = formFrame.configManage.FileDir + @"\square_btn_up.png";
            if (File.Exists(path))
            {
                bmUp = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\square_btn_down.png";
            if (File.Exists(path))
            {
                bmDown = new Bitmap(path);
            }

            pbPrev.Image = bmUp;
            pbNext.Image = bmUp;
            pbAck.Image = bmUp;
            pbExit.Image = bmUp;
        }
Example #13
0
        public FormMyCalib(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            string path = formFrame.configManage.FileDir + @"\main_btn_down.png";
            if (File.Exists(path))
            {
                bmBtnDown = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\main_btn_up.png";
            if (File.Exists(path))
            {
                bmBtnUp = new Bitmap(path);
            }

            pbClear.Image = bmBtnUp;
            pbZero.Image = bmBtnUp;
            pbCalib.Image = bmBtnUp;
            pbExit.Image = bmBtnUp;
        }
Example #14
0
        public FormRadio(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.SetAckVisible(true);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            string path = formFrame.configManage.FileDir + @"\check.png";
            if (File.Exists(path))
            {
                bmCheck = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\uncheck.png";
            if (File.Exists(path))
            {
                bmUncheck = new Bitmap(path);
            }
        }
Example #15
0
        public UCDBList(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn, ClickExt);
            ucButtons.SetExtVisible(true);
            this.pnRight.Controls.Add(ucButtons);

            bmRightUp  = GetBitmap(formFrame.configManage.FileDir + @"\east_btn_up.png");
            bmRightDown = GetBitmap(formFrame.configManage.FileDir + @"\east_btn_down.png");

            bmLeftUp= GetBitmap(formFrame.configManage.FileDir + @"\west_btn_up.png");
            bmLeftDown= GetBitmap(formFrame.configManage.FileDir + @"\west_btn_down.png");

            bmDownloadUp = GetBitmap(formFrame.configManage.FileDir + @"\main_btn_up.png");
            bmDownloadDown = GetBitmap(formFrame.configManage.FileDir + @"\main_btn_down.png");

            pbLeft.Image = bmLeftUp;
            pbRight.Image = bmRightUp;
        }
Example #16
0
        public UCDataList(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;

            string path = formFrame.configManage.FileDir + @"\main_btn_down.png";
            if (File.Exists(path))
            {
                bmBtnDown = new Bitmap(path);
            }
            path = formFrame.configManage.FileDir + @"\main_btn_up.png";
            if (File.Exists(path))
            {
                bmBtnUp = new Bitmap(path);
            }

            pbPrevPage.Image = bmBtnUp;
            pbNextPage.Image = bmBtnUp;
            pbClear.Image = bmBtnUp;
            pbExit.Image = bmBtnUp;
        }
Example #17
0
        int yCount = 0; //���򰴼�����

        #endregion Fields

        #region Constructors

        public FormPlate(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;

            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.SetAckVisible(true);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            plateCharList = new List<PlateChar>();
            plateCharList.AddRange(formFrame.configManage.cfg.plateCharList);

            for (int i = 0; i <= 9; i++)
            {
                PlateChar plateChar = new PlateChar();
                plateChar.display = i.ToString();
                plateChar.value = i.ToString();
                plateCharList.Add(plateChar);
            }
            for (char i = 'A'; i <= 'Z'; i++)
            {
                PlateChar plateChar = new PlateChar();
                plateChar.display = i.ToString();
                plateChar.value = i.ToString();
                plateCharList.Add(plateChar);
            }
            yCount = plateCharList.Count / xCount;
            if (plateCharList.Count % xCount != 0) yCount++;

            listScreen = new List<string>(xCount * yCount);
            for (int i = 0; i < plateCharList.Count; i++)
            {
                listScreen.Add(plateCharList[i].display);
            }
            listScreen.Add("<- ");
            listScreen.Add("CE");
        }
Example #18
0
        public FormPwd(FormFrame f, Purview pv, bool _bInputOrValid)
        {
            InitializeComponent();
            formFrame = f;
            bInputOrValid = _bInputOrValid;

            LoginPurview = pv;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.SetAckVisible(true);
            if (pv == Purview.None)
            {
                ucButtons.SetPageCode(0, 1);
            }
            else
            {
                ucButtons.SetPageCode(0, 2);
            }

            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            listScreen.Add(" 0 ");
            listScreen.Add(" 1 ");
            listScreen.Add(" 2 ");
            listScreen.Add(" 3 ");
            listScreen.Add(" 4 ");
            listScreen.Add("+/-");
            listScreen.Add("<- ");

            listScreen.Add(" 5 ");
            listScreen.Add(" 6 ");
            listScreen.Add(" 7 ");
            listScreen.Add(" 8 ");
            listScreen.Add(" 9 ");
            listScreen.Add(" . ");
            listScreen.Add("CE");
        }
Example #19
0
        public UCButtons(FormFrame _formFrame, Panel _panel)
        {
            InitializeComponent();
            formFrame = _formFrame;
            panel = _panel ;

            bmUpUp = GetBitmap(formFrame.configManage.FileDir + @"\north_btn_up.png");
            bmUpDown = GetBitmap(formFrame.configManage.FileDir + @"\north_btn_down.png");

            bmDownUp = GetBitmap(formFrame.configManage.FileDir + @"\south_btn_up.png");
            bmDownDown = GetBitmap(formFrame.configManage.FileDir + @"\south_btn_down.png");

            bmAckUp = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_up.png");
            bmAckDown = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_down.png");

            bmReturnUp = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_up.png");
            bmReturnDown = GetBitmap(formFrame.configManage.FileDir + @"\square_btn_down.png");

            pbUp.Image = bmUpUp;
            pbDown.Image = bmDownUp;
            pbAck.Image = bmAckUp;
            pbReturn.Image = bmReturnUp;
            pbExt.Image = bmReturnUp;
        }
Example #20
0
        public void SetStyle(FormFrame formFrame, Form form)
        {
            formHost = form;

            //new class
            pnLeft = new System.Windows.Forms.Panel();
            pnRight = new System.Windows.Forms.Panel();
            ucButtons = new UCButtons(formFrame, pnRight);

            //pnLeft
            pnLeft.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
            pnLeft.Location = new System.Drawing.Point(28, 24);
            pnLeft.Name = "pnLeft";
            pnLeft.Size = new System.Drawing.Size(616, 380);

            //pnRight
            pnRight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(224)))), ((int)(((byte)(255)))));
            pnRight.Location = new System.Drawing.Point(650, 0);
            pnRight.Name = "pnRight";
            pnRight.Size = new System.Drawing.Size(150, 432);

            //ucButtons
            ucButtons.SetAckVisible(true);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            pnRight.Controls.Add(ucButtons);

            //form
            form.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            form.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            form.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(244)))), ((int)(((byte)(255)))));
            form.ClientSize = new System.Drawing.Size(798, 407);
            form.Controls.Add(this.pnRight);
            form.Controls.Add(this.pnLeft);
            form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            form.Location = new System.Drawing.Point(0, 48);
        }
Example #21
0
        public FormDateTime(FormFrame f)
        {
            InitializeComponent();
            formFrame = f;
            ucButtons = new UCButtons(f, this.pnRight);
            ucButtons.SetAckVisible(true);
            ucButtons.RegisterBtnEvent(ClickUp, ClickDown, ClickAck, ClickReturn,null);
            this.pnRight.Controls.Add(ucButtons);

            this.dateTimePicker.Format = DateTimePickerFormat.Custom;
            this.dateTimePicker.CustomFormat = "yyyyÄêMMÔÂddÈÕ";
            for (int i = 0; i < 24; i++ )
            {
                cbHour.Items.Add(i);
            }
            for (int i = 0; i < 60; i++)
            {
                cbMinute.Items.Add(i);
                cbSecond.Items.Add(i);
            }
            cbHour.Text = "0";
            cbMinute.Text = "0";
            cbSecond.Text = "0";
        }
Example #22
0
 public FormLog(FormFrame f)
 {
     InitializeComponent();
     formFrame = f;
 }
Example #23
0
 public FormXZJ(FormFrame f,int id)
 {
     InitializeComponent();
     formula_id = id;
     formFrame = f;
 }
Example #24
0
 public FormXZJParam(FormFrame f)
 {
     formFrame = f;
     InitializeComponent();
 }
Example #25
0
 public void Init(FormFrame f)
 {
     formFrame = f;
     _FilePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName) + @"\pwd.xml";
     if(!File.Exists(_FilePath))
     {
         CreateConfigValue(_FilePath);
     }
     _CurPurview = Purview.None;
     _DriverPwd = GetConfigValue(_FilePath, cstrDriver);
     _AdminPwd = GetConfigValue(_FilePath, cstrAdmin);
     //_CtrlAdmin = "";
 }