private void UserControl_gesture_Load(object sender, EventArgs e) { List <UC_TP_baseActivator> activatorItems = new List <UC_TP_baseActivator>(); activatorItems.Add(m_tpClassicCurve); activatorItems.Add(m_tPdoubleBtn); activatorItems.Add(m_tpWheelButton); tabControl_invokeAction.TabPages.Clear(); foreach (UC_TP_baseActivator activator in activatorItems) { activator.CanContinue += new DlgCanContinue(CanContinue); if (ChangeAboutText != null) { activator.ChangeAboutText += new DlgChangeAboutText(ChangeAboutText); } activator.ChangeInfoText += new DlgChangeInfoText(ChangeInfoText); activator.PB_Display = pb_Display; activator.Gestures = m_gesturesCollection; activator.TempGesture = m_tempGesture; activator.Initialize(); } SetTabPages(); if (m_tempGesture.Activator != null) { if (m_tempGesture.Activator.Type == MouseActivator.Types.ClassicCurve) { m_activator = m_tpClassicCurve; tabControl_invokeAction.SelectedTab = tP_classicCurves; } else if (m_tempGesture.Activator.Type == MouseActivator.Types.DoubleButton) { m_activator = m_tPdoubleBtn; tabControl_invokeAction.SelectedTab = tP_rockerGesture; } else if (m_tempGesture.Activator.Type == BaseActivator.Types.WheelButton) { m_activator = m_tpWheelButton; tabControl_invokeAction.SelectedTab = tP_wheelGesture; } } else { if (!m_tempGesture.Action.IsExtras())//.Category != TypeOfAction.ExtrasControl.NAME) { m_activator = m_tpClassicCurve; tabControl_invokeAction.SelectedTab = tP_classicCurves; } else { m_activator = m_tpWheelButton; tabControl_invokeAction.SelectedTab = tP_wheelGesture; } } OnCanContinue(false); }
private void UserControl_gesture_Load(object sender, EventArgs e) { List<UC_TP_baseActivator> activatorItems = new List<UC_TP_baseActivator>(); activatorItems.Add(m_tpClassicCurve); activatorItems.Add(m_tPdoubleBtn); activatorItems.Add(m_tpWheelButton); tabControl_invokeAction.TabPages.Clear(); foreach (UC_TP_baseActivator activator in activatorItems) { activator.CanContinue += new DlgCanContinue(CanContinue); if (ChangeAboutText != null) activator.ChangeAboutText += new DlgChangeAboutText(ChangeAboutText); activator.ChangeInfoText += new DlgChangeInfoText(ChangeInfoText); activator.PB_Display = pb_Display; activator.Gestures = m_gesturesCollection; activator.TempGesture = m_tempGesture; activator.Initialize(); } SetTabPages(); if (m_tempGesture.Activator != null) { if (m_tempGesture.Activator.Type == MouseActivator.Types.ClassicCurve) { m_activator = m_tpClassicCurve; tabControl_invokeAction.SelectedTab = tP_classicCurves; } else if (m_tempGesture.Activator.Type == MouseActivator.Types.DoubleButton) { m_activator = m_tPdoubleBtn; tabControl_invokeAction.SelectedTab = tP_rockerGesture; } else if (m_tempGesture.Activator.Type == BaseActivator.Types.WheelButton) { m_activator = m_tpWheelButton; tabControl_invokeAction.SelectedTab = tP_wheelGesture; } } else { if (!m_tempGesture.Action.IsExtras())//.Category != TypeOfAction.ExtrasControl.NAME) { m_activator = m_tpClassicCurve; tabControl_invokeAction.SelectedTab = tP_classicCurves; } else { m_activator = m_tpWheelButton; tabControl_invokeAction.SelectedTab = tP_wheelGesture; } } OnCanContinue(false); }
private void tabControl_invokeAction_SelectedIndexChanged(object sender, EventArgs e) { if (m_tempGesture != null && m_tempGesture.Activator != null) { m_tempGesture.Activator.AbortAnimating(); } if (tabControl_invokeAction.SelectedTab == tP_classicCurves) { m_activator = m_tpClassicCurve; } else if (tabControl_invokeAction.SelectedTab == tP_rockerGesture) { m_activator = m_tPdoubleBtn; } else if (tabControl_invokeAction.SelectedTab == tP_wheelGesture) { m_activator = m_tpWheelButton; } if (m_activator != null) { m_activator.SetValues(); } }
private void tabControl_invokeAction_SelectedIndexChanged(object sender, EventArgs e) { if (m_tempGesture != null && m_tempGesture.Activator != null) m_tempGesture.Activator.AbortAnimating(); if (tabControl_invokeAction.SelectedTab == tP_classicCurves) m_activator = m_tpClassicCurve; else if (tabControl_invokeAction.SelectedTab == tP_rockerGesture) m_activator = m_tPdoubleBtn; else if (tabControl_invokeAction.SelectedTab == tP_wheelGesture) m_activator = m_tpWheelButton; if (m_activator != null) m_activator.SetValues(); }