Esempio n. 1
0
        /// <summary>
        /// setup for UI
        /// </summary>
        private void InitUI()
        {
            _headStrike1 = 0;
            _bodyStrike1 = 0;
            _legStrike1  = 0;

            _headStrike2 = 0;
            _bodyStrike2 = 0;
            _legStrike2  = 0;

            Head1.Text = _headStrike1.ToString();
            Body1.Text = _bodyStrike1.ToString();
            Leg1.Text  = _legStrike1.ToString();

            Head2.Text = _headStrike2.ToString();
            Body2.Text = _bodyStrike2.ToString();
            Leg2.Text  = _legStrike2.ToString();

            _vm = new MatchWindowViewModel();
        }
Esempio n. 2
0
    public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
    {
        MatchWindowViewModel MWVM = values[0] as MatchWindowViewModel;

        LocalDB db = (LocalDB)values[1];

        string name = Enum.GetName(typeof(LocalDB), db);

        string id = "";

        string sep1 = " (";
        string sep2 = ")";

        switch (db)
        {
        case LocalDB.GamesDB:
            if (MWVM.ID_GDB != null)
            {
                id = $"{sep1}{MWVM.ID_GDB}{sep2}";
            }
            break;

        case LocalDB.GiantBomb:
            if (MWVM.ID_GB != null)
            {
                id = $"{sep1}{MWVM.ID_GB}{sep2}";
            }
            break;

        case LocalDB.OpenVGDB:
            if (MWVM.ID_OVG != null)
            {
                id = $"{sep1}{MWVM.ID_OVG}{sep2}";
            }
            break;

        case LocalDB.LaunchBox:
            if (MWVM.ID_LB != null)
            {
                id = $"{sep1}{MWVM.ID_LB}{sep2}";
            }
            break;

        case LocalDB.Unknown:
            break;

        case LocalDB.Datomatic:
            break;

        case LocalDB.MobyGames:
            break;

        case LocalDB.Robin:
            break;

        default:
            break;
        }

        return(name + id);
    }