Exemple #1
0
        public void ComFixColors(TasSayEventArgs e, string[] words)
        {
            List <MyCol> cols = new List <MyCol>();
            Battle       b    = tas.GetBattle();

            foreach (UserBattleStatus u in b.Users)
            {
                if (!u.IsSpectator)
                {
                    cols.Add((MyCol)u.TeamColor);
                }
            }
            MyCol[] arcols = cols.ToArray();

            MyCol.FixColors(arcols, 30000);

            int cnt = 0;

            foreach (UserBattleStatus u in b.Users)
            {
                if (!u.IsSpectator)
                {
                    tas.ForceColor(u.name, (int)arcols[cnt]);
                    cnt++;
                }
            }

            SayBattle("colors fixed");
        }
Exemple #2
0
        private void btnResetPhoneBook_Click(object sender, RoutedEventArgs e)
        {
            MyCol <int> myIntCol = new MainWindow.MyCol <int>();

            for (int i = 1; i <= 20; i++)
            {
                myIntCol.Add(i);
            }
            MyCol <string> myStrCol = (MyCol <string>)myIntCol.ConvertAll(i => "value = " + i.ToString());

            result = "";
            myStrCol.ForEach(UpdateResult);
            MessageBox.Show("result = " + result);
            //MyCustomer.ContactNumbers = "+92 1111111 /n+92 2222222/n+92 3333333/n+92 4444444/n+92 5555555";
        }