Пример #1
0
        private void addEnvironmentBtn_Click(object sender, EventArgs e)
        {
            environmentForm environment = new environmentForm();

            if (environment.ShowDialog() == DialogResult.OK)
            {
                Configuration.Parameters.Add(new KeyValuePair <string, object>(string.Format("ENV|{0}", environment.GetEnvironment().Name), environment.GetEnvironment()));
                PopulateEnvironmentsGrid();
            }
        }
Пример #2
0
        private void environmentsGrid_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
        {
            environmentForm environment = new environmentForm((Logic.Environment)e.DataRow.RowData);

            if (environment.ShowDialog() == DialogResult.OK)
            {
                Configuration.Parameters.Remove(Configuration.Parameters.Where(p => p.Key == string.Format("ENV|{0}", ((Logic.Environment)e.DataRow.RowData).Name)).FirstOrDefault());
                Configuration.Parameters.Add(new KeyValuePair <string, object>(string.Format("ENV|{0}", environment.GetEnvironment().Name), environment.GetEnvironment()));
                PopulateEnvironmentsGrid();
            }
        }