예제 #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // idle start
            Application.Idle += new EventHandler(Application_Idle);

            loadFrm = new MkaFrmLoading();
            loadFrm.Show();
            Application.DoEvents();

            // register file type
            Register();

            // Check command line
            if (args.Length > 1)
            {
                MessageBox.Show("Incorrect number of arguments. Usage: MokkAnnotator.exe [filenames]", "MokkAnnotator");
            }

            MkaFrmAnnotator form = new MkaFrmAnnotator();

            if (args.Length == 1)
            {
                form.ArgumentFile = args[0];
            }

            Application.Run(form);

            // idle end
            Application.Idle -= new EventHandler(Application_Idle);
        }
예제 #2
0
 static void Application_Idle(object sender, EventArgs e)
 {
     if (loadFrm != null)
     {
         loadFrm.Close();
         loadFrm.Dispose();
         loadFrm = null;
     }
 }