Example #1
0
        internal static void Main(string[] args)
        {
#if !DEBUG
            WpfSplash.Instance.Show();
#endif
            CoreGlobalPreferencesSingleton.Instance.StartTime = Environment.TickCount;
            XmlConfigurator.Configure();
            DefaultInterpreters.Setup();

            var app = new App();
            NaroMessage.SetFactory(new MessageBoxMessage());
            NaroStartInfo.Instance.Arguments = args;
            Application.EnableVisualStyles();
            WindowsFormsHost.EnableWindowsFormsInterop();
            Log.Info("-------------------------- Started " + NaroAppConstantNames.AppName + " " +
                     NaroAppConstantNames.Version + " session ---------------------------");

            var optionsPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
                              @"\NaroCAD\options.nxml";
            if (!File.Exists(optionsPath))
            {
                File.Copy(Directory.GetCurrentDirectory() + @"\options.nxml", optionsPath);
            }

            AppDomain.CurrentDomain.UnhandledException += HandleException;
            var shellWindow = new ShellWindow();
            shellWindow.SetActionGraph();
            app.Run(shellWindow);

            File.Delete(NaroAppConstantNames.GuardFileName);
            //MemMapper.DisplayLeaks();
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            NaroMessage.SetFactory(new MessageBoxMessage());
            var pluginManagerWindow = new ManagementPluginWindow();

            pluginManagerWindow.ShowDialog();
        }