Beispiel #1
0
        static void Main(string[] args) {
            s_commandLineArgs = args;
            try {
                initializeLogging();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // for now, we create the most simple version of IILPanelForm and IILShellControl and instantiate the ILView with them
                var mainForm = new ILMainFormSimple();
                ILView view = new ILView(mainForm, new ILShellForm(), mainForm);
                view_Load(view, EventArgs.Empty);
                Application.Run(view);
            } catch (Exception exc) {
                System.Diagnostics.Trace.Flush();
                var dlgRes = MessageBox.Show(@"ILView has encountered an error and will be closed now. 

Please help us improve ILView! Information about the error can be sent to us 
automatically after this window was closed. The information will consist out 
of the contents of the file '" + ErrorlogName + @"' which records trace messages 
generated by ILView during run. If you do not wish to have ILView sent the information, 
click on [Cancel] now. Please sent the file '" + ErrorlogName + @"' by email to 
[email protected] than. This enables us to look into the problem and provide 
fixes for it. 

Otherwise click [OK] to sent the content of the file now. We apologize any inconvenience!", "Hoops! There is something broken! :/", MessageBoxButtons.OKCancel);
                if (dlgRes == DialogResult.OK) {
                    string log = "(empty)";
                    if (System.IO.File.Exists(ErrorlogName)) {
                        log = System.IO.File.ReadAllText(ErrorlogName);
                    }

                }
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            s_commandLineArgs = args;
            initializeLogging();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // for now, we create the most simple version of IILPanelForm and IILShellControl and instantiate the ILView with them
            var mainForm = new ILMainFormSimple();
            ILView view = new ILView(mainForm, new ILShellForm(), mainForm);
            view_Load(view,EventArgs.Empty);
            Application.Run(view);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            s_commandLineArgs = args;
            initializeLogging();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // for now, we create the most simple version of IILPanelForm and IILShellControl and instantiate the ILView with them
            var    mainForm = new ILMainFormSimple();
            ILView view     = new ILView(mainForm, new ILShellForm(), mainForm);

            view_Load(view, EventArgs.Empty);
            Application.Run(view);
        }
Beispiel #4
0
        static void view_Load(object sender, EventArgs e)
        {
            string url;
            string exePath;
            ILView view = sender as ILView;

            // from command parameters ?

#if DEBUG
//            s_commandLineArgs = new string[] { @"var scene = new ILScene() {
//    Camera = {
//        new ILSphere()
//    }
//};
//scene;"
//            };
#endif

            if (s_commandLineArgs != null && s_commandLineArgs.Length > 0 && !String.IsNullOrEmpty(s_commandLineArgs[0]))
            {
                try {
                    string expression = s_commandLineArgs[0];
                    // evaluate expression
                    Console.WriteLine("Evaluating Expression from Command Line Input: ");
                    Console.WriteLine(expression);
                    view.Source = expression;
                    return;
                } catch (Exception exc) {
                    Trace.WriteLine(exc.ToString());
                    MessageBox.Show(exc.ToString());
                }
            }
            // from exe name ?
            try {
                if (!String.IsNullOrEmpty(ExeName) && urlFromExeName(ExeName, out url))
                {
                    view.Source = url;
                    return;
                }
            } catch (System.Security.SecurityException exc) { }
            view.Source = "example";  // shows the common example
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            s_commandLineArgs = args;
            try {
                initializeLogging();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // for now, we create the most simple version of IILPanelForm and IILShellControl and instantiate the ILView with them
                var    mainForm = new ILMainFormSimple();
                ILView view     = new ILView(mainForm, new ILShellForm(), mainForm);
                view_Load(view, EventArgs.Empty);
                Application.Run(view);
            } catch (Exception exc) {
                System.Diagnostics.Trace.Flush();
                var dlgRes = MessageBox.Show(@"ILView has encountered an error and will be closed now. 

Please help us improve ILView! Information about the error can be sent to us 
automatically after this window was closed. The information will consist out 
of the contents of the file '" + ErrorlogName + @"' which records trace messages 
generated by ILView during run. If you do not wish to have ILView sent the information, 
click on [Cancel] now. Please sent the file '" + ErrorlogName + @"' by email to 
[email protected] than. This enables us to look into the problem and provide 
fixes for it. 

Otherwise click [OK] to sent the content of the file now. We apologize any inconvenience!", "Hoops! There is something broken! :/", MessageBoxButtons.OKCancel);
                if (dlgRes == DialogResult.OK)
                {
                    string log = "(empty)";
                    if (System.IO.File.Exists(ErrorlogName))
                    {
                        log = System.IO.File.ReadAllText(ErrorlogName);
                    }
                }
            }
        }