private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            NewChannel nch = new NewChannel();

            HelperCl.AnimationForm(nch);
            nch.ShowDialog();
        }
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            Calls c = new Calls(users);

            HelperCl.AnimationForm(c);
            c.ShowDialog();
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            NewGroup ng = new NewGroup();

            HelperCl.AnimationForm(ng);
            ng.ShowDialog();
        }
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            DateTime dt = DateTime.Now;

            users = new List <User>
            {
                new User {
                    Name = "Aleksandr Hryhorenko 0", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 1", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 2", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 3", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 4", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 5", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 6", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 7", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 8", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 9", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                },
                new User {
                    Name = "Aleksandr Hryhorenko 10", PhoneNumber = "+380 67 213 83 45", Username = "******", DateVisit = dt.ToShortDateString()
                }
            };
            this.DataContext = users;

            string pathPhoto = System.Reflection.Assembly.GetExecutingAssembly().Location.TrimEnd("UITelega.exe".ToCharArray()) + "ph01.jpg";

            if (!File.Exists(pathPhoto))
            {
                return;
            }

            HelperCl.ResizeImg(pathPhoto);
            foreach (var item in users)
            {
                item.Avatar = HelperCl.pathPh;
            }
        }