public MpeResourceDesigner(MediaPortalEditor mpe)
    {
      // Set Painting Styles
      SetStyle(ControlStyles.DoubleBuffer, true);
      SetStyle(ControlStyles.AllPaintingInWmPaint, true);
      SetStyle(ControlStyles.UserPaint, true);

      // This call is required by the Windows.Forms Form Designer.
      InitializeComponent();

      // Initialize variables
      this.mpe = mpe;
      mask = new MpeControlMask(this);
      //this.mask2 = new MpeResourceMask();
      //this.Controls.Add(mask2);
      resourceList = new MpeResourceCollection();

      // Create Popup Context Menu
      contextMenu = new PopupMenu();
      contextMenu.MenuCommands.Add(new MenuCommand("Parent", menuImageList, 4));
      contextMenu.MenuCommands.Add(new MenuCommand("-"));
      contextMenu.MenuCommands.Add(new MenuCommand("Send To Back", menuImageList, 0));
      contextMenu.MenuCommands.Add(new MenuCommand("Bring To Front", menuImageList, 1));
      contextMenu.MenuCommands.Add(new MenuCommand("-"));
      contextMenu.MenuCommands.Add(new MenuCommand("Copy"));
      contextMenu.MenuCommands.Add(new MenuCommand("Paste"));
      contextMenu.MenuCommands.Add(new MenuCommand("Cut"));
      contextMenu.MenuCommands.Add(new MenuCommand("Delete", menuImageList, 2));
      contextMenu.MenuCommands.Add(new MenuCommand("-"));
      contextMenu.MenuCommands.Add(new MenuCommand("Properties", menuImageList, 3));
      contextMenu.MenuCommands.Add(new MenuCommand("Test"));
    }
Beispiel #2
0
        public MpeResourceDesigner(MediaPortalEditor mpe)
        {
            // Set Painting Styles
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.UserPaint, true);

            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // Initialize variables
            this.mpe = mpe;
            mask     = new MpeControlMask(this);
            //this.mask2 = new MpeResourceMask();
            //this.Controls.Add(mask2);
            resourceList = new MpeResourceCollection();

            // Create Popup Context Menu
            contextMenu = new PopupMenu();
            contextMenu.MenuCommands.Add(new MenuCommand("Parent", menuImageList, 4));
            contextMenu.MenuCommands.Add(new MenuCommand("-"));
            contextMenu.MenuCommands.Add(new MenuCommand("Send To Back", menuImageList, 0));
            contextMenu.MenuCommands.Add(new MenuCommand("Bring To Front", menuImageList, 1));
            contextMenu.MenuCommands.Add(new MenuCommand("-"));
            contextMenu.MenuCommands.Add(new MenuCommand("Copy"));
            contextMenu.MenuCommands.Add(new MenuCommand("Paste"));
            contextMenu.MenuCommands.Add(new MenuCommand("Cut"));
            contextMenu.MenuCommands.Add(new MenuCommand("Delete", menuImageList, 2));
            contextMenu.MenuCommands.Add(new MenuCommand("-"));
            contextMenu.MenuCommands.Add(new MenuCommand("Properties", menuImageList, 3));
            contextMenu.MenuCommands.Add(new MenuCommand("Test"));
        }