Beispiel #1
0
        private void btnOpenInputForm_Click(object sender, EventArgs e)
        {
            InputForm inputForm = new InputForm();

            //regise 2 custom events of Input form
            inputForm.CloseForm += InputForm_CloseForm;
            //using eventHandle
            inputForm.SaveDataEventHandle += InputForm_SaveDataEventHandle;

            inputForm.Show();

            //re- calculate total Input form
            totalInputForm++;
            lblTotalInputForm.Text = totalInputForm.ToString();
        }
Beispiel #2
0
        private void Listform_ListViewDoubleClick(int index)
        {
            //get selected object
            var selectedItem = StoredObjects[index];

            //create new Input  Form
            InputForm inputForm = new InputForm(selectedItem);

            //regise 2 custom events of Input form
            inputForm.CloseForm += InputForm_CloseForm;
            //using eventHandle
            inputForm.SaveDataEventHandle += InputForm_SaveDataEventHandle;

            inputForm.Show();

            //re- calculate total Input form
            totalInputForm++;
            lblTotalInputForm.Text = totalInputForm.ToString();
        }