예제 #1
0
        void OnTrainingEvent(Object sender, TrainingEventArgs e)
        {
            switch (e.Type)
            {
            case TrainingEventType.Start:
                break;

            case TrainingEventType.End:
                sw.Close();
                StopRecord();
                if (processFeature)
                {
                    trainingManager.Status = "Start processing";
                    ExecuteOfflineProcessor();
                    trainingManager.Status = "Done processing";
                    TrainModel();
                    trainingManager.Status = "Done training";
                }
                break;

            case TrainingEventType.StartGesture:
                sw.WriteLine("{0} {1} {2}", TrainingEventType.StartGesture.ToString(), e.Gesture,
                             depthFrameNumber);
                break;
            }
        }
예제 #2
0
 void OnTrainingEvent(Object sender, TrainingEventArgs e)
 {
     switch (e.Type) {
     case TrainingEventType.Start:
       break;
     case TrainingEventType.End:
       sw.Close();
       StopRecord();
       if (processFeature) {
     trainingManager.Status = "Start processing";
     ExecuteOfflineProcessor();
     trainingManager.Status = "Done processing";
     TrainModel();
     trainingManager.Status = "Done training";
       }
       break;
     case TrainingEventType.StartGesture:
       sw.WriteLine("{0} {1} {2}", TrainingEventType.StartGesture.ToString(), e.Gesture,
       depthFrameNumber);
       break;
       }
 }