예제 #1
0
 public void Record(long gameid, string platform, string key, string server, string player, string champ)
 {
     try
     {
         if (champ != null)
         {
             if (File.Exists(Application.StartupPath + @"\Champions\" + champ + ".png"))
             {
                 this.Champion.BackgroundImage = Image.FromFile(Application.StartupPath + @"\Champions\" + champ + ".png");
             }
             else
             {
                 this.Champion.BackgroundImage = Ghostblade.Properties.Resources.Unknown;
             }
         }
         CurrentChampion   = champ;
         playerlabel.Text  = player;
         RepTask           = new ReplayTask(gameid, platform.ToUpper(), key, server, player);
         RepTask.RecordGui = this;
         RepTask.Record();
     }
     catch (Exception ex)
     {
         Logger.Instance.Log.Error("Failed to record", ex);
     }
 }
예제 #2
0
        public void Record(long summonerid, RootObject game, string platform)
        {
            try
            {
                string player = null;
                string champ  = FindChamp(summonerid, game, out player);
                CurrentChampion = champ;
                if (champ != null)
                {
                    if (File.Exists(Application.StartupPath + @"\Champions\" + champ + ".png"))
                    {
                        this.Champion.BackgroundImage = Image.FromFile(Application.StartupPath + @"\Champions\" + champ + ".png");
                    }
                    else
                    {
                        this.Champion.BackgroundImage = Ghostblade.Properties.Resources.Unknown;
                    }

                    playerlabel.Text = player;
                }
                RepTask           = new ReplayTask(game.gameId, game.platformId.ToUpper(), game.observers.encryptionKey, RiotTool.Servers[platform.ToUpper()], player);
                RepTask.RecordGui = this;
                RepTask.Record();
            }
            catch (Exception ex)
            {
                Logger.Instance.Log.Error("Failed to record", ex);
            }
        }
예제 #3
0
 public void Record(long gameid, string platform, string key, string server, string player)
 {
     try
     {
         CurrentChampion   = "unknown";
         RepTask           = new ReplayTask(gameid, platform.ToUpper(), key, server, player);
         RepTask.RecordGui = this;
         RepTask.Record();
     }
     catch (Exception ex)
     {
         Logger.Instance.Log.Error("Failed to record", ex);
     }
 }