C# Class SIL.FieldWorks.Common.Controls.BulkEditBar.BulkEditTabPageSettings

This is the base class that knows common settings used in BulkEdit tabs. Used to persist those values.
Show file Open project: sillsdev/FieldWorks

Protected Properties

Property Type Description
m_bulkEditBar BulkEditBar

Private Properties

Property Type Description
BuildCurrentTabSettingsKey string
BuildLastTabSettingsKey string
CaptureSettingsForCurrentTab BulkEditTabPageSettings
DeserializeLastTabPageSettings BulkEditTabPageSettings
DeserializeTabPageSettings BulkEditTabPageSettings
GetBulkEditBarToolId string
GetNewSettingsForSelectedTab BulkEditTabPageSettings
InExpectedTab bool
InitializeSelectedTab void
SerializeSettings string
SetTargetCombo void
TryGetSettingsForCurrentTabPage bool
TrySwitchToLastSavedTab bool

Public Methods

Method Description
BulkEditTabPageSettings ( ) : System

Protected Methods

Method Description
CanLoadFromBulkEditBar ( ) : bool

CheckExpectedTab ( ) : void

make sure bulkEditBar is in the expected tab state.

GetCurrentTabPageName ( BulkEditBar bulkEditBar ) : string

HasExpectedTargetSelected ( ) : bool

after deserializing, determine if the target combo was able to get set to the persisted value.

InvokeTargetComboSelectedIndexChanged ( ) : void

this is a hack that explictly triggers the currentTargetCombo.SelectedIndexChange delegates during initialization, since they do not fire automatically until after everything is setup.

SaveSettings ( BulkEditBar bulkEditBar ) : void

Serialize the settings for a bulk edit bar tab, and store it in the property table.

SetTargetField ( ) : void

SetupApplyPreviewButtons ( ) : void

Update Preview/Clear and Apply Button states.

SetupBulkEditBarTab ( BulkEditBar bulkEditBar ) : void

Check that we've changed to BulkEditBar to ExpectedTab, and then set BulkEditBar to those tab settings

Private Methods

Method Description
BuildCurrentTabSettingsKey ( BulkEditBar bulkEditBar ) : string
BuildLastTabSettingsKey ( BulkEditBar bulkEditBar ) : string

Construct the property table key based upon the tool using this BulkEditBar.

CaptureSettingsForCurrentTab ( BulkEditBar bulkEditBar ) : BulkEditTabPageSettings

Create BulkEditBarTabPage settings for the current tab, and save them to the property table. (only effective after initialization (i.e. m_setupOrRestoredBulkEditBarTab) To restore the settings, use TrySwitchToLastSavedTab() and/or followed by InitializeSelectedTab().

DeserializeLastTabPageSettings ( BulkEditBar bulkEditBar ) : BulkEditTabPageSettings

factory returning a tab settings object, if we found them in the property table.

DeserializeTabPageSettings ( BulkEditBar bulkEditBar, string tabSettingsKey ) : BulkEditTabPageSettings
GetBulkEditBarToolId ( BulkEditBar bulkEditBar ) : string

GetNewSettingsForSelectedTab ( BulkEditBar bulkEditBar ) : BulkEditTabPageSettings
InExpectedTab ( ) : bool
InitializeSelectedTab ( BulkEditBar bulkEditBar ) : void

Try to restore settings for selected tab, otherwise use defaults.

SerializeSettings ( ) : string
SetTargetCombo ( ) : void
TryGetSettingsForCurrentTabPage ( BulkEditBar bulkEditBar, BulkEditTabPageSettings &tabPageSettings ) : bool
TrySwitchToLastSavedTab ( BulkEditBar bulkEditBar ) : bool

Restore last visited BulkEditBar tab index. After BulkEditBar finishes initializing its state and controls in that tab, finish restoring the settings in that tab with InitializeSelectedTab()

Method Details

BulkEditTabPageSettings() public method

public BulkEditTabPageSettings ( ) : System
return System

CanLoadFromBulkEditBar() protected method

protected CanLoadFromBulkEditBar ( ) : bool
return bool

CheckExpectedTab() protected method

make sure bulkEditBar is in the expected tab state.
protected CheckExpectedTab ( ) : void
return void

GetCurrentTabPageName() protected static method

protected static GetCurrentTabPageName ( BulkEditBar bulkEditBar ) : string
bulkEditBar BulkEditBar
return string

HasExpectedTargetSelected() protected method

after deserializing, determine if the target combo was able to get set to the persisted value.
protected HasExpectedTargetSelected ( ) : bool
return bool

InvokeTargetComboSelectedIndexChanged() protected method

this is a hack that explictly triggers the currentTargetCombo.SelectedIndexChange delegates during initialization, since they do not fire automatically until after everything is setup.
protected InvokeTargetComboSelectedIndexChanged ( ) : void
return void

SaveSettings() protected method

Serialize the settings for a bulk edit bar tab, and store it in the property table.
protected SaveSettings ( BulkEditBar bulkEditBar ) : void
bulkEditBar BulkEditBar
return void

SetTargetField() protected method

protected SetTargetField ( ) : void
return void

SetupApplyPreviewButtons() protected method

Update Preview/Clear and Apply Button states.
protected SetupApplyPreviewButtons ( ) : void
return void

SetupBulkEditBarTab() protected method

Check that we've changed to BulkEditBar to ExpectedTab, and then set BulkEditBar to those tab settings
protected SetupBulkEditBarTab ( BulkEditBar bulkEditBar ) : void
bulkEditBar BulkEditBar
return void

Property Details

m_bulkEditBar protected property

the bulkEditBar we're getting or settings our values
protected BulkEditBar,SIL.FieldWorks.Common.Controls m_bulkEditBar
return BulkEditBar