Inheritance: IComparable
Esempio n. 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);
            }
        }
Esempio n. 2
0
        private void toolStripComboBoxShortCut_SelectedIndexChanged(object sender, EventArgs e)
        {
            VideoViewTag tag = (VideoViewTag)this.toolStripComboBoxShortCut.SelectedItem;

            if (tag != null)
            {
                this.ScrollToView(tag.ID);
            }
        }
Esempio n. 3
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);
     }
 }