예제 #1
0
파일: frmCauHinh.cs 프로젝트: tayeumi/HFC
        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 { }
        }
예제 #2
0
        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 { }
        }
예제 #3
0
        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);
        }
예제 #4
0
파일: frmDangNhap.cs 프로젝트: tayeumi/HFC
        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;
            }
        }
예제 #5
0
 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;
     }
 }
예제 #6
0
파일: DbAccess.cs 프로젝트: tayeumi/HFC
 public static string get_config(string _id)
 {
     RegistryWriter rg = new RegistryWriter();
     return rg.valuekey(_id);
 }
예제 #7
0
파일: frmMain.cs 프로젝트: tayeumi/HFC
        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);
        }
예제 #8
0
파일: frmDangNhap.cs 프로젝트: tayeumi/HFC
 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;
     }
 }
예제 #9
0
파일: DbAccess.cs 프로젝트: tayeumi/HFC
        public static string get_config(string _id)
        {
            RegistryWriter rg = new RegistryWriter();

            return(rg.valuekey(_id));
        }
예제 #10
0
파일: Intro.cs 프로젝트: tayeumi/HFC
        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 { }
        }
예제 #11
0
파일: Intro.cs 프로젝트: tayeumi/HFC
 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;
     }
 }
예제 #12
0
        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 { }
        }