public static ViewModel OpenReplay(string filename) { Replay replay = Replay.Load(filename); ViewModel view = OpenReplayInternal(replay); view.Name = Path.GetFileName(filename); view.SetUnmodified(); return(view); }
public static ViewModel CreateNew() { Replay replay = new Replay(); replay.AddAction(new CreateBoardAction(19, 19)); ViewModel view = OpenReplayInternal(replay); view.Name = "New Replay " + replayCounter; replayCounter++; view.SetUnmodified(); return(view); }
public static ViewModel PlayLesson(String filename) { string replay; Stream audio; AudioLessonFile.Load(filename, out replay, out audio); ViewModel view = new ViewModel(); view.Game = new Game(Replay.Parse(replay)); view.Game.Seek(0); view.Name = Path.GetFileName(filename); view.Media = new Player(audio); view.SetUnmodified(); return(view); }
public static ViewModel PlayLesson(String filename) { string replay; Stream audio; AudioLessonFile.Load(filename, out replay, out audio); ViewModel view = new ViewModel(); view.Game = new Game(Replay.Parse(replay)); view.Game.Seek(0); view.Name = Path.GetFileName(filename); view.Media = new Player(audio); view.SetUnmodified(); return view; }