Ejemplo n.º 1
0
        public Summary(SaveMatch saveMatch, ref SQLBase db)
        {
            NavigationPage.SetHasNavigationBar(this, false);
            sets         = new Settings();
            myBaseSqlite = db;
            match        = saveMatch;
            VievModel    = new Players(myBaseSqlite);
            EloExist();
            SaveToBase();
            InitializeComponent();
            InitalizeLabel();
            this.BindingContext = match;

            //logi
            sets.AddLogs(DateTime.Now.ToString());

            sets.AddLogs(match.InfoDebug);
            sets.EndLog();

            List <Player> players = myBaseSqlite.GetPlayersList();

            foreach (Player item in players)
            {
                System.Diagnostics.Debug.WriteLine("Player " + item.name + "elo = " + item.elo);

                sets.AddLogs("Player " + item.name + "elo = " + item.elo);
            }

            sets.EndLog();

            System.Diagnostics.Debug.WriteLine("MultiplerFromPlace() * MultiplerFromPlayerCount() * MultiplerFromRoundCount() * MultiplerFromMatchCount() * MultiplerFromArrowCount() * MultiplerFromRatio()  + MultiplerEloRelation() + BonusForFirstMatch())");
            sets.AddLogs("MultiplerFromPlace() * MultiplerFromPlayerCount() * MultiplerFromRoundCount() * MultiplerFromMatchCount() * MultiplerFromArrowCount() * MultiplerFromRatio()  + MultiplerEloRelation() + BonusForFirstMatch())\n");
            foreach (KeyValuePair <int, GameScore> item in match.DictGameScore())
            {
                if (!(item.Value is null))
                {
                    item.Value.InfoDebug();
                    item.Value.InfoDebug2();

                    sets.AddLogs(item.Value.InfoDebug());
                    sets.AddLogs(item.Value.InfoDebug2());
                    System.Diagnostics.Debug.WriteLine(item.Value.RatioRecord + "<-RadioRecord|" + item.Value.name + "|BestShoot-> " + item.Value.BestShotFlag);
                    sets.AddLogs(item.Value.RatioRecord + "<-RadioRecord|" + item.Value.name + "|BestShoot-> " + item.Value.BestShotFlag);
                }
            }
            sets.EndLog();
        }