示例#1
0
        private void editButton_Click(object sender, RoutedEventArgs e)
        {
            var item = itemList.SelectedItem as Platform;
            if (item == null)
            {
                throw new Exception("David, lazy programming fail!");
            }

            var window = new PlatformEditorWindow(this, item);
            window.ShowDialog();
            itemList.Items.Refresh();
        }
示例#2
0
        private void newButton_Click(object sender, RoutedEventArgs e)
        {
            var window = new PlatformEditorWindow(this);
            window.ShowDialog();
            if (window.Result == null)
            {
                return;
            }

            collection.Add(window.Result);
            itemList.Items.Refresh();
        }