Ejemplo n.º 1
0
 private void moveAddPanel()
 {
     if (isAddPanelInlude())
     {
         AddPanel addPanel = (AddPanel)this.Controls.Find("addPanel", false)[0];
         addPanel.Size     = new Size(AddPanel.defaultWidth, AddPanel.defaultHeight);
         addPanel.Location = new Point(
             addButton.Location.X + addButton.Width / 2 - addPanel.Width / 2,
             addButton.Location.Y + addButton.Height);
     }
 }
Ejemplo n.º 2
0
        private void includeAddPanel()
        {
            AddPanel addPanel = new AddPanel();

            addPanel.Name = "addPanel";
            addPanel.add("创建", Color.ForestGreen, addPanel_CreateButton_Click);
            addPanel.add("打开", Color.OrangeRed, addPanel_openButton_Click);
            addPanel.add("导入", Color.DarkOrange, addPanel_importButton_Click);
            addPanel.addToParent(this);
            addPanel.Location =
                new Point(addButton.Location.X + addButton.Width / 2 - addPanel.Width / 2, addButton.Location.Y + addButton.Height);
            addPanel.Size = new Size(AddPanel.defaultWidth, AddPanel.defaultHeight);
        }
Ejemplo n.º 3
0
        private void removeAddPanel()
        {
            AddPanel addPanel = (AddPanel)this.Controls.Find("addPanel", false)[0];

            addPanel.removeFromParent();
        }