Example #1
0
 protected override void OnDrawItem(DrawItemEventArgs e)
 {
     if (base.Items.Count > 0)
     {
         exListBoxItem exListBoxItem = (exListBoxItem)base.Items[e.Index];
         exListBoxItem.drawItem(e, base.Margin, this._titleFont, this._detailsFont, this._levelFont, this._fmt, this._imageSize);
     }
 }
Example #2
0
 protected override void OnDrawItem(DrawItemEventArgs e)
 {
     // prevent from error Visual Designer
     if (this.Items.Count > 0)
     {
         exListBoxItem item = (exListBoxItem)this.Items[e.Index];
         item.drawItem(e, this.Margin, _titleFont, _detailsFont, _levelFont, _fmt, this._imageSize);
     }
 }
Example #3
0
 internal void removeMdiChild(String username, exListBoxItem elbi)
 {
     vClient toRemove = mdiChilds.FirstOrDefault<vClient>(u => u._username == username);
     try {
         exListBox1.Items.Remove(elbi);
     } catch (Exception e)
     {
         MessageBox.Show("Error on remove Child. Please contact me with the Message blow!\n\n" + e.Message);
     }
     mdiChilds.Remove(toRemove);
 }
Example #4
0
 public void addMdiChild(String username, String password, String region, bool autoConnect = false)
 {
     if(mdiChilds.Count<vClient>(u => u._username == username) > 0)
     {
         MessageBox.Show("This Client already exist.");
         return;
     }
     Image summonerIcon = Basic.returnIcon(0);
     vClient t = new vClient(username, password, region, this, autoConnect);
     exListBoxItem eLBI = new exListBoxItem(t._username, t._username, "Status: Waiting...", "", summonerIcon);
     t.addListBoxItem(eLBI);
     exListBox1.Items.Add(eLBI);
     mdiChilds.Add(t);
     t.MdiParent = this;
     t.Show();
     id++;
 }
Example #5
0
 internal void updateListItemImage(exListBoxItem elbi, Image newImage)
 {
     exListBoxItem toUpdate = (exListBoxItem)exListBox1.Items[exListBox1.Items.IndexOf(elbi)];
     toUpdate.ItemImage = newImage;
     exListBox1.Refresh();
 }
Example #6
0
 internal void updateListItem(exListBoxItem elbi, String newName, String newStatus, String newLevel, Image newImage)
 {
     exListBoxItem toUpdate = (exListBoxItem)exListBox1.Items[exListBox1.Items.IndexOf(elbi)];
     toUpdate.Title = newName; toUpdate.Details = newStatus; toUpdate.Level = newLevel; toUpdate.ItemImage = newImage;
     exListBox1.Refresh();
 }
Example #7
0
 internal void onlyUpdateListItemStatusAndLevel(exListBoxItem elbi, String newStatus, String newLevel)
 {
     exListBoxItem toUpdate = (exListBoxItem)exListBox1.Items[exListBox1.Items.IndexOf(elbi)];
     toUpdate.Details = newStatus; toUpdate.Level = newLevel;
     exListBox1.Refresh();
 }