예제 #1
0
        static void Main()
        {
            //if (Debugger.IsAttached) {
            //    Settings.Default.Reset();
            //}

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            //0 = ResetMode
            //1 = DevelopersMode
            //2 = Static Ip
            int appMode = 2;

            //int appServer = 2;

            if (appMode == 0)
            {
                Settings.Default.Reset();
            }


            User    user    = new User();
            Company company = new Company();

            while (true)
            {
                DialogLogin  dialogLogin  = new DialogLogin(company, user);
                DialogResult dialogResult = dialogLogin.ShowDialog();

                if (dialogResult == DialogResult.OK)
                {
                    FormMain formMain = new FormMain(company, user);
                    dialogResult = formMain.ShowDialog();
                    if (dialogResult == DialogResult.Cancel)
                    {
                        Environment.Exit(0);
                    }
                    else
                    {
                        continue;
                    }
                }
                else
                {
                    Environment.Exit(0);
                }
            }
        }
예제 #2
0
        static void Main()
        {
            //if (Debugger.IsAttached) {
            //    Settings.Default.Reset();
            //}

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //0 = ResetMode
            //1 = DevelopersMode
            //2 = Static Ip
            int appMode = 2;
            //int appServer = 2;

            if (appMode == 0) {
                Settings.Default.Reset();
            }

            User user = new User();
            Company company = new Company();

            while (true) {
                DialogLogin dialogLogin = new DialogLogin(company,user);
                DialogResult dialogResult = dialogLogin.ShowDialog();

                if (dialogResult == DialogResult.OK) {
                    FormMain formMain = new FormMain(company, user);
                    dialogResult = formMain.ShowDialog();
                    if (dialogResult == DialogResult.Cancel) {
                        Environment.Exit(0);
                    } else {
                        continue;
                    }
                } else {
                    Environment.Exit(0);
                }
            }
        }
 public DialogDatabase(DialogLogin dialogLogin)
 {
     InitializeComponent();
     this.dialogLogin = dialogLogin;
 }
예제 #4
0
 public DialogDatabase(DialogLogin dialogLogin)
 {
     InitializeComponent();
     this.dialogLogin = dialogLogin;
 }