Exemplo n.º 1
0
        /// <summary>
        /// セクションラベルのデフォルトボタンがクリックされた
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void sectionDefaultButtonClick(object sender, EventArgs e)
        {
            ItemSectionControl control = sender as ItemSectionControl;

            if (control != null)
            {
                //何番目のパネルか判定してそれに対応したデフォルト文字列を取得
                int    index = this.flowLayoutPanel1.Controls.IndexOf(control);
                string name  = ItemBuildSection.GetDefaultString(index);
                control.SectionNameText = name;
            }
        }
Exemplo n.º 2
0
        internal void addSectionControl(ItemBuildSection section)
        {
            ItemSectionControl sectionControl = new ItemSectionControl();

            sectionControl.AllowDrop   = true;
            sectionControl.AutoSize    = true;
            sectionControl.Location    = new System.Drawing.Point(3, 3);
            sectionControl.MinimumSize = new System.Drawing.Size(200, 150);
            sectionControl.Name        = section.SectionLabel;
            sectionControl.Size        = new System.Drawing.Size(200, 150);

            sectionControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            sectionControl.ItemEdited += new ItemEditedEventHandler(sectionControl_ItemEdited);

            sectionControl.LayoutSectionValue(section);
            flowLayoutPanel1.Controls.Add(sectionControl);
        }
Exemplo n.º 3
0
        private void itemSectionControl1_ItemEdited(object sender, ItemEditEventArgs e)
        {
            ItemSectionControl control = sender as ItemSectionControl;
            int index = -1;

            if (control != null)
            {
                //何番目のパネルか判定してそれに対応したデフォルト文字列を取得
                index = this.flowLayoutPanel1.Controls.IndexOf(control);
            }

            switch (e.Event)
            {
            case ItemEditEventArgs.EventType.Add:

                break;

            case ItemEditEventArgs.EventType.Delete:
                break;

            case ItemEditEventArgs.EventType.LabelEdit:
                break;
            }
        }