private void ReloadViewForm() { if (_viewFrm != null && !_viewFrm.IsDisposed) { _viewFrm.Close(); _viewFrm = new ViewForm(_rec.Gestures); _viewFrm.Owner = this; _viewFrm.Show(); } }
private void ViewGesture_Click(object sender, System.EventArgs e) { if (_viewFrm != null && !_viewFrm.IsDisposed) { _viewFrm.Close(); _viewFrm = null; } else { _viewFrm = new ViewForm(_rec.Gestures); _viewFrm.Owner = this; _viewFrm.Show(); } }
public MainForm() { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); InitializeComponent(); _rec = new RecognizerUtils(); _points = new ArrayList(); _directionalCodewordsQueue = new Queue <int>(); _directionalCodewordsList = new List <string>(); _pointsList = new List <ArrayList>(); _font = new Font(FontFamily.GenericSansSerif, 8.25f); _viewFrm = null; lblResult.Text = String.Empty; this.KeyPreview = true; //ComputingThread = new Thread(new ThreadStart(this.HMMDecode)); //ComputingThread.Start(); // Spin for a while waiting for the started thread to become // alive: //while (!ComputingThread.IsAlive) ; //// Put the Main thread to sleep for 1 millisecond to allow oThread //// to do some work: //Thread.Sleep(1); }