コード例 #1
0
ファイル: Form1.cs プロジェクト: bveina/dmx-pro-csharp
        public void loadCueIntoBlind(int num)
        {
            //if (blindCue!=null) blindCue.channelLevelsChanged -=
            blindCue = mCList[num];
            blindCue.channelLevelsChanged += new EventHandler(blindCue_channelLevelsChanged);

            if (blindCue == null) return;

            groupBox2.Text = string.Format("Cue Number: {0} - {1}", blindCue.cueNumber, blindCue.cueName);
            //Console.WriteLine("before blindslider.channels=blindcue.channel:");
            //Console.WriteLine(blindCue.serialize());
            sliderGroupBlind.ChannelValues = (byte[])(blindCue.channelLevels.Clone());
            //Console.WriteLine("after blindslider.channels=blindcue.channel:");
            //Console.WriteLine(blindCue.serialize());

            txtCueName.Text = blindCue.cueName;
            nudDownFade.Value = blindCue.downFadeTime;
            nudUpFade.Value = blindCue.upFadeTime;
            nudFollowTime.Value = blindCue.followTime;
            chkFollow.Checked = blindCue.isFollowCue;
        }
コード例 #2
0
ファイル: CueList.cs プロジェクト: bveina/dmx-pro-csharp
 public LightCue getFollowingCue(LightCue cue)
 {
     if (cue == null) return mCues[0];
     int index = mCues.FindIndex(delegate(LightCue l) { return l.cueNumber == cue.cueNumber; });
     if (index == -1) return mCues[0];
     if (index == (mCues.Count - 1)) return mCues[0];
     return mCues[index + 1];
 }
コード例 #3
0
ファイル: CueList.cs プロジェクト: bveina/dmx-pro-csharp
 public LightCue getPrecedingCue(LightCue cue)
 {
     if (cue == null) return mCues[0];
     int index = mCues.FindIndex(delegate(LightCue l) { return l.cueNumber == cue.cueNumber; });
     if (index == -1) return mCues[0];
     if (index == 0) return mCues[mCues.Count - 1];
     return mCues[index - 1];
 }
コード例 #4
0
ファイル: CueList.cs プロジェクト: bveina/dmx-pro-csharp
 public bool AddCue(LightCue cue)
 {
     if (mCues.Exists(delegate(LightCue l) { return l.cueNumber == cue.cueNumber; }))
         return false;
     mCues.Add(cue);
     mCues.Sort();
     return true;
     // since LightCue implements IComparable<LightCue>
     //we dont need to specify a delegate. it will sort by cue number
 }