Exemple #1
0
 private void radButton1_Click(object sender, EventArgs e)
 {
     if (!IsValid())
     {
         return;
     }
     if (ConnectionFound())
     {
         T8GlobalFunc.WriteFileSetting(T8Application.SettingFilePath, GenerateSettings());
         MessageBox.Show(this, "Pengaturan database sudah disimpan.", "Simpan sukses", MessageBoxButtons.OK, MessageBoxIcon.Information);
         radButton1.Enabled = false;
     }
 }
Exemple #2
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();
        }
Exemple #3
0
 public static void SetSettings(string _general_setting_file_path, string _values)
 {
     T8GlobalFunc.WriteFileSetting(_general_setting_file_path, _values);
     GetSetting();
 }
Exemple #4
0
 public static void SetSetting()
 {
     T8GlobalFunc.WriteFileSetting(general_setting_file_path, T8GlobalFunc.Decrypt(T8GlobalFunc.ReadSettingFile(general_setting_file_path), "t8"));
     GetSetting();
 }