Пример #1
0
        public MainWindow CreateLibraryMainWindow()
        {
            MainWindowArgument arg = MainWindowArgument.Parse(_preferences)[0];
            MainWindow         w   = new MainWindow(arg, _menu);

            w.Text        = "Poderosa";
            w.FormClosed += new FormClosedEventHandler(WindowClosedHandler);
            w.Activated  += delegate(object sender, EventArgs args)
            {
                _activeWindow = (MainWindow)sender; //最後にアクティブになったものを指定する
            };
            _windows.Add(w);
            //w.Show();
            return(w);
        }
Пример #2
0
        public void RunExtension()
        {
            try {
                _poderosaWorld.Culture.SetCulture(CoreServicePreferenceAdapter.LangToCulture(_preferences.OriginalPreference.Language));
                MainWindowArgument[] args = MainWindowArgument.Parse(_preferences);
                foreach (MainWindowArgument arg in args)
                {
                    _windows.Add(CreateMainWindow(arg));
                }

                if (GetStartMode() == StartMode.StandAlone)
                {
                    Application.Run(_appContext);
                    IPoderosaApplication app = (IPoderosaApplication)_poderosaWorld.GetAdapter(typeof(IPoderosaApplication));
                    app.Shutdown();
                }
            } catch (Exception ex) {
                RuntimeUtil.ReportException(ex);
            }
        }