Exemplo n.º 1
0
        internal void updateListItemImage(exListBoxItem elbi, Image newImage)
        {
            exListBoxItem toUpdate = (exListBoxItem)exListBox1.Items[exListBox1.Items.IndexOf(elbi)];

            toUpdate.ItemImage = newImage;
            exListBox1.Refresh();
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
0
        internal void updateListItemImage(exListBoxItem elbi, Image newImage)
        {
            exListBoxItem exListBoxItem = (exListBoxItem)this.exListBox1.Items[this.exListBox1.Items.IndexOf(elbi)];

            exListBoxItem.ItemImage = newImage;
            this.exListBox1.Refresh();
        }
Exemplo n.º 5
0
        internal void onlyUpdateListItemStatusAndLevel(exListBoxItem elbi, string newStatus, string newLevel)
        {
            exListBoxItem exListBoxItem = (exListBoxItem)this.exListBox1.Items[this.exListBox1.Items.IndexOf(elbi)];

            exListBoxItem.Details = newStatus;
            exListBoxItem.Level   = newLevel;
            this.exListBox1.Refresh();
        }
Exemplo n.º 6
0
        internal void updateListItem(exListBoxItem elbi, string newName, string newStatus, string newLevel, Image newImage)
        {
            exListBoxItem exListBoxItem = (exListBoxItem)this.exListBox1.Items[this.exListBox1.Items.IndexOf(elbi)];

            exListBoxItem.Title     = newName;
            exListBoxItem.Details   = newStatus;
            exListBoxItem.Level     = newLevel;
            exListBoxItem.ItemImage = newImage;
            this.exListBox1.Refresh();
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
0
        internal void removeMdiChild(string username, exListBoxItem elbi)
        {
            vClient item = VoliBot.mdiChilds.FirstOrDefault((vClient u) => u._username == username);

            try
            {
                this.exListBox1.Items.Remove(elbi);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error on remove Child. Please contact me with the Message blow!\n\n" + ex.Message);
            }
            VoliBot.mdiChilds.Remove(item);
        }
Exemplo n.º 9
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++;
        }
Exemplo n.º 10
0
        public void addMdiChild(string username, string password, string region, bool autoConnect = false)
        {
            if (VoliBot.mdiChilds.Count((vClient u) => u._username == username) > 0)
            {
                MessageBox.Show("This Client already exist.");
                return;
            }
            Image         image         = Basic.returnIcon(0);
            vClient       vClient       = new vClient(username, password, region, this, autoConnect);
            exListBoxItem exListBoxItem = new exListBoxItem(vClient._username, vClient._username, "Status: Waiting...", "", image);

            vClient.addListBoxItem(exListBoxItem);
            this.exListBox1.Items.Add(exListBoxItem);
            VoliBot.mdiChilds.Add(vClient);
            vClient.MdiParent = this;
            vClient.Show();
            this.id++;
        }
Exemplo n.º 11
0
 private void exListBox1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         int index = exListBox1.IndexFromPoint(e.Location);
         if (index != ListBox.NoMatches)
         {
             exListBoxItem ix     = (exListBoxItem)exListBox1.Items[index];
             vClient       client = mdiChilds.FirstOrDefault <vClient>(u => u._username == ix.Id);
             if (client.WindowState == FormWindowState.Maximized)
             {
                 client.WindowState = FormWindowState.Normal;
             }
             else
             {
                 client.WindowState = FormWindowState.Maximized;
             }
         }
     }
     catch (Exception) { }
 }
Exemplo n.º 12
0
 private void exListBox1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         int num = this.exListBox1.IndexFromPoint(e.Location);
         if (num != -1)
         {
             exListBoxItem ix      = (exListBoxItem)this.exListBox1.Items[num];
             vClient       vClient = VoliBot.mdiChilds.FirstOrDefault((vClient u) => u._username == ix.Id);
             if (vClient.WindowState == FormWindowState.Maximized)
             {
                 vClient.WindowState = FormWindowState.Normal;
             }
             else
             {
                 vClient.WindowState = FormWindowState.Maximized;
             }
         }
     }
     catch (Exception)
     {
     }
 }