public override void SetData(Game newContext, PluginDataBaseGameBase PluginGameData)
        {
            gameBackgroundImages = (GameBackgroundImages)PluginGameData;

            Video1.Volume = PluginDatabase.PluginSettings.Settings.Volume / 10;
            Video2.Volume = PluginDatabase.PluginSettings.Settings.Volume / 10;

            try
            {
                Video1.LoadedBehavior = MediaState.Stop;
                Video2.LoadedBehavior = MediaState.Stop;

                if (!gameBackgroundImages.HasDataBackground)
                {
                    MustDisplay      = false;
                    this.DataContext = ControlDataContext;
                    return;
                }

                IsFirst = true;
                SetBackground();
                IsFirst = false;
            }
            catch (Exception ex)
            {
                Common.LogError(ex, false, true, "BackgroundChanger");
            }
        }
Пример #2
0
        public ImagesManager(IPlayniteAPI PlayniteApi, GameBackgroundImages gameBackgroundImages, bool IsCover)
        {
            _PlayniteApi            = PlayniteApi;
            _gameBackgroundImages   = gameBackgroundImages;
            _backgroundImages       = Serialization.GetClone(gameBackgroundImages.Items.Where(x => x.IsCover == IsCover).ToList());
            _backgroundImagesEdited = Serialization.GetClone(_backgroundImages);
            _IsCover = IsCover;

            InitializeComponent();

            PART_LbBackgroundImages.ItemsSource = null;
            PART_LbBackgroundImages.ItemsSource = _backgroundImagesEdited;

            PART_BackgroundImage.UseAnimated = true;
        }
Пример #3
0
        public override void SetData(Game newContext, PluginDataBaseGameBase PluginGameData)
        {
            gameBackgroundImages = (GameBackgroundImages)PluginGameData;

            try
            {
                Video1.LoadedBehavior = MediaState.Stop;

                if (!gameBackgroundImages.HasDataCover)
                {
                    MustDisplay = false;
                    return;
                }

                IsFirst = true;
                SetCover();
                IsFirst = false;
            }
            catch (Exception ex)
            {
                Common.LogError(ex, false, true, "BackgroundChanger");
            }
        }