Esempio n. 1
0
        public MainWindow()
        {
            uneditedImg = new System.Windows.Controls.Image();
            filesList   = new List <string>();

            //AandC = new AreasAndConditions();
            SpeechS = new SpeechSifter();
            InitializeComponent();
            SpeechS.sre.SpeechRecognized +=
                new EventHandler <SpeechRecognizedEventArgs>(sre_SpeechRecognized);
            SpeechS.sre.LoadGrammarCompleted +=
                new EventHandler <LoadGrammarCompletedEventArgs>(LoadGrammarCompletedHandler);
            //TODO

            SpeechS.controlWords = new string[] { "Write", "Save", "Discard", "Take" };

            //LoadLocalJSON creates now AandCList if there's none
            LoadLocalJSON();
            UpdateOverlayCombobox();
            AandCList.CollectionChanged += AandCList_CollectionChanged;

            //Triggeres OverlayComboBOx_CHanged and sets the res of the boxes
            //Sets up the rest of the ComboCoxes
            OverlayComboBox.SelectedIndex = 0;

            btnOptionsVoiceEnabled.IsChecked = false;


            Process[] prc = Process.GetProcessesByName("MediaExpress");
            if (prc.Length > 0)
            {
                bmdm = new BMDMediaExpressInterfaceWPF.MainWindow();
                bmdm.Show();

                //Add handler for new bmd images
                bmdm.NewImage += bmdm_NewImage;

                MediaExpress = prc[0];
                btnMediaExpressEnabled.IsChecked = true;
                //checkbox in the options menu
            }
            else
            {
                btnMediaExpressEnabled.IsChecked = false;
            }
        }
Esempio n. 2
0
        public MainWindow()
        {
            uneditedImg = new System.Windows.Controls.Image();
            filesList = new List<string>();

            //AandC = new AreasAndConditions();
            SpeechS = new SpeechSifter();
            InitializeComponent();
            SpeechS.sre.SpeechRecognized +=
                new EventHandler<SpeechRecognizedEventArgs>(sre_SpeechRecognized);
            SpeechS.sre.LoadGrammarCompleted +=
                new EventHandler<LoadGrammarCompletedEventArgs>(LoadGrammarCompletedHandler);
            //TODO

            SpeechS.controlWords = new string[] { "Write", "Save", "Discard", "Take" };

            //LoadLocalJSON creates now AandCList if there's none
            LoadLocalJSON();
            UpdateOverlayCombobox();
            AandCList.CollectionChanged += AandCList_CollectionChanged;

            //Triggeres OverlayComboBOx_CHanged and sets the res of the boxes
            //Sets up the rest of the ComboCoxes
            OverlayComboBox.SelectedIndex = 0;

            btnOptionsVoiceEnabled.IsChecked = false;

            Process[] prc = Process.GetProcessesByName("MediaExpress");
            if (prc.Length > 0)
            {
                bmdm = new BMDMediaExpressInterfaceWPF.MainWindow();
                bmdm.Show();

                //Add handler for new bmd images
                bmdm.NewImage += bmdm_NewImage;

                MediaExpress = prc[0];
                btnMediaExpressEnabled.IsChecked = true;
                //checkbox in the options menu

            }
            else { btnMediaExpressEnabled.IsChecked = false; }
        }