Пример #1
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            //Open and poputate input form

            userInputWindow = new UserInputWindow();

            foreach (var itemList in new_characters)
            {
                if (listView1.SelectedItems.Count > 0 && itemList == listView1.SelectedItems[0].Tag)
                {
                    userInputWindow.textBoxFirstName.Text    = itemList.FirstName;
                    userInputWindow.textBoxLastName.Text     = itemList.LastName;
                    userInputWindow.numericUpDownAge.Value   = itemList.Age;
                    userInputWindow.comboBoxGender.Text      = itemList.Gender;
                    userInputWindow.checkBoxImmortal.Checked = itemList.Immortal;
                    userInputWindow.comboBoxClass.Text       = itemList.Class;
                }
            }

            if (DisplayInputFormExistSecond != null)
            {
                DisplayInputFormExistSecond(this, new EventArgs());
            }

            userInputWindow.Show();
        }
        public void buttonNewInputWindow_Click(object sender, EventArgs e)
        {
            userInputWindow = new UserInputWindow();
            lvf             = new ListViewForm();

            userInputWindow.ObjectAdded += ObjectAddedHandler;

            userInputWindow.DisplayObjectsStored += DisplayObjectsStoredHandler;

            userInputWindow.DisplayInputFormExist += DisplayInputFormExistHandler;

            userInputWindow.Show();
        }