private CommandController commandController; //TODO: добавить реализацию public MainWorkSpace() { securityManager = SecurityManagerImpl.getInstance(); dataProvider = DataPRoviderImpl.getInstance(); directoryController = DirectoryControllerImpl.getInstance(); fileController = FileControllerImpl.getInstance(); commandController = CommandControllerImpl.getInstance(); InitializeComponent(); }
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(); }