private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.BYDOCUMENT: dateFrom.Text = ""; dateTo.Text = ""; dateFrom.Enabled = false; dateTo.Enabled = false; textBox2.Enabled = true; comboBox1.Text = ""; comboBox1.Enabled = false; break; case EBUTTONSTATE.BYDATE: textBox2.Text = ""; textBox2.Enabled = false; dateFrom.Enabled = true; dateTo.Enabled = true; comboBox1.Enabled = true; break; } }
/// <summary> /// Configure our buttons to match our current state... /// </summary> /// <param name="a_ebuttonstate"></param> private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.CLOSED: m_buttonOpen.Enabled = true; m_buttonClose.Enabled = false; m_buttonSetup.Enabled = false; m_buttonScan.Enabled = false; m_buttonStop.Enabled = false; break; case EBUTTONSTATE.OPEN: m_buttonOpen.Enabled = false; m_buttonClose.Enabled = true; m_buttonSetup.Enabled = true; m_buttonScan.Enabled = true; m_buttonStop.Enabled = false; break; case EBUTTONSTATE.SCANNING: m_buttonOpen.Enabled = false; m_buttonClose.Enabled = false; m_buttonSetup.Enabled = false; m_buttonScan.Enabled = false; m_buttonStop.Enabled = true; break; } }
private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.OPEN: button1.Enabled = true; button3.Enabled = true; button4.Enabled = true; //buttonOcr.Enabled = true; break; case EBUTTONSTATE.WITHWORKER: button1.Enabled = false; button3.Enabled = false; button4.Enabled = false; //buttonOcr.Enabled = false; break; } }
/// <summary> /// Configure our buttons to match our current state... /// </summary> /// <param name="a_ebuttonstate"></param> private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.CLOSED: m_buttonOpen.Enabled = true; m_buttonClose.Enabled = false; m_buttonScan.Enabled = false; m_buttonAttach.Enabled = false; m_buttonStop.Enabled = false; break; case EBUTTONSTATE.OPEN: m_buttonOpen.Enabled = false; m_buttonClose.Enabled = true; m_buttonScan.Enabled = true; if (courrierScan != null) { m_buttonAttach.Enabled = true; } else { m_buttonAttach.Enabled = false; } m_buttonStop.Enabled = false; break; case EBUTTONSTATE.SCANNING: m_buttonOpen.Enabled = false; m_buttonClose.Enabled = false; m_buttonScan.Enabled = false; m_buttonAttach.Enabled = false; m_buttonStop.Enabled = true; break; } }
private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.CROPSTART: toolStrip1.Items["toolStripButtonReset"].Enabled = false; toolStrip1.Items["toolStripButtonRotateLeft"].Enabled = false; toolStrip1.Items["toolStripButtonRotateRight"].Enabled = false; toolStrip1.Items["toolStripButtonCrop"].Enabled = false; toolStrip1.Items["toolStripButtonTransform"].Enabled = false; toolStrip1.Items["toolStripButtonBrightness"].Enabled = false; toolStrip1.Items["toolStripButtonAcceptCrop"].Visible = true; toolStrip1.Items["toolStripButtonCancelCrop"].Visible = true; toolStrip1.Items["toolStripButtonAcceptTransform"].Visible = false; toolStrip1.Items["toolStripButtonCancelTransform"].Visible = false; button1.Enabled = false; button2.Enabled = false; break; case EBUTTONSTATE.CROPEND: toolStrip1.Items["toolStripButtonReset"].Enabled = true; toolStrip1.Items["toolStripButtonRotateLeft"].Enabled = true; toolStrip1.Items["toolStripButtonRotateRight"].Enabled = true; toolStrip1.Items["toolStripButtonCrop"].Enabled = true; toolStrip1.Items["toolStripButtonTransform"].Enabled = true; toolStrip1.Items["toolStripButtonBrightness"].Enabled = true; toolStrip1.Items["toolStripButtonAcceptCrop"].Visible = false; toolStrip1.Items["toolStripButtonCancelCrop"].Visible = false; toolStrip1.Items["toolStripButtonAcceptTransform"].Visible = false; toolStrip1.Items["toolStripButtonCancelTransform"].Visible = false; button1.Enabled = true; button2.Enabled = true; break; case EBUTTONSTATE.TRANSFORMSTART: toolStrip1.Items["toolStripButtonReset"].Enabled = false; toolStrip1.Items["toolStripButtonRotateLeft"].Enabled = false; toolStrip1.Items["toolStripButtonRotateRight"].Enabled = false; toolStrip1.Items["toolStripButtonCrop"].Enabled = false; toolStrip1.Items["toolStripButtonTransform"].Enabled = false; toolStrip1.Items["toolStripButtonBrightness"].Enabled = false; toolStrip1.Items["toolStripButtonAcceptCrop"].Visible = false; toolStrip1.Items["toolStripButtonCancelCrop"].Visible = false; toolStrip1.Items["toolStripButtonAcceptTransform"].Visible = true; toolStrip1.Items["toolStripButtonCancelTransform"].Visible = true; button1.Enabled = false; button2.Enabled = false; break; case EBUTTONSTATE.TRANSFORMEND: toolStrip1.Items["toolStripButtonReset"].Enabled = true; toolStrip1.Items["toolStripButtonRotateLeft"].Enabled = true; toolStrip1.Items["toolStripButtonRotateRight"].Enabled = true; toolStrip1.Items["toolStripButtonCrop"].Enabled = true; toolStrip1.Items["toolStripButtonBrightness"].Enabled = true; toolStrip1.Items["toolStripButtonAcceptCrop"].Visible = false; toolStrip1.Items["toolStripButtonCancelCrop"].Visible = false; toolStrip1.Items["toolStripButtonTransform"].Enabled = true; toolStrip1.Items["toolStripButtonAcceptTransform"].Visible = false; toolStrip1.Items["toolStripButtonCancelTransform"].Visible = false; button1.Enabled = true; button2.Enabled = true; break; } }
private void SetButtons(EBUTTONSTATE a_ebuttonstate) { switch (a_ebuttonstate) { default: case EBUTTONSTATE.CATEGORYSTRIPDOC: toolStripTree.Enabled = true; toolStripTree.Items["toolStripImport"].Enabled = true; toolStripTree.Items["toolStripScan"].Enabled = true; break; case EBUTTONSTATE.CATEGORYSTRIPROOT: toolStripTree.Enabled = true; toolStripTree.Items["toolStripImport"].Enabled = false; toolStripTree.Items["toolStripScan"].Enabled = false; break; case EBUTTONSTATE.CLOSED: break; case EBUTTONSTATE.OPEN: toolStripImage.Enabled = false; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = false; trackBar1.Enabled = false; listView1.Items.Clear(); imagePanel1.Image = null; contextMenuDocs.Enabled = false; break; case EBUTTONSTATE.TREEWITHDOCS: imagePanel1.Image = null; trackBar1.Enabled = false; contextMenuDocs.Enabled = true; toolStripImage.Enabled = false; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = false; break; case EBUTTONSTATE.TREEWITHOUTDOCS: imagePanel1.Image = null; trackBar1.Enabled = false; contextMenuDocs.Enabled = false; toolStripImage.Enabled = false; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = false; listView1.Items.Clear(); break; case EBUTTONSTATE.SINGLEPHOTO: //imagePanel1.Image = null; toolStripImage.Enabled = true; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = true; trackBar1.Enabled = true; toolStripImage.Enabled = true; toolStripImage.Items["toolStripPrint"].Enabled = true; toolStripImage.Items["toolStripDescription"].Enabled = true; toolStripImage.Items["toolStripDelete"].Enabled = true; toolStripImage.Items["toolStripRotateLeft"].Enabled = true; toolStripImage.Items["toolStripRotateRight"].Enabled = true; contextMenuDocs.Enabled = true; break; case EBUTTONSTATE.MULTIPLEPHOTO: imagePanel1.Image = null; toolStripImage.Enabled = true; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = true; trackBar1.Enabled = false; toolStripImage.Enabled = true; toolStripImage.Items["toolStripPrint"].Enabled = true; toolStripImage.Items["toolStripDescription"].Enabled = true; toolStripImage.Items["toolStripDelete"].Enabled = true; toolStripImage.Items["toolStripRotateLeft"].Enabled = false; toolStripImage.Items["toolStripRotateRight"].Enabled = false; contextMenuDocs.Enabled = true; break; case EBUTTONSTATE.FILENOTIMAGE: imagePanel1.Image = null; trackBar1.Enabled = false; contextMenuDocs.Enabled = true; toolStripImage.Enabled = false; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = false; break; case EBUTTONSTATE.FILEIMAGE: trackBar1.Enabled = true; contextMenuDocs.Enabled = true; toolStripImage.Enabled = true; menuStrip1.Items["documentsToolStripMenuItem"].Enabled = true; break; } }