Esempio n. 1
0
        private void BtnAddMultiply_Click(object sender, EventArgs e)
        {
            string           name  = GetTreningName();
            uint             count = (uint)EdCount.Value;
            SportsmanCommand cmd   = new SportsmanMultiply(name, count, CommandSelected());

            LbCommands.Items.Add(cmd);
            LbCommands.SelectedItem = cmd;
            EdTrening.SelectAll();
            LbCommands.Focus();
            SomeChanged();
        }
Esempio n. 2
0
        private void BtnAddTrening_Click(object sender, EventArgs e)
        {
            int count = LbTrening.Items.Count;

            SportsmanCommand[] list = new SportsmanCommand[count];
            for (int i = 0; i < count; ++i)
            {
                list[i] = LbTrening.Items[i] as SportsmanCommand;
            }
            SportsmanCommand cmd = new SportsmanTrening(GetTreningName(), list);

            LbCommands.Items.Add(cmd);
            LbCommands.SelectedItem = cmd;
            LbTrening.Items.Clear();
            EdTrening.SelectAll();
            LbCommands.Focus();
            SomeChanged();
        }
Esempio n. 3
0
 private void BtnAddToTrening_Click(object sender, EventArgs e)
 {
     LbTrening.Items.Add(CommandSelected());
     LbTrening.SelectedIndex = LbTrening.Items.Count - 1;
     LbCommands.Focus();
 }