Beispiel #1
0
        private CommandController commandController; //TODO: добавить реализацию

        public MainWorkSpace()
        {
            securityManager     = SecurityManagerImpl.getInstance();
            dataProvider        = DataPRoviderImpl.getInstance();
            directoryController = DirectoryControllerImpl.getInstance();
            fileController      = FileControllerImpl.getInstance();
            commandController   = CommandControllerImpl.getInstance();
            InitializeComponent();
        }
Beispiel #2
0
 public void createFile(string name)
 {
     if ((dataProvider.getCurrentDirectory() + '\\' + name).Equals(dataProvider.getCurrentDirectory() + '\\') || File.Exists(dataProvider.getCurrentDirectory() + '\\' + name))
     {
         throw new FileOrDirectoryOlreadyExistException();
     }
     if (!SecurityManagerImpl.getInstance().isFileNameCorrect(name))
     {
         throw new WrongFileOrDirectoryNameException();
     }
     File.Create(dataProvider.getCurrentDirectory() + '\\' + name).Close();
 }