Exemple #1
0
        public MainWindow()
        {
            try
            {
                Control.WriteLog("App Start");
                InitializeComponent();

                timer          = new DispatcherTimer();
                timer.Interval = TimeSpan.FromSeconds(1.0);
                timer.Tick    += VisualUpdate;

                var  ctrl    = Control.Share;
                var  setting = ctrl.Setting;
                bool first   = false;
                if (string.IsNullOrWhiteSpace(setting.Speech.Credential))
                {
                    var popup = new PopupSetting();
                    popup.Show();
                    first = true;
                }
                else if (setting.EnableWhenStart)
                {
                    ctrl.ManualOpen();
                    //ctrl.Manual.StartVoice();
                }

                SetMode(setting.Speech.Mode);
                SetLang(ctrl.Language);
                SetActive(!first && setting.EnableWhenStart);

                timer.Start();
            }
            catch (Exception ex)
            {
                Control.WriteLog(ex.Message);
                Control.WriteLog(ex.StackTrace);
                throw ex;
            }
        }
Exemple #2
0
        public void Execute(object parameter)
        {
            var popup = new PopupSetting();

            popup.Show();
        }