Example #1
0
File: Main.cs Project: noxe/eXpand
        public static void Main(string[] args) {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += OnException;
            try {
                var appSetting = ConfigurationManager.AppSettings["debug"];
                if (appSetting != null && appSetting.ToLower() == "true") {
                    Debugger.Break();
                }
                var pathInfo = new PathInfo(args);
                Tracing.Tracer.LogSeparator("PathInfo");
                Tracing.Tracer.LogText(pathInfo.ToString());
                Tracing.Tracer.LogSeparator("PathInfo");
                CheckAssemblyFile(pathInfo);
                var modelControllerBuilder = new ModelControllerBuilder();
                var settingsStorageOnRegistry = new SettingsStorageOnRegistry(@"Software\Developer Express\eXpressApp Framework\Model Editor");
                modelEditorForm = new ModelEditorForm(modelControllerBuilder.GetController(pathInfo), settingsStorageOnRegistry);
                modelEditorForm.Disposed += (sender, eventArgs) => ((IModelEditorSettings)modelEditorForm).ModelEditorSaveSettings();
                modelEditorForm.SetCaption(Path.GetFileName(pathInfo.LocalPath));

                Application.Run(modelEditorForm);
            } catch (Exception exception) {
                HandleException(exception);
            }

        }
Example #2
0
        public static void Main(string[] args)
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += OnException;
            try {
                var strings = args;
                if (args.Length > 4 && args[0] == "d")
                {
                    MessageBox.Show(
                        $"Attach to {Path.GetFileName(AppDomain.CurrentDomain.SetupInformation.ApplicationBase)}");
                    strings = args.Skip(1).ToArray();
                }
                var pathInfo = new PathInfo(strings);
                Tracing.Tracer.LogSeparator("PathInfo");
                Tracing.Tracer.LogText(pathInfo.ToString());
                Tracing.Tracer.LogSeparator("PathInfo");
                CheckAssemblyFile(pathInfo);
                var modelControllerBuilder    = new ModelControllerBuilder();
                var settingsStorageOnRegistry = new SettingsStorageOnRegistry(@"Software\Developer Express\eXpressApp Framework\Model Editor");
                var modelEditorViewController = modelControllerBuilder.GetController(pathInfo);
                Tracing.Tracer.LogText("modelEditorViewController");
                WinSimpleActionBinding.Register();
                WinSingleChoiceActionBinding.Register();
                WinParametrizedActionBinding.Register();
                PopupWindowShowActionBinding.Register();
                _modelEditorForm           = new ModelEditorForm(modelEditorViewController, settingsStorageOnRegistry);
                _modelEditorForm.Disposed += (sender, eventArgs) => ((IModelEditorSettings)sender).ModelEditorSaveSettings();
                _modelEditorForm.SetCaption(Path.GetFileName(pathInfo.LocalPath));

                Application.Run(_modelEditorForm);
            } catch (Exception exception) {
                HandleException(exception);
            }
        }
Example #3
0
        public static void Main(string[] args)
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += OnException;
            try {
                var appSetting = ConfigurationManager.AppSettings["debug"];
                if (appSetting != null && appSetting.ToLower() == "true")
                {
                    MessageBox.Show("Attach to this proccess");
                }
                var pathInfo = new PathInfo(args);
                Tracing.Tracer.LogSeparator("PathInfo");
                Tracing.Tracer.LogText(pathInfo.ToString());
                Tracing.Tracer.LogSeparator("PathInfo");
                CheckAssemblyFile(pathInfo);
                var modelControllerBuilder    = new ModelControllerBuilder();
                var settingsStorageOnRegistry = new SettingsStorageOnRegistry(@"Software\Developer Express\eXpressApp Framework\Model Editor");
                _modelEditorForm           = new ModelEditorForm(modelControllerBuilder.GetController(pathInfo), settingsStorageOnRegistry);
                _modelEditorForm.Disposed += (sender, eventArgs) => ((IModelEditorSettings)_modelEditorForm).ModelEditorSaveSettings();
                _modelEditorForm.SetCaption(Path.GetFileName(pathInfo.LocalPath));

                Application.Run(_modelEditorForm);
            } catch (Exception exception) {
                HandleException(exception);
            }
        }
Example #4
0
        public static void Main(string[] args) {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += OnException;
            try {
                var strings = args;
                if (args.Length>3&&args[0]=="d"){
                    MessageBox.Show("Attach to this proccess");
                    strings = args.Skip(1).ToArray();
                }
                var pathInfo = new PathInfo(strings);
                Tracing.Tracer.LogSeparator("PathInfo");
                Tracing.Tracer.LogText(pathInfo.ToString());
                Tracing.Tracer.LogSeparator("PathInfo");
                CheckAssemblyFile(pathInfo);
                var modelControllerBuilder = new ModelControllerBuilder();
                var settingsStorageOnRegistry = new SettingsStorageOnRegistry(@"Software\Developer Express\eXpressApp Framework\Model Editor");
                _modelEditorForm = new ModelEditorForm(modelControllerBuilder.GetController(pathInfo), settingsStorageOnRegistry);
                _modelEditorForm.Disposed += (sender, eventArgs) => ((IModelEditorSettings)_modelEditorForm).ModelEditorSaveSettings();
                _modelEditorForm.SetCaption(Path.GetFileName(pathInfo.LocalPath));

                Application.Run(_modelEditorForm);
            } catch (Exception exception) {
                HandleException(exception);
            }

        }
Example #5
0
        public static void Main(string[] args)
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += OnException;
            try {
                var pathInfo = new PathInfo(args);
                Tracing.Tracer.LogSeparator("PathInfo");
                Tracing.Tracer.LogText(pathInfo.ToString());
                Tracing.Tracer.LogSeparator("PathInfo");
                CheckAssemblyFile(pathInfo);
                var modelControllerBuilder    = new ModelControllerBuilder();
                var settingsStorageOnRegistry = new SettingsStorageOnRegistry(@"Software\Developer Express\eXpressApp Framework\Model Editor");
                modelEditorForm           = new ModelEditorForm(modelControllerBuilder.GetController(pathInfo), settingsStorageOnRegistry);
                modelEditorForm.Disposed += (sender, eventArgs) => ((IModelEditorSettings)modelEditorForm).ModelEditorSaveSettings();
                modelEditorForm.SetCaption(Path.GetFileName(pathInfo.LocalPath));

                Application.Run(modelEditorForm);
            } catch (Exception exception) {
                HandleException(exception);
            }
        }