Ejemplo n.º 1
0
 private void FrmSecurity_Load(Object sender, EventArgs e)
 {
     _config = new ControlConfig {
         Control = this, FileName = "security.json"
     };
     _config.Load();
 }
Ejemplo n.º 2
0
        private void FrmMain_Load(Object sender, EventArgs e)
        {
            _config = new ControlConfig {
                Control = this, FileName = "mqtt.json"
            };
            _config.Load();

            _log = new TextControlLog {
                Control = txtReceive
            };

            if (cbRemote.Items.Count == 0)
            {
                cbRemote.Items.Add("127.0.0.1:1883");
            }
            if (txtClientId.Text.IsNullOrEmpty())
            {
                txtClientId.Text = Environment.MachineName;
            }
            if (cbQos.SelectedIndex < 0)
            {
                cbQos.SelectedIndex = 0;
            }
            if (cbQos2.SelectedIndex < 0)
            {
                cbQos2.SelectedIndex = 0;
            }

            //txtReceive.UseWinFormControl();
            txtReceive.Clear();
            txtReceive.SetDefaultStyle(12);
            txtSend.SetDefaultStyle(12);
        }
Ejemplo n.º 3
0
 private void FrmMain_Load(Object sender, EventArgs e)
 {
     _config = new ControlConfig {
         Control = this, FileName = "ApiDiscover.json"
     };
     _config.Load();
 }
Ejemplo n.º 4
0
        private void FrmSecurity_Load(Object sender, EventArgs e)
        {
            cmbCipher.DataSource    = Enum.GetValues(typeof(CipherMode));
            cmbPadding.DataSource   = Enum.GetValues(typeof(PaddingMode));
            cmbCipher.SelectedItem  = CipherMode.CBC;
            cmbPadding.SelectedItem = PaddingMode.PKCS7;

            _config = new ControlConfig {
                Control = this, FileName = "Symmetric.json"
            };
            _config.Load();
        }
Ejemplo n.º 5
0
        private void FrmRedis_Load(Object sender, EventArgs e)
        {
            _config = new ControlConfig {
                Control = this, FileName = "Redis.json"
            };
            _config.Load();

            var nodes = _config.Items?["Nodes"];

            if (nodes != null)
            {
                _rdsConfigs = JsonHelper.Convert <IList <RedisConfig> >(nodes);
            }
            if (_rdsConfigs == null)
            {
                _rdsConfigs = new List <RedisConfig>();
            }
        }
Ejemplo n.º 6
0
        private void FrmMain_Load(Object sender, EventArgs e)
        {
            _config = new ControlConfig {
                Control = this, FileName = "ssh.json"
            };
            _config.Load();

            _log = new TextControlLog {
                Control = txtReceive
            };

            //txtReceive.UseWinFormControl();
            txtReceive.Clear();
            txtReceive.SetDefaultStyle(12);
            txtSend.SetDefaultStyle(12);

            gbReceive.Tag = gbReceive.Text;
            gbSend.Tag    = gbSend.Text;
        }
Ejemplo n.º 7
0
        private void FrmMain_Load(Object sender, EventArgs e)
        {
            _log = new TextControlLog {
                Control = txtReceive
            };

            if (cbMode.SelectedIndex < 0)
            {
                cbMode.SelectedIndex = 0;
            }

            txtReceive.SetDefaultStyle(12);

            // 加载保存的颜色
            UIConfig.Apply(txtReceive);

            _config = new ControlConfig {
                Control = this, FileName = "ModbusSlave.json"
            };
            _config.Load();
            LoadConfig();
        }