예제 #1
0
        private void Buttonz_Click(object sender, RoutedEventArgs e)
        {
            var path = this.TxtFolder.Text.Trim();

            string[] fs1 = null, fs2 = null;
            try
            {
                fs1 = System.IO.Directory.GetFiles(path, "*.jpg", SearchOption.AllDirectories);
                fs2 = System.IO.Directory.GetFiles(path, "*.png", SearchOption.AllDirectories);
            }
            catch
            {
                MessageBoxz.ShowError("无法获取指定目录下的文件");
                return;
            }
            List <string> photoPaths = new List <string>();

            photoPaths.AddRange(fs1);
            photoPaths.AddRange(fs2);
            List <UserPhotoDemo> users = new List <UserPhotoDemo>();

            foreach (var f in photoPaths)
            {
                users.Add(new UserPhotoDemo {
                    FilePath = f, FileName = System.IO.Path.GetFileName(f)
                });
            }
            this.ImgViewer.ItemsSource = users;
        }
예제 #2
0
 private void modify_fail()
 {
     MessageBoxz.ShowError("修改失败,账号或密码不能为空");
 }
예제 #3
0
 private void login_fail()
 {
     MessageBoxz.ShowError("用户名或密码错误!");
 }
예제 #4
0
 private void add_fail()
 {
     MessageBoxz.ShowError("账号和密码不能为空");
 }
 private void FButton_Click_Error(object sender, RoutedEventArgs e)
 {
     MessageBoxz.ShowError("你只看到我在不停的忙碌,却没看到我奋斗的热情。你有朝九晚五,我有通宵达旦。你否定我的现在,我决定我的未来。你可以轻视我的存在,我会用代码证明这是谁的时代!Coding是注定痛苦的旅行,路上少不了Bug和Change,但!那又怎样!我是程序猿,我为自己带眼");
 }