private void drawThemeButton(VWiiTheme theme) { if (Left >= 1130) { Top += 170; Left = 10; } Button b = new Button(); StackPanel s = new StackPanel(); Image a = new Image(); a.Source = new BitmapImage(new Uri($"{theme.IMGURL}", UriKind.RelativeOrAbsolute)); TextBlock ba = new TextBlock(); ba.Text = theme.Name; ba.HorizontalAlignment = HorizontalAlignment.Center; s.Orientation = Orientation.Vertical; s.Children.Add(a); s.Children.Add(ba); b.Margin = new Thickness(Left, Top, 0, 0); Left += 280; b.Content = s; b.Width = 260; b.Height = 160; b.VerticalAlignment = VerticalAlignment.Top; b.HorizontalAlignment = HorizontalAlignment.Left; b.Click += B_Click; stuff.Children.Add(b); }
private void ReadAllThemes(int region) { int eu = 0, us = 1, jp = 2; foreach (string file in Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "bin", "vwii", "json"))) { var theme = VWiiTheme.LoadFromJSON(file); if (eu == region) { if (theme.worksEU) { Themes.Add(theme); } } if (us == region) { if (theme.worksUS) { Themes.Add(theme); } } if (jp == region) { if (theme.worksJP) { Themes.Add(theme); } } } }
public ThemeFrame(int region, VWiiTheme theme, MainWindow m) { InitializeComponent(); string[] regions = new string[3] { "EU", "US", "JP" }; tn.Text = $"Name:{theme.Name} \tRegion: {regions[region]}"; mw = m; Region = region; Theme = theme; if (region == 1) { app = "1f"; } else if (region == 2) { app = "1c"; } }