예제 #1
0
 public Login(XtrimControl x, FrmSplash splash)
 {
     InitializeComponent();
     xC = x;
     this.splash = splash;
     initConfig();
 }
예제 #2
0
        public MainMenu4(XtrimControl x, FrmSplash splash)
        {
            InitializeComponent();
            xC    = x;
            login = new Login(xC, splash);
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                /* run your code here */
                xC.iniDB = new objdb.InitDB(xC.conn);
            }).Start();
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                /* run your code here */
                xC.accDB = new objdb.AccDB(xC.conn);
            }).Start();
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                /* run your code here */
                xC.manDB = new objdb.MainDB(xC.conn);
            }).Start();
            //BackgroundWorker bw = new BackgroundWorker();
            //bw.WorkerReportsProgress = true;
            //bw.DoWork += Bw_DoWork;
            //bw.RunWorkerCompleted += Bw_RunWorkerCompleted;
            //bw.RunWorkerAsync();

            login.ShowDialog(this);
            if (login.LogonSuccessful.Equals("1"))
            {
                initConfig();
            }
            else
            {
                Application.Exit();
            }
        }