コード例 #1
0
    public MediaPortalEditor()
    {
      InitializeComponent();
      Text = "MediaPortalEditor";

      // Initialize style options
      style = VisualStyle.IDE;
      SetStyle(ControlStyles.DoubleBuffer, true);
      SetStyle(ControlStyles.AllPaintingInWmPaint, true);

      // Create the docking and tab manager
      tabManager = new TabControl();
      tabManager.Appearance = TabControl.VisualAppearance.MultiDocument;
      tabManager.ClosePressed += new EventHandler(OnDesignerClosed);
      tabManager.SelectionChanged += new EventHandler(OnDesignerIndexChanged);
      tabManager.Dock = DockStyle.Fill;
      tabManager.Style = style;
      tabManager.IDEPixelBorder = true;
      tabManager.ShowClose = false;
      tabManager.ImageList = tabImageList;
      Controls.Add(tabManager);

      dockManager = new DockingManager(this, style);
      dockManager.InnerControl = tabManager;
      dockManager.TabControlCreated += new DockingManager.TabControlCreatedHandler(OnTabControlCreated);
      dockManager.ContentHidden += new DockingManager.ContentHandler(OnContentHidden);
      dockManager.ContentShown += new DockingManager.ContentHandler(OnContentShown);

      // Create Status Bar
      statusBar = CreateStatusBar();
      dockManager.OuterControl = statusBar;

      // Create Menu and Toolbar
      topMenu = CreateTopMenu();

      // Create Skin Tree
      skinExplorer = new MpeExplorer(this);
      Content c = dockManager.Contents.Add(skinExplorer, "Explorer", serviceImageList, 0);
      dockManager.AddContentWithState(c, State.DockLeft);

      // Create Properties
      propertyManager = new MpePropertyManager(this);
      c = dockManager.Contents.Add(propertyManager, "Properties", serviceImageList, 1);
      dockManager.AddContentWithState(c, State.DockRight);

      // Create Help Manager and Browser
      helpManager = new MpeHelpManager(this);
      c = dockManager.Contents.Add(helpManager, "Help", serviceImageList, 2);
      dockManager.AddContentWithState(c, State.DockBottom);
      helpBrowser = new MpeHelpBrowser(this);

      // Setup Tab Designers
      selectedDesignerIndex = -1;

      // Static Self Reference
      self = this;
    }
コード例 #2
0
 protected MpeStatusBar CreateStatusBar()
 {
   // Convert the statusBarIcons (ImageList) into an Array of Images
   MpeStatusBar statusbar = new MpeStatusBar(statusBarIcons);
   statusbar.Dock = DockStyle.Bottom;
   Controls.Add(statusbar);
   return statusbar;
 }