Example #1
0
        private void saveSettings(object sender, RoutedEventArgs e)
        {
            FileHandle._settings.appVersion    = _version;
            FileHandle._settings.leagueVersion = AmethystCore.GetVersion();

            FileHandle.writeSettings();
        }
Example #2
0
 public void updateSettings()
 {
     //Update league version text box
     ((Label)this.FindName("leagueVersion")).Content = AmethystCore.GetVersion();
     //Update app version text box
     ((Label)this.FindName("appVersion")).Content = _version;
     //Update startWithWindows toggle thing
     ((RadioButton)this.FindName("startToggle")).IsChecked = FileHandle._settings.startWithWindows;
 }
        private void genChamp_Click(object sender, RoutedEventArgs e)
        {
            string currChampion = AmethystCore.GetNewChampion();
            string version      = AmethystCore.GetVersion();

            ((Label)this.FindName("champName")).Content = AmethystCore.GetName(currChampion);

            BitmapImage logo = new BitmapImage();

            logo.BeginInit();
            logo.UriSource = new Uri("http://ddragon.leagueoflegends.com/cdn/" + version + "/img/champion/" + currChampion + ".png");
            logo.EndInit();

            ((Image)this.FindName("champImage")).Source = logo;

            if (invisible)
            {
                invisible = false;
                ((Grid)this.FindName("champGrid")).Visibility = Visibility.Visible;
            }
        }