Inheritance: IComparable
コード例 #1
0
        private void ShortcutAdd(IView v)
        {
            VideoViewTag tag = new VideoViewTag(v.ID, v.Title);

            foreach (VideoViewTag t in this.toolStripComboBoxShortCut.Items)
            {
                if (t.ID.Equals(tag.ID))
                {
                    return;
                }
            }
            this.toolStripComboBoxShortCut.Items.Add(tag);
            this.ViewCount++;
            try
            {
                object    o    = this.toolStripComboBoxShortCut.SelectedItem;
                ArrayList list = ArrayList.Adapter(this.toolStripComboBoxShortCut.Items);
                list.Sort();
                this.toolStripComboBoxShortCut.SelectedItem = o;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, MotionPreference.Instance.MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void toolStripComboBoxShortCut_SelectedIndexChanged(object sender, EventArgs e)
        {
            VideoViewTag tag = (VideoViewTag)this.toolStripComboBoxShortCut.SelectedItem;

            if (tag != null)
            {
                this.ScrollToView(tag.ID);
            }
        }
コード例 #3
0
ファイル: CameraBoard.cs プロジェクト: zhuangyy/Motion
 private void ShortcutAdd(IView v)
 {
     VideoViewTag tag = new VideoViewTag(v.ID, v.Title);
     foreach (VideoViewTag t in this.toolStripComboBoxShortCut.Items)
     {
         if (t.ID.Equals(tag.ID))
         {
             return;
         }
     }
     this.toolStripComboBoxShortCut.Items.Add(tag);
     this.ViewCount++;
     try
     {
         object o = this.toolStripComboBoxShortCut.SelectedItem;
         ArrayList list = ArrayList.Adapter(this.toolStripComboBoxShortCut.Items);
         list.Sort();
         this.toolStripComboBoxShortCut.SelectedItem = o;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, MotionPreference.Instance.MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }