示例#1
0
 private void updateFileFieldView(string directoryName)
 {
     if (isNotEmpty(directoryName))
     {
         FileController controller = new FileController(directoryName);
         string         fileControllerException = controller.FileControllerException;
         listView1.Items.Clear();
         if (showException(fileControllerException))
         {
             DialogWithOneButtom error =
                 //new DialogWithOneButtom(fileControllerException);
                 new DialogWithOneButtom("Не правильно указан путь к файлам.");
             error.Show();
         }
         else
         {
             foreach (FileEntity fileEntity in controller.FileEntities)
             {
                 listView1.Items.Add(new ListViewItem(fileEntity.FullFileName));
             }
         }
     }
     else
     {
         DialogWithOneButtom error =
             new DialogWithOneButtom(Сonstants.FillDirectoryPathError);
         error.Show();
     }
 }
示例#2
0
        private void showUserAccounts(object sender, EventArgs e)
        {
            UserEntityController controller      = UserEntityController.Instance;
            string userEntityControllerException =
                controller.UserEntityControllerException;

            if (showException(userEntityControllerException))
            {
                DialogWithOneButtom error =
                    new DialogWithOneButtom(userEntityControllerException);
                error.Show();
            }
            else
            {
                refreshListView(controller.UserEntities);
            }
        }