Example #1
0
 void IDisposable.Dispose()
 {
     IPreferencesService service = (IPreferencesService) this._serviceProvider.GetService(typeof(IPreferencesService));
     if (service != null)
     {
         PreferencesStore preferencesStore = service.GetPreferencesStore(typeof(UIService));
         IDictionary styles = this.Styles;
         preferencesStore.SetValue("DialogFontFace", this._newDialogFontFace, "Tahoma");
         preferencesStore.SetValue("DialogFontSize", this._newDialogFontSize, 8);
     }
     this._appWindow = null;
     this._serviceProvider = null;
 }
Example #2
0
 public UIService(IServiceProvider serviceProvider, MxApplicationWindow appWindow)
 {
     this._serviceProvider = serviceProvider;
     this._appWindow = appWindow;
 }
Example #3
0
        public void Run()
        {
            try
            {
                this.InitializeApplication();
                this._appWindow = this.CreateApplicationWindow();
                this._appWindow.InitialActivated += new EventHandler(this.OnApplicationWindowActivated);
                this._appWindow.Closing += new CancelEventHandler(this.OnApplicationWindowClosing);
                bool flag = (this.ApplicationType & ApplicationType.Workspace) != ApplicationType.Generic;

                this._packageManager.LoadPackages(this.CreateApplicationPackage());
                if (flag)
                {
                    this._toolboxService.LoadToolbox();
                    this._languageManager.LoadDocumentLanguages();
                    this._docTypeManager.LoadDocumentTypes();
                    //TODO: �ϴ��о�������, ��ʱ����� 2010.10.12 15:40
                    this._projectManager.LoadProjectTypes();
                }
                Application.Run(this._appWindow);
            }
            catch (Exception)
            {
            }
            finally
            {
                try
                {
                    this.CloseApplication();
                }
                catch (Exception)
                {
                }
            }
        }