示例#1
0
        protected void ToolEditUIEnvironment(object sender, EventArgs e)
        {
            var editor = new ListExplorer {
                DataSource = GuiEnvironment.Instance
            };

            dock.Put(editor);
        }
示例#2
0
        public static void Start(string[] args, ToolkitType type, Type splashType, Type mainType)
        {
            Application.Initialize(type);
            GuiService.UIThread = Thread.CurrentThread;
            //exceptions
            Application.UnhandledException += (sender, e) =>
            {
                Helper.OnException(e.ErrorException);
            };


            //Load Configuration
            for (int i = 0; i < args.Length; i++)
            {
                string s = args[i];
                if (s.Equals("-config"))
                {
                    var obj = Serialization.Deserialize(args[++i]);
                    using (var op = new ListExplorer())
                    {
                        op.DataSource = obj;
                        op.ShowWindow((WindowFrame)null);
                    }
                    Application.Run();
                    Serialization.Serialize(obj, args[i]);
                    return;
                }
            }
            using (var splash = (Splash)EmitInvoker.CreateObject(splashType))
            {
                splash.Run();
            }

            using (var main = (MainWindow)EmitInvoker.CreateObject(mainType))
            {
                main.LoadConfiguration();
                main.Show();
                Application.Run();
            }
            Application.Dispose();
        }