Пример #1
0
        private void OpenFile()
        {
            var fileDialog = new System.Windows.Forms.OpenFileDialog()
            {
                FileName = Path.GetFileName(EyeGestureFile)
            };
            var result = fileDialog.ShowDialog();

            switch (result)
            {
            case System.Windows.Forms.DialogResult.OK:
                EyeGestureFile = fileDialog.FileName;
                break;

            case System.Windows.Forms.DialogResult.Cancel:
            default:
                break;
            }
            xmlEyeGestures = XmlEyeGestures.ReadFromFile(EyeGestureFile);
            EyeGesture     = GestureList != null && GestureList.Any() ? GestureList[0] : null;
            if (GestureList.Any())
            {
                DisableAll();
            }
        }
Пример #2
0
 private void DeleteGesture()
 {
     if (GestureList != null && GestureList.Contains(EyeGesture))
     {
         GestureList.Remove(EyeGesture);
     }
     EyeGesture = GestureList != null && GestureList.Any() ? GestureList[0] : null;
 }
Пример #3
0
 private void Load()
 {
     EyeGesturesEnabled = Settings.Default.EyeGesturesEnabled;
     EyeGestureFile     = Settings.Default.EyeGestureFile;
     EyeGestureString   = Settings.Default.EyeGestureString;
     xmlEyeGestures     = XmlEyeGestures.ReadFromString(EyeGestureString);
     EyeGesture         = GestureList != null && GestureList.Any() ? GestureList[0] : null;
 }
Пример #4
0
 private void ResetChanges()
 {
     xmlEyeGestures = XmlEyeGestures.ReadFromString(EyeGestureString);
     EyeGesture     = GestureList != null && GestureList.Any() ? GestureList[0] : null;
     Settings.Default.EyeGestureUpdated = true;
 }