Ejemplo n.º 1
0
        private void showForm()
        {
            using (var cfgForm = new API_Form())
            {
                var result = cfgForm.ShowDialog();

                if (result != DialogResult.OK)
                {
                    return;
                }

                apiKey = Properties.Settings.Default.ApiKey;
            }
        }
Ejemplo n.º 2
0
        private string getAPIKey()
        {
            if (string.IsNullOrWhiteSpace(apiKey))
            {
                using (var cfgForm = new API_Form())
                {
                    var result = cfgForm.ShowDialog();

                    if (result != DialogResult.OK)
                    {
                        return(null);
                    }

                    apiKey = Properties.Settings.Default.ApiKey;
                }
            }

            return(apiKey);
        }