Beispiel #1
0
 private void UpdateConfigState(ConfigState state)
 {
     if (state == ConfigState.Stopped)
     {
         SafeThread.SetEnableControl(textOPCNodeName, true);
         SafeThread.SetEnableControl(nudOPCUpdateRate, true);
         SafeThread.SetEnableControl(btnApply, true);
         SafeThread.SetEnableControl(btnTest, true);
     }
     else
     {
         SafeThread.SetEnableControl(textOPCNodeName, false);
         SafeThread.SetEnableControl(nudOPCUpdateRate, false);
         SafeThread.SetEnableControl(btnApply, false);
         SafeThread.SetEnableControl(btnTest, false);
     }
 }
 private void UpdateConfigState(ConfigState state)
 {
     if (state == ConfigState.Stopped)
     {
         SafeThread.SetEnableControl(btnApply, true);
         SafeThread.SetEnableControl(btnTest, true);
         SafeThread.SetEnableControl(comboBoxDSN, true);
         SafeThread.SetEnableControl(textBoxUserName, true);
         SafeThread.SetEnableControl(textBoxPassword, true);
     }
     else
     {
         SafeThread.SetEnableControl(btnApply, false);
         SafeThread.SetEnableControl(btnTest, false);
         SafeThread.SetEnableControl(comboBoxDSN, false);
         SafeThread.SetEnableControl(textBoxUserName, false);
         SafeThread.SetEnableControl(textBoxPassword, false);
     }
 }
 private void UpdateConfigState(ConfigState state)
 {
     if (state == ConfigState.Stopped)
     {
         SafeThread.SetEnableControl(btnApply, true);
         SafeThread.SetReadOnlyDataGridView(dataGridTrn, false);
         SafeThread.SetAllowUserToAddRowsDataGridView(dataGridTrn, true);
         SafeThread.SetVisibleStripItem(navigatorTran, navigatorAddNewItem, true);
         SafeThread.SetVisibleStripItem(navigatorTran, navigatorDeleteItem, true);
     }
     else
     {
         SafeThread.SetEnableControl(btnApply, false);
         SafeThread.CancelEditDataGridView(dataGridTrn);
         SafeThread.SetReadOnlyDataGridView(dataGridTrn, true);
         SafeThread.SetAllowUserToAddRowsDataGridView(dataGridTrn, false);
         SafeThread.SetVisibleStripItem(navigatorTran, navigatorAddNewItem, false);
         SafeThread.SetVisibleStripItem(navigatorTran, navigatorDeleteItem, false);
     }
 }