Exemplo n.º 1
0
        private void FormMain_Shown(object sender, EventArgs e)
        {
            Boolean bHasApiKey = false;

            AppSettings appSettings = new AppSettings();

            if (appSettings.ApiKey.Length == 0)
            {
                if (DialogResult.Yes == Program.ShowQuestion(Resources.Q_SETUP_API))
                {
                    FormAPIKey dlg = new FormAPIKey(appSettings.ApiKey, appSettings.UseChinaServer);
                    if (DialogResult.OK == dlg.ShowDialog())
                    {
                        if (dlg.APIKey.Length > 0)
                        {
                            bHasApiKey = true;
                        }
                    }
                }
            }
            else
            {
                bHasApiKey = true;
            }

            // do initial download
            if (bHasApiKey)
            {
                FormInitLoading form = new FormInitLoading();
                form.ShowDialog();
            }

            if (null != mMyIrEasy)
            {
                if (Settings.Default.UART_COM_PORT.Length > 0)
                {
                    mMyIrEasy.Initialize(Settings.Default.UART_COM_PORT);
                }
            }

            UpdateTitleText();
        }
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            FormInitLoading form = new FormInitLoading(true);

            form.ShowDialog();
        }
Exemplo n.º 3
0
        private void downloadIRDataToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormInitLoading dlg = new FormInitLoading(true);

            dlg.ShowDialog();
        }