Example #1
0
        private void UpdateAvatar()
        {
            HashString = AvatarGen.GenerateHash();
            Bitmap avaBitmap = AvatarGen.GenerateAvatar(HashString);

            Avatar = GetBitmapImage(avaBitmap);
        }
Example #2
0
        public AddProfiler(Global global, Persona persona)
        {
            ProfilerMode        = ProfilerMode.Edit;
            this.persona        = persona;
            this.global         = global;
            addProfileViewModel = new ViewModels.AddProfileViewModel(this, global);

            HashString = persona.HashString;
            Bitmap avaBitmap = AvatarGen.GenerateAvatar(HashString);

            Avatar = GetBitmapImage(avaBitmap);

            view    = new Views.AddProfile(addProfileViewModel);
            Proxies = global.Proxies;

            //нужно сделать, чтобы если на акке был прокси, то его можно было удалить
            if (persona.Proxy != null)
            {
                var pr = Proxies.Where(p => p.Ip == persona.Proxy.Ip && p.Port == persona.Proxy.Port).FirstOrDefault();
                if (pr != null)
                {
                    Proxy = pr;
                }
                else
                {
                    Proxy = persona.Proxy;
                }
            }


            view.ShowDialog();
        }