Пример #1
0
        private void SetListViewItemActionInfo(int index, ContentAction action, ListViewItem lvi)
        {
            lvi.SubItems.Clear();
            lvi.ImageIndex = 0;
            lvi.Text = string.Format("Action{0:D2}", index);

            var info = new ListViewItem.ListViewSubItem();
            info.Text = action.Text;
            lvi.SubItems.Add(info);

            var waittingSec = new ListViewItem.ListViewSubItem();
            waittingSec.Text = (action.DuringMS * 0.001).ToString();
            lvi.SubItems.Add(waittingSec);


            lvi.Tag = this.m_editingStage.ContentList[index];
        }
Пример #2
0
        private void newAcitonMI_Click(object sender, EventArgs e)
        {
            var action = new ContentAction();

            this.m_editingStage.ContentList.Add(action);

            this.contentList.BeginUpdate();
            this.contentList.Items.Clear();

            for (int i = 0; i < this.m_editingStage.ContentList.Count(); i++)
            {
                var lvi = new ListViewItem();
                SetListViewItemActionInfo(i, this.m_editingStage.ContentList[i], lvi);
                this.contentList.Items.Add(lvi);
            }
            this.contentList.EndUpdate();
        }
Пример #3
0
 private void SetEditContentAction(ContentAction action)
 {
     if (action != null)
     {
         this.actionType.Text = action.Type.ToString();
         this.actionText.Text = action.Text;
         this.waitingSecond.Value = (decimal)(action.DuringMS * 0.001);
         this.SoundChannel1.Text = action.SoundChannel[0];
         this.SoundChannel2.Text = action.SoundChannel[1];
         this.SoundChannel3.Text = action.SoundChannel[2];
         this.StopChannel1.Checked = action.StopChannel[0];
         this.StopChannel2.Checked = action.StopChannel[1];
         this.StopChannel3.Checked = action.StopChannel[2];
         this.SoundIsLoop1.Checked = action.SoundIsLoop[0];
         this.SoundIsLoop2.Checked = action.SoundIsLoop[1];
         this.SoundIsLoop3.Checked = action.SoundIsLoop[2];
     }
     else
     {
         this.actionType.Text = "";
         this.actionText.Text = "";
         this.waitingSecond.Value = 0;
         this.SoundChannel1.Text = "";
         this.SoundChannel2.Text = "";
         this.SoundChannel3.Text = "";
         this.StopChannel1.Checked = false;
         this.StopChannel2.Checked = false;
         this.StopChannel3.Checked = false;
     }
 }