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

            FileHandle.writeSettings();
        }
        public GroupEditor()
        {
            InitializeComponent();

            List <Champion> champs = AmethystCore.GetChampList();

            foreach (Champion champ in champs)
            {
                ComboBoxItem item = new ComboBoxItem();
                item.Content = champ;
                if (champList.SelectedIndex == -1)
                {
                    item.IsSelected = true;
                }
                champList.Items.Add(item);
            }

            foreach (ChampionGroup group in ChampionGroup.groups)
            {
                ComboBoxItem item = new ComboBoxItem();
                item.Content = group;
                if (groupList.SelectedIndex == -1)
                {
                    item.IsSelected = true;
                }
                groupList.Items.Add(item);
            }
        }
        public MainWindow()
        {
            AmethystCore.LoadChampions();

            InitializeComponent();

            Main.Content = mainPage;
        }
示例#4
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;
            }
        }
 private void buttonCGG_Click(object sender, RoutedEventArgs e)
 {
     openURL("http://champion.gg/champion/" + AmethystCore.GetCurrentChampion() + "/");
 }
 private void buttonLAL_Click(object sender, RoutedEventArgs e)
 {
     openURL("https://lolalytics.com/champion/" + AmethystCore.GetCurrentChampion() + "/");
 }