private void frmCauHinh_Load(object sender, EventArgs e) { try { Class.RegistryWriter rg = new Class.RegistryWriter(); txtServer.Text = rg.valuekey("server"); txtDatabaseName.Text = rg.valuekey("database"); txtUser.Text = Class.App.DecryptString(rg.valuekey("user"), "UserID"); txtPass.Text = Class.App.DecryptString(rg.valuekey("pass"), "PasswordID"); txtCmts.Text = rg.valuekey("CMTS"); txtPassTelnet.Text = Class.App.DecryptString(rg.valuekey("CMTS_TEL"), "PasswordID"); txtPassLogin.Text = Class.App.DecryptString(rg.valuekey("CMTS_pass"), "PasswordID"); txtLogin.Text = Class.App.DecryptString(rg.valuekey("CMTS_user"), "UserID"); if (rg.valuekey("autoupdate") == "1") { checkAutoUpdate.Checked = true; } else { checkAutoUpdate.Checked = false; } } catch { } }
private void frmMain_Load(object sender, EventArgs e) { Class.RegistryWriter rg = new Class.RegistryWriter(); this.defaultGiaoDien.LookAndFeel.SkinName = rg.valuekey("style"); this.Text = this.Text + " " + config("Config.xml", "company") + " V" + config("Config.xml", "version"); btnDangNhap_ItemClick(null, null); SkinHelper.InitSkinPopupMenu(barSubItem4); }
private void frmDangNhap_Load(object sender, EventArgs e) { Class.RegistryWriter rg = new Class.RegistryWriter(); string user = rg.valuekey("user_client"); if (user != "Blue" & user != "") { txtTaiKhoan.Text = user; checkLuuPass.Checked = true; } else { txtTaiKhoan.Text = ""; checkLuuPass.Checked = false; } }
private void Checkfile_Tick(object sender, EventArgs e) { Class.RegistryWriter rg = new Class.RegistryWriter(); if (rg.valuekey("autoupdate") == "1") { Checkfile.Enabled = false; checkfileDll(); kiemtraphienban(); IntroTime.Enabled = true; } else { Checkfile.Enabled = false; IntroTime.Enabled = true; } }
public static string get_config(string _id) { RegistryWriter rg = new RegistryWriter(); return rg.valuekey(_id); }
public static string get_config(string _id) { RegistryWriter rg = new RegistryWriter(); return(rg.valuekey(_id)); }
private void frmintro_Load(object sender, EventArgs e) { // delete first if (Application.StartupPath != "E:\\HFC Project\\HFC\\bin\\Debug") // lap trinh thi ko xoa va tai lai file nay { //if (System.IO.File.Exists("node.txt")) //{ // System.IO.File.Delete("node.txt"); //} //if (System.IO.File.Exists("nodewarning.txt")) //{ // System.IO.File.Delete("nodewarning.txt"); //} //if (System.IO.File.Exists("path.txt")) //{ // System.IO.File.Delete("path.txt"); //} } Checkfile.Enabled = true; try { //if (rg.valuekey("media") == "Blue") // cai nay ko ko //{ // // Class.DataServices.media = "default_ring.wav"; //} //else //{ // // Class.DataServices.media = rg.valuekey("media"); //} Class.RegistryWriter rg = new Class.RegistryWriter(); Class.App.media = rg.valuekey("media"); //string _user = Class.App.EncryptString("hrm", "UserID"); //string _pass = Class.App.EncryptString("adminlbc", "PasswordID"); //rg.WriteKey("user", _user); //rg.WriteKey("pass", _pass); if (rg.valuekey("autoupdate") == "Blue") { rg.WriteKey("autoupdate", "1"); } if (!Directory.Exists(@"Templates")) { Directory.CreateDirectory(@"Templates"); } if (!Directory.Exists(@"media")) { Directory.CreateDirectory(@"media"); } if (!Directory.Exists(@"Report")) { Directory.CreateDirectory(@"Report"); } if (!Directory.Exists(@"Team")) { Directory.CreateDirectory(@"Team"); } } catch { } }