- gesturerecognizer_demo.zip
- GestureRecognizer_demo
- gesturerecognizer_src.zip
- GestureRecognizer_src
- cmgblade_src.zip
- MouseGesture
- cmgblade_demo.zip
- Gestures
- ArrowLeft.mgf
- ArrowLeftNET.mgn
- ArrowLeftTS.mgt
- ArrowRight.mgf
- ArrowRightNET.mgn
- ArrowRightTS.mgt
- Circle.mgf
- CircleNET.mgn
- CircleTS.mgt
- DownLeftLine.mgf
- DownLeftLineNET.mgn
- DownLeftLineTS.mgt
- DownRightLine.mgf
- DownRightLineNET.mgn
- DownRightLineTS.mgt
- DownUp.mgf
- DownUpNET.mgn
- DownUpTS.mgt
- Esse.mgf
- EsseNET.mgn
- EsseTS.mgt
- HourGlass.mgf
- HourGlassNET.mgn
- HourGlassTS.mgt
- LeftSquare.mgf
- LeftSquareNET.mgn
- LeftSquareTS.mgt
- LineDown.mgf
- LineDownNET.mgn
- LineDownTS.mgt
- LineLeft.mgf
- LineLeftNET.mgn
- LineLeftTS.mgt
- LineRight.mgf
- LineRightNET.mgn
- LineRightTS.mgt
- LineUp.mgf
- LineUpNET.mgn
- LineUpTS.mgt
- LLeft.mgf
- LLeftNET.mgn
- LLeftTS.mgt
- LRight.mgf
- LRightNET.mgn
- LRightTS.mgt
- Omega.mgf
- OmegaNET.mgn
- OmegaTS.mgt
- RightSquare.mgf
- RightSquareNET.mgn
- RightSquareTS.mgt
- UpDown.mgf
- UpDownNET.mgn
- UpDownTS.mgt
- UpLeftLine.mgf
- UpLeftLineNET.mgn
- UpLeftLineTS.mgt
- UpRightLine.mgf
- UpRightLineNET.mgn
- UpRightLineTS.mgt
- Whirl.mgf
- WhirlNET.mgn
- WhirlTS.mgt
- MouseGesture.exe
- mousegesturesrc.zip
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MouseGestures;
namespace GestureRecognizer
{
public partial class GestureSetCreationForm : Form
{
private GestureMainForm m_MainForm;
private GestureRecognizerData m_Data;
private GestureSet m_GestureSet;
public int BaseGestureIndex { get { return BaseGestureComboBox.SelectedIndex - 1; } }
public bool ClearGestureSet { get { return ClearGestureSetCheckBox.Checked; } }
public GestureSetCreationForm(GestureMainForm main_form, GestureRecognizerData data, GestureSet set)
{
InitializeComponent();
m_MainForm = main_form;
m_Data = data;
m_GestureSet = set;
BaseGestureComboBox.Items.Add(data.Gesture.Name);
for (int i = 0; i < m_GestureSet.Gestures; i++)
BaseGestureComboBox.Items.Add(m_GestureSet[i].Name);
BaseGestureComboBox.SelectedIndex = 0;
}
private void CreateGestureSetButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
protected override void OnClosed(EventArgs e)
{
if (DialogResult == DialogResult.OK)
{
if (AutoCreationRadioButton.Checked)
m_MainForm.AutoCreateGestureSet(m_Data, m_GestureSet, (int)GesturesToCreateNumericUpDown.Value, BaseGestureComboBox.SelectedIndex - 1, ClearGestureSetCheckBox.Checked);
else
m_MainForm.ManualCreateGestureSet(m_Data, m_GestureSet, (int)GesturesToCreateNumericUpDown.Value, BaseGestureComboBox.SelectedIndex - 1, ClearGestureSetCheckBox.Checked);
}
}
private void AutoCreationRadioButton_CheckedChanged(object sender, EventArgs e)
{
if (AutoCreationRadioButton.Checked)
BaseGestureComboBox.Enabled = true;
else
{
BaseGestureComboBox.Enabled = false;
BaseGesturePanel.Points = null;
}
}
private void BaseGestureComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (BaseGestureComboBox.SelectedIndex != -1)
BaseGesturePanel.Gesture = (BaseGestureComboBox.SelectedIndex == 0) ? m_Data.Gesture : m_GestureSet[BaseGestureComboBox.SelectedIndex - 1];
else
BaseGesturePanel.Points = null;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I got my Computer Science (Engineering) Master's Degree at the Siena University (Italy), but I'm from Rieti (a small town next to Rome).
My hobbies are RPG, MMORGP, programming and 3D graphics.
At the moment I'm employed at Apex s.r.l. (Modena, Italy) as a senior software developer, working for a WPF/WCF project in Rome.