예제 #1
0
        public WebTroubleShootingControl()
        {
            InitializeComponent();
            _webTroubleShootingData                          = new WebTroubleShootingData();
            proxyServer_TextBox.text_Box.Text                = string.Empty;
            proxyPort_TextBox.text_Box.Text                  = string.Empty;
            proxyException_TextBox.text_Box.Text             = string.Empty;
            syslogServer_TextControl.text_Box.Text           = string.Empty;
            syslogPort_textControl.text_Box.Text             = string.Empty;
            autoRecovery_choiceCombo.choice_Combo.DataSource = ListValues.TrueFalseList;

            AddEventHandlers();
        }
예제 #2
0
        public void SetControl(IEnumerable <IComponentData> list)
        {
            RemoveEventHandlers();
            _webTroubleShootingData = list.OfType <WebTroubleShootingData>().FirstOrDefault();

            autoRecovery_choiceCombo.choice_Combo.SelectedItem = ListValues.TrueFalseList.FirstOrDefault(x => x == _webTroubleShootingData.AutoRecoveryMode.Key);
            autoRecovery_choiceCombo.onOff_CheckBox.Checked    = _webTroubleShootingData.AutoRecoveryMode.Value;

            proxyServer_TextBox.text_Box.Text             = _webTroubleShootingData.ServerName.Key;
            proxyServer_TextBox.onOff_CheckBox.Checked    = _webTroubleShootingData.ServerName.Value;
            proxyPort_TextBox.text_Box.Text               = _webTroubleShootingData.ServerPort.Key;
            proxyPort_TextBox.onOff_CheckBox.Checked      = _webTroubleShootingData.ServerPort.Value;
            proxyException_TextBox.text_Box.Text          = _webTroubleShootingData.ProxyExceptionList.Key;
            proxyException_TextBox.onOff_CheckBox.Checked = _webTroubleShootingData.ProxyExceptionList.Value;

            syslogServer_TextControl.text_Box.Text          = _webTroubleShootingData.SyslogServer.Key;
            syslogServer_TextControl.onOff_CheckBox.Checked = _webTroubleShootingData.SyslogServer.Value;
            syslogPort_textControl.text_Box.Text            = _webTroubleShootingData.SyslogPort.Key;
            syslogPort_textControl.onOff_CheckBox.Checked   = _webTroubleShootingData.SyslogPort.Value;

            AddEventHandlers();
        }