private void LoadGame(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".bin"; // Default file extension dlg.Filter = "Text documents (.bin)|*.bin"; // Filter files by extension Nullable <bool> result = dlg.ShowDialog(); if (result == true) { GamePage gamePage = new GamePage(frameRef, null); // create a new GamePage frameRef.ParentFrame.Navigate(gamePage); // switch priority from MenuPage to GamePage gamePage.LoadGame(dlg.FileName); } }
public BattleScene(GamePage page, Player player, Monster monster) { parentPage = page; this.player = player; this.monster = monster; this.playerImage = player.GetImage(); this.monsterImage = monster.GetImage(); if (monster.Name == "monster0581") // mimic { Image img = new Image(); img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(("Assets/" + "monster0581b" + ".png"), UriKind.Relative)); img.Name = "monster0581b"; this.monsterImage = img; } }
public ImageInteractionScene(ImageInteraction inter, GamePage parent) { interaction = inter; parentPage = parent; }
public ListBoxInteractionDisplay(GamePage page) { parentPage = page; }
public ImageInteractionScene(GamePage parent, Image img) { imgSetup = img; parentPage = parent; }
public PageData(GamePage parent) { this.parent = parent; items = new List <Item>(); itemImagePositions = new List <int>(); }
public void StartGameRun(string data) { GamePage gamePage = new GamePage(frameRef, data); frameRef.ParentFrame.Navigate(gamePage); }