private void fmMain_Load(object sender, EventArgs e) { img1 = Image.FromFile(Application.StartupPath + "\\img\\1.bmp"); img2 = Image.FromFile(Application.StartupPath + "\\img\\2.bmp"); //TestSCL(); //Ping p = new Ping(); //PingReply r = p.Send("101.0.0.1"); //if (r.Status == IPStatus.TimedOut) //{ // return; //} //p.Dispose(); InitCanvas(); //LedHelper.Init(2); //LedHelper.AddLed("192.168.16.98", 1); LedHelper.Init(1); //LedHelper.ReConnectTime = 5; //LedHelper.PingTime = 10; //LedHelper.LocPort = 8500; LedHelper.AddLed("192.168.16.99", 0, 128, 96); LedHelper.Open(); thread = new TLoopThread(OnThread); thread.Start(); }
private void tbDisp_Enter(object sender, EventArgs e) { dsp = new XMLDisplay(edXml.Text); //dsp = XMLDisplay.FromFile(....); dsp.BeforeRender = BeforeRender; dsp.AfterRender = AfterRender; if (pic.Image != null) { pic.Image.Dispose(); } int s = 2; pic.Image = new Bitmap(dsp.Size.Width * s, dsp.Size.Height * s); LedHelper.Init(3); LedHelper.AddLed("192.168.16.97", 1, dsp.Size.Width, dsp.Size.Height); LedHelper.Open(); tmDisp.Enabled = true; }