Example #1
0
 private void ClearOuterFields()
 {
     NazwaBox.Clear();
     DataBox.Clear();
     IloscBox.Clear();
     TypBox.SelectedIndex = -1;
 }
Example #2
0
 private void FehlerButton_Click(object sender, EventArgs e)
 {
     DataBox.Clear();
     foreach (string s in KZ.DataFromDB())
     {
         DataBox.Text += s + "\n";
     }
 }
Example #3
0
        private void BuildGump()
        {
            _totalReal  = 0;
            _totalValue = 0;
            _databox.Clear();

            foreach (SkillListEntry entry in _skillListEntries)
            {
                entry.Clear();
                entry.Dispose();
            }

            _skillListEntries.Clear();

            PropertyInfo pi         = typeof(Skill).GetProperty(_sortField);
            List <Skill> sortSkills = new List <Skill>(World.Player.Skills.OrderBy(x => pi.GetValue(x, null)));

            if (_sortAsc)
            {
                sortSkills.Reverse();
            }

            foreach (Skill skill in sortSkills)
            {
                _totalReal  += skill.Base;
                _totalValue += skill.Value;

                Label skillName      = new Label(skill.Name, true, 1153, font: 3);
                Label skillValueBase = new Label(skill.Base.ToString(), true, 1153, font: 3);
                Label skillValue     = new Label(skill.Value.ToString(), true, 1153, font: 3);
                Label skillCap       = new Label(skill.Cap.ToString(), true, 1153, font: 3);

                _skillListEntries.Add(new SkillListEntry(skillName, skillValueBase, skillValue, skillCap, skill));
            }

            foreach (SkillListEntry t in _skillListEntries)
            {
                _databox.Add(t);
            }

            _databox.WantUpdateSize = true;
            _databox.ReArrangeChildren();

            Add(new Label(ResGumps.Total, true, 1153)
            {
                X = 40, Y = 320
            });
            Add(new Label(_totalReal.ToString("F1"), true, 1153)
            {
                X = 220, Y = 320
            });
            Add(new Label(_totalValue.ToString("F1"), true, 1153)
            {
                X = 300, Y = 320
            });
        }
Example #4
0
        private void ListIPs_SelectedIndexChanged(object sender, EventArgs e)
        {
            string ListipsItem = null;

            try
            {
                ListipsItem = ListIPs.SelectedItem.ToString();
            }
            catch (Exception) {}

            if (ListipsItem == null)
            {
                ListipsItem = AllIPs.ElementAt(Zwischenspeicher);
            }
            else
            {
                Zwischenspeicher = ListIPs.Items.IndexOf(ListipsItem);
            }

            string[] IndexAll = ListipsItem.Split(new char[] { '.' });
            string   Index    = IndexAll[3];

            //Aufruf einer Methode zum Auslesen der Daten (als Liste?)
            FarbPanel.BackColor = CheckOnline(Convert.ToByte(Index));
            int    Zähler = 0;
            string Folge  = "Folgende Pings fehlen: ";

            if (FarbPanel.BackColor == Color.Orange)
            {
                for (int i = 0; i < 300; i++)
                {
                    if (Speicher[Convert.ToByte(Index), i])
                    {
                        Zähler++;
                    }
                    else
                    {
                        Folge += i.ToString() + ",";
                    }
                }
            }
            DataBox.Clear();
            if (Zähler == 300)
            {
                DataBox.Text = Zähler.ToString() + "/300\n";
            }
            else
            {
                DataBox.Text = Zähler.ToString() + "/300\n" + Folge;
            }
        }