Пример #1
0
        void futureImprovement_selectionEvent()
        {
            MainCanvas.Children.Remove(futureImprovement);

            try
            {
                freestyleMode.unload();
                MainCanvas.Children.Remove(freestyleMode);
                freestyleMode = null;
            }
            catch
            {
            }


            string focusFile = System.IO.Path.Combine(userDirectory, "focused.txt");

            System.IO.File.WriteAllText(focusFile, focusedString);

            string focusFileGoals = System.IO.Path.Combine(recordingPath, "Goals.txt");
            string goals          = focusedPauses + System.Environment.NewLine;

            goals = goals + focusedGestures + System.Environment.NewLine;
            goals = goals + focusedPosture + System.Environment.NewLine;
            System.IO.File.WriteAllText(focusFileGoals, goals);

            doLogs();
            speakTimes   = new ArrayList();
            gestureTimes = new ArrayList();
            myState      = States.entryScreen;

            startAgain();
            //  loadMode();
        }
Пример #2
0
        private void loadFreestyle()
        {
            rulesAnalyzerFIFO = new RulesAnalyzerFIFO(this);

            if (freestyleMode == null)
            {
                freestyleMode = new FreestyleMode();
            }
            speakTimes    = new ArrayList();
            gestureTimes  = new ArrayList();
            gestureImages = new ImageSource[3];
            postureImages = new ImageSource[3];
            for (int i = 0; i < 3; i++)
            {
                gestureImages[i] = null;
                postureImages[i] = null;
            }
            freestyleMode.Height = this.ActualHeight;
            freestyleMode.Width  = this.ActualWidth;
            MainCanvas.Children.Add(freestyleMode);
            Canvas.SetTop(freestyleMode, 0);
            Canvas.SetLeft(freestyleMode, 0);

            freestyleMode.Loaded += freeStyle_Loaded;
        }
Пример #3
0
        public void closeFreeStyleMode()
        {
            freestyleMode.setGhostMovingInvisible();
            freestyleMode.setOldTextInvisible();
            freestyleMode.setGhostInvisible();
            freestyleMode.setFeedbackTextInvisible();

            MainCanvas.Children.Remove(freestyleMode);
            //freestyleMode.Visibility = Visibility.Collapsed;
            freestyleMode.unload();


            freestyleMode = null;
            GC.Collect();
            GC.WaitForPendingFinalizers();
            // rulesAnalyzerFIFO = null;
            //TODO
            doPausesesReflection();
        }