Beispiel #1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     login login = new login();
     if (login.ShowDialog() == DialogResult.OK)
     {
         main mainForm = new main();
         mainForm.User = login.User;
         Application.Run(mainForm);
     }
 }
Beispiel #2
0
 static void MainThread()
 {
     string ip = IniReadAndWrite.IniReadValue("connect", "ip");
     string id = IniReadAndWrite.IniReadValue("connect", "id");
     string pwd = IniReadAndWrite.IniReadValue("connect", "pwd");
     string db = IniReadAndWrite.IniReadValue("connect", "db");
     main mainForm = new main(thePreUpdateDate);
     mainForm.User = login.User;
     mainForm.Role = login.Role;
     mainForm.loginForm = login;
     SqlDependency.Start("UID=" + WorkLogForm.CommonClass.Securit.DeDES(id) + ";PWD=" + WorkLogForm.CommonClass.Securit.DeDES(pwd) + ";Database=" + WorkLogForm.CommonClass.Securit.DeDES(db) + ";server=" + WorkLogForm.CommonClass.Securit.DeDES(ip));
     mainForm.ShowDialog();
     //Application.Run(mainForm);
     if (mainForm.DialogResult == DialogResult.OK)
     {
         update = new Thread(new ThreadStart(onlineUpdate));
         update.ApartmentState = ApartmentState.STA;
         update.Start();
     }
 }
Beispiel #3
0
 public Secretary(main main)
 {
     InitializeComponent();
     Main = main;
 }