示例#1
0
        // Установка аватара
        private void ImageSet()
        {
            BitmapImage bitMap = new BitmapImage();

            bitMap.BeginInit();
            bitMap.UriSource   = new Uri(jsonCollection[EnterTheCabinet.GetNumber()]["PathProp"].ToString(), UriKind.RelativeOrAbsolute);
            bitMap.CacheOption = BitmapCacheOption.OnLoad;
            bitMap.EndInit();
            userImage.Stretch = Stretch.Fill;
            userImage.Source  = bitMap;
        }
示例#2
0
        public PrivateCabinet()
        {
            InitializeComponent();
            dataGrid.Loaded += DataGrid_Loaded;
            jsonCollection   = JsonMapper.ToObject(path);
            users            = new ClassUser[jsonCollection.Count];
            this.Loaded     += PrivateCabinet_Loaded;

            // Установка аватарки, имени и баланса
            userName.Content    = EnterTheCabinet.GetName();
            userBalance.Content = jsonCollection[EnterTheCabinet.GetNumber()]["BalanceProp"].ToString();
            ImageSet();
        }