Наследование: System.Windows.Forms.Form
Пример #1
0
        private void EditSelectedShow()
        {
            if (listViewShows.SelectedItems.Count > 0)
            {
                ListViewItem lvItem = listViewShows.SelectedItems[0];

                if (lvItem != null)
                {
                    Show           show = (lvItem.Tag as Show).Clone() as Show;
                    ShowEditorForm form = new ShowEditorForm(show);
                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        int showIndex = Data.Shows.FindIndex(oldShow => oldShow == lvItem.Tag);
                        Data.Shows[showIndex] = form.ShowData;
                        lvItem.Tag            = form.ShowData;
                        lvItem.Text           = form.ShowData.Name;
                    }
                }
            }
        }
Пример #2
0
        private void EditSelectedShow()
        {
            if (listViewShows.SelectedItems.Count > 0)
            {
                ListViewItem lvItem = listViewShows.SelectedItems[0];

                if (lvItem != null)
                {
                    Show show = (lvItem.Tag as Show).Clone() as Show;
                    ShowEditorForm form = new ShowEditorForm(show);
                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        int showIndex = Data.Shows.FindIndex(oldShow => oldShow == lvItem.Tag);
                        Data.Shows[showIndex] = form.ShowData;
                        lvItem.Tag = form.ShowData;
                        lvItem.Text = form.ShowData.Name;
                    }
                }
            }
        }