예제 #1
0
 public void ShowTooltip(string title, string sub_title, Champion.Info info, IWin32Window owner = null)
 {
     this.changing_selection = true;
     base.ShowTooltip(title, sub_title, owner);
     this.champ_info          = info;
     this.gridMain.DataSource = this.champ_info.Stats.Table;
     this.changing_selection  = false;
     return;
 }
예제 #2
0
 private void formStatSheet_DragDrop(object sender, DragEventArgs e)
 {
     Champion.Info target_info = null;
     try
     {
         target_info = e.Data.GetData(typeof(Champion.Info)) as Champion.Info;
     }
     catch
     {
         target_info = null;
     }
     this.Champion = target_info;
     return;
 }
예제 #3
0
 private void formStatSheet_DragDrop(object sender, DragEventArgs e)
 {
     Champion.Info target_info = null;
     try
     {
         target_info = e.Data.GetData(typeof(Champion.Info)) as Champion.Info;
     }
     catch
     {
         target_info = null;
     }
     this.Champion = target_info;
     return;
 }
예제 #4
0
        private static void UpdateLiveChampionInfo()
        {
            HttpWebRequest request       = HttpWebRequest.Create(Engine.LiveChampionDataURL) as HttpWebRequest;
            StreamReader   stream_reader = new StreamReader(request.GetResponse().GetResponseStream(), Encoding.UTF8);
            JObject        data          = JObject.Parse(stream_reader.ReadToEnd());

            stream_reader.Close();
            //
            JToken result = data.SelectToken("champions");

            Engine.live_champion_info = JsonConvert.DeserializeObject <List <LiveChampionInfo> >(result.ToString());
            foreach (string s in Engine.ChampionInfos.Keys)
            {
                Serialization.Champion.Info current_info = Engine.ChampionInfos[s];
                current_info.LiveInfo = Engine.live_champion_info.FirstOrDefault(info => info.ID == current_info.ID);
            }
            return;
        }
예제 #5
0
        private void ShowTooltip(int row_index, int column_index)
        {
            if (this.champions == null || row_index < 0 || column_index < 0 || row_index >= this.gridMain.RowCount || column_index >= this.gridMain.ColumnCount || (this.fTooltip.Visible && this.itmLockTooltip.Checked))
            {
                return;
            }
            string champion_name = this.gridMain.Rows[row_index].Cells["colName"].Value.ToString();

            this.last_champ_name = Engine.CleanseChampionName(this.champions, champion_name);
            Champion.Info info         = this.champions[this.last_champ_name];
            string        column_name  = this.gridMain.Columns[column_index].HeaderText;
            string        value_out    = "???";
            string        subtitle_out = column_name;

            switch (column_name)
            {
            case "Attack":
                value_out = info.RatingInfo.Attack.ToString() + " / 10";
                break;

            case "Defense":
                value_out = info.RatingInfo.Defense.ToString() + " / 10";
                break;

            case "Difficulty":
                value_out = info.RatingInfo.Difficulty.ToString() + " / 10";
                break;

            case "Magic":
                value_out = info.RatingInfo.Magic.ToString() + " / 10";
                break;

            case "Passive":
                value_out    = "     " + info.PassiveDescription;
                subtitle_out = info.PassiveName + " (Passive)";
                break;

            //
            case "Q":
                value_out    = "     " + info.SpellDescriptionQ;
                subtitle_out = info.SpellNameQ + " (Q)";
                break;

            case "W":
                value_out    = "     " + info.SpellDescriptionW;
                subtitle_out = info.SpellNameW + " (W)";
                break;

            case "E":
                value_out    = "     " + info.SpellDescriptionE;
                subtitle_out = info.SpellNameE + " (E)";
                break;

            case "R":
                value_out    = "     " + info.SpellDescriptionR;
                subtitle_out = info.SpellNameR + " (R)";
                break;

            //
            case "Image":
                value_out    = info.SkinList;
                subtitle_out = "Skins";
                break;

            case "Free":
                value_out    = info.FreeToPlay.ToString();
                subtitle_out = "Free to Play?";
                break;

            case "Name":
                value_out    = info.LoreSummary;
                subtitle_out = "Lore Summary";
                break;

            case "Tags":
                value_out = info.TagList;
                break;

            case "Title":
                value_out    = info.LoreSummary;
                subtitle_out = "Lore Summary";
                break;
            }
            this.fTooltip.ShowTooltip(info.Name, subtitle_out, value_out, this);
        }
예제 #6
0
 public void ShowTooltip(string title, string sub_title, Champion.Info info, IWin32Window owner = null)
 {
     this.changing_selection = true;
     base.ShowTooltip(title, sub_title, owner);
     this.champ_info = info;
     this.gridMain.DataSource = this.champ_info.Stats.Table;
     this.changing_selection = false;
     return;
 }