예제 #1
0
        private void MDI_Load(object sender, EventArgs e)
        {
            //string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            if (File.Exists(MainClass.path + "\\cnt"))
            {
                Login obj = new Login();
                obj.MdiParent   = this;
                obj.WindowState = FormWindowState.Maximized;
                obj.Show();
            }
            else
            {
                Settings obj = new Settings();
                obj.MdiParent   = this;
                obj.WindowState = FormWindowState.Maximized;
                obj.Show();
            }

            logoutToolStripMenuItem.Enabled = false;
            Login log = new Login();

            log.Show();
            log.MdiParent = this;
            mdiobj        = this;
            Sample s1 = new Sample();

            s1.stfname.Visible = false;
        }
예제 #2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     do
     {
         if (MainClass.appStatus == "" || MainClass.appStatus == "open")
         {
             Login     loginInstance = new Login();
             MainClass main          = MainClass.getInstance();
             if (!File.Exists(MainClass.path + "\\cnt"))
             {
                 Settings settings = new Settings();
                 Application.Run(settings);
                 if (settings.status == "")
                 {
                     break;
                 }
             }
             else
             {
                 Application.Run(loginInstance);
                 if (loginInstance.getStatus())
                 {
                     MDI mdi = new MDI();
                     MainClass.setMDI(mdi);
                     Application.Run(mdi);
                 }
                 if (MainClass.appStatus == "exit")
                 {
                     break;
                 }
             }
         }
     } while (MainClass.appStatus != null);
 }
 public static void setMDI(MDI m)
 {
     mdi = m;
 }