Beispiel #1
0
        private void buttonAdd_Click(object sender, System.EventArgs e)
        {
            FossilFuelSpecificationForm form = new FossilFuelSpecificationForm(null, this.numericFormat);

            form.PopulateSubstanceList();
            form.ShowDialog();
        }
Beispiel #2
0
        private void buttonEdit_Click(object sender, System.EventArgs e)
        {
            int selectedIndex = 0;

            for (int i = 0; i < listViewFossilFuel.Items.Count; i++)
            {
                if (listViewFossilFuel.Items[i].Selected)
                {
                    selectedIndex = i;
                    break;
                }
            }
            FossilFuel                  fossilFuel      = fossilFuelCatalogControl.GetSelectedFossilFuel();
            FossilFuelCache             fossilFuelCache = new FossilFuelCache(fossilFuel, FossilFuelCatalog.Instance);
            FossilFuelSpecificationForm form            = new FossilFuelSpecificationForm(fossilFuelCache, this.numericFormat);

            form.PopulateSubstanceList();
            form.ShowDialog();
            listViewFossilFuel.Items[selectedIndex].Selected = true;
        }