C# Class Bloom.Workspace.WorkspaceView

Inheritance: System.Windows.Forms.UserControl
Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Public Properties

Property Type Description
DPIOfThisAccount float

Private Properties

Property Type Description
AdjustButtonTextsForCurrentSize void
AdjustTabStripDisplayForScreenSize void
AdjustToolPanelLocation void
Application_Idle void
BackgroundColorsForLinux void
CheckDPISettings void
GrowToFullSize void
GrowToStage1 void
GrowToStage2 void
HandleTabTextChanged void
InitializeComponent void
OnAboutBoxClick void
OnEditBook void
OnHelpButtonClick void
OnOpenCreateLibrary_Click void
OnRegistrationMenuItem_Click void
OnSendReceive void
OnSettingsButton_Click void
OnSettingsProtectionChanged void
OnUpdateDisplay void
OpenInfoFile void
RemoveButtonTexts void
RestartBloom void
RestoreOriginalButtonTexts void
SaveOriginalButtonTexts void
SaveOriginalWidthValues void
SelectPage void
SetTabVisibility void
SetupUILanguageMenu void
ShrinkToStage1 void
ShrinkToStage2 void
ShrinkToStage3 void
StartProblemReport void
WorkspaceView_Load void
WorkspaceView_Resize void
_applicationUpdateCheckTimer_Tick void
_checkForNewVersionMenuItem_Click void
_makeASuggestionMenuItem_Click void
_releaseNotesMenuItem_Click void
_reportAProblemMenuItem_Click void
_showLogMenuItem_Click void
_tabStrip_BackColorChanged void
_tabStrip_SelectedTabChanged void
_trainingVideosMenuItem_Click void
_webSiteMenuItem_Click void
buildingReaderTemplatesMenuItem_Click void
keyBloomConceptsMenuItem_Click void
toolStripMenuItem3_Click void
usingReaderTemplatesMenuItem_Click void

Public Methods

Method Description
OpenCreateLibrary ( ) : void
SetStateOfNonPublishTabs ( bool enable ) : void
ShortenStringToFit ( string text, int maxWidth, int originalWidth, Font font, Graphics g ) : string

Ensure that the TabStripItem or Control or Whatever is no wider than desired by truncating the Text as needed, with an ellipsis appended to show truncation has occurred.

Would this be a good library method somewhere? Where?

WorkspaceView ( Bloom.Workspace.WorkspaceModel model, Control libraryView, EditingView editingViewFactory, PublishView pdfViewFactory, CollectionSettingsDialog settingsDialogFactory, EditBookCommand editBookCommand, SendReceiveCommand sendReceiveCommand, SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent, SelectedTabChangedEvent selectedTabChangedEvent, LocalizationChangedEvent localizationChangedEvent, FeedbackDialog feedbackDialogFactory, ProblemReporterDialog problemReportDialogFactory, LocalizationManager localizationManager ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AdjustButtonTextsForCurrentSize ( ) : void

Remove the button texts if needed for the current size of the main window.

AdjustTabStripDisplayForScreenSize ( ) : void
AdjustToolPanelLocation ( bool allowNarrowing ) : void

Adjusts the tool panel location to allow more (or optionally less) space for the tab buttons.

Application_Idle ( object sender, EventArgs e ) : void
BackgroundColorsForLinux ( IBloomTabArea currentTabView ) : void
CheckDPISettings ( ) : void
GrowToFullSize ( ) : void
GrowToStage1 ( ) : void
GrowToStage2 ( ) : void
HandleTabTextChanged ( object sender, EventArgs e ) : void

Adjust the tool panel location when the chosen localization changes. See https://jira.sil.org/browse/BL-1212 for what can happen if we don't adjust. At the moment, we only widen, we never narrow the overall area allotted to the tab buttons. Button widths adjust themselves automatically to their Text width. There doesn't seem to be a built-in mechanism to limit the width to a given maximum so we implement such an operation ourselves.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

OnAboutBoxClick ( object sender, EventArgs e ) : void
OnEditBook ( Book book ) : void
OnHelpButtonClick ( object sender, MouseEventArgs e ) : void
OnOpenCreateLibrary_Click ( object sender, EventArgs e ) : void
OnRegistrationMenuItem_Click ( object sender, EventArgs e ) : void
OnSendReceive ( object obj ) : void
OnSettingsButton_Click ( object sender, EventArgs e ) : void
OnSettingsProtectionChanged ( object sender, System e ) : void
OnUpdateDisplay ( object sender, System e ) : void
OpenInfoFile ( string fileName ) : void
RemoveButtonTexts ( ) : void

Remove the text from each of the buttons, but set the tooltip text where needed. (Tooltips different than the text have already been set on two of these buttons.)

RestartBloom ( string newInstallDir ) : void
RestoreOriginalButtonTexts ( ) : void
SaveOriginalButtonTexts ( ) : void
SaveOriginalWidthValues ( ) : void
SelectPage ( Control view ) : void
SetTabVisibility ( TabStripButton page, bool visible ) : void
SetupUILanguageMenu ( ) : void
ShrinkToStage1 ( ) : void
ShrinkToStage2 ( ) : void
ShrinkToStage3 ( ) : void
StartProblemReport ( object sender, EventArgs e ) : void
WorkspaceView_Load ( object sender, EventArgs e ) : void
WorkspaceView_Resize ( object sender, EventArgs e ) : void
_applicationUpdateCheckTimer_Tick ( object sender, EventArgs e ) : void
_checkForNewVersionMenuItem_Click ( object sender, EventArgs e ) : void
_makeASuggestionMenuItem_Click ( object sender, EventArgs e ) : void
_releaseNotesMenuItem_Click ( object sender, EventArgs e ) : void
_reportAProblemMenuItem_Click ( object sender, EventArgs e ) : void
_showLogMenuItem_Click ( object sender, EventArgs e ) : void
_tabStrip_BackColorChanged ( object sender, EventArgs e ) : void
_tabStrip_SelectedTabChanged ( object sender, SelectedTabChangedEventArgs e ) : void
_trainingVideosMenuItem_Click ( object sender, EventArgs e ) : void
_webSiteMenuItem_Click ( object sender, EventArgs e ) : void
buildingReaderTemplatesMenuItem_Click ( object sender, EventArgs e ) : void
keyBloomConceptsMenuItem_Click ( object sender, EventArgs e ) : void
toolStripMenuItem3_Click ( object sender, EventArgs e ) : void
usingReaderTemplatesMenuItem_Click ( object sender, EventArgs e ) : void

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

OpenCreateLibrary() public method

public OpenCreateLibrary ( ) : void
return void

SetStateOfNonPublishTabs() public method

public SetStateOfNonPublishTabs ( bool enable ) : void
enable bool
return void

ShortenStringToFit() public static method

Ensure that the TabStripItem or Control or Whatever is no wider than desired by truncating the Text as needed, with an ellipsis appended to show truncation has occurred.
Would this be a good library method somewhere? Where?
public static ShortenStringToFit ( string text, int maxWidth, int originalWidth, Font font, Graphics g ) : string
text string the string to shorten if necessary
maxWidth int the maximum item width allowed
originalWidth int the original item width (with the original string)
font System.Drawing.Font the font to use
g System.Drawing.Graphics the relevant Graphics object for drawing/measuring
return string

WorkspaceView() public method

public WorkspaceView ( Bloom.Workspace.WorkspaceModel model, Control libraryView, EditingView editingViewFactory, PublishView pdfViewFactory, CollectionSettingsDialog settingsDialogFactory, EditBookCommand editBookCommand, SendReceiveCommand sendReceiveCommand, SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent, SelectedTabChangedEvent selectedTabChangedEvent, LocalizationChangedEvent localizationChangedEvent, FeedbackDialog feedbackDialogFactory, ProblemReporterDialog problemReportDialogFactory, LocalizationManager localizationManager ) : System
model Bloom.Workspace.WorkspaceModel
libraryView System.Windows.Forms.Control
editingViewFactory Bloom.Edit.EditingView
pdfViewFactory Bloom.Publish.PublishView
settingsDialogFactory Bloom.Collection.CollectionSettingsDialog
editBookCommand EditBookCommand
sendReceiveCommand SendReceiveCommand
selectedTabAboutToChangeEvent SelectedTabAboutToChangeEvent
selectedTabChangedEvent SelectedTabChangedEvent
localizationChangedEvent LocalizationChangedEvent
feedbackDialogFactory FeedbackDialog
problemReportDialogFactory Bloom.MiscUI.ProblemReporterDialog
localizationManager LocalizationManager
return System

Property Details

DPIOfThisAccount public static property

public static float DPIOfThisAccount
return float