示例#1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (c2.checkConn())
     {
         //con tro
         this.Cursor = MyCursors.Create(System.IO.Path.Combine(Application.StartupPath, "Pointer.cur"));
         login_default();
     }
     else
     {
         MessageBox.Show("Loi ket noi CSDL - kiem tra file Connection.xml trong thu muc debug");
     }
 }
        private void frmMain_Load(object sender, System.EventArgs e)
        {
            if (DataService.OpenConnection())
            {
                DateTime startDate = m_KeysCtrl.LayKey().StartDate;
                TimeSpan date      = DateTime.Now - startDate;
                int      ngay      = date.Days;
                //if (ngay > 30)
                //{
                //    frmExpirationDate frmExpirationDate = new frmExpirationDate();
                //    frmExpirationDate.ShowDialog();
                //}
                Default();
                DangNhap();

                this.Cursor = MyCursors.Create(System.IO.Path.Combine(Application.StartupPath, "Pointer.cur"));

                // Create the list of frequently used commands for the QAT Customize menu
                ribbonControl.QatFrequentCommands.Add(btnDangNhap);
                ribbonControl.QatFrequentCommands.Add(btnDangXuat);
                ribbonControl.QatFrequentCommands.Add(btnThoat);

                // Load Quick Access Toolbar layout if one is saved from last session...
                Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\DevComponents\Ribbon");
                if (key != null)
                {
                    try
                    {
                        string layout = key.GetValue("RibbonPadCSLayout", "").ToString();
                        if (layout != "" && layout != null)
                        {
                            ribbonControl.QatLayout = layout;
                        }
                    }
                    finally
                    {
                        key.Close();
                    }
                }

                // Pulse the Application Button
                buttonFile.Pulse(11);
            }
            else
            {
                Default();
                ReConnection();
            }
        }
示例#3
0
        private void frmMain_Load(object sender, System.EventArgs e)
        {
            if (DataService.OpenConnection())
            {
                Default();
                DangNhap();

                this.Cursor = MyCursors.Create(System.IO.Path.Combine(Application.StartupPath, "Pointer.cur"));

                // Create the list of frequently used commands for the QAT Customize menu

                // Load Quick Access Toolbar layout if one is saved from last session...
                Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\DevComponents\Ribbon");
                if (key != null)
                {
                    try
                    {
                        string layout = key.GetValue("RibbonPadCSLayout", "").ToString();
                        if (layout != "" && layout != null)
                        {
                            ribbonControl.QatLayout = layout;
                        }
                    }
                    finally
                    {
                        key.Close();
                    }
                }

                // Pulse the Application Button
            }
            else
            {
                Default();
                ReConnection();
            }
        }