Ejemplo n.º 1
0
        public static void Show(Exception ex, Form parent)
        {
            ExForm frm = new ExForm(ex);

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.ShowDialog(parent);
        }
Ejemplo n.º 2
0
        public static void Show(Exception ex)
        {
            ExForm frm = new ExForm(ex);

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.Show();
        }
Ejemplo n.º 3
0
        private void LedFrm_Load(object sender, EventArgs e)
        {
            Text = ledNo;
            try
            {
                led = new Led(Config.Get(ledNo), Convert.ToInt32(Config.Get("CycleTime")) * 1000);

                InitDb();

                if (!string.IsNullOrEmpty(ledSeq))
                {
                    xCount = Convert.ToInt32(Config.Get("XCount"));
                    yCount = Convert.ToInt32(Config.Get("YCount"));
                    int no = int.Parse(ledSeq);
                    int x  = Size.Width * ((no - 1) % xCount) + ((Screen.PrimaryScreen.WorkingArea.Width - Size.Width * xCount) / (xCount + 1) * ((no - 1) % xCount + 1));
                    int y  = Size.Height * ((no - 1) / xCount) + ((Screen.PrimaryScreen.WorkingArea.Height - Size.Height * yCount) / (yCount + 1)) * ((no - 1) / xCount + 1);
                    Location = new Point(x, y);
                }
                timer1.Interval = Convert.ToInt32(Config.Get("RefreshTime")) * 1000;
            }
            catch (Exception ex)
            {
                ExForm.Show(ex);
            }
        }
Ejemplo n.º 4
0
 private void Write2Rom()
 {
     string[] texts = new string[2];
     texts[0] = "               !»¶Ó­¹âÁÙ!";
     texts[1] = "            !ÏÃÃÅAUO×Ô¶¯²Ö¿â!";
     try
     {
         led.show(texts);
     }
     catch (Exception ex)
     {
         ExForm.Show(ex);
     }
 }
Ejemplo n.º 5
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     string[] texts = new string[4];
     texts[0] = texts[3] = textBox1.Text;
     texts[1] = texts[2] = textBox2.Text;
     try
     {
         led.show(texts);
     }
     catch (Exception ex)
     {
         ExForm.Show(ex);
     }
 }
Ejemplo n.º 6
0
 private void Test2_Load(object sender, EventArgs e)
 {
     this.Text       = stationNo;
     timer1.Interval = Convert.ToInt32(Config.Get("RefreshTime")) * 1000;
     try
     {
         if (!string.IsNullOrEmpty(ledNo))
         {
             this.xCount = Convert.ToInt32(Config.Get("XCount"));
             this.yCount = Convert.ToInt32(Config.Get("YCount"));
             int no = int.Parse(ledNo);
             int x  = this.Size.Width * ((no - 1) % xCount) + ((Screen.PrimaryScreen.WorkingArea.Width - this.Size.Width * xCount) / (xCount + 1) * ((no - 1) % xCount + 1));
             int y  = this.Size.Height * ((no - 1) / xCount) + ((Screen.PrimaryScreen.WorkingArea.Height - this.Size.Height * yCount) / (yCount + 1)) * ((no - 1) / xCount + 1);
             this.Location = new Point(x, y);
         }
         //Write2Rom();
     }
     catch (Exception ex)
     {
         ExForm.Show(ex);
     }
 }