private void createCmd(bool isDirectory) { FileHeader fh = new FileHeader(Session.userInfo); fh.IsDirectory = isDirectory; if (isDirectory) { fh.Name = "newdir"; fh.Extension = ""; } FilePropertiesWindow fpw = new FilePropertiesWindow(fh); if (fpw.ShowDialog().Value) { try { fsctrl.writeFile(fsctrl.CurrDir, fh, null, true); FileView fv = addFileView(fh); onFileViewMouseDown(fv, null); } catch (Exception e) { MessageBox.Show(e.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); if (e is RootdirOutOfSpaceException || e is DiskOutOfSpaceException) { try { fsctrl.deleteFile(fsctrl.CurrDir, fh, false); } catch { //ignore } } } } }