コード例 #1
0
		public List<SItemBonus> GetBonusList() {
			List<SItemBonus> bonus = new List<SItemBonus>();
			for( int i = 0; i < mBonusCount; i++ ) {
				SItemBonus b = new SItemBonus();
				b.Type = (EItemBonus)( Controls[ "cb" + i ] as ComboBox ).SelectedIndex;
				b.Value = (int)( Controls[ "num" + i ] as NumericUpDown ).Value;
				
				if( b.Value == 0 )
					continue;

				bonus.Add( b );
			}

			return bonus;
		}
コード例 #2
0
ファイル: frmItemBonus.cs プロジェクト: CairoLee/svn-dump
        public List <SItemBonus> GetBonusList()
        {
            List <SItemBonus> bonus = new List <SItemBonus>();

            for (int i = 0; i < mBonusCount; i++)
            {
                SItemBonus b = new SItemBonus();
                b.Type  = (EItemBonus)(Controls["cb" + i] as ComboBox).SelectedIndex;
                b.Value = (int)(Controls["num" + i] as NumericUpDown).Value;

                if (b.Value == 0)
                {
                    continue;
                }

                bonus.Add(b);
            }

            return(bonus);
        }