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

            var window = new EmulatorEditorWindow(this, collection.ParentGameLibrary.Platforms, item);
            window.ShowDialog();
            itemList.Items.Refresh();
        }
コード例 #2
0
        private void newButton_Click(object sender, RoutedEventArgs e)
        {
            var window = new EmulatorEditorWindow(this, collection.ParentGameLibrary.Platforms);
            window.ShowDialog();
            if (window.Result == null)
            {
                return;
            }

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