private void cmdSendProj_Click(object sender, EventArgs e) { try { // get the index from the combo box int idx = cmbCommands.SelectedIndex; if (idx == -1) { return; } ProjectorCommand cmd = UVDLPApp.Instance().m_proj_cmd_lst.m_commands[idx]; byte[] dat = cmd.GetBytes(); if (dat != null) { UVDLPApp.Instance().m_deviceinterface.DriverProjector.Write(dat, dat.Length); } } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }
private void cmdSendProj_Click(object sender, EventArgs e) { try { // get the index from the combo box int idx = cmbCommands.SelectedIndex; if (idx == -1) { return; } ProjectorCommand cmd = UVDLPApp.Instance().m_proj_cmd_lst.m_commands[idx]; byte[] dat = cmd.GetBytes(); if (dat != null) { int idx2 = cmbDisplays.SelectedIndex; if (idx2 == -1) { return; } MonitorConfig mc = UVDLPApp.Instance().m_printerinfo.m_lstMonitorconfigs[idx2]; //mc.m_displayconnection. //get the correct projector driver DeviceDriver prjdrv = UVDLPApp.Instance().m_deviceinterface.GetDriver(idx2); if (prjdrv.Connected) { prjdrv.Write(dat, dat.Length); // write it } else { MessageBox.Show("Projector Driver Not connected"); } } } catch (Exception ex) { DebugLogger.Instance().LogError(ex.Message); } }