示例#1
0
        public override void CreateEvents()
        {
            if (TrainerIndex.IsNull())
            {
                TrainerIndex = Owner.Trainers.Where(g => g.TrainerType == this.TrainerType).Count() + 1;
            }

            if (Start != null)
            {
                Start.SetDownTick(TickPair.Down);
                Start.Text = StartText;
                Start.CreateEvents();
            }

            if (End != null)
            {
                End.SetDownTick(TickPair.Up);
                End.Text = EndText;
                End.CreateEvents();
            }

            if (this.Loopable)
            {
                if (Norm != null)
                {
                    Norm.SetDownTick(GetNormTick(TickPair));
                    Norm.Text = NormText;
                    Norm.CreateEvents();
                }
            }

            base.CreateEvents();
        }