Exemplo n.º 1
0
        public CoinViewModel(ICoin data) : this(data.GetId())
        {
            _code               = data.Code;
            _algoId             = data.AlgoId;
            _testWallet         = data.TestWallet;
            _enName             = data.EnName;
            _cnName             = data.CnName;
            _icon               = data.Icon;
            _walletRegexPattern = data.WalletRegexPattern;
            _justAsDualCoin     = data.JustAsDualCoin;
            _notice             = data.Notice;
            _tutorialUrl        = data.TutorialUrl;
            _isHot              = data.IsHot;
            _kernelBrand        = data.KernelBrand;
            _minGpuMemoryGb     = data.MinGpuMemoryGb;
            string iconFileFullName = TempPath.GetIconFileFullName(data.Icon);

            if (!string.IsNullOrEmpty(iconFileFullName) && File.Exists(iconFileFullName))
            {
                _iconImageSource = iconFileFullName;
            }
        }