Ejemplo n.º 1
0
 public MpeSaveForm(MpeDesigner[] designers, ImageList imageList)
 {
   InitializeComponent();
   for (int i = 0; designers != null && i < designers.Length; i++)
   {
     ListViewItem item = changeList.Items.Add(designers[i].ResourceName);
     item.Tag = designers[i];
     item.Selected = true;
     item.SubItems.Add(designers[i].GetType().Name.Replace("Designer", "").Replace("Mpe", ""));
   }
   DialogResult = DialogResult.Cancel;
 }
Ejemplo n.º 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];
   }
 }