Exemplo n.º 1
0
        private string GenerateSettings()
        {
            sb = new StringBuilder();

            sb.Append(dropDownDriverList.Text + ";");
            sb.Append(txtHost.Text + ";");
            sb.Append(txtPort.Text + ";");
            sb.Append(drDbName.Text + ";");
            sb.Append(txtUsername.Text + ";");
            sb.Append(txtPassword.Text + ";");
            return(T8GlobalFunc.Encrypt(sb.ToString(), "t8"));
        }
Exemplo n.º 2
0
        private string GenerateGeneralSetting()
        {
            StringBuilder generalSettingText = new StringBuilder();

            generalSettingText.Append(chkKonfirmasiPassword.Checked.ToString() + ";");
            generalSettingText.Append(chkIdleTime.Checked.ToString() + ";");
            generalSettingText.Append(nIdleTime.Value.ToString() + ";");
            generalSettingText.Append(chkSimpanHistorySettingLocalUser.Checked.ToString() + ";");
            generalSettingText.Append(chkUserSpesifik.Checked.ToString() + ";");

            generalSettingText.Append(chkOtomatisCetakAgendaDisposisi.Checked.ToString() + ";");
            generalSettingText.Append(nRangkapCetakDisposisi.Value.ToString() + ";");

            generalSettingText.Append(chkOtomatisCetakSuratKeluar.Checked.ToString() + ";");
            generalSettingText.Append(nRangkapCetakSuratKeluar.Value.ToString() + ";");

            generalSettingText.Append(chkOtomatisCetakAgendaPenyelesaian.Checked.ToString() + ";");
            generalSettingText.Append(nRangkapCetakPenyelesaian.Value.ToString() + ";");

            return(T8GlobalFunc.Encrypt(generalSettingText.ToString(), "t8"));
        }
Exemplo n.º 3
0
        public static void SetSettings(string _var, bool _val)
        {
            if (_var == "AutoSizeMain")
            {
                AutoSizeMain = _val;
            }
            if (_var == "AdministratorTableMain")
            {
                AdministratorTableMain = _val;
            }
            if (_var == "AutoSizeUser")
            {
                AutoSizeUser = _val;
            }
            if (_var == "ShowPasswordUser")
            {
                ShowPasswordUser = _val;
            }
            if (_var == "AdministratorTableUser")
            {
                AdministratorTableUser = _val;
            }
            if (_var == "AutoSizeHistoryLoginUser")
            {
                AutoSizeHistoryLoginUser = _val;
            }
            if (_var == "AdministratorTableHistoryLoginUser")
            {
                AdministratorTableHistoryLoginUser = _val;
            }
            if (_var == "AutoSizeHistoryDisposisi")
            {
                AutoSizeHistoryDisposisi = _val;
            }
            if (_var == "AdministratorTableHistoryDisposisi")
            {
                AdministratorTableHistoryDisposisi = _val;
            }
            if (_var == "AutoSizeHistoryPenyelesaian")
            {
                AutoSizeHistoryPenyelesaian = _val;
            }
            if (_var == "AdministratorTableHistoryPenyelesaian")
            {
                AdministratorTableHistoryPenyelesaian = _val;
            }
            if (_var == "AdministratorTableHistoryEditSuratMasuk")
            {
                AdministratorTableHistoryEditSuratMasuk = _val;
            }
            if (_var == "AutoSizeHistoryEditSuratMasuk")
            {
                AutoSizeHistoryEditSuratMasuk = _val;
            }
            if (_var == "AdministratorTableHistoryEditSuratKeluar")
            {
                AdministratorTableHistoryEditSuratKeluar = _val;
            }
            if (_var == "AutoSizeHistoryEditSuratKeluar")
            {
                AutoSizeHistoryEditSuratKeluar = _val;
            }
            if (_var == "AutoSizeMainSK")
            {
                AutoSizeMainSK = _val;
            }
            if (_var == "AdministratorTableMainSK")
            {
                AdministratorTableMainSK = _val;
            }

            StringBuilder _values = new StringBuilder();

            //public static bool AutoSizeMainSK;
            //public static bool AdministratorTableMainSK;
            _values.Append(AutoSizeMain + ";" + AdministratorTableMain + ";" + AutoSizeUser + ";" + ShowPasswordUser + ";" + AdministratorTableUser
                           + ";" + AutoSizeHistoryLoginUser + ";" + AdministratorTableHistoryLoginUser + ";" + AutoSizeHistoryDisposisi + ";"
                           + AdministratorTableHistoryDisposisi + ";" + AutoSizeHistoryPenyelesaian + ";" + AdministratorTableHistoryPenyelesaian + ";" + AdministratorTableHistoryEditSuratMasuk + ";"
                           + AutoSizeHistoryEditSuratMasuk + ";" + AdministratorTableHistoryEditSuratKeluar + ";" + AutoSizeHistoryEditSuratKeluar
                           + ";" + AutoSizeMainSK + ";" + AdministratorTableMainSK);

            T8GlobalFunc.WriteFileSetting(local_setting_file_path, T8GlobalFunc.Encrypt(_values.ToString(), "t8"));
            GetSetting();
        }