private void SaveEnvironment(object o, MyStringEventArgs e)
        {
            comboBoxEnvironments.Items.Clear();

            foreach (var environment in TeamEnvironmentCollection.EnvironmentDictionary)
            {
                comboBoxEnvironments.Items.Add(new KeyValuePair <TeamWorkingEnvironment, string>(environment.Value, environment.Value.environmentKey));
                comboBoxEnvironments.DisplayMember = "Value";
            }

            comboBoxEnvironments.SelectedIndex = comboBoxEnvironments.FindStringExact(GlobalParameters.WorkingEnvironment);
        }
        private void SaveConnection(object o, MyStringEventArgs e)
        {
            // Just adding is not enough as it can happen that the name has changed for an existing connection.
            comboBoxMetadataConnection.Items.Clear();

            foreach (var connection in TeamConfiguration.ConnectionDictionary)
            {
                comboBoxMetadataConnection.Items.Add(new KeyValuePair <TeamConnection, string>(connection.Value, connection.Value.ConnectionKey));
                comboBoxMetadataConnection.ValueMember   = "Key";
                comboBoxMetadataConnection.DisplayMember = "Value";
            }

            comboBoxMetadataConnection.SelectedIndex = comboBoxMetadataConnection.FindStringExact(TeamConfiguration.MetadataConnection.ConnectionKey);
        }
Example #3
0
        private void UpdateEnvironmentModeLabel(object sender, MyStringEventArgs e)
        {
            var localEnvironmentModeText = e.Value;


            if (labelEnvironmentMode.InvokeRequired)
            {
                labelEnvironmentMode.BeginInvoke((MethodInvoker) delegate { labelEnvironmentMode.Text = localEnvironmentModeText; });
            }
            else
            {
                labelEnvironmentMode.Text = localEnvironmentModeText;
            }
        }
 /// <summary>
 /// Update the main information RichTextBox (used as delegate in generates tabs).
 /// </summary>
 /// <param name="o"></param>
 /// <param name="e"></param>
 private void UpdateMainInformationTextBox(Object o, MyStringEventArgs e)
 {
     richTextBoxInformation.AppendText(e.Value);
     richTextBoxInformation.ScrollToCaret();
 }