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");
            }
        }
Esempio n. 2
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");
            }
        }