public bool SaveDocument(IDocumentModel documentModel, Stream stream, IExporterOptions options) { BBCodeExporter exporter = new BBCodeExporter((DocumentModel)documentModel, (BBCodeDocumentExporterOptions)options); exporter.Export(stream); return(true); }
public AssemblyXmlParser(IDocumentationXmlMatcher xmlMatcher, IDocumentModel documentModel, IDocumentableMemberFinder documentableMembers) { this.xmlMatcher = xmlMatcher; this.documentModel = documentModel; this.documentableMembers = documentableMembers; }
public UndoableRleCollectionRemoveRangeHistoryItem(IDocumentModel documentModel, RleCollection <T> collection, int index, int count) : base(documentModel.MainPart) { this.collection = collection; this.index = index; this.count = count; }
public UndoableRleCollectionSetValueHistoryItem(IDocumentModel documentModel, RleCollection <T> collection, int index, T value) : base(documentModel.MainPart) { this.collection = collection; this.newValue = value; this.index = index; }
/// <summary> /// Class constructor. /// </summary> /// <param name="documentTypeKey"></param> public FileBaseViewModel(string documentTypeKey, IMessageBoxService IMsgBox) : this() { _MsgBox = IMsgBox; MDocumentModel = new DocumentModel(); DocumentTypeKey = documentTypeKey; }
private void SetSelectedDropDownLists(IDocumentModel document) { var selectedPurpose = _context.Purposes .AsNoTracking() .FirstOrDefault(x => x.Id == document.PurposeId); var selectedStatus = _context.Statuses .AsNoTracking() .FirstOrDefault(x => x.Id == document.StatusId); var selectedVisaType = _context.VisaType .AsNoTracking() .FirstOrDefault(x => x.Id == document.VisaTypeId); var selectedVisaDateType = _context.VisaDateType .AsNoTracking() .FirstOrDefault(x => x.Id == document.VisaDateTypeId); var selectedOwner = _context.DocumentOwners .AsNoTracking() .FirstOrDefault(x => x.Id == document.OwnerId); var selectedApplicant = _context.Applicants .AsNoTracking() .FirstOrDefault(x => x.Id == document.ApplicantId); PopulateApplicantsDropDownList(selectedApplicant); PopulateOwnersDropDownList(selectedOwner); PopulatePurposesDropDownList(selectedPurpose); PopulateStatusesDropDownList(selectedStatus); PopulateVisaTypeDropDownList(selectedVisaType); PopulateVisaDateTypeDropDownList(selectedVisaDateType); }
public void Dispose() { if (this.mDocumentModel != null) { this.mDocumentModel.Dispose(); this.mDocumentModel = null; } }
public UndoableRleCollectionInsertRangeHistoryItem(IDocumentModel documentModel, RleCollection <T> collection, int index, IRleCollection <T> range, IRleCollectionValueConverter <T> valueConverter) : base(documentModel.MainPart) { this.collection = collection; this.index = index; this.newRange = range; this.valueConverter = valueConverter; }
public UndoableRleCollectionSetRangeValueHistoryItem(IDocumentModel documentModel, RleCollection <T> collection, int startIndex, int endIndex, T value) : base(documentModel.MainPart) { this.collection = collection; this.startIndex = startIndex; this.endIndex = endIndex; this.newValue = value; }
public void Dispose() { if (MDocumentModel != null) { MDocumentModel.Dispose(); MDocumentModel = null; } }
/// <summary> /// Class constructor /// </summary> /// <param name="file"></param> public FileChangeWatcher(IDocumentModel file) { _mFile = file ?? throw new ArgumentNullException(nameof(file)); ////SD.Workbench.MainWindow.Activated += MainForm_Activated; _mFile.FileNameChanged += file_FileNameChanged; ////FileChangeWatcher.activeWatchers.Add(this); ////Bugfix: Watching files by default can cause application file load deadlock situations(?) ////this.SetWatcher(); }
/// <summary> /// Load a files contents into the viewmodel for viewing and editing. /// </summary> /// <param name="dm"></param> /// <param name="closeOnErrorWithoutMessage"></param> /// <returns></returns> public static EdiViewModel LoadFile(IDocumentModel dm, ISettingsManager settings, bool closeOnErrorWithoutMessage = false) { EdiViewModel vm = new EdiViewModel(); vm.InitInstance(settings.SettingData); vm.FilePath = dm.FileNamePath; vm.CloseOnErrorWithoutMessage = closeOnErrorWithoutMessage; vm.LoadFileAsync(vm.FilePath); ////vm.OpenFile(filePath); // Non-async file open version return(vm); }
////public static void DisableAllChangeWatchers() ////{ //// ////SD.MainThread.VerifyAccess(); //// globalDisableCount++; //// //// foreach (FileChangeWatcher w in activeWatchers) //// w.SetWatcher(); //// //// ////Project.ProjectChangeWatcher.OnAllChangeWatchersDisabledChanged(); ////} ////public static void EnableAllChangeWatchers() ////{ //// ////SD.MainThread.VerifyAccess(); //// //// if (globalDisableCount == 0) //// throw new InvalidOperationException(); //// //// globalDisableCount--; //// //// foreach (FileChangeWatcher w in activeWatchers) //// w.SetWatcher(); //// //// ////Project.ProjectChangeWatcher.OnAllChangeWatchersDisabledChanged(); ////} public void Dispose() { ////SD.MainThread.VerifyAccess(); ////activeWatchers.Remove(this); if (this.mFile != null) { ////SD.Workbench.MainWindow.Activated -= MainForm_Activated; this.mFile.FileNameChanged -= file_FileNameChanged; this.mFile = null; } if (this.mWatcher != null) { this.mWatcher.Changed -= OnFileChangedEvent; this.mWatcher.Created -= OnFileChangedEvent; this.mWatcher.Renamed -= OnFileChangedEvent; this.mWatcher.Dispose(); this.mWatcher = null; } }
public DummyDocumentController(IDocumentModel model) { this.model = model; }
// Constructors are not intended for external usage outside of this class // Use the static methods provided to initialize this viewmodel /// <summary> /// Class constructor from <seealso cref="IDocumentModel"/> parameter. /// </summary> /// <param name="documentModel"></param> protected EdiViewModel(IDocumentModel documentModel, IMessageBoxService IMsgBox) : this(IMsgBox) { MDocumentModel.SetFileNamePath(documentModel.FileNamePath, documentModel.IsReal); }
/// <summary> /// Load a UML editor file based on an <seealso cref="IDocumentModel"/> /// representation and an <seealso cref="ISettingsManager"/> instance. /// </summary> /// <param name="dm"></param> /// <param name="o">Should point to a <seealso cref="ISettingsManager"/> instance.</param> /// <returns></returns> public static MiniUmlViewModel LoadFile(IDocumentModel dm, object o, IMessageBoxService msgBox) { return(LoadFile(dm.FileNamePath)); }
/// <summary> /// Class constructor from <seealso cref="IDocumentModel"/> parameter. /// </summary> /// <param name="documentModel"></param> public MiniUmlViewModel(IDocumentModel documentModel, IMessageBoxService IMsgBox) : this(IMsgBox) { MDocumentModel = documentModel; MDocumentModel.SetFileNamePath(FilePath, IsFilePathReal); }
/// <summary> /// Class constructor from <seealso cref="IDocumentModel"/> parameter. /// </summary> /// <param name="documentModel"></param> public MiniUmlViewModel(IDocumentModel documentModel) : this() { MDocumentModel = documentModel; MDocumentModel.SetFileNamePath(FilePath, IsFilePathReal); }
public void CreateStubs() { StubDocXmlMatcher = MockRepository.GenerateStub <IDocumentationXmlMatcher>(); StubDocModel = MockRepository.GenerateStub <IDocumentModel>(); StubDocMembers = MockRepository.GenerateStub <IDocumentableMemberFinder>(); }
/// <summary> /// Load a UML editor file based on an <seealso cref="IDocumentModel"/> /// representation and an <seealso cref="ISettingsManager"/> instance. /// </summary> /// <param name="dm"></param> /// <param name="o">Should point to a <seealso cref="ISettingsManager"/> instance.</param> /// <returns></returns> public static MiniUmlViewModel LoadFile(IDocumentModel dm, object o) { return(MiniUmlViewModel.LoadFile(dm.FileNamePath)); }
public DummyDocumentController(IDocumentModel model) { this.model = model; }
/// <summary> /// Class constructor from <seealso cref="IDocumentModel"/> parameter. /// </summary> /// <param name="documentModel"></param> public MiniUmlViewModel(IDocumentModel documentModel) : this() { this.mDocumentModel = documentModel; this.mDocumentModel.SetFileNamePath(this.FilePath, this.IsFilePathReal); }
public static Log4NetViewModel LoadFile(IDocumentModel dm, object o) { return(Log4NetViewModel.LoadFile(dm.FileNamePath)); }
public static IFileBaseViewModel CreateNewDocument(IDocumentModel documentModel, IMessageBoxService IMsgBox) { return(new EdiViewModel(documentModel, IMsgBox)); }
/// <summary> /// Load an Edi text editor file based on an <seealso cref="IDocumentModel"/> /// representation and a <seealso cref="ISettingsManager"/> instance. /// </summary> /// <param name="dm"></param> /// <param name="o">Should point to a <seealso cref="ISettingsManager"/> instance.</param> /// <returns></returns> public static EdiViewModel LoadFile(IDocumentModel dm, object o, IMessageBoxService msgBox) { return(LoadFile(dm, o as ISettingsManager, msgBox)); }
public AssemblyXmlParser(IDocumentationXmlMatcher xmlMatcher, IDocumentModel documentModel, IDocumentableMemberFinder documentableMembers) { this.xmlMatcher = xmlMatcher; this.documentModel = documentModel; this.documentableMembers = documentableMembers; }
/// <summary> /// Class constructor from <seealso cref="IDocumentModel"/> parameter. /// </summary> /// <param name="documentModel"></param> public EdiViewModel(IDocumentModel documentModel) : this() { MDocumentModel.SetFileNamePath(documentModel.FileNamePath, documentModel.IsReal); }
public static IFileBaseViewModel CreateNewDocument(IDocumentModel documentModel) { return(new EdiViewModel(documentModel)); }
/// <summary> /// Class constructor. /// </summary> /// <param name="documentTypeKey"></param> public FileBaseViewModel(string documentTypeKey) : this() { this.mDocumentModel = new DocumentModel(); this.mDocumentTypeKey = documentTypeKey; }
/// <summary> /// Load an Edi text editor file based on an <seealso cref="IDocumentModel"/> /// representation and a <seealso cref="ISettingsManager"/> instance. /// </summary> /// <param name="dm"></param> /// <param name="o">Should point to a <seealso cref="ISettingsManager"/> instance.</param> /// <returns></returns> public static EdiViewModel LoadFile(IDocumentModel dm, object o) { return(EdiViewModel.LoadFile(dm, o as ISettingsManager)); }
public void CreateStubs() { StubDocXmlMatcher = MockRepository.GenerateStub<IDocumentationXmlMatcher>(); StubDocModel = MockRepository.GenerateStub<IDocumentModel>(); StubDocMembers = MockRepository.GenerateStub<IDocumentableMemberFinder>(); }
public static Log4NetViewModel LoadFile(IDocumentModel dm, object o, IMessageBoxService msgBox) { return(Log4NetViewModel.LoadFile(dm.FileNamePath, msgBox)); }