Login() public method

public Login ( ) : bool
return bool
Beispiel #1
0
        /// <summary>
        /// Starts the speech recognition engine async and start seeking for web commands.
        /// </summary>
        public void StartAsyncRecognitionAndWebControl()
        {
            StartAsyncRecognition();

            if (Mode == OperatingMode.OnlineNormal || Mode == OperatingMode.OnlineAdvanced)
            {
                webControlManager = new WebControlManager(Email, Password);
                webControlManager.Login();

                StartWebInterfaceCommandsSeeking();
            }
        }
        private void DownloadPlugins()
        {
            //this.Invoke(new MethodInvoker(Close));

            Email = textBoxEmail.Text;
            Password = textBoxPassword.Text;

            WebControl = new WebControlManager(Email, Password);
            if (WebControl.Login())
            {
                var listInstalledPlugins = WebControl.GetInstalled();
                foreach (var webPlugin in listInstalledPlugins)
                {
                    string innerPluginDirectoryPath = "";
                    Directory.CreateDirectory(Environment.CurrentDirectory + @"\Plugins");
                    Directory.CreateDirectory(Environment.CurrentDirectory + @"\Plugins\" + webPlugin.Name);
                    innerPluginDirectoryPath = Environment.CurrentDirectory + @"\Plugins\" + webPlugin.Name + @"\" + webPlugin.Name + ".zip";
                    webPlugin.LocalFilepath = innerPluginDirectoryPath;

                    if (webPlugin.Download(innerPluginDirectoryPath))
                    {
                        DownloadedPlugins.Add(webPlugin);
                    }
                }
                this.Invoke(new MethodInvoker(Close));
            }
            else
            {
                this.Invoke(new MethodInvoker(ShowLoginNotSuccessfulMessageBox));
            }
        }