public frmProjCommand()
 {
     InitializeComponent();
     m_pc = null;
     SetData();
     DisplayCommandList();
 }
示例#2
0
 public frmProjCommand()
 {
     InitializeComponent();
     m_pc = null;
     SetData();
     DisplayCommandList();
 }
示例#3
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            //prjcmdlst
            ProjectorCommand cmd = new ProjectorCommand();

            UVDLPApp.Instance().m_proj_cmd_lst.m_commands.Add(cmd);
            DisplayCommandList();
            UVDLPApp.Instance().SaveProjectorCommands(UVDLPApp.Instance().m_appconfig.ProjectorCommandsFile);
        }
示例#4
0
        private void cmdDelete_Click(object sender, EventArgs e)
        {
            if (lbCommands.SelectedIndex == -1)
            {
                return;
            }
            ProjectorCommand cmd = UVDLPApp.Instance().m_proj_cmd_lst.m_commands[lbCommands.SelectedIndex];

            UVDLPApp.Instance().m_proj_cmd_lst.m_commands.Remove(cmd);
            DisplayCommandList();
            UVDLPApp.Instance().SaveProjectorCommands(UVDLPApp.Instance().m_appconfig.ProjectorCommandsFile);
        }
示例#5
0
 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 lbCommands_SelectedIndexChanged(object sender, EventArgs e)
 {
     // get the name of the 
     if (lbCommands.SelectedIndex == -1)
     {
         cmdDelete.Enabled = false;
         return;
     }
     else 
     {
         cmdDelete.Enabled = true;
     }
     string name = lbCommands.SelectedItem.ToString();
     foreach (ProjectorCommand cmd in UVDLPApp.Instance().m_proj_cmd_lst.m_commands) 
     {
         if (cmd.name.Equals(name)) 
         {
             m_pc = cmd;
             SetData();
         }
     }
 }
 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);
     }
 }
示例#8
0
        private void lbCommands_SelectedIndexChanged(object sender, EventArgs e)
        {
            // get the name of the
            if (lbCommands.SelectedIndex == -1)
            {
                cmdDelete.Enabled = false;
                return;
            }
            else
            {
                cmdDelete.Enabled = true;
            }
            string name = lbCommands.SelectedItem.ToString();

            foreach (ProjectorCommand cmd in UVDLPApp.Instance().m_proj_cmd_lst.m_commands)
            {
                if (cmd.name.Equals(name))
                {
                    m_pc = cmd;
                    SetData();
                }
            }
        }
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     //prjcmdlst 
     ProjectorCommand cmd = new ProjectorCommand();
     UVDLPApp.Instance().m_proj_cmd_lst.m_commands.Add(cmd);
     DisplayCommandList();
     UVDLPApp.Instance().SaveProjectorCommands(UVDLPApp.Instance().m_appconfig.ProjectorCommandsFile);
 }