C# 클래스 Revit.SDK.Samples.CancelSave.CS.CancelSave

상속: IExternalApplication
파일 보기 프로젝트 열기: AMEE/revit

공개 메소드들

메소드 설명
OnShutdown ( UIControlledApplication application ) : Autodesk.Revit.UI.Result

Implement OnShutdown method of IExternalApplication interface.

OnStartup ( UIControlledApplication application ) : Autodesk.Revit.UI.Result

Implement OnStartup method of IExternalApplication interface. This method subscribes to DocumentOpened, DocumentCreated, DocumentSaving and DocumentSavingAs events. The first two events are used to reserve "Project Status" original value; The last two events are used to check whether "Project Status" has been updated, and re-reserve current value as new original value for next compare.

비공개 메소드들

메소드 설명
CheckProjectStatusUpdate ( Object sender, RevitAPIPreDocEventArgs args ) : void

Event handler method for DocumentSaving and DocumentSavingAs events. This method will check whether "Project Status" has been updated, and reserve current value as original value.

DealNotUpdate ( RevitAPIPreDocEventArgs args ) : void

Deal with the case that the project status wasn't updated. If the event is Cancellable, cancel it and inform user else just inform user the status.

DetectAddinFileLocation ( Autodesk applictaion ) : string
ReservePojectOriginalStatus ( Object sender, RevitAPIPostDocEventArgs args ) : void

Event handler method for DocumentOpened and DocumentCreated events. This method will reserve "Project Status" value after document has been opened or created.

RetrieveProjectCurrentStatus ( System.Windows.Forms.Document doc ) : string

Retrieve current value of Project Status.

메소드 상세

OnShutdown() 공개 메소드

Implement OnShutdown method of IExternalApplication interface.
public OnShutdown ( UIControlledApplication application ) : Autodesk.Revit.UI.Result
application UIControlledApplication Controlled application to be shutdown.
리턴 Autodesk.Revit.UI.Result

OnStartup() 공개 메소드

Implement OnStartup method of IExternalApplication interface. This method subscribes to DocumentOpened, DocumentCreated, DocumentSaving and DocumentSavingAs events. The first two events are used to reserve "Project Status" original value; The last two events are used to check whether "Project Status" has been updated, and re-reserve current value as new original value for next compare.
public OnStartup ( UIControlledApplication application ) : Autodesk.Revit.UI.Result
application UIControlledApplication Controlled application to be loaded to Revit process.
리턴 Autodesk.Revit.UI.Result