public void CollapseToMediumTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value ButtonSize expected = new ButtonSize(); // TODO: Initialize to an appropriate value ButtonSize actual; target.CollapseToMedium = expected; actual = target.CollapseToMedium; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public UC_TP_doubleBtn() { InitializeComponent(); for (int i = 0; i < ConvertValue.MouseButtonsCount; i++) { cB_holdBtn.Items.Add(Translation.GetMouseBtnText(ConvertValue.IndexToMouseBtn(i))); cB_executeBtn.Items.Add(Translation.GetMouseBtnText(ConvertValue.IndexToMouseBtn(i))); } m_doubleBtnAction = new DoubleButton(MouseButtons.None, MouseButtons.None); lbl_holdBtn.Text = Translation.Name_RockerHoldDownBtn; rTB_pushHoldBtn.Text = Translation.GetText("C_RockerG_pushHoldBtn"); lbl_executeBtn.Text = Translation.Name_RockerExecuteBtn; rTB_clickExecuteBtn.Text = Translation.GetText("C_RockerG_clickExecuteBtn"); rTB_notes.Text = Translation.GetText("C_RockerG_notes"); cH_associatedActions.Text = Translation.GetText("C_Gestures_cH_associatedActions"); cH_group.Text = Translation.GetText("C_Gestures_cH_group"); }
private void comboBox_SelectedIndexChanged(object sender, EventArgs e) { if (!m_bOwnSelect) { //m_bOwnSelect = true; //ComboBox cbIndexChanged = (ComboBox)sender; //ComboBox cbModifyCombo = cB_executeBtn; //if (cbIndexChanged == cB_executeBtn) // cbModifyCombo = cB_holdBtn; //object selected = cbModifyCombo.SelectedItem; //cbModifyCombo.Items.Clear(); //cbModifyCombo.Items.AddRange(Enum.GetNames(typeof(MouseButtons))); //cbModifyCombo.Items.Remove(MouseButtons.None.ToString()); //cbModifyCombo.Items.Remove(cbIndexChanged.SelectedItem); //cbModifyCombo.SelectedItem = selected; //m_bOwnSelect = false; MouseButtons holdBtn = MouseButtons.None; MouseButtons executeBtn = MouseButtons.None; if (cB_holdBtn.SelectedIndex != -1) { holdBtn = ConvertValue.IndexToMouseBtn(cB_holdBtn.SelectedIndex); //(MouseButtons)Enum.Parse(typeof(MouseButtons), cB_holdBtn.SelectedItem.ToString()); } if (cB_executeBtn.SelectedIndex != -1) { executeBtn = ConvertValue.IndexToMouseBtn(cB_executeBtn.SelectedIndex);//(MouseButtons)Enum.Parse(typeof(MouseButtons), cB_executeBtn.SelectedItem.ToString()); } m_tempGesture.Activator = new DoubleButton(holdBtn, executeBtn); m_doubleBtnAction = m_tempGesture.Activator; base.RedrawDisplay(); lV_buttonMatchedGestures.Items.Clear(); List <MyGesture> matchedGest = m_gesturesCollection.MatchedGestures(m_tempGesture.Activator.ID); if (matchedGest != null) { foreach (MyGesture gest in matchedGest) { lV_buttonMatchedGestures.Items.Add(new ListViewItem(new string[] { gest.Caption, gest.AppGroup.Caption })); } } SetInfoValues(); } }
public override void Initialize() { base.Initialize(); if (m_tempGesture.Activator != null && m_tempGesture.Activator.Type == BaseActivator.Types.DoubleButton) { m_doubleBtnAction = m_tempGesture.Activator; m_bOwnSelect = true; if (m_doubleBtnAction.Trigger != MouseButtons.None) { //cB_executeBtn.Items.Remove(m_doubleBtnAction.Trigger.ToString()); cB_holdBtn.SelectedIndex = ConvertValue.MouseBtnToIndex(m_doubleBtnAction.Trigger); } if (m_doubleBtnAction.Modifier != MouseButtons.None) { //cB_holdBtn.Items.Remove(m_doubleBtnAction.Modifier.ToString()); cB_executeBtn.SelectedIndex = ConvertValue.MouseBtnToIndex(m_doubleBtnAction.Modifier); } m_bOwnSelect = false; //tabControl_invokeAction.SelectedTab = tabPage_buttons; base.RedrawDisplay(); } }
//void MyMouse_MouseBrowseWheel(ExtraMouseHook.WheelAction wheelAction) //{ // switch (wheelAction) // { // case WheelAction.Down: // m_mouse.SimulateMouseAction(MouseAction.LeftDoubleClick); // break; // case WheelAction.Up: // KeyInput.ExecuteKeyInput(AllKeys.KEY_BACK); // break; // } //} void MyMouse_DoubleBtnAction(MouseEventArgs trigger, MouseEventArgs modifier, bool notifyOnly) { Debug.WriteLine(string.Format("MyEngine: DoubleBtnAction {0}/{1} NotifyOnly: {2}", trigger.Button, modifier.Button, notifyOnly)); form_top.CloseContextMenu(); m_cursorPosition = modifier.Location; m_hwndForeWnd = Win32.GetForegroundWindow(); //m_hwndWndToUse = GetWindowToUse(modifier.Location); string name = DoubleButton.GetName(trigger.Button, modifier.Button); if (notifyOnly) { ShowToolTip(name); } else { //form_top.CloseContextMenu(); GesturesCollection recognizedGestures = GetRecognizedGestures(name); if (recognizedGestures.Count == 0) { return; } if (recognizedGestures.Count == 1 && recognizedGestures[0].IsImplicitOnly) { MyGesture gestToExecute = recognizedGestures[0]; ExecuteImplicitOnlyAction(gestToExecute.Action, KeystrokesOptions.MouseAction.ModifierClick, true); } else { m_dblBtnGesturesToExecute = recognizedGestures; //ExecuteDblBtnGestures(); Thread threadExecuteDblBtnGestures = new Thread(new ThreadStart(ExecuteDblBtnGestures)); threadExecuteDblBtnGestures.Start(); } } }
public void DoubleButtonConstructorTest() { DoubleButton target = new DoubleButton(); Assert.Inconclusive("TODO: Implement code to verify target"); }
public void TextTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value string expected = string.Empty; // TODO: Initialize to an appropriate value string actual; target.Text = expected; actual = target.Text; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void PopupTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value FrameworkElement expected = null; // TODO: Initialize to an appropriate value FrameworkElement actual; target.Popup = expected; actual = target.Popup; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void ParentActiveVariantTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value RibbonGroupVariant expected = new RibbonGroupVariant(); // TODO: Initialize to an appropriate value RibbonGroupVariant actual; target.ParentActiveVariant = expected; actual = target.ParentActiveVariant; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void InternalButtonSizeTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value InternalButtonSize expected = new InternalButtonSize(); // TODO: Initialize to an appropriate value InternalButtonSize actual; target.InternalButtonSize = expected; actual = target.InternalButtonSize; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void IconTest() { DoubleButton target = new DoubleButton(); // TODO: Initialize to an appropriate value ImageSource expected = null; // TODO: Initialize to an appropriate value ImageSource actual; target.Icon = expected; actual = target.Icon; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }