Beispiel #1
0
        public EditPlatformConfigDialog(PlatformConfig platformConfig, string action)
        {
            InitializeComponent();
            App.SetWindowFont(this);
            this.Title = action + " Platform Config";

            this.PlatformConfig = SerializationHelper.CloneObject <PlatformConfig>(platformConfig);
            WPFHelper.FillComboBox(comboPlatform, EnumHelper.EnumToList <Platform>(),
                                   this.PlatformConfig.Platform);
            this.DataContext = this.PlatformConfig;

            UpdateGameConfigs();
            UpdateEmulators();
        }
Beispiel #2
0
        public void Load(CatalogEditor catalogEditor, Game game, bool gameExists)
        {
            if (game != null)
            {
                WPFHelper.FillComboBox(comboEmulator, catalogEditor.GetAvailableEmulators(game.Platform), game.Emulator);
                WPFHelper.FillComboBox(comboGameConfig, catalogEditor.GetAvailableGameConfigs(game.Platform), game.GameConfig);

                panel.IsEnabled  = true;
                this.Game        = game;
                this.DataContext = game;
                image.Load(game, gameExists);
                UpdateVisibility(game.HasImage);
                this.Foreground = System.Windows.Media.Brushes.White;
            }
            else
            {
                Clear();
            }
        }