コード例 #1
0
        public bool Initialize()
        {
            _setting         = new SettingHook();
            _numberOfStation = _setting.GetNumberOfStation();

            if (_numberOfStation < 1)
            {
                _numberOfStation = 1;
            }
            Clear();

            _initialized = true;
            return(true);
        }
コード例 #2
0
        private void ReloadSetting()
        {
            _setting = new SettingHook();

            tb_MachineSerialNumber.Text   = _setting.MachineSerialNumber();
            tb_NumberOfStation.Text       = _setting.GetNumberOfStation().ToString();
            tb_UniqueIdentityLength.Text  = _setting.GetUniqueIdLength().ToString();
            cb_EnableTraceability.Checked = _setting.GetEnableTraceability();
            tb_PlcIpAddress.Text          = _setting.GetPlcIpAdress();

            if (_login)
            {
                tb_DbConnectionString.Text = _setting.GetDatabaseConnectionString();
                tb_AdminPassword.Text      = _setting.GetAdminPassword();
            }
            else
            {
                tb_DbConnectionString.Clear();
                tb_AdminPassword.Clear();
            }
        }