コード例 #1
0
 protected void OnClosed(object sender, EventArgs e)
 {
     try
     {
         SaveConfiguration();
         SavePreferences();
     }
     catch (Exception ee)
     {
         MpeLog.Warn(ee);
     }
 }
コード例 #2
0
 public void AddDesigner(MpeDesigner designer)
 {
     try
     {
         designer.Initialize();
     }
     catch (DesignerException ee)
     {
         MpeLog.Debug(ee);
         MpeLog.Warn(ee);
         PropertyManager.SelectedResource = null;
         MessageBox.Show(this, ee.Message, "Designer Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     if (tabManager.TabPages[designer.ResourceName] == null)
     {
         TabPage newTab = new TabPage(designer.ResourceName, (Control)designer, 4);
         if (designer is MpeControlDesigner)
         {
             newTab.ImageIndex = 0;
         }
         else if (designer is FontDesigner)
         {
             newTab.ImageIndex = 1;
         }
         else if (designer is MpeImageDesigner)
         {
             newTab.ImageIndex = 2;
         }
         else if (designer is MpeScreenDesigner)
         {
             newTab.ImageIndex = 3;
         }
         else if (designer is MpeStringDesigner)
         {
             newTab.ImageIndex = 4;
         }
         else if (designer is MpeHelpBrowser)
         {
             newTab.ImageIndex = 5;
         }
         newTab.Tag = designer;
         tabManager.TabPages.Add(newTab);
         tabManager.SelectedTab = newTab;
         tabManager.ShowClose   = true;
     }
     else
     {
         tabManager.SelectedTab = tabManager.TabPages[designer.ResourceName];
     }
 }
コード例 #3
0
 protected void LoadConfiguration()
 {
     StatusBar.Info("Loading configuration...");
     if (File.Exists("config.xml"))
     {
         try
         {
             dockManager.LoadConfigFromFile("config.xml");
         }
         catch (Exception ee)
         {
             MpeLog.Debug(ee);
             MpeLog.Warn(ee);
         }
     }
 }