示例#1
0
 public void AddTitleImage(TitleImage titleImage)
 {
     this.flowLayoutPanel1.Controls.Add(titleImage);
     this.flowLayoutPanel1.Controls.Remove(plusTitleImage);
     this.flowLayoutPanel1.Controls.Add(plusTitleImage);
     images.Add(titleImage);
     titleImage.OnSelected += TitleImageSelected;
     titleImage.OnRemoved  += TitleImageRemoved;
     titleImage.Selected    = true;
 }
示例#2
0
 public void TitleImageSelected(TitleImage selectedTitle, EventArgs args)
 {
     selectedTitleImage = selectedTitle;
     foreach (TitleImage item in this.images)
     {
         if (item != selectedTitle)
         {
             item.Selected = false;
         }
     }
 }
示例#3
0
 public TitleImageControl()
 {
     InitializeComponent();
     plusTitleImage = new TitleImage()
     {
         Image        = plusImage,
         CannotRemove = true,
         Selectable   = false,
     };
     plusTitleImage.Click += PlusTitleImage_Click;
 }
示例#4
0
 public void RemoveTitleImage(TitleImage image)
 {
     this.flowLayoutPanel1.Controls.Add(image);
 }
示例#5
0
 public void TitleImageRemoved(TitleImage selectedTitle, EventArgs args)
 {
     this.images.Remove(selectedTitle);
 }