C# 클래스 Smrf.NodeXL.ExcelTemplate.NodeXLApplicationSettingsBase

Base class for most NodeXL's user settings classes.
This is the base class for all of NodeXL's user settings classes except those used to save dialog positions, which are derived from .

This class saves user settings to the workbook so that the settings travel with the workbook. It does this by intercepting calls to the property, the Save method, and the method. Within each intercept, the workbook settings are copied to the file that the base class uses to store settings, the base class is allowed to do its usual work on the file, and if appropriate, the file is then copied back to the workbook settings. The net result is that the base class effectively reads and writes the workbook settings. The actual file settings are used by NodeXL only when a new workbook is created.

This is much easier than creating a custom settings provider, which is not well documented and far from trivial. That's especially true when settings groups are used, as they are in NodeXL.

In this class, the file that the base class uses to store settings is called the "standard settings file", and the settings stored in the workbook are called the "workbook settings."

상속: System.Configuration.ApplicationSettingsBase
파일 보기 프로젝트 열기: 2014-sed-team3/term-project 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_bItemCalled System.Boolean
m_bUseWorkbookSettings System.Boolean

공개 메소드들

메소드 설명
NodeXLApplicationSettingsBase ( ) : System
NodeXLApplicationSettingsBase ( System.Boolean useWorkbookSettings ) : System
NotUseWorkbookSettings ( ) : void
OnNewWorkbook ( ) : void
Reset ( ) : void
Save ( ) : void
UseNewWorkbookSettingsForThisWorkbook ( ) : void
UseWorkbookSettingsForNewWorkbooks ( ) : void
this ( String propertyName ) : Object

보호된 메소드들

메소드 설명
CopyAndFilterSettings ( String sSourceSettings, String sDestinationSettings ) : String
CopyStandardSettingsToWorkbookSettings ( ) : void
CopyWorkbookSettingsToStandardSettings ( ) : void
CreateStandardSettingsFolder ( System.Boolean bAlsoCreateStandardSettingsFile ) : void
FileIsLocked ( IOException oIOException ) : System.Boolean

Determines whether an IOException was thrown because a file was locked.

GetPerWorkbookSettings ( ) : PerWorkbookSettings
GetStandardSettingsFilePath ( ) : String
GetStandardSettingsFileStream ( System.Boolean bForWriting ) : FileStream
GetWorkbookSettings ( ) : String
OnSettingsLoaded ( Object sender, System.Configuration.SettingsLoadedEventArgs e ) : void
ReadStandardSettingsFile ( ) : String
SetWorkbookSettings ( String sWorkbookSettings ) : void
WriteStandardSettingsFile ( String sFileContents ) : void

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

CopyAndFilterSettings() 보호된 메소드

protected CopyAndFilterSettings ( String sSourceSettings, String sDestinationSettings ) : String
sSourceSettings String
sDestinationSettings String
리턴 String

CopyStandardSettingsToWorkbookSettings() 보호된 메소드

protected CopyStandardSettingsToWorkbookSettings ( ) : void
리턴 void

CopyWorkbookSettingsToStandardSettings() 보호된 메소드

protected CopyWorkbookSettingsToStandardSettings ( ) : void
리턴 void

CreateStandardSettingsFolder() 보호된 메소드

protected CreateStandardSettingsFolder ( System.Boolean bAlsoCreateStandardSettingsFile ) : void
bAlsoCreateStandardSettingsFile System.Boolean
리턴 void

FileIsLocked() 보호된 메소드

Determines whether an IOException was thrown because a file was locked.
protected FileIsLocked ( IOException oIOException ) : System.Boolean
oIOException System.IO.IOException /// The IOException that was thrown. ///
리턴 System.Boolean

GetPerWorkbookSettings() 보호된 메소드

protected GetPerWorkbookSettings ( ) : PerWorkbookSettings
리턴 PerWorkbookSettings

GetStandardSettingsFilePath() 보호된 정적인 메소드

protected static GetStandardSettingsFilePath ( ) : String
리턴 String

GetStandardSettingsFileStream() 보호된 메소드

protected GetStandardSettingsFileStream ( System.Boolean bForWriting ) : FileStream
bForWriting System.Boolean
리턴 System.IO.FileStream

GetWorkbookSettings() 보호된 메소드

protected GetWorkbookSettings ( ) : String
리턴 String

NodeXLApplicationSettingsBase() 공개 메소드

public NodeXLApplicationSettingsBase ( ) : System
리턴 System

NodeXLApplicationSettingsBase() 공개 메소드

public NodeXLApplicationSettingsBase ( System.Boolean useWorkbookSettings ) : System
useWorkbookSettings System.Boolean
리턴 System

NotUseWorkbookSettings() 공개 메소드

public NotUseWorkbookSettings ( ) : void
리턴 void

OnNewWorkbook() 공개 메소드

public OnNewWorkbook ( ) : void
리턴 void

OnSettingsLoaded() 보호된 메소드

protected OnSettingsLoaded ( Object sender, System.Configuration.SettingsLoadedEventArgs e ) : void
sender Object
e System.Configuration.SettingsLoadedEventArgs
리턴 void

ReadStandardSettingsFile() 보호된 메소드

protected ReadStandardSettingsFile ( ) : String
리턴 String

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

Save() 공개 메소드

public Save ( ) : void
리턴 void

SetWorkbookSettings() 보호된 메소드

protected SetWorkbookSettings ( String sWorkbookSettings ) : void
sWorkbookSettings String
리턴 void

UseNewWorkbookSettingsForThisWorkbook() 공개 메소드

public UseNewWorkbookSettingsForThisWorkbook ( ) : void
리턴 void

UseWorkbookSettingsForNewWorkbooks() 공개 메소드

public UseWorkbookSettingsForNewWorkbooks ( ) : void
리턴 void

WriteStandardSettingsFile() 보호된 메소드

protected WriteStandardSettingsFile ( String sFileContents ) : void
sFileContents String
리턴 void

this() 공개 메소드

public this ( String propertyName ) : Object
propertyName String
리턴 Object

프로퍼티 상세

m_bItemCalled 보호되어 있는 프로퍼티

protected Boolean,System m_bItemCalled
리턴 System.Boolean

m_bUseWorkbookSettings 보호되어 있는 프로퍼티

protected Boolean,System m_bUseWorkbookSettings
리턴 System.Boolean