/// <summary> /// 動画を変更する /// </summary> private void ChangeMovie() { if (!allowcommand) { PlayGame(); return; } if (ssm.SelectedSongInformation == null || ssm.SelectedSongInformation.IsFolder || ssm.SelectedSongInformation.SongInfo == null) { return; } string moviePath = ssm.SelectedSongInformation.SongInfo.MoviePath; SongInformation songinfo = ssm.SelectedSongInformation.SongInfo; if (!string.IsNullOrEmpty(moviePath)) { if (PPDSetting.Setting.MenuMoviePreviewDisabled) { return; } var index = this.IndexOf(menuMovie); this.RemoveChild(menuMovie); menuMovie.Dispose(); menuMovie = new MenuMovie(device); this.InsertChild(menuMovie, index); // 動画取得 menuMovie.Movie = GameHost.GetMovie(songinfo); // 動画の最大ボリューム設定 menuMovie.MaximumVolume = songinfo.MovieVolume; menuMovie.FileName = moviePath; // 初期化 try { menuMovie.Initialize(); // 動画のカット設定 menuMovie.TrimmingData = songinfo.TrimmingData; // 動画のループ設定 menuMovie.SetLoop(songinfo.ThumbStartTime, songinfo.ThumbEndTime); // 再生、フェードイン menuMovie.Play(); menuMovie.FadeIn(); } catch { GameHost.AddNotify(PPDExceptionContentProvider.Provider.GetContent(PPDExceptionType.CannotOpenMovie)); } } else { MessageBox.Show(PPDExceptionContentProvider.Provider.GetContent(PPDExceptionType.NoMovieFileInDirectory) + "\n@" + songinfo.DirectoryPath); } }
public override bool Load() { WebManager.Instance.UpdateAccountInfo(); //init var list = SongInformation.All; int selectnum = 0; string initialdirectory = PPDSetting.Setting.SongDir; ContestInfo contestInfo = null; WebSongInformation[] activeScores = null; ListInfo[] lists = null; Action[] actions = { () => { contestInfo = WebManager.Instance.GetContestInfo(); }, () => { activeScores = WebManager.Instance.GetScores(true); }, () => { lists = WebManager.Instance.GetListInfos(); }, PerfectTrialCache.Instance.Update }; Parallel.ForEach(actions, (action) => action()); // 前のメニューからのパラメーターを調べる if (PreviousParam.TryGetValue("PPDGameUtility", out object temp)) { var gameutility = temp as PPDGameUtility; initialdirectory = gameutility.SongInformation.ParentDirectory; } ssm = new SelectSongManager(contestInfo, activeScores, lists); ssm.SongChanged += ssm_SongChanged; ssm.DirectoryChanged += ssm_DirectoryChanged; ssm.ModeChanged += ssm_ModeChanged; ssm.Filter.Desc = SkinSetting.Setting.Desc; ssm.Filter.Difficulty = SkinSetting.Setting.Difficulty; ssm.Filter.Field = SkinSetting.Setting.SortField; ssm.Filter.Type = SkinSetting.Setting.ScoreType; textBox = new DxTextBox(device, GameHost, ResourceManager); mss = new MenuSelectSong(device, ResourceManager, this); mss.Inputed += mss_Inputed; mss.GotFocused += mss_GotFocused; sic = new SongInfoControl(device, ResourceManager); sic.Inputed += sic_Inputed; cc = new ConfirmControl(device, ResourceManager); cc.Inputed += cc_Inputed; oc = new OptionControl(device, ResourceManager, Sound); lm = new LeftMenu(device, GameHost, ResourceManager, textBox, ssm, Sound); lm.RandomSelected += lm_RandomSelected; lm.FilterChanged += lm_FilterChanged; ss = new ScoreSearcher(device, ResourceManager, textBox, ssm.Filter); obd = new OpenBrowserDialog(device, ResourceManager, Sound); fm = new FocusManager(this); fm.Focus(mss); mss.DisapperFinish += cc.Show; bgd = new BackGroundDisplay(device, ResourceManager, "skins\\PPDSingle_BackGround.xml", "Menu"); black = new RectangleComponent(device, ResourceManager, PPDColors.Black) { RectangleHeight = 450, RectangleWidth = 800, Alpha = 0 }; menuMovie = new MenuMovie(device); this.AddChild(black); this.AddChild(textBox); this.AddChild(obd); this.AddChild(cc); this.AddChild(oc); this.AddChild(ss); this.AddChild(lm); this.AddChild(sic); this.AddChild(mss); var po = new PictureObject(device, ResourceManager, Utility.Path.Combine("bottom.png")); po.Position = new Vector2(0, 450 - po.Height + 1); po.AddChild(new TextureString(device, Utility.Language["SearchScore"], 14, PPDColors.Gray) { Position = new Vector2(85, 7) }); po.AddChild(new TextureString(device, Utility.Language["Move"], 14, PPDColors.Gray) { Position = new Vector2(205, 7) }); po.AddChild(new TextureString(device, Utility.Language["Menu"], 14, PPDColors.Gray) { Position = new Vector2(325, 7) }); po.AddChild(new TextureString(device, Utility.Language["Option"], 14, PPDColors.Gray) { Position = new Vector2(445, 7) }); po.AddChild(new TextureString(device, Utility.Language["Decide"], 14, PPDColors.Gray) { Position = new Vector2(565, 7) }); po.AddChild(new TextureString(device, Utility.Language["Back"], 14, PPDColors.Gray) { Position = new Vector2(685, 7) }); this.AddChild(po); this.AddChild(menuMovie); this.AddChild(bgd); oc.Connect = SkinSetting.Setting.Connect; oc.RivalGhost = SkinSetting.Setting.RivalGhost; ssm.CurrentRoot = SongInformation.Root; ssm.CurrentLogicRoot = LogicFolderInfomation.Root; if (PreviousParam.TryGetValue("CurrentRoot", out temp)) { var root = temp as SongInformation; ssm.CurrentRoot = root; } if (PreviousParam.TryGetValue("CurrentLogicRoot", out temp)) { var root = temp as LogicFolderInfomation; ssm.CurrentLogicRoot = root; } if (PreviousParam.TryGetValue("CurrentMode", out temp)) { var mode = (SelectSongManager.Mode)temp; ssm.ChangeMode(mode); } if (PreviousParam.TryGetValue("SelectedIndex", out temp)) { selectnum = (int)temp; } ssm.SelectedIndex = selectnum; return(true); }