コード例 #1
0
 private void RefreshPortNames(object sender = null, EventArgs e = null)
 {
     using (new UiControlBusyScope(sender))
     {
         cbPorts.Items.Clear();
         cbPorts.Items.Add("Fake");
         cbPorts.Items.AddRange(ComHelper.GetPortNames());
     }
 }
コード例 #2
0
        private void CreateOsd(string portName)
        {
            try
            {
                osd?.Close();
                port = new PortWrapper(ComHelper.CreatePort(portName));

                port.Writen    += Port_Writen;
                port.Readed    += Port_Readed;
                port.PortFlush += Port_PortFlush;

                osd          = new PixelOSD(port);
                front.Status = "PixelOSD created";
            }
            catch (Exception ex)
            {
                front.Status = ex.Message;
            }
        }