示例#1
0
        public ComboListView()
        {
            // set comboBoxLanguages (comboBox1)
            m_gestures          = new List <MyGesture>();
            m_selectedGestures  = new List <string>();
            this.DoubleBuffered = true;
            OwnerDraw           = true;

            cms_options = new ContextMenuStrip();
            cms_options.ShowImageMargin = false;
            cms_options.Items.Add("ChangePriority");
            cms_options.ItemClicked += new ToolStripItemClickedEventHandler(cms_options_ItemClicked);

            m_cbItems = new List <string>();
            for (int i = 0; i < ConvertValue.PrioritiesCount; i++)
            {
                m_cbItems.Add(ConvertValue.IndexToPriority(i).ToString());
            }

            Translate();

            cB_execution.Items.AddRange(m_cbItems.ToArray());
            cB_execution.Size      = new System.Drawing.Size(0, 0);
            cB_execution.Location  = new System.Drawing.Point(0, 0);
            cB_execution.FlatStyle = FlatStyle.Flat;
            this.Controls.AddRange(new System.Windows.Forms.Control[] { this.cB_execution });
            cB_execution.SelectedIndexChanged += new System.EventHandler(this.ComboBoxSelectedIndexChanged);
            cB_execution.LostFocus            += new System.EventHandler(this.ComboBoxFocusExit);
            cB_execution.KeyPress             += new System.Windows.Forms.KeyPressEventHandler(this.ComboBoxKeyPress);
            cB_execution.DropDownStyle         = ComboBoxStyle.DropDownList;
            cB_execution.Hide();
        }
示例#2
0
        private void ComboBoxSelectedIndexChanged(object sender, System.EventArgs e)
        {
            int index = cB_execution.SelectedIndex;

            if (index >= 0)
            {
                string str = cB_execution.Items[index].ToString();
                m_comboItem.SubItems[m_comboColumnIndex].Text = str;
                OnComboIndexChanged(m_comboItem, ConvertValue.IndexToPriority(index));
            }
        }
示例#3
0
 public void Translate()
 {
     for (int i = 0; i < m_gestures.Count; i++)
     {
         this.Items[i].SubItems[1].Text = m_gestures[i].PriorityName;
     }
     for (int i = 0; i < ConvertValue.PrioritiesCount; i++)
     {
         m_cbItems[i] = Translation.GetPriorityText(ConvertValue.IndexToPriority(i));
     }
     cms_options.Items[0].Text = Translation.GetText("MW_cMI_changePriority");
 }
示例#4
0
 private void SetValues()
 {
     cB_priority.Items.Clear();
     if (!m_tempGesture.IsImplicitOnly)
     {
         for (int i = 0; i < ConvertValue.PrioritiesCount; i++)
         {
             cB_priority.Items.Add(Translation.GetPriorityText(ConvertValue.IndexToPriority(i)));
         }
     }
     else
     {
         cB_priority.Items.Add(Translation.GetPriorityText(ConvertValue.IndexToPriority(0)));
         m_tempGesture.ExecutionType = ExecuteType.Implicit;
     }
     cB_priority.SelectedIndex = ConvertValue.PriorityToIndex(m_tempGesture.ExecutionType);
 }
示例#5
0
 private void cB_priority_SelectedIndexChanged(object sender, EventArgs e)
 {
     m_tempGesture.ExecutionType = ConvertValue.IndexToPriority(cB_priority.SelectedIndex);
 }