Replace tabs with spaces and fix more of remaining whitespace issues.

This commit is contained in:
Kirill Osenkov 2015-12-09 17:06:57 -08:00
parent 2e58e16808
commit ed4b8936c0
616 changed files with 28380 additions and 29156 deletions

View File

@ -247,7 +247,6 @@ namespace OpenLiveWriter.Test
editor.ChangeView(EditingMode.PlainText);
}
[DllImport("KERNEL32.DLL", CharSet=CharSet.Auto, EntryPoint="LoadLibrary")]
public static extern IntPtr LoadLibrary(String lpFileName);
}

View File

@ -301,11 +301,11 @@ namespace LocUtil
{
const string TEMPLATE = @"namespace OpenLiveWriter.Localization
{{
public enum {0}
{{
None,
{1}
}}
public enum {0}
{{
None,
{1}
}}
}}
";
@ -367,9 +367,9 @@ namespace LocUtil
else if (values == null)
{
const string DESC_TEMPLATE = @"/// <summary>
/// {0}
/// </summary>
{1}";
/// {0}
/// </summary>
{1}";
ArrayList descs = new ArrayList();
foreach (string command in commandList.ToArray())
{

View File

@ -6,8 +6,8 @@ using System.Windows.Forms;
namespace OpenLiveWriter.Api
{
public interface ILiveClipboardOptionsEditor
{
void EditLiveClipboardOptions(IWin32Window dialogOwner) ;
}
public interface ILiveClipboardOptionsEditor
{
void EditLiveClipboardOptions(IWin32Window dialogOwner) ;
}
}

View File

@ -10,129 +10,129 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Application control.
/// </summary>
public class ApplicationControl : System.Windows.Forms.UserControl, ICommandManager, ISelectionManager
{
/// <summary>
/// The set of active commands, keyed by command identifier.
/// </summary>
private Hashtable commandTable = new Hashtable();
/// <summary>
/// Application control.
/// </summary>
public class ApplicationControl : System.Windows.Forms.UserControl, ICommandManager, ISelectionManager
{
/// <summary>
/// The set of active commands, keyed by command identifier.
/// </summary>
private Hashtable commandTable = new Hashtable();
/// <summary>
/// The set of selected objects.
/// </summary>
private ArrayList selectionList = new ArrayList();
/// <summary>
/// The set of selected objects.
/// </summary>
private ArrayList selectionList = new ArrayList();
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Occurs when the selection changes.
/// </summary>
public event EventHandler SelectionChanged;
/// <summary>
/// Occurs when the selection changes.
/// </summary>
public event EventHandler SelectionChanged;
/// <summary>
/// Initializes a new instance of the ApplicationControl class.
/// </summary>
public ApplicationControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationControl class.
/// </summary>
public ApplicationControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
/// <interface>ICommandManager</interface>
/// <summary>
/// Activates the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to activate.</param>
public void ActivateCommandList(CommandList commandList)
{
// Add all the commands from this command provider to the command table.
foreach (Command command in commandList.Commands)
commandTable.Add(command.Identifier, command);
}
/// <interface>ICommandManager</interface>
/// <summary>
/// Activates the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to activate.</param>
public void ActivateCommandList(CommandList commandList)
{
// Add all the commands from this command provider to the command table.
foreach (Command command in commandList.Commands)
commandTable.Add(command.Identifier, command);
}
/// <interface>ICommandManager</interface>
/// <summary>
/// Deactivates the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to deactivate.</param>
public void DeactivateCommandList(CommandList commandList)
{
// Remove all the commands from this command provider from the command table.
foreach (Command command in commandList.Commands)
commandTable.Remove(command.Identifier);
}
/// <interface>ICommandManager</interface>
/// <summary>
/// Deactivates the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to deactivate.</param>
public void DeactivateCommandList(CommandList commandList)
{
// Remove all the commands from this command provider from the command table.
foreach (Command command in commandList.Commands)
commandTable.Remove(command.Identifier);
}
/// <interface>ISelectionManager</interface>
/// <summary>
/// Clears the current selection.
/// </summary>
public void ClearSelection()
{
// Clear the selection list.
selectionList.Clear();
/// <interface>ISelectionManager</interface>
/// <summary>
/// Clears the current selection.
/// </summary>
public void ClearSelection()
{
// Clear the selection list.
selectionList.Clear();
// Raise the SelectionChanged event.
OnSelectionChanged(EventArgs.Empty);
}
// Raise the SelectionChanged event.
OnSelectionChanged(EventArgs.Empty);
}
/// <summary>
/// Raises the SelectionChanged event.
/// </summary>
/// <param name="e">And EventArgs that contains the event data.</param>
protected virtual void OnSelectionChanged(EventArgs e)
{
if (SelectionChanged != null)
SelectionChanged(this, e);
}
/// <summary>
/// Raises the SelectionChanged event.
/// </summary>
/// <param name="e">And EventArgs that contains the event data.</param>
protected virtual void OnSelectionChanged(EventArgs e)
{
if (SelectionChanged != null)
SelectionChanged(this, e);
}
/// <interface>ISelectionManager</interface>
/// <summary>
/// Sets the selection.
/// </summary>
/// <param name="selectableObject">The ISelectableObject value to select.</param>
public void SetSelection(ISelectableObject selectableObject)
{
}
/// <interface>ISelectionManager</interface>
/// <summary>
/// Sets the selection.
/// </summary>
/// <param name="selectableObject">The ISelectableObject value to select.</param>
public void SetSelection(ISelectableObject selectableObject)
{
}
/// <interface>ISelectionManager</interface>
/// <summary>
/// Sets the selection.
/// </summary>
/// <param name="selectableObject">The array of ISelectableObject values to select.</param>
public void SetSelection(ISelectableObject[] selectableObjects)
{
}
}
/// <interface>ISelectionManager</interface>
/// <summary>
/// Sets the selection.
/// </summary>
/// <param name="selectableObject">The array of ISelectableObject values to select.</param>
public void SetSelection(ISelectableObject[] selectableObjects)
{
}
}
}

View File

@ -5,16 +5,16 @@ using System;
namespace Project31.ApplicationFramework
{
/// <summary>
/// ApplicationGlobalContext for for the ApplicationFramework.
/// </summary>
public class ApplicationGlobalContext
{
/// <summary>
/// Initializes a new instance of the ApplicationGlobalContext class.
/// </summary>
private ApplicationGlobalContext()
{
}
}
/// <summary>
/// ApplicationGlobalContext for for the ApplicationFramework.
/// </summary>
public class ApplicationGlobalContext
{
/// <summary>
/// Initializes a new instance of the ApplicationGlobalContext class.
/// </summary>
private ApplicationGlobalContext()
{
}
}
}

View File

@ -10,85 +10,85 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleBlue : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public class ApplicationStyleBlue : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ApplicationStyleBlue()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public ApplicationStyleBlue()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleBlue
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(207)), ((System.Byte)(227)), ((System.Byte)(253)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.InactiveSelectionColor = System.Drawing.SystemColors.Control;
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(195)), ((System.Byte)(215)), ((System.Byte)(249)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(180)), ((System.Byte)(215)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(166)), ((System.Byte)(187)), ((System.Byte)(223)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(148)), ((System.Byte)(173)), ((System.Byte)(222)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(213)), ((System.Byte)(249)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(174)), ((System.Byte)(213)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(223)), ((System.Byte)(247)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleBlue
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(207)), ((System.Byte)(227)), ((System.Byte)(253)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.InactiveSelectionColor = System.Drawing.SystemColors.Control;
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(195)), ((System.Byte)(215)), ((System.Byte)(249)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(180)), ((System.Byte)(215)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(166)), ((System.Byte)(187)), ((System.Byte)(223)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(148)), ((System.Byte)(173)), ((System.Byte)(222)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(213)), ((System.Byte)(249)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(174)), ((System.Byte)(213)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(223)), ((System.Byte)(247)));
}
#endregion
}
}
#endregion
}
}

View File

@ -10,81 +10,81 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleBronze : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public class ApplicationStyleBronze : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ApplicationStyleBronze()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public ApplicationStyleBronze()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleBronze
//
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(223)), ((System.Byte)(221)), ((System.Byte)(192)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(240)), ((System.Byte)(240)), ((System.Byte)(226)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(172)), ((System.Byte)(172)), ((System.Byte)(133)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(200)), ((System.Byte)(173)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(172)), ((System.Byte)(172)), ((System.Byte)(133)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(230)), ((System.Byte)(230)), ((System.Byte)(220)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(241)), ((System.Byte)(241)), ((System.Byte)(227)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(200)), ((System.Byte)(173)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(238)), ((System.Byte)(238)), ((System.Byte)(222)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleBronze
//
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(223)), ((System.Byte)(221)), ((System.Byte)(192)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(240)), ((System.Byte)(240)), ((System.Byte)(226)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(172)), ((System.Byte)(172)), ((System.Byte)(133)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(200)), ((System.Byte)(173)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(172)), ((System.Byte)(172)), ((System.Byte)(133)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(230)), ((System.Byte)(230)), ((System.Byte)(220)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(241)), ((System.Byte)(241)), ((System.Byte)(227)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(200)), ((System.Byte)(173)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(222)), ((System.Byte)(220)), ((System.Byte)(191)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(238)), ((System.Byte)(238)), ((System.Byte)(222)));
}
#endregion
}
}
#endregion
}
}

View File

@ -10,85 +10,85 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleGreen : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public class ApplicationStyleGreen : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public ApplicationStyleGreen()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public ApplicationStyleGreen()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleGreen
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.InactiveSelectionColor = System.Drawing.SystemColors.Control;
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(236)), ((System.Byte)(230)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(175)), ((System.Byte)(213)), ((System.Byte)(205)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(212)), ((System.Byte)(204)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleGreen
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.InactiveSelectionColor = System.Drawing.SystemColors.Control;
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(236)), ((System.Byte)(230)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(175)), ((System.Byte)(213)), ((System.Byte)(205)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(212)), ((System.Byte)(204)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
}
#endregion
}
}
#endregion
}
}

View File

@ -7,107 +7,107 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleLavender : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public class ApplicationStyleLavender : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Initializes a new insance of the ApplicationStyleSienna class.
/// </summary>
public ApplicationStyleLavender()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new insance of the ApplicationStyleSienna class.
/// </summary>
public ApplicationStyleLavender()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleLavender
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(129)), ((System.Byte)(129)), ((System.Byte)(197)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(213)), ((System.Byte)(214)), ((System.Byte)(238)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(127)), ((System.Byte)(177)));
this.DisplayName = "Lavender";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(238)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(182)), ((System.Byte)(178)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(198)), ((System.Byte)(218)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(178)), ((System.Byte)(181)), ((System.Byte)(221)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(178)), ((System.Byte)(181)), ((System.Byte)(221)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(163)), ((System.Byte)(158)), ((System.Byte)(217)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(127)), ((System.Byte)(177)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(211)), ((System.Byte)(215)), ((System.Byte)(219)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(155)), ((System.Byte)(209)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(211)), ((System.Byte)(232)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(163)), ((System.Byte)(158)), ((System.Byte)(217)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(238)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleLavender
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(129)), ((System.Byte)(129)), ((System.Byte)(197)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(213)), ((System.Byte)(214)), ((System.Byte)(238)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(127)), ((System.Byte)(177)));
this.DisplayName = "Lavender";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(238)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(182)), ((System.Byte)(178)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(198)), ((System.Byte)(218)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(178)), ((System.Byte)(181)), ((System.Byte)(221)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(178)), ((System.Byte)(181)), ((System.Byte)(221)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(163)), ((System.Byte)(158)), ((System.Byte)(217)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(127)), ((System.Byte)(177)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(211)), ((System.Byte)(215)), ((System.Byte)(219)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(155)), ((System.Byte)(209)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(211)), ((System.Byte)(232)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(163)), ((System.Byte)(158)), ((System.Byte)(217)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(186)), ((System.Byte)(188)), ((System.Byte)(226)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(238)));
}
#endregion
}
#endregion
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Lavender.png");
}
}
}
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Lavender.png");
}
}
}
}

View File

@ -6,63 +6,60 @@ using OpenLiveWriter.ApplicationFramework.Preferences;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
/// <summary>
/// Provides application management service.
/// </summary>
public sealed class ApplicationStyleManager
{
/// <summary>
/// Provides application management service.
/// </summary>
public sealed class ApplicationStyleManager
{
/// <summary>
/// Gets or sets the ApplicationStyle object
/// </summary>
public static ApplicationStyle ApplicationStyle
{
get
{
return ApplicationManager.ApplicationStyle;
}
}
/// <summary>
/// Gets or sets the ApplicationStyle object
/// </summary>
public static ApplicationStyle ApplicationStyle
{
get
{
return ApplicationManager.ApplicationStyle;
}
}
#region ApplicatonStyle access/monitoring
#region ApplicatonStyle access/monitoring
public static event EventHandler ApplicationStyleChanged
{
add
{
ApplicationStylePreferences.PreferencesChanged += value ;
}
remove
{
ApplicationStylePreferences.PreferencesChanged -= value ;
}
}
public static event EventHandler ApplicationStyleChanged
{
add
{
ApplicationStylePreferences.PreferencesChanged += value ;
}
remove
{
ApplicationStylePreferences.PreferencesChanged -= value ;
}
}
public static void CheckForApplicationStyleChanges()
{
ApplicationStylePreferences.CheckForChanges() ;
}
public static void CheckForApplicationStyleChanges()
{
ApplicationStylePreferences.CheckForChanges() ;
}
/// Get the ApplicationStylePreferences instance for the current thread
/// </summary>
private static ApplicationStylePreferences ApplicationStylePreferences
{
get
{
if (_applicationStylePreferences == null)
{
_applicationStylePreferences = Activator.CreateInstance(typeof(ApplicationStylePreferences), new object[] { true } ) as ApplicationStylePreferences ;
}
return _applicationStylePreferences;
}
}
[ThreadStatic]
private static ApplicationStylePreferences _applicationStylePreferences ;
/// Get the ApplicationStylePreferences instance for the current thread
/// </summary>
private static ApplicationStylePreferences ApplicationStylePreferences
{
get
{
if (_applicationStylePreferences == null)
{
_applicationStylePreferences = Activator.CreateInstance(typeof(ApplicationStylePreferences), new object[] { true } ) as ApplicationStylePreferences ;
}
return _applicationStylePreferences;
}
}
[ThreadStatic]
private static ApplicationStylePreferences _applicationStylePreferences ;
#endregion
#endregion
}
}
}

View File

@ -10,144 +10,144 @@ using OpenLiveWriter.ApplicationFramework.Preferences ;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
/// <summary>
/// Appearance preferences.
/// </summary>
public class ApplicationStylePreferences : OpenLiveWriter.ApplicationFramework.Preferences.Preferences
{
#region Static & Constant Declarations
/// <summary>
/// Appearance preferences.
/// </summary>
public class ApplicationStylePreferences : OpenLiveWriter.ApplicationFramework.Preferences.Preferences
{
#region Static & Constant Declarations
/// <summary>
/// The AppearancePreferences sub-key.
/// </summary>
private const string PREFERENCES_SUB_KEY = "Appearance";
/// <summary>
/// The AppearancePreferences sub-key.
/// </summary>
private const string PREFERENCES_SUB_KEY = "Appearance";
/// <summary>
/// The ApplicationStyleTypeName key.
/// </summary>
private const string APPLICATION_STYLE_TYPE_NAME = "ApplicationStyleTypeName";
/// <summary>
/// The ApplicationStyleTypeName key.
/// </summary>
private const string APPLICATION_STYLE_TYPE_NAME = "ApplicationStyleTypeName";
#endregion Static & Constant Declarations
#endregion Static & Constant Declarations
#region Private Member Variables
#region Private Member Variables
/// <summary>
/// The ApplicationStyle Type.
/// </summary>
private Type applicationStyleType;
/// <summary>
/// The ApplicationStyle Type.
/// </summary>
private Type applicationStyleType;
#endregion
#endregion
#region Class Initialization & Termination
#region Class Initialization & Termination
/// <summary>
/// Initializes a new instance of the AppearancePreferences class.
/// </summary>
public ApplicationStylePreferences(bool monitorChanges) : base(PREFERENCES_SUB_KEY, monitorChanges)
{
}
/// <summary>
/// Initializes a new instance of the AppearancePreferences class.
/// </summary>
public ApplicationStylePreferences(bool monitorChanges) : base(PREFERENCES_SUB_KEY, monitorChanges)
{
}
public ApplicationStylePreferences() : this(false)
{
}
public ApplicationStylePreferences() : this(false)
{
}
#endregion Class Initialization & Termination
#endregion Class Initialization & Termination
#region Public Properties
#region Public Properties
/// <summary>
/// Gets or sets the ApplicationStyle Type.
/// </summary>
public Type ApplicationStyleType
{
get
{
return typeof(ApplicationStyleSkyBlue);
/// <summary>
/// Gets or sets the ApplicationStyle Type.
/// </summary>
public Type ApplicationStyleType
{
get
{
return typeof(ApplicationStyleSkyBlue);
// JJA: Decided to only support SkyBlue so we could make the
// design of the sidebar more straightforward
//return applicationStyleType;
}
set
{
if (applicationStyleType != value)
{
applicationStyleType = value;
Modified();
}
}
}
// JJA: Decided to only support SkyBlue so we could make the
// design of the sidebar more straightforward
//return applicationStyleType;
}
set
{
if (applicationStyleType != value)
{
applicationStyleType = value;
Modified();
}
}
}
#endregion Public Properties
#endregion Public Properties
#region Protected Methods
#region Protected Methods
/// <summary>
/// Loads preferences.
/// </summary>
protected override void LoadPreferences()
{
// Obtain the type name of the application style. If it's null, use SkyBlue.
string name = SettingsPersisterHelper.GetString(APPLICATION_STYLE_TYPE_NAME, "ApplicationStyleSkyBlue");
/// <summary>
/// Loads preferences.
/// </summary>
protected override void LoadPreferences()
{
// Obtain the type name of the application style. If it's null, use SkyBlue.
string name = SettingsPersisterHelper.GetString(APPLICATION_STYLE_TYPE_NAME, "ApplicationStyleSkyBlue");
// strip "AplicationStyle" preface (for legacy settings format support)
const string APPLICATION_STYLE = "ApplicationStyle";
if ( name.StartsWith(APPLICATION_STYLE) )
name = name.Substring(APPLICATION_STYLE.Length) ;
// strip "AplicationStyle" preface (for legacy settings format support)
const string APPLICATION_STYLE = "ApplicationStyle";
if ( name.StartsWith(APPLICATION_STYLE) )
name = name.Substring(APPLICATION_STYLE.Length) ;
switch(name)
{
case "SkyBlue":
applicationStyleType = typeof(ApplicationStyleSkyBlue);
break;
case "Lavender":
applicationStyleType = typeof(ApplicationStyleLavender);
break;
case "Sienna":
applicationStyleType = typeof(ApplicationStyleSienna);
break;
case "Sterling":
applicationStyleType = typeof(ApplicationStyleSterling);
break;
case "Wintergreen":
applicationStyleType = typeof(ApplicationStyleWintergreen);
break;
default:
Trace.Fail("Unexpected application style type: " + name);
applicationStyleType = typeof(ApplicationStyleSkyBlue);
break;
}
switch(name)
{
case "SkyBlue":
applicationStyleType = typeof(ApplicationStyleSkyBlue);
break;
case "Lavender":
applicationStyleType = typeof(ApplicationStyleLavender);
break;
case "Sienna":
applicationStyleType = typeof(ApplicationStyleSienna);
break;
case "Sterling":
applicationStyleType = typeof(ApplicationStyleSterling);
break;
case "Wintergreen":
applicationStyleType = typeof(ApplicationStyleWintergreen);
break;
default:
Trace.Fail("Unexpected application style type: " + name);
applicationStyleType = typeof(ApplicationStyleSkyBlue);
break;
}
// Set the new application style.
if (ApplicationManager.ApplicationStyle.GetType() != applicationStyleType)
ApplicationManager.ApplicationStyle = Activator.CreateInstance(applicationStyleType) as ApplicationStyle;
}
// Set the new application style.
if (ApplicationManager.ApplicationStyle.GetType() != applicationStyleType)
ApplicationManager.ApplicationStyle = Activator.CreateInstance(applicationStyleType) as ApplicationStyle;
}
/// <summary>
/// Saves preferences.
/// </summary>
protected override void SavePreferences()
{
string name = null;
if ( applicationStyleType == typeof(ApplicationStyleSkyBlue) )
name = "SkyBlue";
else if ( applicationStyleType == typeof(ApplicationStyleLavender) )
name = "Lavender";
else if ( applicationStyleType == typeof(ApplicationStyleSienna) )
name = "Sienna";
else if ( applicationStyleType == typeof(ApplicationStyleSterling) )
name = "Sterling";
else if ( applicationStyleType == typeof(ApplicationStyleWintergreen) )
name = "Wintergreen";
else
{
Trace.Fail("Unexpected application style: " + applicationStyleType.Name);
name = "SkyBlue";
}
/// <summary>
/// Saves preferences.
/// </summary>
protected override void SavePreferences()
{
string name = null;
if ( applicationStyleType == typeof(ApplicationStyleSkyBlue) )
name = "SkyBlue";
else if ( applicationStyleType == typeof(ApplicationStyleLavender) )
name = "Lavender";
else if ( applicationStyleType == typeof(ApplicationStyleSienna) )
name = "Sienna";
else if ( applicationStyleType == typeof(ApplicationStyleSterling) )
name = "Sterling";
else if ( applicationStyleType == typeof(ApplicationStyleWintergreen) )
name = "Wintergreen";
else
{
Trace.Fail("Unexpected application style: " + applicationStyleType.Name);
name = "SkyBlue";
}
SettingsPersisterHelper.SetString(APPLICATION_STYLE_TYPE_NAME, name);
}
SettingsPersisterHelper.SetString(APPLICATION_STYLE_TYPE_NAME, name);
}
#endregion Protected Methods
}
#endregion Protected Methods
}
}

View File

@ -9,245 +9,245 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
/// <summary>
/// Appearance preferences panel.
/// </summary>
public class ApplicationStylePreferencesPanel : PreferencesPanel
{
#region Static & Constant Declarations
/// <summary>
/// Appearance preferences panel.
/// </summary>
public class ApplicationStylePreferencesPanel : PreferencesPanel
{
#region Static & Constant Declarations
/// <summary>
/// The types of ApplicationStyle objects provided by the system.
/// </summary>
private Type[] applicationStyleTypes = new Type[]
{
typeof(ApplicationStyleSkyBlue),
};
/// <summary>
/// The types of ApplicationStyle objects provided by the system.
/// </summary>
private Type[] applicationStyleTypes = new Type[]
{
typeof(ApplicationStyleSkyBlue),
};
#endregion Static & Constant Declarations
#endregion Static & Constant Declarations
#region Private Member Variables
#region Private Member Variables
/// <summary>
/// The AppearancePreferences object.
/// </summary>
private ApplicationStylePreferences applicationStylePreferences;
/// <summary>
/// The AppearancePreferences object.
/// </summary>
private ApplicationStylePreferences applicationStylePreferences;
#endregion Private Member Variables
#endregion Private Member Variables
#region Windows Form Designer generated code
#region Windows Form Designer generated code
private System.Windows.Forms.FontDialog fontDialog;
private System.Windows.Forms.GroupBox groupBoxTheme;
private System.Windows.Forms.Label labelFolderNameFont;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBoxApplicationStyles;
private System.Windows.Forms.PictureBox pictureBoxPreview;
private System.ComponentModel.Container components = null;
private System.Windows.Forms.FontDialog fontDialog;
private System.Windows.Forms.GroupBox groupBoxTheme;
private System.Windows.Forms.Label labelFolderNameFont;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBoxApplicationStyles;
private System.Windows.Forms.PictureBox pictureBoxPreview;
private System.ComponentModel.Container components = null;
#endregion Windows Form Designer generated code
#endregion Windows Form Designer generated code
#region Class Initialization & Termination
#region Class Initialization & Termination
/// <summary>
/// Initializes a new instance of the AppearancePreferencesPanel class.
/// </summary>
public ApplicationStylePreferencesPanel() : this(new ApplicationStylePreferences(false))
{
}
/// <summary>
/// Initializes a new instance of the AppearancePreferencesPanel class.
/// </summary>
public ApplicationStylePreferencesPanel() : this(new ApplicationStylePreferences(false))
{
}
public ApplicationStylePreferencesPanel(ApplicationStylePreferences preferences)
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
public ApplicationStylePreferencesPanel(ApplicationStylePreferences preferences)
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// Set the panel bitmap.
PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.ApplicationStyleSmall.png");
// Set the panel bitmap.
PanelBitmap = ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.ApplicationStyleSmall.png");
// Instantiate the MicroViewPreferences object and initialize the controls.
applicationStylePreferences = preferences;
applicationStylePreferences.PreferencesModified += new EventHandler(appearancePreferences_PreferencesModified);
// Instantiate the MicroViewPreferences object and initialize the controls.
applicationStylePreferences = preferences;
applicationStylePreferences.PreferencesModified += new EventHandler(appearancePreferences_PreferencesModified);
// Initialize the application styles listbox.
InitializeApplicationStyles();
}
// Initialize the application styles listbox.
InitializeApplicationStyles();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion Class Initialization & Termination
#endregion Class Initialization & Termination
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBoxTheme = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.pictureBoxPreview = new System.Windows.Forms.PictureBox();
this.labelFolderNameFont = new System.Windows.Forms.Label();
this.listBoxApplicationStyles = new System.Windows.Forms.ListBox();
this.fontDialog = new System.Windows.Forms.FontDialog();
this.groupBoxTheme.SuspendLayout();
this.SuspendLayout();
//
// groupBoxTheme
//
this.groupBoxTheme.Controls.Add(this.label1);
this.groupBoxTheme.Controls.Add(this.pictureBoxPreview);
this.groupBoxTheme.Controls.Add(this.labelFolderNameFont);
this.groupBoxTheme.Controls.Add(this.listBoxApplicationStyles);
this.groupBoxTheme.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBoxTheme.Location = new System.Drawing.Point(8, 32);
this.groupBoxTheme.Name = "groupBoxTheme";
this.groupBoxTheme.Size = new System.Drawing.Size(354, 282);
this.groupBoxTheme.TabIndex = 1;
this.groupBoxTheme.TabStop = false;
this.groupBoxTheme.Text = "Color";
//
// label1
//
this.label1.BackColor = System.Drawing.SystemColors.Control;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.label1.Location = new System.Drawing.Point(150, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(132, 18);
this.label1.TabIndex = 2;
this.label1.Text = "Preview:";
//
// pictureBoxPreview
//
this.pictureBoxPreview.BackColor = System.Drawing.SystemColors.Control;
this.pictureBoxPreview.Location = new System.Drawing.Point(150, 36);
this.pictureBoxPreview.Name = "pictureBoxPreview";
this.pictureBoxPreview.Size = new System.Drawing.Size(192, 235);
this.pictureBoxPreview.TabIndex = 2;
this.pictureBoxPreview.TabStop = false;
//
// labelFolderNameFont
//
this.labelFolderNameFont.BackColor = System.Drawing.SystemColors.Control;
this.labelFolderNameFont.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.labelFolderNameFont.Location = new System.Drawing.Point(10, 18);
this.labelFolderNameFont.Name = "labelFolderNameFont";
this.labelFolderNameFont.Size = new System.Drawing.Size(132, 18);
this.labelFolderNameFont.TabIndex = 0;
this.labelFolderNameFont.Text = "&Color scheme:";
//
// listBoxApplicationStyles
//
this.listBoxApplicationStyles.DisplayMember = "DisplayName";
this.listBoxApplicationStyles.IntegralHeight = false;
this.listBoxApplicationStyles.Location = new System.Drawing.Point(10, 36);
this.listBoxApplicationStyles.Name = "listBoxApplicationStyles";
this.listBoxApplicationStyles.Size = new System.Drawing.Size(130, 235);
this.listBoxApplicationStyles.TabIndex = 1;
this.listBoxApplicationStyles.SelectedIndexChanged += new System.EventHandler(this.listBoxApplicationStyles_SelectedIndexChanged);
//
// fontDialog
//
this.fontDialog.AllowScriptChange = false;
this.fontDialog.AllowVerticalFonts = false;
this.fontDialog.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.fontDialog.FontMustExist = true;
this.fontDialog.ScriptsOnly = true;
this.fontDialog.ShowEffects = false;
//
// AppearancePreferencesPanel
//
this.Controls.Add(this.groupBoxTheme);
this.Name = "AppearancePreferencesPanel";
this.PanelName = "Appearance";
this.Controls.SetChildIndex(this.groupBoxTheme, 0);
this.groupBoxTheme.ResumeLayout(false);
this.ResumeLayout(false);
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBoxTheme = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.pictureBoxPreview = new System.Windows.Forms.PictureBox();
this.labelFolderNameFont = new System.Windows.Forms.Label();
this.listBoxApplicationStyles = new System.Windows.Forms.ListBox();
this.fontDialog = new System.Windows.Forms.FontDialog();
this.groupBoxTheme.SuspendLayout();
this.SuspendLayout();
//
// groupBoxTheme
//
this.groupBoxTheme.Controls.Add(this.label1);
this.groupBoxTheme.Controls.Add(this.pictureBoxPreview);
this.groupBoxTheme.Controls.Add(this.labelFolderNameFont);
this.groupBoxTheme.Controls.Add(this.listBoxApplicationStyles);
this.groupBoxTheme.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBoxTheme.Location = new System.Drawing.Point(8, 32);
this.groupBoxTheme.Name = "groupBoxTheme";
this.groupBoxTheme.Size = new System.Drawing.Size(354, 282);
this.groupBoxTheme.TabIndex = 1;
this.groupBoxTheme.TabStop = false;
this.groupBoxTheme.Text = "Color";
//
// label1
//
this.label1.BackColor = System.Drawing.SystemColors.Control;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.label1.Location = new System.Drawing.Point(150, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(132, 18);
this.label1.TabIndex = 2;
this.label1.Text = "Preview:";
//
// pictureBoxPreview
//
this.pictureBoxPreview.BackColor = System.Drawing.SystemColors.Control;
this.pictureBoxPreview.Location = new System.Drawing.Point(150, 36);
this.pictureBoxPreview.Name = "pictureBoxPreview";
this.pictureBoxPreview.Size = new System.Drawing.Size(192, 235);
this.pictureBoxPreview.TabIndex = 2;
this.pictureBoxPreview.TabStop = false;
//
// labelFolderNameFont
//
this.labelFolderNameFont.BackColor = System.Drawing.SystemColors.Control;
this.labelFolderNameFont.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.labelFolderNameFont.Location = new System.Drawing.Point(10, 18);
this.labelFolderNameFont.Name = "labelFolderNameFont";
this.labelFolderNameFont.Size = new System.Drawing.Size(132, 18);
this.labelFolderNameFont.TabIndex = 0;
this.labelFolderNameFont.Text = "&Color scheme:";
//
// listBoxApplicationStyles
//
this.listBoxApplicationStyles.DisplayMember = "DisplayName";
this.listBoxApplicationStyles.IntegralHeight = false;
this.listBoxApplicationStyles.Location = new System.Drawing.Point(10, 36);
this.listBoxApplicationStyles.Name = "listBoxApplicationStyles";
this.listBoxApplicationStyles.Size = new System.Drawing.Size(130, 235);
this.listBoxApplicationStyles.TabIndex = 1;
this.listBoxApplicationStyles.SelectedIndexChanged += new System.EventHandler(this.listBoxApplicationStyles_SelectedIndexChanged);
//
// fontDialog
//
this.fontDialog.AllowScriptChange = false;
this.fontDialog.AllowVerticalFonts = false;
this.fontDialog.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.fontDialog.FontMustExist = true;
this.fontDialog.ScriptsOnly = true;
this.fontDialog.ShowEffects = false;
//
// AppearancePreferencesPanel
//
this.Controls.Add(this.groupBoxTheme);
this.Name = "AppearancePreferencesPanel";
this.PanelName = "Appearance";
this.Controls.SetChildIndex(this.groupBoxTheme, 0);
this.groupBoxTheme.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
}
#endregion
#region Public Methods
#region Public Methods
/// <summary>
/// Saves the PreferencesPanel.
/// </summary>
public override void Save()
{
if (applicationStylePreferences.IsModified())
applicationStylePreferences.Save();
}
/// <summary>
/// Saves the PreferencesPanel.
/// </summary>
public override void Save()
{
if (applicationStylePreferences.IsModified())
applicationStylePreferences.Save();
}
#endregion Public Methods
#endregion Public Methods
#region Private Methods
#region Private Methods
/// <summary>
/// Initialize the application styles listbox.
/// </summary>
private void InitializeApplicationStyles()
{
// Add each of the available styles.
foreach (Type type in applicationStyleTypes)
{
ApplicationStyle applicationStyle;
try
{
applicationStyle = Activator.CreateInstance(type) as ApplicationStyle;
listBoxApplicationStyles.Items.Add(applicationStyle);
if (applicationStyle.GetType() == ApplicationManager.ApplicationStyle.GetType())
listBoxApplicationStyles.SelectedItem = applicationStyle;
}
catch (Exception e)
{
Debug.Fail("Error loading ApplicationStyle "+type.ToString(), e.StackTrace.ToString());
}
}
}
/// <summary>
/// Initialize the application styles listbox.
/// </summary>
private void InitializeApplicationStyles()
{
// Add each of the available styles.
foreach (Type type in applicationStyleTypes)
{
ApplicationStyle applicationStyle;
try
{
applicationStyle = Activator.CreateInstance(type) as ApplicationStyle;
listBoxApplicationStyles.Items.Add(applicationStyle);
if (applicationStyle.GetType() == ApplicationManager.ApplicationStyle.GetType())
listBoxApplicationStyles.SelectedItem = applicationStyle;
}
catch (Exception e)
{
Debug.Fail("Error loading ApplicationStyle "+type.ToString(), e.StackTrace.ToString());
}
}
}
#endregion Private Methods
#endregion Private Methods
#region Private Event Handlers
#region Private Event Handlers
/// <summary>
/// appearancePreferences_PreferencesModified event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">An EventArgs that contains the event data.</param>
private void appearancePreferences_PreferencesModified(object sender, EventArgs e)
{
OnModified(EventArgs.Empty);
}
/// <summary>
/// appearancePreferences_PreferencesModified event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">An EventArgs that contains the event data.</param>
private void appearancePreferences_PreferencesModified(object sender, EventArgs e)
{
OnModified(EventArgs.Empty);
}
/// <summary>
/// listBoxApplicationStyles_SelectedIndexChanged event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">An EventArgs that contains the event data.</param>
private void listBoxApplicationStyles_SelectedIndexChanged(object sender, EventArgs e)
{
// If the list box is empty, just ignore the event.
if (listBoxApplicationStyles.Items.Count == 0)
return;
/// <summary>
/// listBoxApplicationStyles_SelectedIndexChanged event handler.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">An EventArgs that contains the event data.</param>
private void listBoxApplicationStyles_SelectedIndexChanged(object sender, EventArgs e)
{
// If the list box is empty, just ignore the event.
if (listBoxApplicationStyles.Items.Count == 0)
return;
// Update state.
ApplicationStyle applicationStyle = (ApplicationStyle)listBoxApplicationStyles.SelectedItem;
pictureBoxPreview.Image = applicationStyle.PreviewImage;
applicationStylePreferences.ApplicationStyleType = applicationStyle.GetType();
}
// Update state.
ApplicationStyle applicationStyle = (ApplicationStyle)listBoxApplicationStyles.SelectedItem;
pictureBoxPreview.Image = applicationStyle.PreviewImage;
applicationStylePreferences.ApplicationStyleType = applicationStyle.GetType();
}
#endregion Private Event Handlers
}
#endregion Private Event Handlers
}
}

View File

@ -7,107 +7,107 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleSienna : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public class ApplicationStyleSienna : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Initializes a new insance of the ApplicationStyleSienna class.
/// </summary>
public ApplicationStyleSienna()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new insance of the ApplicationStyleSienna class.
/// </summary>
public ApplicationStyleSienna()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleSienna
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(250)), ((System.Byte)(245)), ((System.Byte)(202)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.DisplayName = "Sienna";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(229)), ((System.Byte)(225)), ((System.Byte)(184)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.White;
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(222)), ((System.Byte)(178)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(194)), ((System.Byte)(149)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(171)), ((System.Byte)(166)), ((System.Byte)(120)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(203)), ((System.Byte)(198)), ((System.Byte)(152)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(250)), ((System.Byte)(245)), ((System.Byte)(202)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(194)), ((System.Byte)(149)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleSienna
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(250)), ((System.Byte)(245)), ((System.Byte)(202)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.DisplayName = "Sienna";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(229)), ((System.Byte)(225)), ((System.Byte)(184)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.White;
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(222)), ((System.Byte)(178)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(161)), ((System.Byte)(156)), ((System.Byte)(112)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(194)), ((System.Byte)(149)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(171)), ((System.Byte)(166)), ((System.Byte)(120)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(208)), ((System.Byte)(181)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(203)), ((System.Byte)(198)), ((System.Byte)(152)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(250)), ((System.Byte)(245)), ((System.Byte)(202)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(199)), ((System.Byte)(194)), ((System.Byte)(149)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(226)), ((System.Byte)(221)), ((System.Byte)(176)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(224)), ((System.Byte)(202)));
}
#endregion
}
#endregion
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Sienna.png");
}
}
}
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Sienna.png");
}
}
}
}

View File

@ -7,104 +7,104 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleSterling : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public class ApplicationStyleSterling : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public ApplicationStyleSterling()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public ApplicationStyleSterling()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleSterling
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(146)), ((System.Byte)(155)), ((System.Byte)(174)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(219)), ((System.Byte)(224)), ((System.Byte)(229)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(230)), ((System.Byte)(234)), ((System.Byte)(238)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.DisplayName = "Sterling";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(208)), ((System.Byte)(212)), ((System.Byte)(220)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(194)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(205)), ((System.Byte)(206)), ((System.Byte)(215)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(211)), ((System.Byte)(215)), ((System.Byte)(219)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(191)), ((System.Byte)(199)), ((System.Byte)(206)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(223)), ((System.Byte)(228)), ((System.Byte)(234)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(217)), ((System.Byte)(222)), ((System.Byte)(227)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(217)), ((System.Byte)(222)), ((System.Byte)(227)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(237)), ((System.Byte)(240)), ((System.Byte)(243)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleSterling
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(146)), ((System.Byte)(155)), ((System.Byte)(174)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(219)), ((System.Byte)(224)), ((System.Byte)(229)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(230)), ((System.Byte)(234)), ((System.Byte)(238)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.DisplayName = "Sterling";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(208)), ((System.Byte)(212)), ((System.Byte)(220)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(194)), ((System.Byte)(202)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(205)), ((System.Byte)(206)), ((System.Byte)(215)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(157)), ((System.Byte)(161)), ((System.Byte)(167)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(211)), ((System.Byte)(215)), ((System.Byte)(219)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(191)), ((System.Byte)(199)), ((System.Byte)(206)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(223)), ((System.Byte)(228)), ((System.Byte)(234)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(198)), ((System.Byte)(203)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(217)), ((System.Byte)(222)), ((System.Byte)(227)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(217)), ((System.Byte)(222)), ((System.Byte)(227)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(237)), ((System.Byte)(240)), ((System.Byte)(243)));
}
#endregion
}
#endregion
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Sterling.png");
}
}
}
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Sterling.png");
}
}
}
}

View File

@ -7,104 +7,104 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework.ApplicationStyles
{
public class ApplicationStyleWintergreen : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public class ApplicationStyleWintergreen : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public ApplicationStyleWintergreen()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public ApplicationStyleWintergreen()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleWintergreen
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.DisplayName = "Wintergreen";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(198)), ((System.Byte)(215)), ((System.Byte)(212)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(217)), ((System.Byte)(215)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(236)), ((System.Byte)(230)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(175)), ((System.Byte)(213)), ((System.Byte)(205)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(212)), ((System.Byte)(204)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// ApplicationStyleWintergreen
//
this.ActiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.DisplayName = "Wintergreen";
this.InactiveSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(198)), ((System.Byte)(215)), ((System.Byte)(212)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(202)), ((System.Byte)(217)), ((System.Byte)(215)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.MenuBitmapAreaColor = System.Drawing.Color.FromArgb(((System.Byte)(197)), ((System.Byte)(236)), ((System.Byte)(230)));
this.MenuSelectionColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(168)), ((System.Byte)(163)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(175)), ((System.Byte)(213)), ((System.Byte)(205)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(212)), ((System.Byte)(204)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(201)), ((System.Byte)(238)), ((System.Byte)(231)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(164)), ((System.Byte)(203)), ((System.Byte)(197)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(234)), ((System.Byte)(228)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.ToolWindowBackgroundColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(72)), ((System.Byte)(100)), ((System.Byte)(165)));
this.ToolWindowTitleBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(94)), ((System.Byte)(131)), ((System.Byte)(200)));
this.ToolWindowTitleBarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.ToolWindowTitleBarTextColor = System.Drawing.Color.White;
this.ToolWindowTitleBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(126)), ((System.Byte)(166)), ((System.Byte)(237)));
this.WindowColor = System.Drawing.Color.White;
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(204)), ((System.Byte)(224)), ((System.Byte)(221)));
}
#endregion
}
#endregion
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Wintergreen.png");
}
}
}
/// <summary>
/// Gets or sets the preview image of the ApplicationStyle.
/// </summary>
public override Image PreviewImage
{
get
{
return ResourceHelper.LoadAssemblyResourceBitmap("ApplicationStyles.Images.Wintergreen.png");
}
}
}
}

View File

@ -12,118 +12,118 @@ using Project31.Controls;
namespace Project31.ApplicationFramework
{
/// <summary>
/// ApplicationWorkspaceColumnPaneLightweightControl. Internal helper class used by
/// ApplicationWorkspaceColumnLightweightControl.
/// </summary>
internal class ApplicationWorkspaceColumnPaneLightweightControl : LightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// ApplicationWorkspaceColumnPaneLightweightControl. Internal helper class used by
/// ApplicationWorkspaceColumnLightweightControl.
/// </summary>
internal class ApplicationWorkspaceColumnPaneLightweightControl : LightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// The control.
/// </summary>
private Control control;
/// <summary>
/// The control.
/// </summary>
private Control control;
/// <summary>
/// Gets or sets the control.
/// </summary>
public Control Control
{
get
{
return control;
}
set
{
if (control != value)
{
if (control != null)
control.Parent = null;
/// <summary>
/// Gets or sets the control.
/// </summary>
public Control Control
{
get
{
return control;
}
set
{
if (control != value)
{
if (control != null)
control.Parent = null;
control = value;
control = value;
PerformLayout();
Invalidate();
}
}
}
PerformLayout();
Invalidate();
}
}
}
/// <summary>
/// Initializes a new instance of the DummyPaneLightweightControl class.
/// </summary>
/// <param name="container"></param>
public ApplicationWorkspaceColumnPaneLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the DummyPaneLightweightControl class.
/// </summary>
/// <param name="container"></param>
public ApplicationWorkspaceColumnPaneLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the DummyPaneLightweightControl class.
/// </summary>
public ApplicationWorkspaceColumnPaneLightweightControl()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the DummyPaneLightweightControl class.
/// </summary>
public ApplicationWorkspaceColumnPaneLightweightControl()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// ApplicationWorkspaceColumnPaneLightweightControl
//
this.Visible = false;
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// ApplicationWorkspaceColumnPaneLightweightControl
//
this.Visible = false;
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
#endregion
}
#endregion
protected override void OnLayout(EventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnLayout(e);
protected override void OnLayout(EventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnLayout(e);
// Layout the control.
if (control != null)
{
//
if (control.Parent != Parent)
control.Parent = Parent;
// Layout the control.
if (control != null)
{
//
if (control.Parent != Parent)
control.Parent = Parent;
//
Rectangle layoutRectangle = VirtualClientRectangle;
layoutRectangle.Inflate(-1, -1);
control.Bounds = VirtualClientRectangleToParent(layoutRectangle);
}
}
//
Rectangle layoutRectangle = VirtualClientRectangle;
layoutRectangle.Inflate(-1, -1);
control.Bounds = VirtualClientRectangleToParent(layoutRectangle);
}
}
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
// Solid background color.
using (SolidBrush backgroundBrush = new SolidBrush(ApplicationManager.ApplicationStyle.BorderColor))
e.Graphics.FillRectangle(backgroundBrush, VirtualClientRectangle);
}
}
// Solid background color.
using (SolidBrush backgroundBrush = new SolidBrush(ApplicationManager.ApplicationStyle.BorderColor))
e.Graphics.FillRectangle(backgroundBrush, VirtualClientRectangle);
}
}
}

View File

@ -11,98 +11,98 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// ApplicationCommandBar lightweight control. Provides the CommandBarLightweightControl for
/// the ApplicationWorkspace.
/// </summary>
public class ApplicationWorkspaceCommandBarLightweightControl : CommandBarLightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// ApplicationCommandBar lightweight control. Provides the CommandBarLightweightControl for
/// the ApplicationWorkspace.
/// </summary>
public class ApplicationWorkspaceCommandBarLightweightControl : CommandBarLightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
public ApplicationWorkspaceCommandBarLightweightControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
public ApplicationWorkspaceCommandBarLightweightControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
/// <param name="container"></param>
public ApplicationWorkspaceCommandBarLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
/// <param name="container"></param>
public ApplicationWorkspaceCommandBarLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Fill the background.
if (ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor == ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomColor)
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor))
e.Graphics.FillRectangle(solidBrush, VirtualClientRectangle);
else
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor, ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomColor, LinearGradientMode.Vertical))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Fill the background.
if (ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor == ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomColor)
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor))
e.Graphics.FillRectangle(solidBrush, VirtualClientRectangle);
else
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopColor, ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomColor, LinearGradientMode.Vertical))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
// Draw the first line of the top bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopBevelFirstLineColor))
e.Graphics.FillRectangle(solidBrush, 0, 0, VirtualWidth, 1);
// Draw the first line of the top bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopBevelFirstLineColor))
e.Graphics.FillRectangle(solidBrush, 0, 0, VirtualWidth, 1);
// Draw the second line of the top bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopBevelSecondLineColor))
e.Graphics.FillRectangle(solidBrush, 0, 1, VirtualWidth, 1);
// Draw the second line of the top bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarTopBevelSecondLineColor))
e.Graphics.FillRectangle(solidBrush, 0, 1, VirtualWidth, 1);
// Draw the first line of the bottom bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomBevelFirstLineColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-2, VirtualWidth, 1);
// Draw the first line of the bottom bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomBevelFirstLineColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-2, VirtualWidth, 1);
// Draw the first line of the bottom bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomBevelSecondLineColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-1, VirtualWidth, 1);
// Draw the first line of the bottom bevel.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.ApplicationWorkspaceCommandBarBottomBevelSecondLineColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-1, VirtualWidth, 1);
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
}
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
}
}
}
}

View File

@ -73,7 +73,7 @@ namespace OpenLiveWriter.ApplicationFramework
/// <summary>
/// True if bottom border should not be used.
/// </summary>
private bool suppressBottomBorder;
private bool suppressBottomBorder;
/// <summary>
/// The right inset.

View File

@ -291,7 +291,7 @@ namespace OpenLiveWriter.ApplicationFramework
/// Raised by a subcontrol to inform ColorPickerForm that it should navigate
/// (either for forward or backward) to the next control.
/// </summary>
public event NavigateEventHandler _Navigate;
public event NavigateEventHandler _Navigate;
/// <summary>
/// Called by a subcontrol (derived class of IColorPickerSubControl) to raise the _Navigate event

View File

@ -128,7 +128,6 @@ namespace OpenLiveWriter.ApplicationFramework
Invalidate();
}
const int PADDING = 6;
const int GUTTER_SIZE = 3;
const int COLOR_SIZE = 14;

View File

@ -1248,7 +1248,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
private bool commandBarButtonContextMenuInvalidateParent = false;
/// <summary>
/// Gets or sets the command text.
/// </summary>

View File

@ -158,9 +158,9 @@ namespace OpenLiveWriter.ApplicationFramework
public CommandBarButtonLightweightControl(CommandBarLightweightControl commandBarLightweightControl, string commandIdentifier, bool rightAligned)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
InitializeObject();
// Set the command bar lightweight control.
@ -1261,7 +1261,6 @@ namespace OpenLiveWriter.ApplicationFramework
void Paint(BidiGraphics g, Rectangle bounds, DrawState drawState);
}
public override bool DoDefaultAction()
{
if (ContextMenuUserInterface || DropDownContextMenuUserInterface)

View File

@ -308,7 +308,6 @@ namespace OpenLiveWriter.ApplicationFramework
MenuItems.AddRange(commandMenuBuilder.CreateMenuItems());
}
/// <summary>
/// Displays the CommandContextMenu at the specified location and returns the command that
/// was selected by the user.

View File

@ -17,33 +17,33 @@ namespace OpenLiveWriter.ApplicationFramework
internal class CommandContextMenuMiniForm : BaseForm
{
/* NOTE: When being shown in the context of the browser (or any non .NET
* application) this form will not handle any dialog level keyboard
* commands (tab, enter, escape, alt-mnenonics, etc.). This is because
* it is a modeless form that does not have its own thread/message-loop.
* Because the form was created by our .NET code the main IE frame that
* has the message loop has no idea it needs to route keyboard events'
* to us. There are several possible workarounds:
*
* (1) Create and show this form on its own thread with its own
* message loop. In this case all calls from the form back
* to the main UI thread would need to be marshalled.
*
* (2) Manually process keyboard events in the low-level
* ProcessKeyPreview override (see commented out method below)
*
* (3) Change the implementation of the mini-form to be a modal
* dialog. The only problem here is we would need to capture
* mouse input so that clicks outside of the modal dialog onto
* the IE window result in the window being dismissed. We were
* not able to get this to work (couldn't capture the mouse)
* in experimenting with this implementation.
*
* Our judgement was to leave it as-is for now as it is unlikely that
* keyboard input into a mini-form will be a big deal (the only way
* to access the mini-form is with a mouse gesture on the toolbar so
* the user is still in "mouse-mode" when the form pops up.
*
*/
* application) this form will not handle any dialog level keyboard
* commands (tab, enter, escape, alt-mnenonics, etc.). This is because
* it is a modeless form that does not have its own thread/message-loop.
* Because the form was created by our .NET code the main IE frame that
* has the message loop has no idea it needs to route keyboard events'
* to us. There are several possible workarounds:
*
* (1) Create and show this form on its own thread with its own
* message loop. In this case all calls from the form back
* to the main UI thread would need to be marshalled.
*
* (2) Manually process keyboard events in the low-level
* ProcessKeyPreview override (see commented out method below)
*
* (3) Change the implementation of the mini-form to be a modal
* dialog. The only problem here is we would need to capture
* mouse input so that clicks outside of the modal dialog onto
* the IE window result in the window being dismissed. We were
* not able to get this to work (couldn't capture the mouse)
* in experimenting with this implementation.
*
* Our judgement was to leave it as-is for now as it is unlikely that
* keyboard input into a mini-form will be a big deal (the only way
* to access the mini-form is with a mouse gesture on the toolbar so
* the user is still in "mouse-mode" when the form pops up.
*
*/
public CommandContextMenuMiniForm(IWin32Window parentFrame, Command command)
{
@ -119,7 +119,6 @@ namespace OpenLiveWriter.ApplicationFramework
User32.SendMessage(_parentFrame.Handle, WM.NCACTIVATE, new UIntPtr(1), IntPtr.Zero);
}
/// <summary>
/// Automatically close when the form is deactivated
/// </summary>
@ -193,7 +192,6 @@ namespace OpenLiveWriter.ApplicationFramework
miniFormBevelBitmap.Height));
}
/// <summary>
/// Prevent background painting (supports double-buffering)
/// </summary>
@ -203,20 +201,19 @@ namespace OpenLiveWriter.ApplicationFramework
}
/*
protected override bool ProcessKeyPreview(ref Message m)
{
// NOTE: this is the only keyboard "event" which appears
// to get called when our form is shown in the browser.
// if we want to support tab, esc, enter, mnemonics, etc.
// without creating a new thread/message-loop for this
// form (see comment at the top) then this is where we
// would do the manual processing
protected override bool ProcessKeyPreview(ref Message m)
{
// NOTE: this is the only keyboard "event" which appears
// to get called when our form is shown in the browser.
// if we want to support tab, esc, enter, mnemonics, etc.
// without creating a new thread/message-loop for this
// form (see comment at the top) then this is where we
// would do the manual processing
return base.ProcessKeyPreview (ref m);
}
*/
return base.ProcessKeyPreview (ref m);
}
*/
/// <summary>
/// User clicked the action button

View File

@ -12,422 +12,422 @@ using Project31.MindShare.CoreServices;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Represents a command in the Project31.ApplicationFramework.
/// </summary>
[
DesignTimeVisible(false),
ToolboxItem(false)
]
public class CommandInstance : Component
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Represents a command in the Project31.ApplicationFramework.
/// </summary>
[
DesignTimeVisible(false),
ToolboxItem(false)
]
public class CommandInstance : Component
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Menu bitmap for the enabled state.
/// </summary>
private CommandDefinition commandDefinition;
/// <summary>
/// Menu bitmap for the enabled state.
/// </summary>
private CommandDefinition commandDefinition;
/// <summary>
/// Gets or sets the menu bitmap for the enabled state.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the enabled state.")
]
public Bitmap MenuBitmapEnabled
{
get
{
return menuBitmapEnabled;
}
/// <summary>
/// Gets or sets the menu bitmap for the enabled state.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the enabled state.")
]
public Bitmap MenuBitmapEnabled
{
get
{
return menuBitmapEnabled;
}
set
{
menuBitmapEnabled = value;
}
}
set
{
menuBitmapEnabled = value;
}
}
/// <summary>
/// Menu bitmap for the disabled state.
/// </summary>
private Bitmap menuBitmapDisabled;
/// <summary>
/// Menu bitmap for the disabled state.
/// </summary>
private Bitmap menuBitmapDisabled;
/// <summary>
/// Gets or sets the menu bitmap for the disabled state.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the disabled state.")
]
public Bitmap MenuBitmapDisabled
{
get
{
return menuBitmapDisabled;
}
/// <summary>
/// Gets or sets the menu bitmap for the disabled state.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the disabled state.")
]
public Bitmap MenuBitmapDisabled
{
get
{
return menuBitmapDisabled;
}
set
{
menuBitmapDisabled = value;
}
}
set
{
menuBitmapDisabled = value;
}
}
/// <summary>
/// Menu bitmap for the selected state.
/// </summary>
private Bitmap menuBitmapSelected;
/// <summary>
/// Menu bitmap for the selected state.
/// </summary>
private Bitmap menuBitmapSelected;
/// <summary>
/// Gets or sets the menu selected bitmap.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the selected state.")
]
public Bitmap MenuBitmapSelected
{
get
{
return menuBitmapSelected;
}
/// <summary>
/// Gets or sets the menu selected bitmap.
/// </summary>
[
Category("Appearance"),
Localizable(false),
DefaultValue(null),
Description("Specifies the menu bitmap for the selected state.")
]
public Bitmap MenuBitmapSelected
{
get
{
return menuBitmapSelected;
}
set
{
menuBitmapSelected = value;
}
}
set
{
menuBitmapSelected = value;
}
}
/// <summary>
/// The menu shortcut of the command.
/// </summary>
private Shortcut menuShortcut;
/// <summary>
/// The menu shortcut of the command.
/// </summary>
private Shortcut menuShortcut;
/// <summary>
/// Gets or sets the menu shortcut of the command.
/// </summary>
[
Category("Behavior"),
DefaultValue(Shortcut.None),
Description("Specifies the menu shortcut of the command.")
]
public Shortcut MenuShortcut
{
get
{
return menuShortcut;
}
set
{
menuShortcut = value;
}
}
/// <summary>
/// Gets or sets the menu shortcut of the command.
/// </summary>
[
Category("Behavior"),
DefaultValue(Shortcut.None),
Description("Specifies the menu shortcut of the command.")
]
public Shortcut MenuShortcut
{
get
{
return menuShortcut;
}
set
{
menuShortcut = value;
}
}
/// <summary>
/// A value indicating whether the menu shortcut should be shown for the command.
/// </summary>
private bool showMenuShortcut;
/// <summary>
/// A value indicating whether the menu shortcut should be shown for the command.
/// </summary>
private bool showMenuShortcut;
/// <summary>
/// Gets or sets a value indicating whether the menu shortcut should be shown for the command.
/// </summary>
[
Category("Behavior"),
DefaultValue(false),
Description("Specifies whether the menu shortcut should be shown for the command.")
]
public bool ShowMenuShortcut
{
get
{
return showMenuShortcut;
}
set
{
showMenuShortcut = value;
}
}
/// <summary>
/// Gets or sets a value indicating whether the menu shortcut should be shown for the command.
/// </summary>
[
Category("Behavior"),
DefaultValue(false),
Description("Specifies whether the menu shortcut should be shown for the command.")
]
public bool ShowMenuShortcut
{
get
{
return showMenuShortcut;
}
set
{
showMenuShortcut = value;
}
}
/// <summary>
/// The command text. This is the "user visible text" that is associate with the command
/// (such as "Save All"). It appears whenever the user can see text for the command.
/// </summary>
private string text;
/// <summary>
/// The command text. This is the "user visible text" that is associate with the command
/// (such as "Save All"). It appears whenever the user can see text for the command.
/// </summary>
private string text;
/// <summary>
/// Gets or sets the command text.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the text that is associated with the command.")
]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
/// <summary>
/// Gets or sets the command text.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the text that is associated with the command.")
]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
/// <summary>
/// The command description. This is the "user visible description" that is associated
/// with the command. It appears whenever the user can see a description for the command.
/// </summary>
private string description;
/// <summary>
/// The command description. This is the "user visible description" that is associated
/// with the command. It appears whenever the user can see a description for the command.
/// </summary>
private string description;
/// <summary>
/// Gets or sets the command description.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the description for the command.")
]
public string Description
{
get
{
return description;
}
set
{
description = value;
}
}
/// <summary>
/// Gets or sets the command description.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the description for the command.")
]
public string Description
{
get
{
return description;
}
set
{
description = value;
}
}
/// <summary>
/// Command bar button bitmap for the disabled state.
/// </summary>
private Bitmap commandBarButtonBitmapDisabled;
/// <summary>
/// Command bar button bitmap for the disabled state.
/// </summary>
private Bitmap commandBarButtonBitmapDisabled;
/// <summary>
/// Gets or sets the command bar button bitmap for the disabled state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the disabled state.")
]
public Bitmap CommandBarButtonBitmapDisabled
{
get
{
return commandBarButtonBitmapDisabled;
}
/// <summary>
/// Gets or sets the command bar button bitmap for the disabled state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the disabled state.")
]
public Bitmap CommandBarButtonBitmapDisabled
{
get
{
return commandBarButtonBitmapDisabled;
}
set
{
commandBarButtonBitmapDisabled = value;
}
}
set
{
commandBarButtonBitmapDisabled = value;
}
}
/// <summary>
/// Command bar button bitmap for the enabled state.
/// </summary>
private Bitmap commandBarButtonBitmapEnabled;
/// <summary>
/// Command bar button bitmap for the enabled state.
/// </summary>
private Bitmap commandBarButtonBitmapEnabled;
/// <summary>
/// Gets or sets the command bar button bitmap for the enabled state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the enabled state.")
]
public Bitmap CommandBarButtonBitmapEnabled
{
get
{
return commandBarButtonBitmapEnabled;
}
/// <summary>
/// Gets or sets the command bar button bitmap for the enabled state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the enabled state.")
]
public Bitmap CommandBarButtonBitmapEnabled
{
get
{
return commandBarButtonBitmapEnabled;
}
set
{
commandBarButtonBitmapEnabled = value;
}
}
set
{
commandBarButtonBitmapEnabled = value;
}
}
/// <summary>
/// Command bar button bitmap for the pushed state.
/// </summary>
private Bitmap commandBarButtonBitmapPushed;
/// <summary>
/// Command bar button bitmap for the pushed state.
/// </summary>
private Bitmap commandBarButtonBitmapPushed;
/// <summary>
/// Gets or sets the command bar button bitmap for the pushed state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the pushed state.")
]
public Bitmap CommandBarButtonBitmapPushed
{
get
{
return commandBarButtonBitmapPushed;
}
/// <summary>
/// Gets or sets the command bar button bitmap for the pushed state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the pushed state.")
]
public Bitmap CommandBarButtonBitmapPushed
{
get
{
return commandBarButtonBitmapPushed;
}
set
{
commandBarButtonBitmapPushed = value;
}
}
set
{
commandBarButtonBitmapPushed = value;
}
}
/// <summary>
/// Command bar button bitmap for the rollover state.
/// </summary>
private Bitmap commandBarButtonBitmapRollover;
/// <summary>
/// Command bar button bitmap for the rollover state.
/// </summary>
private Bitmap commandBarButtonBitmapRollover;
/// <summary>
/// Gets or sets the command bar button bitmap for the rollover state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the rollover state.")
]
public Bitmap CommandBarButtonBitmapRollover
{
get
{
return commandBarButtonBitmapRollover;
}
/// <summary>
/// Gets or sets the command bar button bitmap for the rollover state.
/// </summary>
[
Category("Appearance"),
Localizable(true),
DefaultValue(null),
Description("Specifies the command bar button bitmap for the rollover state.")
]
public Bitmap CommandBarButtonBitmapRollover
{
get
{
return commandBarButtonBitmapRollover;
}
set
{
commandBarButtonBitmapRollover = value;
}
}
set
{
commandBarButtonBitmapRollover = value;
}
}
/// <summary>
/// A value indicating whether the command is enabled or not (i.e. can respond to user interaction).
/// </summary>
private bool enabled = true;
/// <summary>
/// A value indicating whether the command is enabled or not (i.e. can respond to user interaction).
/// </summary>
private bool enabled = true;
/// <summary>
/// Gets or sets a value indicating whether the command is enabled or not (i.e. can respond to user interaction).
/// </summary>
[
Category("Behavior"),
DefaultValue(true),
Description("Specifies whether the command is enabled by default.")
]
public bool Enabled
{
get
{
return enabled;
}
set
{
// Set the value.
enabled = value;
/// <summary>
/// Gets or sets a value indicating whether the command is enabled or not (i.e. can respond to user interaction).
/// </summary>
[
Category("Behavior"),
DefaultValue(true),
Description("Specifies whether the command is enabled by default.")
]
public bool Enabled
{
get
{
return enabled;
}
set
{
// Set the value.
enabled = value;
// Fire the enabled changed event.
OnEnabledChanged(EventArgs.Empty);
}
}
// Fire the enabled changed event.
OnEnabledChanged(EventArgs.Empty);
}
}
/// <summary>
/// Occurs when the command is executed.
/// </summary>
[
Category("Action"),
Description("Occurs when the command is executed.")
]
public event EventHandler Execute;
/// <summary>
/// Occurs when the command is executed.
/// </summary>
[
Category("Action"),
Description("Occurs when the command is executed.")
]
public event EventHandler Execute;
/// <summary>
/// Occurs when the command's enabled state changes.
/// </summary>
[
Category("Property Changed"),
Description("Occurs when the command's enabled state changes.")
]
public event EventHandler EnabledChanged;
/// <summary>
/// Occurs when the command's enabled state changes.
/// </summary>
[
Category("Property Changed"),
Description("Occurs when the command's enabled state changes.")
]
public event EventHandler EnabledChanged;
/// <summary>
/// Initializes a new instance of the Command class.
/// </summary>
/// <param name="container"></param>
public CommandDefinition(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the Command class.
/// </summary>
/// <param name="container"></param>
public CommandDefinition(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the Command class.
/// </summary>
public CommandDefinition()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the Command class.
/// </summary>
public CommandDefinition()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
/// <summary>
/// This method can be called to raise the Execute event
/// </summary>
public void PerformExecute()
{
Debug.Assert(Enabled, "Command is disabled.", "It is illogical to execute a command that is disabled.");
OnExecute(EventArgs.Empty);
}
/// <summary>
/// This method can be called to raise the Execute event
/// </summary>
public void PerformExecute()
{
Debug.Assert(Enabled, "Command is disabled.", "It is illogical to execute a command that is disabled.");
OnExecute(EventArgs.Empty);
}
/// <summary>
/// Raises the Execute event.
/// </summary>
protected void OnExecute(EventArgs e)
{
if (Execute != null)
Execute(this, e);
else
UnderConstructionForm.Show();
}
/// <summary>
/// Raises the Execute event.
/// </summary>
protected void OnExecute(EventArgs e)
{
if (Execute != null)
Execute(this, e);
else
UnderConstructionForm.Show();
}
/// <summary>
/// Raises the EnabledChanged event.
/// </summary>
protected void OnEnabledChanged(EventArgs e)
{
if (EnabledChanged != null)
EnabledChanged(this, e);
}
}
/// <summary>
/// Raises the EnabledChanged event.
/// </summary>
protected void OnEnabledChanged(EventArgs e)
{
if (EnabledChanged != null)
EnabledChanged(this, e);
}
}
}

View File

@ -12,90 +12,90 @@ using Project31.CoreServices;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Summary description for CommandList.
/// </summary>
[Designer(typeof(ComponentRootDesigner), typeof(IRootDesigner))]
public class CommandList : Component
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Summary description for CommandList.
/// </summary>
[Designer(typeof(ComponentRootDesigner), typeof(IRootDesigner))]
public class CommandList : Component
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// The command collection for this command list.
/// </summary>
private CommandCollection commands = new CommandCollection();
/// <summary>
/// The command collection for this command list.
/// </summary>
private CommandCollection commands = new CommandCollection();
/// <summary>
/// Gets or sets the command collection for this command list.
/// </summary>
[
Localizable(true),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public CommandCollection Commands
{
get
{
return commands;
}
set
{
commands = value;
}
}
/// <summary>
/// Gets or sets the command collection for this command list.
/// </summary>
[
Localizable(true),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public CommandCollection Commands
{
get
{
return commands;
}
set
{
commands = value;
}
}
/// <summary>
/// Initializes a new instance of the CommandList class.
/// </summary>
/// <param name="container">Component container.</param>
public CommandList(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the CommandList class.
/// </summary>
/// <param name="container">Component container.</param>
public CommandList(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the CommandList class.
/// </summary>
public CommandList()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the CommandList class.
/// </summary>
public CommandList()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
/// <summary>
/// Helper to enable all the commands in the command list.
/// </summary>
public void Enable()
{
foreach (Command command in commands)
command.Enabled = true;
}
/// <summary>
/// Helper to enable all the commands in the command list.
/// </summary>
public void Enable()
{
foreach (Command command in commands)
command.Enabled = true;
}
/// <summary>
/// Helper to disable all the commands in the command list.
/// </summary>
public void Disable()
{
foreach (Command command in commands)
command.Enabled = false;
}
}
/// <summary>
/// Helper to disable all the commands in the command list.
/// </summary>
public void Disable()
{
foreach (Command command in commands)
command.Enabled = false;
}
}
}

View File

@ -8,81 +8,81 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Provides "event bridging" between MenuItem objects and Command objects.
/// </summary>
internal class CommandMenuItemEventBridge
{
#region Private Member Variables & Properties
/// <summary>
/// The Command for this Command to MenuItem event bridge.
/// </summary>
private Command command;
/// <summary>
/// Provides "event bridging" between MenuItem objects and Command objects.
/// </summary>
internal class CommandMenuItemEventBridge
{
#region Private Member Variables & Properties
/// <summary>
/// The Command for this Command to MenuItem event bridge.
/// </summary>
private Command command;
/// <summary>
/// The MenuItem for this Command to MenuItem event bridge.
/// </summary>
private MenuItem menuItem;
#endregion
/// <summary>
/// The MenuItem for this Command to MenuItem event bridge.
/// </summary>
private MenuItem menuItem;
#endregion
#region Class Initialization & Termination
/// <summary>
/// Initializes a new instance of the CommandMenuItemEventBridge class.
/// </summary>
/// <param name="command">The Command for this Command to MenuItem event bridge.</param>
/// <param name="menuItem">The MenuItem for this Command to MenuItem event bridge.</param>
public CommandMenuItemEventBridge(Command command, MenuItem menuItem)
{
// Set the command.
this.command = command;
#region Class Initialization & Termination
/// <summary>
/// Initializes a new instance of the CommandMenuItemEventBridge class.
/// </summary>
/// <param name="command">The Command for this Command to MenuItem event bridge.</param>
/// <param name="menuItem">The MenuItem for this Command to MenuItem event bridge.</param>
public CommandMenuItemEventBridge(Command command, MenuItem menuItem)
{
// Set the command.
this.command = command;
// Set the menu item.
this.menuItem = menuItem;
// Set the menu item.
this.menuItem = menuItem;
// Add event handlers for the command events.
command.EnabledChanged += new EventHandler(command_EnabledChanged);
// Add event handlers for the command events.
command.EnabledChanged += new EventHandler(command_EnabledChanged);
// Add event handlers for the menu item events.
menuItem.Click += new EventHandler(menuItem_Click);
}
#endregion
// Add event handlers for the menu item events.
menuItem.Click += new EventHandler(menuItem_Click);
}
#endregion
#region Public Methods
/// <summary>
/// The enabled property of the command changed.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
public void Disconnect()
{
// Add event handlers for command events.
command.EnabledChanged -= new EventHandler(command_EnabledChanged);
#region Public Methods
/// <summary>
/// The enabled property of the command changed.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
public void Disconnect()
{
// Add event handlers for command events.
command.EnabledChanged -= new EventHandler(command_EnabledChanged);
// Bridge menu item events.
menuItem.Click -= new EventHandler(menuItem_Click);
}
#endregion
// Bridge menu item events.
menuItem.Click -= new EventHandler(menuItem_Click);
}
#endregion
#region Event Handlers
/// <summary>
/// The enabled property of the command changed.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
private void command_EnabledChanged(object sender, System.EventArgs e)
{
menuItem.Enabled = command.Enabled;
}
#region Event Handlers
/// <summary>
/// The enabled property of the command changed.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
private void command_EnabledChanged(object sender, System.EventArgs e)
{
menuItem.Enabled = command.Enabled;
}
/// <summary>
/// The menu item was clicked.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
private void menuItem_Click(object sender, System.EventArgs e)
{
command.PerformExecute();
}
#endregion
}
/// <summary>
/// The menu item was clicked.
/// </summary>
/// <param name="sender">Sender of the event.</param>
/// <param name="e">Event parameters.</param>
private void menuItem_Click(object sender, System.EventArgs e)
{
command.PerformExecute();
}
#endregion
}
}

View File

@ -8,171 +8,171 @@ using System.Diagnostics;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Provides command table management.
/// </summary>
public class CommandTable : IEnumerable
{
/// <summary>
/// The set of active commands, keyed by command identifier.
/// </summary>
private Hashtable commandTable = new Hashtable();
/// <summary>
/// Provides command table management.
/// </summary>
public class CommandTable : IEnumerable
{
/// <summary>
/// The set of active commands, keyed by command identifier.
/// </summary>
private Hashtable commandTable = new Hashtable();
/// <summary>
/// The cross-referenced set of active shortcuts. Keyed by shortcut. This table is not
/// maintained until it is used. A call to GetCommand with a shortcut will cause the table
/// to be loaded. Once loaded, it is maintained.
/// </summary>
private Hashtable shortcutTable = null;
/// <summary>
/// The cross-referenced set of active shortcuts. Keyed by shortcut. This table is not
/// maintained until it is used. A call to GetCommand with a shortcut will cause the table
/// to be loaded. Once loaded, it is maintained.
/// </summary>
private Hashtable shortcutTable = null;
/// <summary>
/// Initializes a new instance of the CommandTable class.
/// </summary>
public CommandTable()
{
}
/// <summary>
/// Initializes a new instance of the CommandTable class.
/// </summary>
public CommandTable()
{
}
/// <summary>
/// Clears the command table.
/// </summary>
public void Clear()
{
commandTable.Clear();
if (shortcutTable != null)
shortcutTable.Clear();
}
/// <summary>
/// Clears the command table.
/// </summary>
public void Clear()
{
commandTable.Clear();
if (shortcutTable != null)
shortcutTable.Clear();
}
/// <summary>
/// Adds the specified command.
/// </summary>
/// <param name="command">The command to add.</param>
public void AddCommand(Command command)
{
// Ensure that this is not a duplicate. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(!commandTable.Contains(command.Identifier), "Duplicate command encountered.", String.Format("Command {0} already exists.", command.Identifier));
/// <summary>
/// Adds the specified command.
/// </summary>
/// <param name="command">The command to add.</param>
public void AddCommand(Command command)
{
// Ensure that this is not a duplicate. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(!commandTable.Contains(command.Identifier), "Duplicate command encountered.", String.Format("Command {0} already exists.", command.Identifier));
// Add the command to the command table.
commandTable[command.Identifier] = command;
// Add the command to the command table.
commandTable[command.Identifier] = command;
// Add the shortcut for the command to the shortcut table.
AddShortcut(command);
}
// Add the shortcut for the command to the shortcut table.
AddShortcut(command);
}
/// <summary>
/// Removes the specified command.
/// </summary>
/// <param name="command">The command to remove.</param>
public void RemoveCommand(Command command)
{
// Ensure that the command is in the table. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(commandTable.Contains(command.Identifier), "Command not found.", String.Format("Command {0} does not exist.", command.Identifier));
/// <summary>
/// Removes the specified command.
/// </summary>
/// <param name="command">The command to remove.</param>
public void RemoveCommand(Command command)
{
// Ensure that the command is in the table. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(commandTable.Contains(command.Identifier), "Command not found.", String.Format("Command {0} does not exist.", command.Identifier));
// Remove the command from the command table.
commandTable.Remove(command.Identifier);
// Remove the command from the command table.
commandTable.Remove(command.Identifier);
// Remove the shortcut for the command from the shortcut table.
RemoveShortcut(command);
}
// Remove the shortcut for the command from the shortcut table.
RemoveShortcut(command);
}
/// <summary>
/// Adds the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to add.</param>
public void AddCommandList(CommandList commandList)
{
// Add all the commands to the command table.
foreach (Command command in commandList.Commands)
AddCommand(command);
}
/// <summary>
/// Adds the specified command list.
/// </summary>
/// <param name="commandList">The CommandList to add.</param>
public void AddCommandList(CommandList commandList)
{
// Add all the commands to the command table.
foreach (Command command in commandList.Commands)
AddCommand(command);
}
/// <summary>
/// Removes the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to remove.</param>
public void RemoveCommandList(CommandList commandList)
{
// Remove all the commands from the command table.
foreach (Command command in commandList.Commands)
RemoveCommand(command);
}
/// <summary>
/// Removes the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to remove.</param>
public void RemoveCommandList(CommandList commandList)
{
// Remove all the commands from the command table.
foreach (Command command in commandList.Commands)
RemoveCommand(command);
}
/// <summary>
/// Gets the command with the specified command identifier.
/// </summary>
/// <param name="commandIdentifier">The command identifier of the command to get.</param>
/// <returns>The command, or null if a command with the specified command identifier cannot be found.</returns>
public Command GetCommand(string commandIdentifier)
{
return (Command)commandTable[commandIdentifier];
}
/// <summary>
/// Gets the command with the specified command identifier.
/// </summary>
/// <param name="commandIdentifier">The command identifier of the command to get.</param>
/// <returns>The command, or null if a command with the specified command identifier cannot be found.</returns>
public Command GetCommand(string commandIdentifier)
{
return (Command)commandTable[commandIdentifier];
}
/// <summary>
/// Gets the command with the specified shortcut.
/// </summary>
/// <param name="shortcut">The shortcut of the command to get.</param>
/// <returns>The command, or null if a command with the specified shortcut cannot be found.</returns>
public Command GetCommand(Shortcut shortcut)
{
// If the shortcut table has not been built, build it.
if (shortcutTable == null)
{
// Instantiate the shortcut table.
shortcutTable = new Hashtable();
/// <summary>
/// Gets the command with the specified shortcut.
/// </summary>
/// <param name="shortcut">The shortcut of the command to get.</param>
/// <returns>The command, or null if a command with the specified shortcut cannot be found.</returns>
public Command GetCommand(Shortcut shortcut)
{
// If the shortcut table has not been built, build it.
if (shortcutTable == null)
{
// Instantiate the shortcut table.
shortcutTable = new Hashtable();
// Load all the commands into the shortcut table.
foreach (Command command in this)
AddShortcut(command);
}
// Load all the commands into the shortcut table.
foreach (Command command in this)
AddShortcut(command);
}
// Return the command with the specified shortcut.
return (Command)shortcutTable[shortcut];
}
// Return the command with the specified shortcut.
return (Command)shortcutTable[shortcut];
}
/// <summary>
/// Returns an enumerator that can iterate through a collection.
/// </summary>
/// <returns>An IEnumerator that can be used to iterate through the collection.</returns>
public IEnumerator GetEnumerator()
{
return commandTable.Values.GetEnumerator();
}
/// <summary>
/// Returns an enumerator that can iterate through a collection.
/// </summary>
/// <returns>An IEnumerator that can be used to iterate through the collection.</returns>
public IEnumerator GetEnumerator()
{
return commandTable.Values.GetEnumerator();
}
/// <summary>
/// Adds the specified command to the shortcut table.
/// </summary>
/// <param name="command">The command to add to the shortcut table.</param>
private void AddShortcut(Command command)
{
// If we have a shortcut table, and the command has a shortcut, add it.
if (shortcutTable != null && command.Shortcut != Shortcut.None)
{
// Ensure that this is not a duplicate. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(!shortcutTable.Contains(command.Shortcut), "Duplicate shortcut encountered.", String.Format("Shortcut {0} already exists.", command.Shortcut.ToString()));
shortcutTable[command.Shortcut] = command;
}
}
/// <summary>
/// Adds the specified command to the shortcut table.
/// </summary>
/// <param name="command">The command to add to the shortcut table.</param>
private void AddShortcut(Command command)
{
// If we have a shortcut table, and the command has a shortcut, add it.
if (shortcutTable != null && command.Shortcut != Shortcut.None)
{
// Ensure that this is not a duplicate. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(!shortcutTable.Contains(command.Shortcut), "Duplicate shortcut encountered.", String.Format("Shortcut {0} already exists.", command.Shortcut.ToString()));
shortcutTable[command.Shortcut] = command;
}
}
/// <summary>
/// Adds the specified command to the shortcut table.
/// </summary>
/// <param name="command">The command to add to the shortcut table.</param>
private void RemoveShortcut(Command command)
{
// If the command has a shortcut, remove it from the shortcut table.
if (shortcutTable != null && command.Shortcut != Shortcut.None)
{
// Ensure that the shortcut is in the table. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(shortcutTable.Contains(command.Shortcut), "Shortcut not found.", String.Format("Shortcut {0} does not exists.", command.Shortcut.ToString()));
shortcutTable.Remove(command.Shortcut);
}
}
}
/// <summary>
/// Adds the specified command to the shortcut table.
/// </summary>
/// <param name="command">The command to add to the shortcut table.</param>
private void RemoveShortcut(Command command)
{
// If the command has a shortcut, remove it from the shortcut table.
if (shortcutTable != null && command.Shortcut != Shortcut.None)
{
// Ensure that the shortcut is in the table. In debug mode, assert that this is true.
// In release mode, fail silently (replacing the existing command) so as not to take
// down a running system.
Debug.Assert(shortcutTable.Contains(command.Shortcut), "Shortcut not found.", String.Format("Shortcut {0} does not exists.", command.Shortcut.ToString()));
shortcutTable.Remove(command.Shortcut);
}
}
}
}

View File

@ -9,48 +9,47 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAbout : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAbout : Command
{
public CommandAbout(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAbout(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
public CommandAbout()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAbout()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAbout
//
this.ContextMenuPath = "-&About {0}...@401";
this.Identifier = "WindowsLive.ApplicationFramework.Commands.About";
this.MainMenuPath = "&Help@500/-&About {0}...@401";
this.MenuText = "&About {0}...";
this.Text = "About";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAbout
//
this.ContextMenuPath = "-&About {0}...@401";
this.Identifier = "WindowsLive.ApplicationFramework.Commands.About";
this.MainMenuPath = "&Help@500/-&About {0}...@401";
this.MenuText = "&About {0}...";
this.Text = "About";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignCenter : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignCenter : Command
{
public CommandAlignCenter(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignCenter(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandAlignCenter()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignCenter()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignCenter
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignCenter";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Center@101";
this.Text = "Center Align";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignCenter
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignCenter";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Center@101";
this.Text = "Center Align";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignLeft : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignLeft : Command
{
public CommandAlignLeft(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignLeft(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandAlignLeft()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignLeft()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignLeft
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignLeft";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Left@100";
this.Text = "Left Align";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignLeft
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignLeft";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Left@100";
this.Text = "Left Align";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignRight : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandAlignRight : Command
{
public CommandAlignRight(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignRight(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandAlignRight()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandAlignRight()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignRight
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignRight";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Right@102";
this.Text = "Right Align";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandAlignRight
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.AlignRight";
this.MainMenuPath = "F&ormat@5/-&Align@300/&Right@102";
this.Text = "Right Align";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBlockquote : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBlockquote : Command
{
public CommandBlockquote(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBlockquote(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandBlockquote()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBlockquote()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBlockquote
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Blockquote";
this.MainMenuPath = "F&ormat@5/Block&quote@499";
this.Text = "Blockquote";
this.SuppressMenuBitmap = true;
}
#endregion
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBlockquote
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Blockquote";
this.MainMenuPath = "F&ormat@5/Block&quote@499";
this.Text = "Blockquote";
this.SuppressMenuBitmap = true;
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBold : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBold : Command
{
public CommandBold(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBold(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandBold()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBold()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBold
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Bold";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlB;
this.Text = "Bold";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBold
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Bold";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlB;
this.Text = "Bold";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBullets : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandBullets : Command
{
public CommandBullets(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBullets(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandBullets()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandBullets()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBullets
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Bullets";
this.MainMenuPath = "F&ormat@5/&Bullets@402";
this.Text = "Bullets";
this.SuppressMenuBitmap = true;
}
#endregion
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandBullets
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Bullets";
this.MainMenuPath = "F&ormat@5/&Bullets@402";
this.Text = "Bullets";
this.SuppressMenuBitmap = true;
}
#endregion
}
}

View File

@ -5,56 +5,55 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCheckSpelling : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCheckSpelling : Command
{
public CommandCheckSpelling(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCheckSpelling(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandCheckSpelling()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCheckSpelling()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCheckSpelling
//
this.CommandBarButtonText = "";
this.ContextMenuPath = "";
this.MenuText = "Check &Spelling";
this.Identifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
this.MainMenuPath = "&Tools@7/Check &Spelling...@100";
this.Shortcut = System.Windows.Forms.Shortcut.F7;
this.Text = "Check Spelling";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCheckSpelling
//
this.CommandBarButtonText = "";
this.ContextMenuPath = "";
this.MenuText = "Check &Spelling";
this.Identifier = "MindShare.ApplicationCore.Commands.CheckSpelling";
this.MainMenuPath = "&Tools@7/Check &Spelling...@100";
this.Shortcut = System.Windows.Forms.Shortcut.F7;
this.Text = "Check Spelling";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandClear : Command
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandClear : Command
{
public CommandClear(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandClear(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandClear()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandClear()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandClear
//
this.ContextMenuPath = "-Clea&r@151";
this.Identifier = "MindShare.ApplicationCore.Commands.Clear";
this.MainMenuPath = "&Edit@2/-Clea&r@151";
this.MenuText = "-Clea&r";
this.Shortcut = System.Windows.Forms.Shortcut.Del;
this.Text = "Clear";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandClear
//
this.ContextMenuPath = "-Clea&r@151";
this.Identifier = "MindShare.ApplicationCore.Commands.Clear";
this.MainMenuPath = "&Edit@2/-Clea&r@151";
this.MenuText = "-Clea&r";
this.Shortcut = System.Windows.Forms.Shortcut.Del;
this.Text = "Clear";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,56 +5,55 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandMinimize.
/// </summary>
public class CommandClose : Command
{
/// <summary>
/// Summary description for CommandMinimize.
/// </summary>
public class CommandClose : Command
{
public CommandClose(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandClose(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandClose()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandClose()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandClose
//
this.AccessibleDescription = "";
this.ContextMenuPath = "-Close@20";
this.Identifier = "OpenLiveWriter.ApplicationFramework.CommandClose";
this.MainMenuPath = "&File@0/-&Close@500";
this.Shortcut = System.Windows.Forms.Shortcut.AltF4;
this.Text = "Close";
this.VisibleOnMainMenu = true;
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandClose
//
this.AccessibleDescription = "";
this.ContextMenuPath = "-Close@20";
this.Identifier = "OpenLiveWriter.ApplicationFramework.CommandClose";
this.MainMenuPath = "&File@0/-&Close@500";
this.Shortcut = System.Windows.Forms.Shortcut.AltF4;
this.Text = "Close";
this.VisibleOnMainMenu = true;
}
#endregion
}
}
#endregion
}
}

View File

@ -8,52 +8,51 @@ using System.Diagnostics;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandColorize.
/// </summary>
public class CommandColorize : Command
{
/// <summary>
/// Summary description for CommandColorize.
/// </summary>
public class CommandColorize : Command
{
public CommandColorize(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandColorize(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandColorize()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandColorize()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandColorize
//
this.Description = "Change the color scheme of Open Live Writer";
this.Identifier = "OpenLiveWriter.Commands.Colorize";
this.Text = "Colorize";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandColorize
//
this.Description = "Change the color scheme of Open Live Writer";
this.Identifier = "OpenLiveWriter.Commands.Colorize";
this.Text = "Colorize";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCopy : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCopy : Command
{
public CommandCopy(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCopy(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandCopy()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCopy()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCopy
//
this.ContextMenuPath = "&Copy@102";
this.Identifier = "MindShare.ApplicationCore.Commands.Copy";
this.MainMenuPath = "&Edit@2/&Copy@102";
this.MenuText = "&Copy";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlC;
this.Text = "Copy";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCopy
//
this.ContextMenuPath = "&Copy@102";
this.Identifier = "MindShare.ApplicationCore.Commands.Copy";
this.MainMenuPath = "&Edit@2/&Copy@102";
this.MenuText = "&Copy";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlC;
this.Text = "Copy";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCut : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandCut : Command
{
public CommandCut(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCut(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandCut()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandCut()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCut
//
this.ContextMenuPath = "Cu&t@101";
this.Identifier = "MindShare.ApplicationCore.Commands.Cut";
this.MainMenuPath = "&Edit@2/Cu&t@101";
this.MenuText = "Cu&t";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlX;
this.Text = "Cut";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandCut
//
this.ContextMenuPath = "Cu&t@101";
this.Identifier = "MindShare.ApplicationCore.Commands.Cut";
this.MainMenuPath = "&Edit@2/Cu&t@101";
this.MenuText = "Cu&t";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlX;
this.Text = "Cut";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandDelete : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandDelete : Command
{
public CommandDelete(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandDelete(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandDelete()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandDelete()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandDelete
//
this.ContextMenuPath = "-&Delete-@151";
this.Identifier = "MindShare.ApplicationCore.Commands.Delete";
this.MainMenuPath = "&Edit@2/-&Delete-@151";
this.MenuText = "&Delete";
this.Shortcut = System.Windows.Forms.Shortcut.Del;
this.Text = "Delete";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandDelete
//
this.ContextMenuPath = "-&Delete-@151";
this.Identifier = "MindShare.ApplicationCore.Commands.Delete";
this.MainMenuPath = "&Edit@2/-&Delete-@151";
this.MenuText = "&Delete";
this.Shortcut = System.Windows.Forms.Shortcut.Del;
this.Text = "Delete";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandFind : Command
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandFind : Command
{
public CommandFind(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFind(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandFind()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFind()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFind
//
this.ContextMenuPath = "Fi&nd Text...@601";
this.Identifier = "MindShare.ApplicationCore.Commands.Find";
this.MainMenuPath = "&Edit@2/Fi&nd Text...@601";
this.MenuText = "Fi&nd Text...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
this.Text = "Find";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFind
//
this.ContextMenuPath = "Fi&nd Text...@601";
this.Identifier = "MindShare.ApplicationCore.Commands.Find";
this.MainMenuPath = "&Edit@2/Fi&nd Text...@601";
this.MenuText = "Fi&nd Text...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
this.Text = "Find";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,73 +5,73 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandFocusNextPane.
/// </summary>
public class CommandFocusNextPane : Command
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Summary description for CommandFocusNextPane.
/// </summary>
public class CommandFocusNextPane : Command
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public CommandFocusNextPane(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
public CommandFocusNextPane(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandFocusNextPane()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFocusNextPane()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFocusNextPane
//
this.Identifier = "MindShare.ApplicationCore.Commands.FocusNextPane";
this.Shortcut = System.Windows.Forms.Shortcut.F6;
this.Text = "Next Pane";
this.VisibleOnCommandBar = false;
this.VisibleOnContextMenu = false;
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFocusNextPane
//
this.Identifier = "MindShare.ApplicationCore.Commands.FocusNextPane";
this.Shortcut = System.Windows.Forms.Shortcut.F6;
this.Text = "Next Pane";
this.VisibleOnCommandBar = false;
this.VisibleOnContextMenu = false;
}
#endregion
}
}
#endregion
}
}

View File

@ -5,74 +5,74 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandFocusPreviousPane.
/// </summary>
public class CommandFocusPreviousPane : Command
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Summary description for CommandFocusPreviousPane.
/// </summary>
public class CommandFocusPreviousPane : Command
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public CommandFocusPreviousPane(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
public CommandFocusPreviousPane(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandFocusPreviousPane()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFocusPreviousPane()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFocusPreviousPane
//
this.Identifier = "MindShare.ApplicationCore.Commands.FocusPreviousPane";
this.Shortcut = System.Windows.Forms.Shortcut.ShiftF6;
this.Text = "Previous Pane";
this.VisibleOnCommandBar = false;
this.VisibleOnContextMenu = false;
this.VisibleOnMainMenu = false;
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFocusPreviousPane
//
this.Identifier = "MindShare.ApplicationCore.Commands.FocusPreviousPane";
this.Shortcut = System.Windows.Forms.Shortcut.ShiftF6;
this.Text = "Previous Pane";
this.VisibleOnCommandBar = false;
this.VisibleOnContextMenu = false;
this.VisibleOnMainMenu = false;
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandFont : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandFont : Command
{
public CommandFont(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFont(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandFont()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFont()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFont
//
this.ContextMenuPath = "-&Font...@120";
this.Identifier = "MindShare.ApplicationCore.Commands.Font";
this.MainMenuPath = "F&ormat@5/&Font...@100";
this.MenuText = "-&Font...";
this.Text = "Font";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFont
//
this.ContextMenuPath = "-&Font...@120";
this.Identifier = "MindShare.ApplicationCore.Commands.Font";
this.MainMenuPath = "F&ormat@5/&Font...@100";
this.MenuText = "-&Font...";
this.Text = "Font";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandFontColor : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandFontColor : Command
{
public CommandFontColor(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFontColor(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandFontColor()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandFontColor()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFontColor
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.FontColor";
this.MainMenuPath = "F&ormat@5/Font &Color...@101";
this.Text = "Font Color";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandFontColor
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.FontColor";
this.MainMenuPath = "F&ormat@5/Font &Color...@101";
this.Text = "Font Color";
}
#endregion
}
}
#endregion
}
}

View File

@ -9,53 +9,52 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
public class CommandHelp : Command
{
public class CommandHelp : Command
{
public CommandHelp(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandHelp(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandHelp()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandHelp()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandHelp
//
this.CommandBarButtonText = "";
this.ContextMenuPath = "{0} &Help-@101";
this.Identifier = "OpenLiveWriter.Commands.Help";
this.MainMenuPath = "&Help@500/&{0} Help-@101";
this.MenuText = "{0} &Help";
this.Shortcut = System.Windows.Forms.Shortcut.F1;
this.Text = "Help";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandHelp
//
this.CommandBarButtonText = "";
this.ContextMenuPath = "{0} &Help-@101";
this.Identifier = "OpenLiveWriter.Commands.Help";
this.MainMenuPath = "&Help@500/&{0} Help-@101";
this.MenuText = "{0} &Help";
this.Shortcut = System.Windows.Forms.Shortcut.F1;
this.Text = "Help";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandIndent : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandIndent : Command
{
public CommandIndent(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandIndent(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandIndent()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandIndent()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandIndent
//
this.ContextMenuPath = "-&Increase Indent@110";
this.Identifier = "MindShare.ApplicationCore.Commands.Indent";
this.MainMenuPath = "F&ormat@5/&Indent@500/&Increase@100";
this.MenuText = "&Increase Indent";
this.Text = "Increase Indent";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandIndent
//
this.ContextMenuPath = "-&Increase Indent@110";
this.Identifier = "MindShare.ApplicationCore.Commands.Indent";
this.MainMenuPath = "F&ormat@5/&Indent@500/&Increase@100";
this.MenuText = "&Increase Indent";
this.Text = "Increase Indent";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,47 +5,46 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandInsertLink : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandInsertLink : Command
{
public CommandInsertLink(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
public CommandInsertLink(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
public CommandInsertLink()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
public CommandInsertLink()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandInsertLink
//
this.ContextMenuPath = "-&Hyperlink...@130";
this.Identifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
this.MainMenuPath = "&Insert@4/&Hyperlink...@100";
this.MenuText = "&Hyperlink...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlK;
this.Text = "Insert Hyperlink";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandInsertLink
//
this.ContextMenuPath = "-&Hyperlink...@130";
this.Identifier = "OpenLiveWriter.ApplicationFramework.Commands.InsertLink";
this.MainMenuPath = "&Insert@4/&Hyperlink...@100";
this.MenuText = "&Hyperlink...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlK;
this.Text = "Insert Hyperlink";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandItalic : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandItalic : Command
{
public CommandItalic(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandItalic(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandItalic()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandItalic()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandItalic
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Italic";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
this.Text = "Italic";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandItalic
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Italic";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
this.Text = "Italic";
}
#endregion
}
}
#endregion
}
}

View File

@ -8,51 +8,50 @@ using System.Diagnostics;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandMenu.
/// </summary>
public class CommandMenu : Command
{
/// <summary>
/// Summary description for CommandMenu.
/// </summary>
public class CommandMenu : Command
{
public CommandMenu(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandMenu(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandMenu()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandMenu()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandMenu
//
this.Identifier = "OpenLiveWriter.Commands.Menu";
this.Text = "Show menu";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandMenu
//
this.Identifier = "OpenLiveWriter.Commands.Menu";
this.Text = "Show menu";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandNumbers : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandNumbers : Command
{
public CommandNumbers(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandNumbers(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandNumbers()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandNumbers()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandNumbers
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Numbers";
this.MainMenuPath = "F&ormat@5/-&Numbering@400";
this.Text = "Numbering";
this.SuppressMenuBitmap = true;
}
#endregion
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandNumbers
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Numbers";
this.MainMenuPath = "F&ormat@5/-&Numbering@400";
this.Text = "Numbering";
this.SuppressMenuBitmap = true;
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandOpen : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandOpen : Command
{
public CommandOpen(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandOpen(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandOpen()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandOpen()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandOpen
//
this.ContextMenuPath = "&Open...@201";
this.Identifier = "MindShare.ApplicationCore.Commands.Open";
this.MainMenuPath = "&Edit@2/&Open...@201";
this.MenuText = "&Open...";
this.Text = "Open";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandOpen
//
this.ContextMenuPath = "&Open...@201";
this.Identifier = "MindShare.ApplicationCore.Commands.Open";
this.MainMenuPath = "&Edit@2/&Open...@201";
this.MenuText = "&Open...";
this.Text = "Open";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandOutdent : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandOutdent : Command
{
public CommandOutdent(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandOutdent(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandOutdent()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandOutdent()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandOutdent
//
this.ContextMenuPath = "&Decrease Indent@111";
this.Identifier = "MindShare.ApplicationCore.Commands.Outdent";
this.MainMenuPath = "F&ormat@5/&Indent@500/&Decrease@101";
this.MenuText = "&Decrease Indent";
this.Text = "Decrease Indent";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandOutdent
//
this.ContextMenuPath = "&Decrease Indent@111";
this.Identifier = "MindShare.ApplicationCore.Commands.Outdent";
this.MainMenuPath = "F&ormat@5/&Indent@500/&Decrease@101";
this.MenuText = "&Decrease Indent";
this.Text = "Decrease Indent";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,46 +5,45 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPageSetup : Command
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPageSetup : Command
{
public CommandPageSetup(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPageSetup(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
public CommandPageSetup()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPageSetup()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPageSetup
//
this.Identifier = "MindShare.ApplicationCore.Commands.PageSetup";
this.MainMenuPath = "&File@0/-Page Set&up...@120";
this.Text = "Page Setup";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPageSetup
//
this.Identifier = "MindShare.ApplicationCore.Commands.PageSetup";
this.MainMenuPath = "&File@0/-Page Set&up...@120";
this.Text = "Page Setup";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPaste : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPaste : Command
{
public CommandPaste(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPaste(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandPaste()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPaste()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPaste
//
this.ContextMenuPath = "&Paste@104";
this.Identifier = "MindShare.ApplicationCore.Commands.Paste";
this.MainMenuPath = "&Edit@2/&Paste@106";
this.MenuText = "&Paste";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlV;
this.Text = "Paste";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPaste
//
this.ContextMenuPath = "&Paste@104";
this.Identifier = "MindShare.ApplicationCore.Commands.Paste";
this.MainMenuPath = "&Edit@2/&Paste@106";
this.MenuText = "&Paste";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlV;
this.Text = "Paste";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPasteSpecial : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPasteSpecial : Command
{
public CommandPasteSpecial(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPasteSpecial(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandPasteSpecial()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPasteSpecial()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPaste
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.PasteSpecial";
this.MainMenuPath = "&Edit@2/&Paste Special...@108";
this.MenuText = "Paste Spe&cial...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
this.Text = "Paste Special...";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPaste
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.PasteSpecial";
this.MainMenuPath = "&Edit@2/&Paste Special...@108";
this.MenuText = "Paste Spe&cial...";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
this.Text = "Paste Special...";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPasteWithoutFormatting : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandPasteWithoutFormatting : Command
{
public CommandPasteWithoutFormatting(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPasteWithoutFormatting(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandPasteWithoutFormatting()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPasteWithoutFormatting()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPasteWithoutFormatting
//
this.ContextMenuPath = "Paste &Without Formatting@105";
this.Identifier = "MindShare.ApplicationCore.Commands.PasteWithoutFormatting";
this.MainMenuPath = "&Edit@2/Paste &Without Formatting@105";
this.MenuText = "Paste &Without Formatting";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
this.Text = "Paste";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPasteWithoutFormatting
//
this.ContextMenuPath = "Paste &Without Formatting@105";
this.Identifier = "MindShare.ApplicationCore.Commands.PasteWithoutFormatting";
this.MainMenuPath = "&Edit@2/Paste &Without Formatting@105";
this.MenuText = "Paste &Without Formatting";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftV;
this.Text = "Paste";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,47 +5,46 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPrint : Command
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPrint : Command
{
public CommandPrint(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPrint(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
public CommandPrint()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPrint()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPrint
//
this.Identifier = "MindShare.ApplicationCore.Commands.Print";
this.MainMenuPath = "&File@0/&Print...@121";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
this.Text = "Print";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPrint
//
this.Identifier = "MindShare.ApplicationCore.Commands.Print";
this.MainMenuPath = "&File@0/&Print...@121";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
this.Text = "Print";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,46 +5,45 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPrintPreview : Command
{
/// <summary>
/// Summary description for PrintCommand.
/// </summary>
public class CommandPrintPreview : Command
{
public CommandPrintPreview(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPrintPreview(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
public CommandPrintPreview()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandPrintPreview()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPrintPreview
//
this.Identifier = "MindShare.ApplicationCore.Commands.PrintPreview";
this.MainMenuPath = "&File@0/Print Pre&view...-@122";
this.Text = "Print Preview";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandPrintPreview
//
this.Identifier = "MindShare.ApplicationCore.Commands.PrintPreview";
this.MainMenuPath = "&File@0/Print Pre&view...-@122";
this.Text = "Print Preview";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandRename.
/// </summary>
public class CommandRedo : Command
{
/// <summary>
/// Summary description for CommandRename.
/// </summary>
public class CommandRedo : Command
{
public CommandRedo(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandRedo(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandRedo()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandRedo()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandRedo
//
this.Identifier = "MindShare.ApplicationCore.Commands.Redo";
this.MainMenuPath = "&Edit@2/&Redo-@100";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlY;
this.Text = "Redo";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandRedo
//
this.Identifier = "MindShare.ApplicationCore.Commands.Redo";
this.MainMenuPath = "&Edit@2/&Redo-@100";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlY;
this.Text = "Redo";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandSave.
/// </summary>
public class CommandSave : Command
{
/// <summary>
/// Summary description for CommandSave.
/// </summary>
public class CommandSave : Command
{
public CommandSave(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSave(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandSave()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSave()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSave
//
this.Identifier = "MindShare.ApplicationCore.Commands.Save";
this.MainMenuPath = "&File@0/&Save@10";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
this.Text = "Save";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSave
//
this.Identifier = "MindShare.ApplicationCore.Commands.Save";
this.MainMenuPath = "&File@0/&Save@10";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
this.Text = "Save";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,55 +5,54 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandSelectAll : Command
{
/// <summary>
/// Summary description for CommandClear.
/// </summary>
public class CommandSelectAll : Command
{
public CommandSelectAll(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSelectAll(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandSelectAll()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSelectAll()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSelectAll
//
this.ContextMenuPath = "-Select &All@501";
this.Identifier = "MindShare.ApplicationCore.Commands.SelectAll";
this.MainMenuPath = "&Edit@2/-Select &All@501";
this.MenuText = "Select &All";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
this.Text = "Select All";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSelectAll
//
this.ContextMenuPath = "-Select &All@501";
this.Identifier = "MindShare.ApplicationCore.Commands.SelectAll";
this.MainMenuPath = "&Edit@2/-Select &All@501";
this.MenuText = "Select &All";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
this.Text = "Select All";
}
#endregion
}
}
#endregion
}
}

View File

@ -9,54 +9,53 @@ using OpenLiveWriter.ApplicationFramework;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandSendFeedback : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandSendFeedback : Command
{
public CommandSendFeedback(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSendFeedback(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandSendFeedback()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandSendFeedback()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSendFeedback
//
this.ContextMenuPath = "Send &Feedback@305";
this.Identifier = "OpenLiveWriter.Commands.SendFeedback";
this.MainMenuPath = "&Help@500/Send &Feedback@305";
this.MenuText = "Send &Feedback";
this.Text = "Send Feedback";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandSendFeedback
//
this.ContextMenuPath = "Send &Feedback@305";
this.Identifier = "OpenLiveWriter.Commands.SendFeedback";
this.MainMenuPath = "&Help@500/Send &Feedback@305";
this.MenuText = "Send &Feedback";
this.Text = "Send Feedback";
}
#endregion
}
}
#endregion
}
}

View File

@ -8,53 +8,52 @@ using System.Diagnostics;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandShowMenu.
/// </summary>
public class CommandShowMenu : Command
{
/// <summary>
/// Summary description for CommandShowMenu.
/// </summary>
public class CommandShowMenu : Command
{
public CommandShowMenu(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandShowMenu(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public CommandShowMenu()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandShowMenu()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandShowMenu
//
this.Identifier = "OpenLiveWriter.Commands.ShowMenu";
this.MainMenuPath = "&View@2/&Menu Bar@130";
this.MenuText = "Menu Bar";
this.Text = "Show the menu bar";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandShowMenu
//
this.Identifier = "OpenLiveWriter.Commands.ShowMenu";
this.MainMenuPath = "&View@2/&Menu Bar@130";
this.MenuText = "Menu Bar";
this.Text = "Show the menu bar";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandStrikethrough : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandStrikethrough : Command
{
public CommandStrikethrough(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandStrikethrough(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandStrikethrough()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandStrikethrough()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUnderline
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Strikethrough";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlH ;
this.Text = "Strikethrough";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUnderline
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Strikethrough";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlH ;
this.Text = "Strikethrough";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,56 +5,55 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandStyle : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandStyle : Command
{
public CommandStyle(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandStyle(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandStyle()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandStyle()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandStyle
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Style";
this.MainMenuPath = "";
this.MenuText = "";
this.Text = "Style";
this.VisibleOnContextMenu = false;
this.VisibleOnMainMenu = false;
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandStyle
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Style";
this.MainMenuPath = "";
this.MenuText = "";
this.Text = "Style";
this.VisibleOnContextMenu = false;
this.VisibleOnMainMenu = false;
}
#endregion
}
}
#endregion
}
}

View File

@ -5,54 +5,53 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandUnderline : Command
{
/// <summary>
/// Summary description for CommandCopy.
/// </summary>
public class CommandUnderline : Command
{
public CommandUnderline(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandUnderline(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandUnderline()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandUnderline()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUnderline
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Underline";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
this.Text = "Underline";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUnderline
//
this.ContextMenuPath = "";
this.Identifier = "MindShare.ApplicationCore.Commands.Underline";
this.MainMenuPath = "";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
this.Text = "Underline";
}
#endregion
}
}
#endregion
}
}

View File

@ -5,53 +5,52 @@ using System.ComponentModel;
namespace OpenLiveWriter.ApplicationFramework.Commands
{
/// <summary>
/// Summary description for CommandRename.
/// </summary>
public class CommandUndo : Command
{
/// <summary>
/// Summary description for CommandRename.
/// </summary>
public class CommandUndo : Command
{
public CommandUndo(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandUndo(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
public CommandUndo()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public CommandUndo()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
//
//
}
//
//
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUndo
//
this.Identifier = "MindShare.ApplicationCore.Commands.Undo";
this.MainMenuPath = "&Edit@2/&Undo@99";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlZ;
this.Text = "Undo";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// CommandUndo
//
this.Identifier = "MindShare.ApplicationCore.Commands.Undo";
this.MainMenuPath = "&Edit@2/&Undo@99";
this.Shortcut = System.Windows.Forms.Shortcut.CtrlZ;
this.Text = "Undo";
}
#endregion
}
}
#endregion
}
}

View File

@ -10,84 +10,84 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// A default application style.
/// </summary>
public class DefaultApplicationStyle : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// A default application style.
/// </summary>
public class DefaultApplicationStyle : ApplicationStyle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public DefaultApplicationStyle()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
public DefaultApplicationStyle()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// DefaultApplicationStyle
//
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(207)), ((System.Byte)(227)), ((System.Byte)(253)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(180)), ((System.Byte)(215)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(166)), ((System.Byte)(187)), ((System.Byte)(223)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(148)), ((System.Byte)(173)), ((System.Byte)(222)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(213)), ((System.Byte)(249)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(174)), ((System.Byte)(213)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(223)), ((System.Byte)(247)));
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// DefaultApplicationStyle
//
this.ActiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.ActiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.ActiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(181)), ((System.Byte)(193)), ((System.Byte)(196)));
this.ActiveTabTextColor = System.Drawing.Color.Black;
this.ActiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(207)), ((System.Byte)(227)), ((System.Byte)(253)));
this.AlertControlColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(194)));
this.BoldApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.InactiveTabBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(228)), ((System.Byte)(228)), ((System.Byte)(228)));
this.InactiveTabHighlightColor = System.Drawing.Color.FromArgb(((System.Byte)(243)), ((System.Byte)(243)), ((System.Byte)(243)));
this.InactiveTabLowlightColor = System.Drawing.Color.FromArgb(((System.Byte)(189)), ((System.Byte)(189)), ((System.Byte)(189)));
this.InactiveTabTextColor = System.Drawing.Color.Black;
this.InactiveTabTopColor = System.Drawing.Color.FromArgb(((System.Byte)(232)), ((System.Byte)(232)), ((System.Byte)(232)));
this.ItalicApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic);
this.LinkApplicationFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Underline);
this.NormalApplicationFont = new System.Drawing.Font("Tahoma", 8.25F);
this.PrimaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(161)), ((System.Byte)(180)), ((System.Byte)(215)));
this.PrimaryWorkspaceCommandBarBottomBevelFirstLineColor = System.Drawing.Color.FromArgb(((System.Byte)(117)), ((System.Byte)(135)), ((System.Byte)(179)));
this.PrimaryWorkspaceCommandBarBottomBevelSecondLineColor = System.Drawing.Color.FromArgb(((System.Byte)(166)), ((System.Byte)(187)), ((System.Byte)(223)));
this.PrimaryWorkspaceCommandBarBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(148)), ((System.Byte)(173)), ((System.Byte)(222)));
this.PrimaryWorkspaceCommandBarBottomLayoutMargin = 3;
this.PrimaryWorkspaceCommandBarDisabledTextColor = System.Drawing.Color.Gray;
this.PrimaryWorkspaceCommandBarLeftLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarRightLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarSeparatorLayoutMargin = 2;
this.PrimaryWorkspaceCommandBarTextColor = System.Drawing.Color.Black;
this.PrimaryWorkspaceCommandBarTopBevelFirstLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopBevelSecondLineColor = System.Drawing.Color.Transparent;
this.PrimaryWorkspaceCommandBarTopColor = System.Drawing.Color.FromArgb(((System.Byte)(193)), ((System.Byte)(213)), ((System.Byte)(249)));
this.PrimaryWorkspaceCommandBarTopLayoutMargin = 2;
this.PrimaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(154)), ((System.Byte)(174)), ((System.Byte)(213)));
this.SecondaryWorkspaceBottomColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SecondaryWorkspaceTopColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(203)), ((System.Byte)(245)));
this.SmallApplicationFont = new System.Drawing.Font("Tahoma", 6.75F);
this.WorkspacePaneControlColor = System.Drawing.Color.FromArgb(((System.Byte)(214)), ((System.Byte)(223)), ((System.Byte)(247)));
}
#endregion
}
}
#endregion
}
}

View File

@ -6,64 +6,64 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.ApplicationFramework
{
/// <summary>
/// Summary description for DeleteSingleItemDisplayMessage.
/// </summary>
public class NoLinkTextSpecifiedDisplayMessage : DisplayMessage
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Summary description for DeleteSingleItemDisplayMessage.
/// </summary>
public class NoLinkTextSpecifiedDisplayMessage : DisplayMessage
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public NoLinkTextSpecifiedDisplayMessage(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
public NoLinkTextSpecifiedDisplayMessage(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
}
}
public NoLinkTextSpecifiedDisplayMessage()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public NoLinkTextSpecifiedDisplayMessage()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// NoLinkTextSpecifiedDisplayMessage
//
this.Text = "You must specify the text for the hyperlink.";
this.Title = "No Link Text Specified";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// NoLinkTextSpecifiedDisplayMessage
//
this.Text = "You must specify the text for the hyperlink.";
this.Title = "No Link Text Specified";
}
#endregion
}
}
#endregion
}
}

View File

@ -6,64 +6,64 @@ using OpenLiveWriter.Controls;
namespace OpenLiveWriter.ApplicationFramework
{
/// <summary>
/// Summary description for DeleteSingleItemDisplayMessage.
/// </summary>
public class NoValidHyperlinkSpecifiedDisplayMessage : DisplayMessage
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Summary description for DeleteSingleItemDisplayMessage.
/// </summary>
public class NoValidHyperlinkSpecifiedDisplayMessage : DisplayMessage
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
public NoValidHyperlinkSpecifiedDisplayMessage(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
public NoValidHyperlinkSpecifiedDisplayMessage(IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
}
}
public NoValidHyperlinkSpecifiedDisplayMessage()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
public NoValidHyperlinkSpecifiedDisplayMessage()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// NoValidHyperlinkSpecifiedDisplayMesssage
//
this.Text = "You must specify a valid hyperlink.";
this.Title = "Hyperlink Not Specified";
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
//
// NoValidHyperlinkSpecifiedDisplayMesssage
//
this.Text = "You must specify a valid hyperlink.";
this.Title = "Hyperlink Not Specified";
}
#endregion
}
}
#endregion
}
}

View File

@ -40,7 +40,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
}
// <summary>
/// Clean up any resources being used.
/// </summary>
@ -55,7 +54,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
}
private void InitializeCommands()
{
Context.CommandManager.BeginUpdate();
@ -161,7 +159,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
}
private void command_Execute(object sender, EventArgs ea)
{
// notify context
@ -199,7 +196,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
public interface IDynamicCommandMenuContext
{
/// <summary>
@ -309,6 +305,5 @@ namespace OpenLiveWriter.ApplicationFramework
public bool SeparatorBegin;
}
}

View File

@ -6,47 +6,47 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// The interface of a selection manager.
/// </summary>
public interface ICommandManager
{
/// <summary>
/// Activates the specified command.
/// </summary>
/// <param name="command">The Command to activate.</param>
void ActivateCommand(Command command);
/// <summary>
/// The interface of a selection manager.
/// </summary>
public interface ICommandManager
{
/// <summary>
/// Activates the specified command.
/// </summary>
/// <param name="command">The Command to activate.</param>
void ActivateCommand(Command command);
/// <summary>
/// Deactivates the specified command.
/// </summary>
/// <param name="command">The Command to deactivate.</param>
void DeactivateCommand(Command command);
/// <summary>
/// Deactivates the specified command.
/// </summary>
/// <param name="command">The Command to deactivate.</param>
void DeactivateCommand(Command command);
/// <summary>
/// Activates the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to activate.</param>
void ActivateCommandList(CommandList commandList);
/// <summary>
/// Activates the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to activate.</param>
void ActivateCommandList(CommandList commandList);
/// <summary>
/// Deactivates the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to deactivate.</param>
void DeactivateCommandList(CommandList commandList);
/// <summary>
/// Deactivates the specified command list.
/// </summary>
/// <param name="commandProvider">The CommandList to deactivate.</param>
void DeactivateCommandList(CommandList commandList);
/// <summary>
/// Gets the command with the specified command identifier.
/// </summary>
/// <param name="commandIdentifier">The command identifier of the command to get.</param>
/// <returns>The command, or null if a command with the specified command identifier cannot be found.</returns>
Command GetCommand(string commandIdentifier);
/// <summary>
/// Gets the command with the specified command identifier.
/// </summary>
/// <param name="commandIdentifier">The command identifier of the command to get.</param>
/// <returns>The command, or null if a command with the specified command identifier cannot be found.</returns>
Command GetCommand(string commandIdentifier);
/// <summary>
/// Gets the command with the specified shortcut.
/// </summary>
/// <param name="commandIdentifier">The shortcut of the command to get.</param>
/// <returns>The command, or null if a command with the specified shortcut cannot be found.</returns>
Command GetCommand(Shortcut shortcut);
}
/// <summary>
/// Gets the command with the specified shortcut.
/// </summary>
/// <param name="commandIdentifier">The shortcut of the command to get.</param>
/// <returns>The command, or null if a command with the specified shortcut cannot be found.</returns>
Command GetCommand(Shortcut shortcut);
}
}

View File

@ -5,17 +5,17 @@ using System;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Interface for command providers.
/// </summary>
public interface ICommandProvider
{
/// <summary>
/// Returns the command list for the command provider.
/// </summary>
CommandList CommandList
{
get;
}
}
/// <summary>
/// Interface for command providers.
/// </summary>
public interface ICommandProvider
{
/// <summary>
/// Returns the command list for the command provider.
/// </summary>
CommandList CommandList
{
get;
}
}
}

View File

@ -242,4 +242,3 @@ namespace OpenLiveWriter.ApplicationFramework
}

View File

@ -8,219 +8,219 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// MenuBuilderEntry is an internal class used to build Command-based menus.
/// </summary>
internal sealed class MenuBuilderEntry
{
/// <summary>
/// The MenuBuilder for this MenuBuilderEntry.
/// </summary>
private MenuBuilder menuBuilder;
/// <summary>
/// MenuBuilderEntry is an internal class used to build Command-based menus.
/// </summary>
internal sealed class MenuBuilderEntry
{
/// <summary>
/// The MenuBuilder for this MenuBuilderEntry.
/// </summary>
private MenuBuilder menuBuilder;
/// <summary>
/// Merge menu entry level.
/// </summary>
private int level;
/// <summary>
/// Merge menu entry level.
/// </summary>
private int level;
/// <summary>
/// Gets the merge menu entry level.
/// </summary>
public int Level
{
get
{
return level;
}
}
/// <summary>
/// Gets the merge menu entry level.
/// </summary>
public int Level
{
get
{
return level;
}
}
/// <summary>
/// Merge menu entry position.
/// </summary>
private int position;
/// <summary>
/// Merge menu entry position.
/// </summary>
private int position;
/// <summary>
/// Gets the merge menu entry position.
/// </summary>
public int Position
{
get
{
return position;
}
}
/// <summary>
/// Gets the merge menu entry position.
/// </summary>
public int Position
{
get
{
return position;
}
}
/// <summary>
/// Merge menu entry text.
/// </summary>
private string text;
/// <summary>
/// Merge menu entry text.
/// </summary>
private string text;
/// <summary>
/// Gets the merge menu entry text.
/// </summary>
public string Text
{
get
{
return text;
}
}
/// <summary>
/// Gets the merge menu entry text.
/// </summary>
public string Text
{
get
{
return text;
}
}
/// <summary>
/// Merge menu entry command.
/// </summary>
private Command command;
/// <summary>
/// Merge menu entry command.
/// </summary>
private Command command;
/// <summary>
/// Gets the merge menu entry command.
/// </summary>
public Command Command
{
get
{
return command;
}
}
/// <summary>
/// Gets the merge menu entry command.
/// </summary>
public Command Command
{
get
{
return command;
}
}
/// <summary>
/// Child merge menu entries.
/// </summary>
private SortedList childMergeMenuEntries = new SortedList();
/// <summary>
/// Child merge menu entries.
/// </summary>
private SortedList childMergeMenuEntries = new SortedList();
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class.
/// </summary>
public MenuBuilderEntry(MenuBuilder menuBuilder)
{
this.menuBuilder = menuBuilder;
this.level = -1;
}
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class.
/// </summary>
public MenuBuilderEntry(MenuBuilder menuBuilder)
{
this.menuBuilder = menuBuilder;
this.level = -1;
}
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class. This constructor is used for
/// top level and "container" menu items.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
public MenuBuilderEntry(MenuBuilder menuBuilder, int level, int position, string text)
: this(menuBuilder, level, position, text, null)
{
}
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class. This constructor is used for
/// top level and "container" menu items.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
public MenuBuilderEntry(MenuBuilder menuBuilder, int level, int position, string text)
: this(menuBuilder, level, position, text, null)
{
}
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class. This constructor is used for
/// the command menu entry.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
/// <param name="command">Merge menu entry command.</param>
public MenuBuilderEntry(MenuBuilder menuBuilder, int level, int position, string text, Command command)
{
this.menuBuilder = menuBuilder;
this.level = level;
this.position = position;
this.text = text;
this.command = command;
}
/// <summary>
/// Initializes a new instance of the MenuBuilderEntry class. This constructor is used for
/// the command menu entry.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
/// <param name="command">Merge menu entry command.</param>
public MenuBuilderEntry(MenuBuilder menuBuilder, int level, int position, string text, Command command)
{
this.menuBuilder = menuBuilder;
this.level = level;
this.position = position;
this.text = text;
this.command = command;
}
/// <summary>
/// Indexer for access child merge menu entries.
/// </summary>
public MenuBuilderEntry this [int position, string text]
{
get
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
return (MenuBuilderEntry)childMergeMenuEntries[key];
}
set
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
childMergeMenuEntries[key] = value;
}
}
/// <summary>
/// Indexer for access child merge menu entries.
/// </summary>
public MenuBuilderEntry this [int position, string text]
{
get
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
return (MenuBuilderEntry)childMergeMenuEntries[key];
}
set
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
childMergeMenuEntries[key] = value;
}
}
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <param name="mainMenu">The level at which the MenuItems will appear.</param>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems()
{
// If this merge menu entry has no child merge menu entries, return null.
if (childMergeMenuEntries.Count == 0)
return null;
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <param name="mainMenu">The level at which the MenuItems will appear.</param>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems()
{
// If this merge menu entry has no child merge menu entries, return null.
if (childMergeMenuEntries.Count == 0)
return null;
// Construct an array list to hold the menu items being created.
ArrayList menuItemArrayList = new ArrayList();
// Construct an array list to hold the menu items being created.
ArrayList menuItemArrayList = new ArrayList();
// Enumerate the child merge menu entries of this merge menu entry.
foreach (MenuBuilderEntry mergeMenuEntry in childMergeMenuEntries.Values)
{
// Get the text of the merge menu entry.
string text = mergeMenuEntry.Text;
// Enumerate the child merge menu entries of this merge menu entry.
foreach (MenuBuilderEntry mergeMenuEntry in childMergeMenuEntries.Values)
{
// Get the text of the merge menu entry.
string text = mergeMenuEntry.Text;
// Create the menu item for this child merge menu entry.
MenuItem menuItem;
bool separatorBefore, separatorAfter;
if (menuBuilder.MenuType == MenuType.Main && mergeMenuEntry.level == 0)
{
// Level zero of a main menu.
menuItem = new OwnerDrawMenuItem(menuBuilder.MenuType);
separatorBefore = separatorAfter = false;
}
else
{
// Determine whether a separator before and a separator after the menu item
// should be inserted.
separatorBefore = text.StartsWith(SEPARATOR_TEXT);
separatorAfter = text.EndsWith(SEPARATOR_TEXT);
if (separatorBefore || separatorAfter)
text = text.Replace(SEPARATOR_TEXT, string.Empty);
// Create the menu item for this child merge menu entry.
MenuItem menuItem;
bool separatorBefore, separatorAfter;
if (menuBuilder.MenuType == MenuType.Main && mergeMenuEntry.level == 0)
{
// Level zero of a main menu.
menuItem = new OwnerDrawMenuItem(menuBuilder.MenuType);
separatorBefore = separatorAfter = false;
}
else
{
// Determine whether a separator before and a separator after the menu item
// should be inserted.
separatorBefore = text.StartsWith(SEPARATOR_TEXT);
separatorAfter = text.EndsWith(SEPARATOR_TEXT);
if (separatorBefore || separatorAfter)
text = text.Replace(SEPARATOR_TEXT, string.Empty);
// Instantiate the menu item.
if (mergeMenuEntry.Command == null)
menuItem = new OwnerDrawMenuItem(menuBuilder.MenuType);
else
menuItem = new CommandOwnerDrawMenuItem(menuBuilder.MenuType, mergeMenuEntry.Command);
}
// Instantiate the menu item.
if (mergeMenuEntry.Command == null)
menuItem = new OwnerDrawMenuItem(menuBuilder.MenuType);
else
menuItem = new CommandOwnerDrawMenuItem(menuBuilder.MenuType, mergeMenuEntry.Command);
}
// Set the menu item text.
menuItem.Text = text;
// Set the menu item text.
menuItem.Text = text;
// If this child merge menu entry has any child merge menu entries, recursively
// create their menu items.
MenuItem[] childMenuItems = mergeMenuEntry.CreateMenuItems();
if (childMenuItems != null)
menuItem.MenuItems.AddRange(childMenuItems);
// If this child merge menu entry has any child merge menu entries, recursively
// create their menu items.
MenuItem[] childMenuItems = mergeMenuEntry.CreateMenuItems();
if (childMenuItems != null)
menuItem.MenuItems.AddRange(childMenuItems);
// Add the separator menu item, as needed.
if (separatorBefore)
menuItemArrayList.Add(MakeSeparatorMenuItem(menuBuilder.MenuType));
// Add the separator menu item, as needed.
if (separatorBefore)
menuItemArrayList.Add(MakeSeparatorMenuItem(menuBuilder.MenuType));
// Add the menu item to the array of menu items being returned.
menuItemArrayList.Add(menuItem);
// Add the menu item to the array of menu items being returned.
menuItemArrayList.Add(menuItem);
// Add the separator menu item, as needed.
if (separatorAfter)
menuItemArrayList.Add(MakeSeparatorMenuItem(menuBuilder.MenuType));
}
// Add the separator menu item, as needed.
if (separatorAfter)
menuItemArrayList.Add(MakeSeparatorMenuItem(menuBuilder.MenuType));
}
// Done. Convert the array list into a MenuItem array and return it.
return (MenuItem[])menuItemArrayList.ToArray(typeof(MenuItem));
}
// Done. Convert the array list into a MenuItem array and return it.
return (MenuItem[])menuItemArrayList.ToArray(typeof(MenuItem));
}
/// <summary>
/// Helper to make a separator menu item.
/// </summary>
/// <returns>A MenuItem that is a separator MenuItem.</returns>
private static MenuItem MakeSeparatorMenuItem(MenuType menuType)
{
// Instantiate the separator menu item.
MenuItem separatorMenuItem = new OwnerDrawMenuItem(menuType);
separatorMenuItem.Text = SEPARATOR_TEXT;
return separatorMenuItem;
}
}
/// <summary>
/// Helper to make a separator menu item.
/// </summary>
/// <returns>A MenuItem that is a separator MenuItem.</returns>
private static MenuItem MakeSeparatorMenuItem(MenuType menuType)
{
// Instantiate the separator menu item.
MenuItem separatorMenuItem = new OwnerDrawMenuItem(menuType);
separatorMenuItem.Text = SEPARATOR_TEXT;
return separatorMenuItem;
}
}
}

View File

@ -15,160 +15,160 @@ using Project31.Controls;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Specifies type of merge menu to build.
/// </summary>
internal enum MergeMenuType
{
/// <summary>
/// Performs merge operations for a MainMenu.
/// </summary>
Main,
/// <summary>
/// Specifies type of merge menu to build.
/// </summary>
internal enum MergeMenuType
{
/// <summary>
/// Performs merge operations for a MainMenu.
/// </summary>
Main,
/// <summary>
/// Performs merge operations for a ContextMenu.
/// </summary>
Context
}
/// <summary>
/// Performs merge operations for a ContextMenu.
/// </summary>
Context
}
/// <summary>
/// Menu mergers and aquisitions.
/// </summary>
internal class MergeMenu
{
/// <summary>
/// The root merge menu entry. Commands are merged as child entries of this entry and
/// returned as an array of MenuItems.
/// </summary>
private MergeMenuEntry rootMergeMenuEntry = new MergeMenuEntry();
/// <summary>
/// Menu mergers and aquisitions.
/// </summary>
internal class MergeMenu
{
/// <summary>
/// The root merge menu entry. Commands are merged as child entries of this entry and
/// returned as an array of MenuItems.
/// </summary>
private MergeMenuEntry rootMergeMenuEntry = new MergeMenuEntry();
/// <summary>
/// The type of menu merge to perform.
/// </summary>
private MenuType menuType = MenuType.Main;
/// <summary>
/// The type of menu merge to perform.
/// </summary>
private MenuType menuType = MenuType.Main;
/// <summary>
/// Gets or sets the type of menu merge to perform.
/// </summary>
public MenuType MenuType
{
get
{
return menuType;
}
set
{
menuType = value;
}
}
/// <summary>
/// Gets or sets the type of menu merge to perform.
/// </summary>
public MenuType MenuType
{
get
{
return menuType;
}
set
{
menuType = value;
}
}
/// <summary>
/// Initializes a new instance of the MergeMenu class.
/// </summary>
public MergeMenu()
{
}
/// <summary>
/// Initializes a new instance of the MergeMenu class.
/// </summary>
public MergeMenu()
{
}
/// <summary>
/// Creates and returns a set of menu items for the commands that have been merged.
/// </summary>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems()
{
return rootMergeMenuEntry.CreateMenuItems();
}
/// <summary>
/// Creates and returns a set of menu items for the commands that have been merged.
/// </summary>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems()
{
return rootMergeMenuEntry.CreateMenuItems();
}
/// <summary>
/// Merge a Command into the merge menu.
/// </summary>
/// <param name="command">The command to merge.</param>
/// <param name="menuPath">The menu path at which to merge the command. Generally, this
/// will be either command.MainMenuPath or command.ContextMenuPath, but it can also be
/// a totally custom menu path as well.</param>
public void MergeCommand(Command command, string menuPath)
{
// Ensure that a menu path was specified.
Debug.Assert(menuPath != null && menuPath.Length != 0, "No menu path specified");
if (menuPath == null || menuPath.Length == 0)
return;
/// <summary>
/// Merge a Command into the merge menu.
/// </summary>
/// <param name="command">The command to merge.</param>
/// <param name="menuPath">The menu path at which to merge the command. Generally, this
/// will be either command.MainMenuPath or command.ContextMenuPath, but it can also be
/// a totally custom menu path as well.</param>
public void MergeCommand(Command command, string menuPath)
{
// Ensure that a menu path was specified.
Debug.Assert(menuPath != null && menuPath.Length != 0, "No menu path specified");
if (menuPath == null || menuPath.Length == 0)
return;
// Parse the menu path into an array of menu path entries.
string[] menuPathEntries = menuPath.Split(new char[] {'/'});
// Parse the menu path into an array of menu path entries.
string[] menuPathEntries = menuPath.Split(new char[] {'/'});
// Build the menu structure for this command from the array of menu path entries. For
// example, &File@1/&Close@2 specifies that this command represents the Close command
// of the File menu. It specifies that the Close MenuItem should appear at merge
// position 2 of the File menu, and that the File menu should appear at merge position
// 1 of the main menu.
int lastEntry = menuPathEntries.Length-1;
MergeMenuEntry parentMergeMenuEntry = rootMergeMenuEntry;
for (int entry = 0; entry <= lastEntry; entry++)
{
// Parse the menu path entry into text and position values.
string text;
int position;
ParseMenuPathEntry(menuPathEntries[entry], out text, out position);
// Build the menu structure for this command from the array of menu path entries. For
// example, &File@1/&Close@2 specifies that this command represents the Close command
// of the File menu. It specifies that the Close MenuItem should appear at merge
// position 2 of the File menu, and that the File menu should appear at merge position
// 1 of the main menu.
int lastEntry = menuPathEntries.Length-1;
MergeMenuEntry parentMergeMenuEntry = rootMergeMenuEntry;
for (int entry = 0; entry <= lastEntry; entry++)
{
// Parse the menu path entry into text and position values.
string text;
int position;
ParseMenuPathEntry(menuPathEntries[entry], out text, out position);
// See if we have a merge menu entry for this text and position already.
MergeMenuEntry mergeMenuEntry = (MergeMenuEntry)parentMergeMenuEntry[position, text];
if (entry == lastEntry)
{
// Create the merge menu entry for this menu path entry.
parentMergeMenuEntry[position, text] = new MergeMenuEntry(position, text, command);
}
else
{
// If there isn't a merge menu entry for this intermediate menu path entry,
// create it.
if (mergeMenuEntry == null)
{
mergeMenuEntry = new MergeMenuEntry(position, text);
parentMergeMenuEntry[position, text] = mergeMenuEntry;
}
// See if we have a merge menu entry for this text and position already.
MergeMenuEntry mergeMenuEntry = (MergeMenuEntry)parentMergeMenuEntry[position, text];
if (entry == lastEntry)
{
// Create the merge menu entry for this menu path entry.
parentMergeMenuEntry[position, text] = new MergeMenuEntry(position, text, command);
}
else
{
// If there isn't a merge menu entry for this intermediate menu path entry,
// create it.
if (mergeMenuEntry == null)
{
mergeMenuEntry = new MergeMenuEntry(position, text);
parentMergeMenuEntry[position, text] = mergeMenuEntry;
}
// Set the root to this merge menu entry for the next loop iteration.
parentMergeMenuEntry = mergeMenuEntry;
}
}
}
// Set the root to this merge menu entry for the next loop iteration.
parentMergeMenuEntry = mergeMenuEntry;
}
}
}
/// <summary>
/// Helper to parse a menu path entry describing a menu item in the form:
/// [-]text@position
///
/// '-' Optional. Specifies that a separator menu item should be inserted before the
/// menu item item.
/// text Menu item text (i.e. &File)
/// position Menu item position. For example, &File@1 specifies File menu, first menu
/// position, and &Edit@2 specifies Edit menu, second menu position.
/// </summary>
/// <param name="menuName">The menu path entry to parse.</param>
/// <param name="text">The return text for the menu item specified in this menu path entry.</param>
/// <param name="position">The return position for the menu item specified in this menu path entry.</param>
private static void ParseMenuPathEntry(string menuPathEntry, out string text, out int position)
{
// Parse the menu path entry.
string[] values = menuPathEntry.Split(new char[] {'@'});
Debug.Assert(values.Length == 2, "Invalid menu path entry.", String.Format("{0} is not a valid menu path entry.", menuPathEntry));
/// <summary>
/// Helper to parse a menu path entry describing a menu item in the form:
/// [-]text@position
///
/// '-' Optional. Specifies that a separator menu item should be inserted before the
/// menu item item.
/// text Menu item text (i.e. &File)
/// position Menu item position. For example, &File@1 specifies File menu, first menu
/// position, and &Edit@2 specifies Edit menu, second menu position.
/// </summary>
/// <param name="menuName">The menu path entry to parse.</param>
/// <param name="text">The return text for the menu item specified in this menu path entry.</param>
/// <param name="position">The return position for the menu item specified in this menu path entry.</param>
private static void ParseMenuPathEntry(string menuPathEntry, out string text, out int position)
{
// Parse the menu path entry.
string[] values = menuPathEntry.Split(new char[] {'@'});
Debug.Assert(values.Length == 2, "Invalid menu path entry.", String.Format("{0} is not a valid menu path entry.", menuPathEntry));
// Set the name.
text = values[0];
// Set the name.
text = values[0];
// Set the position.
position = 0;
if (values.Length == 2)
{
try
{
position = Int32.Parse(values[1]);
}
catch (Exception)
{
// Don't kill a running system because of this problem. In this case, use a
// position of 0 and keep on running. For debug mode, throw an assertion.
Debug.Assert(false, "Invalid menu merge order specified.", String.Format("{0} contains an invalid menu merge order specification.", menuPathEntry));
}
}
}
}
// Set the position.
position = 0;
if (values.Length == 2)
{
try
{
position = Int32.Parse(values[1]);
}
catch (Exception)
{
// Don't kill a running system because of this problem. In this case, use a
// position of 0 and keep on running. For debug mode, throw an assertion.
Debug.Assert(false, "Invalid menu merge order specified.", String.Format("{0} contains an invalid menu merge order specification.", menuPathEntry));
}
}
}
}
}

View File

@ -8,196 +8,196 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// MergeMenuEntry is an internal class used to build Command-based menus.
/// </summary>
internal class MergeMenuEntry
{
/// <summary>
/// Used to indicate that the menu item should include a separator. Example: -File@0
/// </summary>
private static string SEPARATOR_TEXT = "-";
/// <summary>
/// MergeMenuEntry is an internal class used to build Command-based menus.
/// </summary>
internal class MergeMenuEntry
{
/// <summary>
/// Used to indicate that the menu item should include a separator. Example: -File@0
/// </summary>
private static string SEPARATOR_TEXT = "-";
/// <summary>
/// Merge menu entry position.
/// </summary>
private int position;
/// <summary>
/// Merge menu entry position.
/// </summary>
private int position;
/// <summary>
/// Gets the merge menu entry position.
/// </summary>
public int Position
{
get
{
return position;
}
}
/// <summary>
/// Gets the merge menu entry position.
/// </summary>
public int Position
{
get
{
return position;
}
}
/// <summary>
/// Merge menu entry text.
/// </summary>
private string text;
/// <summary>
/// Merge menu entry text.
/// </summary>
private string text;
/// <summary>
/// Gets the merge menu entry text.
/// </summary>
public string Text
{
get
{
return text;
}
}
/// <summary>
/// Gets the merge menu entry text.
/// </summary>
public string Text
{
get
{
return text;
}
}
/// <summary>
/// Merge menu entry command.
/// </summary>
private Command command;
/// <summary>
/// Merge menu entry command.
/// </summary>
private Command command;
/// <summary>
/// Gets the merge menu entry command.
/// </summary>
public Command Command
{
get
{
return command;
}
}
/// <summary>
/// Gets the merge menu entry command.
/// </summary>
public Command Command
{
get
{
return command;
}
}
/// <summary>
/// Child merge menu entries.
/// </summary>
private SortedList childMergeMenuEntries = new SortedList();
/// <summary>
/// Child merge menu entries.
/// </summary>
private SortedList childMergeMenuEntries = new SortedList();
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class.
/// </summary>
public MergeMenuEntry()
{
}
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class.
/// </summary>
public MergeMenuEntry()
{
}
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class. This constructor is used for
/// top level and "container" menu items.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
public MergeMenuEntry(int position, string text)
{
this.position = position;
this.text = text;
this.command = null;
}
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class. This constructor is used for
/// top level and "container" menu items.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
public MergeMenuEntry(int position, string text)
{
this.position = position;
this.text = text;
this.command = null;
}
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class. This constructor is used for
/// the command menu entry.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
/// <param name="command">Merge menu entry command.</param>
public MergeMenuEntry(int position, string text, Command command)
{
this.position = position;
this.text = text;
this.command = command;
}
/// <summary>
/// Initializes a new instance of the MergeMenuEntry class. This constructor is used for
/// the command menu entry.
/// </summary>
/// <param name="position">Merge menu entry position.</param>
/// <param name="text">Merge menu entry text.</param>
/// <param name="command">Merge menu entry command.</param>
public MergeMenuEntry(int position, string text, Command command)
{
this.position = position;
this.text = text;
this.command = command;
}
/// <summary>
/// Indexer for access child merge menu entries.
/// </summary>
public MergeMenuEntry this [int position, string text]
{
get
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
return (MergeMenuEntry)childMergeMenuEntries[key];
}
set
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
childMergeMenuEntries[key] = value;
}
}
/// <summary>
/// Indexer for access child merge menu entries.
/// </summary>
public MergeMenuEntry this [int position, string text]
{
get
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
return (MergeMenuEntry)childMergeMenuEntries[key];
}
set
{
string key = String.Format("{0}-{1}", position.ToString("D3"), text);
childMergeMenuEntries[key] = value;
}
}
#if false
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems(bool mainMenu)
{
return CreateMenuItems(mainMenu);
}
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems(bool mainMenu)
{
return CreateMenuItems(mainMenu);
}
#endif
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <param name="mainMenu">The level at which the MenuItems will appear.</param>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems(bool mainMenu)
{
// If this merge menu entry has no child merge menu entries, return null.
if (childMergeMenuEntries.Count == 0)
return null;
/// <summary>
/// Creates and returns a set of menu items from the child merge menu entries in this merge
/// menu entry.
/// </summary>
/// <param name="mainMenu">The level at which the MenuItems will appear.</param>
/// <returns>Array of menu items.</returns>
public MenuItem[] CreateMenuItems(bool mainMenu)
{
// If this merge menu entry has no child merge menu entries, return null.
if (childMergeMenuEntries.Count == 0)
return null;
// Construct an array list to hold the menu items being created.
ArrayList menuItemArrayList = new ArrayList();
// Construct an array list to hold the menu items being created.
ArrayList menuItemArrayList = new ArrayList();
// Enumerate the child merge menu entries of this merge menu entry.
foreach (MergeMenuEntry mergeMenuEntry in childMergeMenuEntries.Values)
{
// Get the text of the merge menu entry.
string text = mergeMenuEntry.Text;
// Enumerate the child merge menu entries of this merge menu entry.
foreach (MergeMenuEntry mergeMenuEntry in childMergeMenuEntries.Values)
{
// Get the text of the merge menu entry.
string text = mergeMenuEntry.Text;
// Create the menu item for this child merge menu entry.
MenuItem menuItem;
if (mainMenu)
menuItem = new OwnerDrawMenuItem();
else
{
// If the text of the merge menu entry specifies that a separator menu item
// should appear before it, insert a separator menu item.
if (text.StartsWith(SEPARATOR_TEXT))
{
// Strip off the SEPARATOR_TEXT.
text = text.Substring(1);
// Create the menu item for this child merge menu entry.
MenuItem menuItem;
if (mainMenu)
menuItem = new OwnerDrawMenuItem();
else
{
// If the text of the merge menu entry specifies that a separator menu item
// should appear before it, insert a separator menu item.
if (text.StartsWith(SEPARATOR_TEXT))
{
// Strip off the SEPARATOR_TEXT.
text = text.Substring(1);
// Instantiate the separator menu item.
MenuItem separatorMenuItem = new OwnerDrawMenuItem();
separatorMenuItem.Text = SEPARATOR_TEXT;
// Instantiate the separator menu item.
MenuItem separatorMenuItem = new OwnerDrawMenuItem();
separatorMenuItem.Text = SEPARATOR_TEXT;
// Add the separator menu item to the array of menu items being returned.
menuItemArrayList.Add(separatorMenuItem);
}
// Add the separator menu item to the array of menu items being returned.
menuItemArrayList.Add(separatorMenuItem);
}
// Instantiate the menu item.
if (mergeMenuEntry.Command == null)
menuItem = new OwnerDrawMenuItem();
else
menuItem = new CommandOwnerDrawMenuItem(mergeMenuEntry.Command);
}
// Instantiate the menu item.
if (mergeMenuEntry.Command == null)
menuItem = new OwnerDrawMenuItem();
else
menuItem = new CommandOwnerDrawMenuItem(mergeMenuEntry.Command);
}
// Set the menu item text.
menuItem.Text = text;
// Set the menu item text.
menuItem.Text = text;
// If this child merge menu entry has any child merge menu entries, recursively
// create their menu items.
MenuItem[] childMenuItems = mergeMenuEntry.CreateMenuItems(false);
if (childMenuItems != null)
menuItem.MenuItems.AddRange(childMenuItems);
// If this child merge menu entry has any child merge menu entries, recursively
// create their menu items.
MenuItem[] childMenuItems = mergeMenuEntry.CreateMenuItems(false);
if (childMenuItems != null)
menuItem.MenuItems.AddRange(childMenuItems);
// Add the menu item to the array of menu items being returned.
menuItemArrayList.Add(menuItem);
}
// Add the menu item to the array of menu items being returned.
menuItemArrayList.Add(menuItem);
}
// Done. Convert the array list into a MenuItem array and return it.
return (MenuItem[])menuItemArrayList.ToArray(typeof(MenuItem));
}
}
// Done. Convert the array list into a MenuItem array and return it.
return (MenuItem[])menuItemArrayList.ToArray(typeof(MenuItem));
}
}
}

View File

@ -96,7 +96,6 @@ namespace OpenLiveWriter.ApplicationFramework
}
}
protected override void OnPaint(PaintEventArgs e)
{

View File

@ -179,7 +179,6 @@ namespace OpenLiveWriter.ApplicationFramework
PerformLayout();
Invalidate();
if (selectedIndex >= 0 && SelectedTabChanged != null)
SelectedTabChanged(this, new SelectedTabChangedEventArgs(selectedIndex));
}

View File

@ -9,43 +9,43 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
public class MultiPaneApplicationWorkspace : Project31.Controls.LightweightControlContainerControl
{
private System.ComponentModel.IContainer components = null;
public class MultiPaneApplicationWorkspace : Project31.Controls.LightweightControlContainerControl
{
private System.ComponentModel.IContainer components = null;
public MultiPaneApplicationWorkspace()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
public MultiPaneApplicationWorkspace()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
}
// TODO: Add any initialization after the InitializeComponent call
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -13,531 +13,531 @@ using Project31.CoreServices;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Multipane lightweight control.
/// </summary>
public class MultiPaneLightweightControl : LightweightControl
{
/// <summary>
/// The height of the gutter area.
/// </summary>
private const int GUTTER_HEIGHT = 22;
/// <summary>
/// Multipane lightweight control.
/// </summary>
public class MultiPaneLightweightControl : LightweightControl
{
/// <summary>
/// The height of the gutter area.
/// </summary>
private const int GUTTER_HEIGHT = 22;
/// <summary>
/// The border size.
/// </summary>
private const int BORDER_SIZE = 4;
/// <summary>
/// The border size.
/// </summary>
private const int BORDER_SIZE = 4;
/// <summary>
/// The splitter width.
/// </summary>
private int SPLITTER_WIDTH = 4;
/// <summary>
/// The splitter width.
/// </summary>
private int SPLITTER_WIDTH = 4;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components;
/// <summary>
/// The left splitter position. This is the offset of the left splitter from the left edge
/// of the multi pane lightweight control. A value of -1 indicates that the left splitter
/// position has not been set.
/// </summary>
private int leftSplitterPosition = -1;
private int newLeftSplitterPosition = -1;
/// <summary>
/// The left splitter position. This is the offset of the left splitter from the left edge
/// of the multi pane lightweight control. A value of -1 indicates that the left splitter
/// position has not been set.
/// </summary>
private int leftSplitterPosition = -1;
private int newLeftSplitterPosition = -1;
/// <summary>
/// The right splitter position. This is the offset of the right splitter from the right
/// edge of the multi pane lightweight control. A value of -1 indicates that the right
/// splitter position has not been set.
/// </summary>
private int rightSplitterPosition = -1;
private int newRightSplitterPosition = -1;
/// <summary>
/// The right splitter position. This is the offset of the right splitter from the right
/// edge of the multi pane lightweight control. A value of -1 indicates that the right
/// splitter position has not been set.
/// </summary>
private int rightSplitterPosition = -1;
private int newRightSplitterPosition = -1;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlLeft;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlLeft;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlCenter;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlCenter;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlRight;
/// <summary>
///
/// </summary>
private Project31.ApplicationFramework.WorkPaneLightweightControl workPaneLightweightControlRight;
/// <summary>
/// The left splitter lightweight control.
/// </summary>
private Project31.ApplicationFramework.SplitterLightweightControl leftSplitter;
/// <summary>
/// The left splitter lightweight control.
/// </summary>
private Project31.ApplicationFramework.SplitterLightweightControl leftSplitter;
/// <summary>
/// The right splitter lightweight control.
/// </summary>
private Project31.ApplicationFramework.SplitterLightweightControl rightSplitter;
/// <summary>
/// The right splitter lightweight control.
/// </summary>
private Project31.ApplicationFramework.SplitterLightweightControl rightSplitter;
/// <summary>
/// The gutter lightweight control.
/// </summary>
private Project31.Controls.GutterLightweightControl gutter;
/// <summary>
/// The gutter lightweight control.
/// </summary>
private Project31.Controls.GutterLightweightControl gutter;
/// <summary>
/// Gets or sets the left pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the left pane control.")
]
public Control LeftPaneControl
{
get
{
return workPaneLightweightControlLeft.Control;
}
set
{
workPaneLightweightControlLeft.Control = value;
}
}
/// <summary>
/// Gets or sets the left pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the left pane control.")
]
public Control LeftPaneControl
{
get
{
return workPaneLightweightControlLeft.Control;
}
set
{
workPaneLightweightControlLeft.Control = value;
}
}
/// <summary>
/// Gets or sets the center pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the center pane control.")
]
public Control CenterPaneControl
{
get
{
return workPaneLightweightControlCenter.Control;
}
set
{
workPaneLightweightControlCenter.Control = value;
}
}
/// <summary>
/// Gets or sets the center pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the center pane control.")
]
public Control CenterPaneControl
{
get
{
return workPaneLightweightControlCenter.Control;
}
set
{
workPaneLightweightControlCenter.Control = value;
}
}
/// <summary>
/// Gets or sets the right pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the right pane control.")
]
public Control RightPaneControl
{
get
{
return workPaneLightweightControlRight.Control;
}
set
{
workPaneLightweightControlRight.Control = value;
}
}
/// <summary>
/// Gets or sets the right pane control.
/// </summary>
[
Category("Layout"),
Localizable(false),
DefaultValue(null),
Description("Specifies the right pane control.")
]
public Control RightPaneControl
{
get
{
return workPaneLightweightControlRight.Control;
}
set
{
workPaneLightweightControlRight.Control = value;
}
}
/// <summary>
/// The vertical tracking indicator. This helper class displays the splitter position when
/// a splitter is being resized.
/// </summary>
VerticalTrackingIndicator verticalTrackingIdicator = new VerticalTrackingIndicator();
/// <summary>
/// The vertical tracking indicator. This helper class displays the splitter position when
/// a splitter is being resized.
/// </summary>
VerticalTrackingIndicator verticalTrackingIdicator = new VerticalTrackingIndicator();
/// <summary>
/// Initializes a new instance of the MultiPaneLightweightControl class.
/// </summary>
/// <param name="container"></param>
public MultiPaneLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the MultiPaneLightweightControl class.
/// </summary>
/// <param name="container"></param>
public MultiPaneLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the MultiPaneLightweightControl class.
/// </summary>
public MultiPaneLightweightControl()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the MultiPaneLightweightControl class.
/// </summary>
public MultiPaneLightweightControl()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.leftSplitter = new Project31.ApplicationFramework.SplitterLightweightControl(this.components);
this.rightSplitter = new Project31.ApplicationFramework.SplitterLightweightControl(this.components);
this.gutter = new Project31.Controls.GutterLightweightControl(this.components);
this.workPaneLightweightControlLeft = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
this.workPaneLightweightControlCenter = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
this.workPaneLightweightControlRight = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
//
// leftSplitter
//
this.leftSplitter.LightweightControlContainerControl = this;
this.leftSplitter.SplitterEndMove += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.leftSplitter_SplitterEndMove);
this.leftSplitter.SplitterBeginMove += new System.EventHandler(this.leftSplitter_SplitterBeginMove);
this.leftSplitter.SplitterMoving += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.leftSplitter_SplitterMoving);
//
// rightSplitter
//
this.rightSplitter.LightweightControlContainerControl = this;
this.rightSplitter.SplitterEndMove += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.rightSplitter_SplitterEndMove);
this.rightSplitter.SplitterBeginMove += new System.EventHandler(this.rightSplitter_SplitterBeginMove);
this.rightSplitter.SplitterMoving += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.rightSplitter_SplitterMoving);
//
// gutter
//
this.gutter.LightweightControlContainerControl = this;
//
// workPaneLightweightControlLeft
//
this.workPaneLightweightControlLeft.Control = null;
this.workPaneLightweightControlLeft.LightweightControlContainerControl = this;
//
// workPaneLightweightControlCenter
//
this.workPaneLightweightControlCenter.Control = null;
this.workPaneLightweightControlCenter.LightweightControlContainerControl = this;
//
// workPaneLightweightControlRight
//
this.workPaneLightweightControlRight.Control = null;
this.workPaneLightweightControlRight.LightweightControlContainerControl = this;
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.leftSplitter = new Project31.ApplicationFramework.SplitterLightweightControl(this.components);
this.rightSplitter = new Project31.ApplicationFramework.SplitterLightweightControl(this.components);
this.gutter = new Project31.Controls.GutterLightweightControl(this.components);
this.workPaneLightweightControlLeft = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
this.workPaneLightweightControlCenter = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
this.workPaneLightweightControlRight = new Project31.ApplicationFramework.WorkPaneLightweightControl(this.components);
//
// leftSplitter
//
this.leftSplitter.LightweightControlContainerControl = this;
this.leftSplitter.SplitterEndMove += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.leftSplitter_SplitterEndMove);
this.leftSplitter.SplitterBeginMove += new System.EventHandler(this.leftSplitter_SplitterBeginMove);
this.leftSplitter.SplitterMoving += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.leftSplitter_SplitterMoving);
//
// rightSplitter
//
this.rightSplitter.LightweightControlContainerControl = this;
this.rightSplitter.SplitterEndMove += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.rightSplitter_SplitterEndMove);
this.rightSplitter.SplitterBeginMove += new System.EventHandler(this.rightSplitter_SplitterBeginMove);
this.rightSplitter.SplitterMoving += new Project31.ApplicationFramework.LightweightSplitterEventHandler(this.rightSplitter_SplitterMoving);
//
// gutter
//
this.gutter.LightweightControlContainerControl = this;
//
// workPaneLightweightControlLeft
//
this.workPaneLightweightControlLeft.Control = null;
this.workPaneLightweightControlLeft.LightweightControlContainerControl = this;
//
// workPaneLightweightControlCenter
//
this.workPaneLightweightControlCenter.Control = null;
this.workPaneLightweightControlCenter.LightweightControlContainerControl = this;
//
// workPaneLightweightControlRight
//
this.workPaneLightweightControlRight.Control = null;
this.workPaneLightweightControlRight.LightweightControlContainerControl = this;
}
#endregion
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void OnLayout(System.EventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnLayout(e);
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void OnLayout(System.EventArgs e)
{
// Call the base class's method so that registered delegates receive the event.
base.OnLayout(e);
// Initialize the left splitter position, if it is uninitialized.
if (leftSplitterPosition == -1)
InitializeLeftSplitterPosition();
// Initialize the left splitter position, if it is uninitialized.
if (leftSplitterPosition == -1)
InitializeLeftSplitterPosition();
// Initialize the right splitter position, if it is uninitialized.
if (rightSplitterPosition == -1)
InitializeRightSplitterPosition();
// Initialize the right splitter position, if it is uninitialized.
if (rightSplitterPosition == -1)
InitializeRightSplitterPosition();
// Layout the gutter.
gutter.VirtualBounds = CalculateGutterBounds();
// Layout the gutter.
gutter.VirtualBounds = CalculateGutterBounds();
// Layout the left pane lightweight control.
workPaneLightweightControlLeft.VirtualBounds = CalculateLeftPaneControlBounds();
// Layout the left pane lightweight control.
workPaneLightweightControlLeft.VirtualBounds = CalculateLeftPaneControlBounds();
// Layout the left splitter.
leftSplitter.VirtualBounds = new Rectangle( leftSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
// Layout the left splitter.
leftSplitter.VirtualBounds = new Rectangle( leftSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
// Layout the center pane lightweight control.
workPaneLightweightControlCenter.VirtualBounds = CalculateCenterPaneLightweightControlBounds();
// Layout the center pane lightweight control.
workPaneLightweightControlCenter.VirtualBounds = CalculateCenterPaneLightweightControlBounds();
// Layout the right splitter.
rightSplitter.VirtualBounds = new Rectangle(VirtualWidth-rightSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
// Layout the right splitter.
rightSplitter.VirtualBounds = new Rectangle(VirtualWidth-rightSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
// Layout the right pane lightweight control.
workPaneLightweightControlRight.VirtualBounds = CalculateRightPaneControlBounds();
}
// Layout the right pane lightweight control.
workPaneLightweightControlRight.VirtualBounds = CalculateRightPaneControlBounds();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Paint the background.
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, Color.FromArgb(214, 232, 239), Color.FromArgb(148, 197, 217), LinearGradientMode.Horizontal))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Paint the background.
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, Color.FromArgb(214, 232, 239), Color.FromArgb(148, 197, 217), LinearGradientMode.Horizontal))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
// Call the base class's method so that registered delegates receive the event and
// child lightweight controls are painted.
base.OnPaint(e);
}
// Call the base class's method so that registered delegates receive the event and
// child lightweight controls are painted.
base.OnPaint(e);
}
/// <summary>
///
/// </summary>
private void InitializeLeftSplitterPosition()
{
leftSplitterPosition = 260;//Math.Max(MinimumLeftSplitterPosition(), VirtualWidth/5);
}
/// <summary>
///
/// </summary>
private void InitializeLeftSplitterPosition()
{
leftSplitterPosition = 260;//Math.Max(MinimumLeftSplitterPosition(), VirtualWidth/5);
}
/// <summary>
///
/// </summary>
private void InitializeRightSplitterPosition()
{
rightSplitterPosition = Math.Max(MinimumRightSplitterPosition(), VirtualWidth/5);
}
/// <summary>
///
/// </summary>
private void InitializeRightSplitterPosition()
{
rightSplitterPosition = Math.Max(MinimumRightSplitterPosition(), VirtualWidth/5);
}
/// <summary>
///
/// </summary>
/// <param name="position"></param>
/// <returns></returns>
private Rectangle CalculateVerticalTrackingIndicatorRectangle(int position)
{
return new Rectangle( position,
0,
SPLITTER_WIDTH-1,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <param name="position"></param>
/// <returns></returns>
private Rectangle CalculateVerticalTrackingIndicatorRectangle(int position)
{
return new Rectangle( position,
0,
SPLITTER_WIDTH-1,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateNewLeftSplitterBounds()
{
return new Rectangle( newLeftSplitterPosition,
-1,
SPLITTER_WIDTH+1,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateNewLeftSplitterBounds()
{
return new Rectangle( newLeftSplitterPosition,
-1,
SPLITTER_WIDTH+1,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateLeftSplitterBounds()
{
return new Rectangle( leftSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateLeftSplitterBounds()
{
return new Rectangle( leftSplitterPosition,
0,
SPLITTER_WIDTH,
VirtualHeight-GUTTER_HEIGHT);
}
/// <summary>
/// Calculates the bounds of the gutter control.
/// </summary>
/// <returns>The bounds of the gutter control.</returns>
private Rectangle CalculateGutterBounds()
{
return new Rectangle( 0,
VirtualHeight-GUTTER_HEIGHT,
VirtualWidth,
GUTTER_HEIGHT);
}
/// <summary>
/// Calculates the bounds of the gutter control.
/// </summary>
/// <returns>The bounds of the gutter control.</returns>
private Rectangle CalculateGutterBounds()
{
return new Rectangle( 0,
VirtualHeight-GUTTER_HEIGHT,
VirtualWidth,
GUTTER_HEIGHT);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateLeftPaneControlBounds()
{
return new Rectangle( BORDER_SIZE,
BORDER_SIZE,
leftSplitterPosition-BORDER_SIZE,
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateLeftPaneControlBounds()
{
return new Rectangle( BORDER_SIZE,
BORDER_SIZE,
leftSplitterPosition-BORDER_SIZE,
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateCenterPaneLightweightControlBounds()
{
return new Rectangle( leftSplitterPosition+SPLITTER_WIDTH,
BORDER_SIZE,
VirtualWidth-(rightSplitterPosition+leftSplitterPosition+SPLITTER_WIDTH),
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateCenterPaneLightweightControlBounds()
{
return new Rectangle( leftSplitterPosition+SPLITTER_WIDTH,
BORDER_SIZE,
VirtualWidth-(rightSplitterPosition+leftSplitterPosition+SPLITTER_WIDTH),
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateRightPaneControlBounds()
{
int rightControlX = VirtualWidth-rightSplitterPosition+SPLITTER_WIDTH;
return new Rectangle( rightControlX,
BORDER_SIZE,
VirtualWidth-(rightControlX+BORDER_SIZE),
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private Rectangle CalculateRightPaneControlBounds()
{
int rightControlX = VirtualWidth-rightSplitterPosition+SPLITTER_WIDTH;
return new Rectangle( rightControlX,
BORDER_SIZE,
VirtualWidth-(rightControlX+BORDER_SIZE),
PaneHeight());
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private int PaneHeight()
{
return VirtualHeight-GUTTER_HEIGHT-(BORDER_SIZE*2);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private int PaneHeight()
{
return VirtualHeight-GUTTER_HEIGHT-(BORDER_SIZE*2);
}
/// <summary>
/// Calculates the minimum left splitter position.
/// </summary>
/// <returns></returns>
private int MinimumLeftSplitterPosition()
{
return 0;
}
/// <summary>
/// Calculates the minimum left splitter position.
/// </summary>
/// <returns></returns>
private int MinimumLeftSplitterPosition()
{
return 0;
}
/// <summary>
/// Calculates the maximum left splitter position.
/// </summary>
/// <returns></returns>
private int MaximumLeftSplitterPosition()
{
return VirtualWidth-10;
}
/// <summary>
/// Calculates the maximum left splitter position.
/// </summary>
/// <returns></returns>
private int MaximumLeftSplitterPosition()
{
return VirtualWidth-10;
}
/// <summary>
/// Calculates the minimum right splitter position.
/// </summary>
/// <returns></returns>
private int MinimumRightSplitterPosition()
{
return 100;
}
/// <summary>
/// Calculates the minimum right splitter position.
/// </summary>
/// <returns></returns>
private int MinimumRightSplitterPosition()
{
return 100;
}
/// <summary>
/// Calculates the maximum right splitter position.
/// </summary>
/// <returns></returns>
private int MaximumRightSplitterPosition()
{
return VirtualWidth-10;
}
/// <summary>
/// Calculates the maximum right splitter position.
/// </summary>
/// <returns></returns>
private int MaximumRightSplitterPosition()
{
return VirtualWidth-10;
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterBeginMove(object sender, System.EventArgs e)
{
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(leftSplitterPosition);
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterBeginMove(object sender, System.EventArgs e)
{
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(leftSplitterPosition);
verticalTrackingIdicator.Begin(Parent, VirtualClientRectangleToParent(trackingIndicatorRectangle));
}
verticalTrackingIdicator.Begin(Parent, VirtualClientRectangleToParent(trackingIndicatorRectangle));
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterEndMove(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
verticalTrackingIdicator.End();
leftSplitterPosition = newLeftSplitterPosition;
PerformLayout();
Invalidate();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterEndMove(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
verticalTrackingIdicator.End();
leftSplitterPosition = newLeftSplitterPosition;
PerformLayout();
Invalidate();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterMoving(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
// Obtain the minimum and maximum left splitter positions.
int minimumLeftSplitterPosition = MinimumLeftSplitterPosition();
int maximumLeftSplitterPosition = MaximumLeftSplitterPosition();
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void leftSplitter_SplitterMoving(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
// Obtain the minimum and maximum left splitter positions.
int minimumLeftSplitterPosition = MinimumLeftSplitterPosition();
int maximumLeftSplitterPosition = MaximumLeftSplitterPosition();
// Calculate the new left splitter position.
newLeftSplitterPosition = leftSplitterPosition+e.Position;
// Calculate the new left splitter position.
newLeftSplitterPosition = leftSplitterPosition+e.Position;
// Validate the new left splitter position. Adjust it as needed.
if (newLeftSplitterPosition < minimumLeftSplitterPosition)
newLeftSplitterPosition = minimumLeftSplitterPosition;
else if (newLeftSplitterPosition > maximumLeftSplitterPosition)
newLeftSplitterPosition = maximumLeftSplitterPosition;
// Validate the new left splitter position. Adjust it as needed.
if (newLeftSplitterPosition < minimumLeftSplitterPosition)
newLeftSplitterPosition = minimumLeftSplitterPosition;
else if (newLeftSplitterPosition > maximumLeftSplitterPosition)
newLeftSplitterPosition = maximumLeftSplitterPosition;
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(newLeftSplitterPosition);
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(newLeftSplitterPosition);
// Set the new left splitter position, if it has changed.
verticalTrackingIdicator.Update(VirtualClientRectangleToParent(trackingIndicatorRectangle).Location);
}
// Set the new left splitter position, if it has changed.
verticalTrackingIdicator.Update(VirtualClientRectangleToParent(trackingIndicatorRectangle).Location);
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterBeginMove(object sender, System.EventArgs e)
{
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(VirtualWidth-rightSplitterPosition);
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterBeginMove(object sender, System.EventArgs e)
{
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(VirtualWidth-rightSplitterPosition);
verticalTrackingIdicator.Begin(Parent, VirtualClientRectangleToParent(trackingIndicatorRectangle));
}
verticalTrackingIdicator.Begin(Parent, VirtualClientRectangleToParent(trackingIndicatorRectangle));
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterEndMove(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
verticalTrackingIdicator.End();
rightSplitterPosition = newRightSplitterPosition;
PerformLayout();
Invalidate();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterEndMove(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
verticalTrackingIdicator.End();
rightSplitterPosition = newRightSplitterPosition;
PerformLayout();
Invalidate();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterMoving(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
// Obtain the minimum and maximum right splitter positions.
int minimumRightSplitterPosition = MinimumRightSplitterPosition();
int maximumRightSplitterPosition = MaximumRightSplitterPosition();
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rightSplitter_SplitterMoving(object sender, Project31.ApplicationFramework.LightweightSplitterEventArgs e)
{
// Obtain the minimum and maximum right splitter positions.
int minimumRightSplitterPosition = MinimumRightSplitterPosition();
int maximumRightSplitterPosition = MaximumRightSplitterPosition();
// Calculate the new right splitter position.
newRightSplitterPosition = rightSplitterPosition-e.Position;
// Calculate the new right splitter position.
newRightSplitterPosition = rightSplitterPosition-e.Position;
// Validate the new right splitter position. Adjust it as needed.
if (newRightSplitterPosition < minimumRightSplitterPosition)
newRightSplitterPosition = minimumRightSplitterPosition;
else if (newRightSplitterPosition > maximumRightSplitterPosition)
newRightSplitterPosition = maximumRightSplitterPosition;
// Validate the new right splitter position. Adjust it as needed.
if (newRightSplitterPosition < minimumRightSplitterPosition)
newRightSplitterPosition = minimumRightSplitterPosition;
else if (newRightSplitterPosition > maximumRightSplitterPosition)
newRightSplitterPosition = maximumRightSplitterPosition;
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(VirtualWidth-newRightSplitterPosition);
// Calculate.
Rectangle trackingIndicatorRectangle = CalculateVerticalTrackingIndicatorRectangle(VirtualWidth-newRightSplitterPosition);
// Set the new right splitter position, if it has changed.
verticalTrackingIdicator.Update(VirtualClientRectangleToParent(trackingIndicatorRectangle).Location);
}
}
// Set the new right splitter position, if it has changed.
verticalTrackingIdicator.Update(VirtualClientRectangleToParent(trackingIndicatorRectangle).Location);
}
}
}

View File

@ -536,9 +536,9 @@ namespace OpenLiveWriter.ApplicationFramework
// Fill the background.
/*
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.MenuBitmapAreaColor))
graphics.FillRectangle(solidBrush, bitmapAreaRectangle);
*/
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.MenuBitmapAreaColor))
graphics.FillRectangle(solidBrush, bitmapAreaRectangle);
*/
Color backgroundColor = SystemColors.Menu;
// If the item is selected, draw the selection rectangle.
if ((drawItemState & DrawItemState.Selected) != 0)

View File

@ -18,7 +18,6 @@ namespace OpenLiveWriter.ApplicationFramework.Preferences
{
#region Static & Constant Declarations
#endregion Static & Constant Declarations
#region Private Member Variables

View File

@ -324,6 +324,5 @@ namespace OpenLiveWriter.ApplicationFramework.Preferences
}
#endregion
}
}

View File

@ -322,7 +322,6 @@ namespace OpenLiveWriter.ApplicationFramework
{
}
protected override void Dispose(bool disposing)
{
if (disposing)

View File

@ -12,210 +12,208 @@ using OpenLiveWriter.CoreServices;
namespace OpenLiveWriter.ApplicationFramework
{
/// <summary>
/// Summary description for SearchBoxControl.
/// </summary>
public class SearchBoxControl : System.Windows.Forms.UserControl
{
private TextBoxWithEnter txtQuery;
//private System.Windows.Forms.PictureBox picSearchBox;
private BitmapButton picSearchBox;
/// <summary>
/// Summary description for SearchBoxControl.
/// </summary>
public class SearchBoxControl : System.Windows.Forms.UserControl
{
private TextBoxWithEnter txtQuery;
//private System.Windows.Forms.PictureBox picSearchBox;
private BitmapButton picSearchBox;
// private Bitmap bmpSearchInput = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.SearchInput.png");
private bool highlighted;
private bool highlighted;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public SearchBoxControl()
{
SetStyle(ControlStyles.UserPaint, true);
public SearchBoxControl()
{
SetStyle(ControlStyles.UserPaint, true);
// SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
HookEvents(txtQuery, picSearchBox, this);
HookEvents(txtQuery, picSearchBox, this);
//picSearchBox.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapEnabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapSelected = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapDisabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
txtQuery.TabIndex = 0;
picSearchBox.TabStop = true;
picSearchBox.TabIndex = 1;
//picSearchBox.Image = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapEnabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapSelected = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
picSearchBox.BitmapDisabled = ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.Search.png");
txtQuery.TabIndex = 0;
picSearchBox.TabStop = true;
picSearchBox.TabIndex = 1;
txtQuery.EnterPressed += new EventHandler(txtQuery_EnterPressed);
picSearchBox.Click += new EventHandler(picSearchBox_Click);
}
txtQuery.EnterPressed += new EventHandler(txtQuery_EnterPressed);
picSearchBox.Click += new EventHandler(picSearchBox_Click);
}
protected override void OnResize(EventArgs e)
{
Invalidate(false);
base.OnResize (e);
}
protected override void OnResize(EventArgs e)
{
Invalidate(false);
base.OnResize (e);
}
private void HookEvents(params Control[] controls)
{
foreach (Control c in controls)
{
c.GotFocus += new EventHandler(UpdateHighlightStateEventHandler);
c.LostFocus += new EventHandler(UpdateHighlightStateEventHandler);
c.MouseEnter += new EventHandler(UpdateHighlightStateEventHandler);
c.MouseLeave += new EventHandler(UpdateHighlightStateEventHandler);
}
}
public event EventHandler HighlightedChanged;
private void HookEvents(params Control[] controls)
{
foreach (Control c in controls)
{
c.GotFocus += new EventHandler(UpdateHighlightStateEventHandler);
c.LostFocus += new EventHandler(UpdateHighlightStateEventHandler);
c.MouseEnter += new EventHandler(UpdateHighlightStateEventHandler);
c.MouseLeave += new EventHandler(UpdateHighlightStateEventHandler);
}
}
public bool Highlighted
{
get { return highlighted; }
set
{
if (highlighted != value)
{
highlighted = value;
if (HighlightedChanged != null)
HighlightedChanged(this, EventArgs.Empty);
}
}
}
public event EventHandler HighlightedChanged;
private void UpdateHighlightState()
{
Highlighted =
ContainsFocus || new Rectangle(0, 0, Width, Height).Contains(PointToClient(MousePosition));
}
public bool Highlighted
{
get { return highlighted; }
set
{
if (highlighted != value)
{
highlighted = value;
if (HighlightedChanged != null)
HighlightedChanged(this, EventArgs.Empty);
}
}
}
private void UpdateHighlightStateEventHandler(object sender, EventArgs args)
{
UpdateHighlightState();
}
private void UpdateHighlightState()
{
Highlighted =
ContainsFocus || new Rectangle(0, 0, Width, Height).Contains(PointToClient(MousePosition));
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private void UpdateHighlightStateEventHandler(object sender, EventArgs args)
{
UpdateHighlightState();
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtQuery = new OpenLiveWriter.ApplicationFramework.SearchBoxControl.TextBoxWithEnter();
this.picSearchBox = new OpenLiveWriter.Controls.BitmapButton();
this.SuspendLayout();
//
// txtQuery
//
this.txtQuery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtQuery.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtQuery.Location = new System.Drawing.Point(5, 5);
this.txtQuery.Name = "txtQuery";
this.txtQuery.Size = new System.Drawing.Size(113, 14);
this.txtQuery.TabIndex = 0;
this.txtQuery.Text = "";
//
// picSearchBox
//
this.picSearchBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.picSearchBox.Location = new System.Drawing.Point(126, 1);
this.picSearchBox.Name = "picSearchBox";
this.picSearchBox.Size = new System.Drawing.Size(23, 20);
this.picSearchBox.TabIndex = 0;
this.picSearchBox.TabStop = false;
//
// SearchBoxControl
//
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.picSearchBox);
this.Controls.Add(this.txtQuery);
this.Name = "SearchBoxControl";
this.Size = new System.Drawing.Size(150, 22);
this.ResumeLayout(false);
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
}
#endregion
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtQuery = new OpenLiveWriter.ApplicationFramework.SearchBoxControl.TextBoxWithEnter();
this.picSearchBox = new OpenLiveWriter.Controls.BitmapButton();
this.SuspendLayout();
//
// txtQuery
//
this.txtQuery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtQuery.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtQuery.Location = new System.Drawing.Point(5, 5);
this.txtQuery.Name = "txtQuery";
this.txtQuery.Size = new System.Drawing.Size(113, 14);
this.txtQuery.TabIndex = 0;
this.txtQuery.Text = "";
//
// picSearchBox
//
this.picSearchBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.picSearchBox.Location = new System.Drawing.Point(126, 1);
this.picSearchBox.Name = "picSearchBox";
this.picSearchBox.Size = new System.Drawing.Size(23, 20);
this.picSearchBox.TabIndex = 0;
this.picSearchBox.TabStop = false;
//
// SearchBoxControl
//
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.picSearchBox);
this.Controls.Add(this.txtQuery);
this.Name = "SearchBoxControl";
this.Size = new System.Drawing.Size(150, 22);
this.ResumeLayout(false);
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
}
#endregion
/*
GraphicsHelper.DrawCompositedImageBorder(
e.Graphics,
ClientRectangle,
bmpSearchInput,
GraphicsHelper.SliceCompositedImageBorder(bmpSearchInput.Size, 6, 7, 7, 8));
*/
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
Color borderColor = Color.FromArgb(74, 114, 140);
/*
GraphicsHelper.DrawCompositedImageBorder(
e.Graphics,
ClientRectangle,
bmpSearchInput,
GraphicsHelper.SliceCompositedImageBorder(bmpSearchInput.Size, 6, 7, 7, 8));
*/
using (Brush b = new SolidBrush(SystemColors.Window))
e.Graphics.FillRectangle(b, 1, 1, Width-2, Height-2);
using (Pen p = new Pen(borderColor, 1))
{
e.Graphics.DrawRectangle(p, 0, 0, Width - 1, Height - 1);
e.Graphics.DrawLine(p, Width - picSearchBox.Width - 2, 0, Width - picSearchBox.Width - 2, Height);
}
Color borderColor = Color.FromArgb(74, 114, 140);
}
using (Brush b = new SolidBrush(SystemColors.Window))
e.Graphics.FillRectangle(b, 1, 1, Width-2, Height-2);
using (Pen p = new Pen(borderColor, 1))
{
e.Graphics.DrawRectangle(p, 0, 0, Width - 1, Height - 1);
e.Graphics.DrawLine(p, Width - picSearchBox.Width - 2, 0, Width - picSearchBox.Width - 2, Height);
}
private class TextBoxWithEnter : TextBox
{
public event EventHandler EnterPressed;
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
if (EnterPressed != null)
EnterPressed(this, EventArgs.Empty);
return true;
}
else
return base.ProcessCmdKey(ref msg, keyData);
}
}
private class TextBoxWithEnter : TextBox
{
public event EventHandler EnterPressed;
private void txtQuery_EnterPressed(object sender, EventArgs e)
{
Search();
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
if (EnterPressed != null)
EnterPressed(this, EventArgs.Empty);
return true;
}
else
return base.ProcessCmdKey(ref msg, keyData);
}
}
private void picSearchBox_Click(object sender, EventArgs e)
{
Search();
}
private void txtQuery_EnterPressed(object sender, EventArgs e)
{
Search();
}
private void picSearchBox_Click(object sender, EventArgs e)
{
Search();
}
private void Search()
{
string query = txtQuery.Text.Trim();
if (query == "")
Process.Start("http://search.live.com/");
else
Process.Start(
string.Format(CultureInfo.InvariantCulture, "http://search.live.com/results.aspx?q={0}&mkt={1}&FORM=LVSP",
HttpUtility.UrlEncode(query),
HttpUtility.UrlEncode(CultureInfo.CurrentCulture.Name)));
}
}
private void Search()
{
string query = txtQuery.Text.Trim();
if (query == "")
Process.Start("http://search.live.com/");
else
Process.Start(
string.Format(CultureInfo.InvariantCulture, "http://search.live.com/results.aspx?q={0}&mkt={1}&FORM=LVSP",
HttpUtility.UrlEncode(query),
HttpUtility.UrlEncode(CultureInfo.CurrentCulture.Name)));
}
}
}

View File

@ -6,78 +6,78 @@ using System.Drawing;
namespace OpenLiveWriter.ApplicationFramework
{
/// <summary>
/// Secondary version of the WorkspaceControl.
/// </summary>
public class SecondaryWorkspaceControl : WorkspaceControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Secondary version of the WorkspaceControl.
/// </summary>
public class SecondaryWorkspaceControl : WorkspaceControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private Container components = null;
/// <summary>
/// Gets the top color.
/// </summary>
public override Color TopColor
{
get
{
return ApplicationManager.ApplicationStyle.SecondaryWorkspaceTopColor;
}
}
/// <summary>
/// Gets the top color.
/// </summary>
public override Color TopColor
{
get
{
return ApplicationManager.ApplicationStyle.SecondaryWorkspaceTopColor;
}
}
/// <summary>
/// Gets the bottom color.
/// </summary>
public override Color BottomColor
{
get
{
return ApplicationManager.ApplicationStyle.SecondaryWorkspaceBottomColor;
}
}
/// <summary>
/// Gets the bottom color.
/// </summary>
public override Color BottomColor
{
get
{
return ApplicationManager.ApplicationStyle.SecondaryWorkspaceBottomColor;
}
}
/// <summary>
/// Initializes a new instance of the SecondaryWorkspaceControl class.
/// </summary>
public SecondaryWorkspaceControl() : this(ApplicationManager.CommandManager)
{
}
/// <summary>
/// Initializes a new instance of the SecondaryWorkspaceControl class.
/// </summary>
public SecondaryWorkspaceControl() : this(ApplicationManager.CommandManager)
{
}
/// <summary>
/// Initializes a new instance of the SecondaryWorkspaceControl class.
/// </summary>
public SecondaryWorkspaceControl(CommandManager commandManager) : base(commandManager)
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the SecondaryWorkspaceControl class.
/// </summary>
public SecondaryWorkspaceControl(CommandManager commandManager) : base(commandManager)
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}

View File

@ -207,12 +207,10 @@ namespace OpenLiveWriter.ApplicationFramework
}
}
private void linkLabelOptional_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
LaunchUrl(_secondUrl);
}
}
}

View File

@ -222,21 +222,20 @@ namespace OpenLiveWriter.ApplicationFramework.Skinning
_sidebarLinkColor = SystemInformation.HighContrast ? SystemColors.HotTrack : Color.FromArgb(0, 134, 198);
/*
SwapAndDispose(ref _imgAppVapor,
ColorizeBitmap(ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.AppVapor.png")));
SwapAndDispose(ref _imgAppVapor,
ColorizeBitmap(ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.AppVapor.png")));
if (_hbAppVapor != IntPtr.Zero)
Gdi32.DeleteObject(_hbAppVapor);
_hbAppVapor = _imgAppVapor.GetHbitmap();
if (_hbAppVapor != IntPtr.Zero)
Gdi32.DeleteObject(_hbAppVapor);
_hbAppVapor = _imgAppVapor.GetHbitmap();
SwapAndDispose(ref _imgAppVaporFaded,
ColorizeBitmap(ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.AppVaporFaded.png")));
SwapAndDispose(ref _imgAppVaporFaded,
ColorizeBitmap(ResourceHelper.LoadAssemblyResourceBitmap("Images.HIG.AppVaporFaded.png")));
if (_hbAppVaporFaded != IntPtr.Zero)
Gdi32.DeleteObject(_hbAppVaporFaded);
_hbAppVaporFaded = _imgAppVaporFaded.GetHbitmap();
*/
if (_hbAppVaporFaded != IntPtr.Zero)
Gdi32.DeleteObject(_hbAppVaporFaded);
_hbAppVaporFaded = _imgAppVaporFaded.GetHbitmap();
*/
}
}
@ -466,7 +465,6 @@ namespace OpenLiveWriter.ApplicationFramework.Skinning
return Colorizer.ColorizeBitmap(bmp, _colorizeColor, _colorizeScale);
}
public delegate void ControlUpdater<TControl>(ColorizedResources cr, TControl c) where TControl : Control;
public void RegisterControlForUpdates<TControl>(TControl control, ControlUpdater<TControl> updater) where TControl : Control
{
@ -523,11 +521,11 @@ namespace OpenLiveWriter.ApplicationFramework.Skinning
{
// Convert special COL_GrayText value to the system's graytext color.
/*
if (crColorize == COL_GrayText)
{
crColorize = ::GetSysColor(COLOR_GRAYTEXT);
}
*/
if (crColorize == COL_GrayText)
{
crColorize = ::GetSysColor(COLOR_GRAYTEXT);
}
*/
// Is the colorize value a flag?
if (Color.Empty == crColorize)

View File

@ -15,279 +15,267 @@ using Timer=System.Windows.Forms.Timer;
namespace OpenLiveWriter.ApplicationFramework.Skinning
{
public class HiddenMenuFrameManager : IFrameManager
{
private static event EventHandler AlwaysShowMenuChanged;
public class HiddenMenuFrameManager : IFrameManager
{
private static event EventHandler AlwaysShowMenuChanged;
private SatelliteApplicationForm _form;
private ColorizedResources res = ColorizedResources.Instance;
private Timer _mouseFrameTimer;
private SatelliteApplicationForm _form;
private ColorizedResources res = ColorizedResources.Instance;
private Timer _mouseFrameTimer;
private bool _inMenuLoop;
private bool _forceMenu = false;
private bool _alwaysShowMenu;
private Command _commandShowMenu;
const int SIZE_RESTORED =0;
const int SIZE_MINIMIZED =1;
const int SIZE_MAXIMIZED =2;
const int SIZE_MAXSHOW =3;
const int SIZE_MAXHIDE =4;
public HiddenMenuFrameManager(SatelliteApplicationForm form)
{
_alwaysShowMenu = AlwaysShowMenu;
_form = form;
_form.Load +=new EventHandler(_form_Load);
_mouseFrameTimer = new Timer();
_mouseFrameTimer.Interval = 100;
_mouseFrameTimer.Tick += new EventHandler(_mouseFrameTimer_Tick);
_commandShowMenu = new Command(CommandId.ShowMenu);
_commandShowMenu.Latched = AlwaysShowMenu;
_commandShowMenu.Execute += new EventHandler(commandShowMenu_Execute);
ApplicationManager.CommandManager.Add(_commandShowMenu);
ColorizedResources.GlobalColorizationChanged += new EventHandler(ColorizedResources_GlobalColorizationChanged);
_form.Disposed += new EventHandler(_form_Disposed);
AlwaysShowMenuChanged += new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged);
}
private void commandShowMenu_Execute(object sender, EventArgs e)
{
AlwaysShowMenu = !_commandShowMenu.Latched;
}
public bool WndProc(ref Message m)
{
switch ((uint)m.Msg)
{
case WM.NCHITTEST:
{
Point p = _form.PointToClient(new Point(m.LParam.ToInt32()));
if (_form.ClientRectangle.Contains(p))
{
// gripper
Size gripperSize = new Size(15,15);
if (new Rectangle(
_form.ClientSize.Width - gripperSize.Width,
_form.ClientSize.Height - gripperSize.Height,
gripperSize.Width,
gripperSize.Height).Contains(p))
{
m.Result = new IntPtr(HT.BOTTOMRIGHT) ;
return true ;
}
}
break;
}
case WM.ENTERMENULOOP:
_inMenuLoop = true;
ForceMenu = true;
break;
case WM.EXITMENULOOP:
_inMenuLoop = false;
if (!IsMouseInFrame())
ForceMenu = false;
else
_mouseFrameTimer.Start();
break;
}
return false;
}
private bool ForceMenu
{
get { return _forceMenu; }
set
{
if (_forceMenu != value)
{
// set value
_forceMenu = value;
// update appearance
UpdateMenuVisibility();
// attempt to force accelerators (this isn't working!)
/*
int stateChange = _forceFrame ? UIS.CLEAR : UIS.SET ;
User32.SendMessage(_form.Handle, WM.CHANGEUISTATE, new UIntPtr(Convert.ToUInt32(
MessageHelper.MAKELONG(stateChange, UISF.HIDEACCEL).ToInt32())), IntPtr.Zero);
//_form.Update();
*/
}
}
}
public static bool AlwaysShowMenu
{
get { return ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").GetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, false); }
set
{
ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").SetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, value);
if (AlwaysShowMenuChanged != null)
AlwaysShowMenuChanged(null, EventArgs.Empty);
}
}
private bool _inMenuLoop;
private bool _forceMenu = false;
private bool _alwaysShowMenu;
private Command _commandShowMenu;
private void UpdateMenuVisibility()
{
//_form.ShowMainMenu = _alwaysShowMenu || _forceMenu ;
}
const int SIZE_RESTORED =0;
const int SIZE_MINIMIZED =1;
const int SIZE_MAXIMIZED =2;
const int SIZE_MAXSHOW =3;
const int SIZE_MAXHIDE =4;
public void PaintBackground(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.InterpolationMode = InterpolationMode.Low;
g.CompositingMode = CompositingMode.SourceCopy;
public HiddenMenuFrameManager(SatelliteApplicationForm form)
{
_alwaysShowMenu = AlwaysShowMenu;
Color light = res.FrameGradientLight;
_form = form;
_form.Load +=new EventHandler(_form_Load);
int width = _form.ClientSize.Width;
int height = _form.ClientSize.Height;
_mouseFrameTimer = new Timer();
_mouseFrameTimer.Interval = 100;
_mouseFrameTimer.Tick += new EventHandler(_mouseFrameTimer_Tick);
using (Brush b = new SolidBrush(light))
g.FillRectangle(b, 0, 0, width, height);
_commandShowMenu = new Command(CommandId.ShowMenu);
_commandShowMenu.Latched = AlwaysShowMenu;
_commandShowMenu.Execute += new EventHandler(commandShowMenu_Execute);
ApplicationManager.CommandManager.Add(_commandShowMenu);
g.CompositingMode = CompositingMode.SourceOver;
g.CompositingQuality = CompositingQuality.HighSpeed;
ColorizedResources.GlobalColorizationChanged += new EventHandler(ColorizedResources_GlobalColorizationChanged);
_form.Disposed += new EventHandler(_form_Disposed);
Rectangle bodyFrameRect = new Rectangle(
_form.DockPadding.Left - 5,
_form.DockPadding.Top,
_form.ClientSize.Width - _form.DockPadding.Right - _form.DockPadding.Left + 5 + 5,
_form.ClientSize.Height - _form.DockPadding.Top - _form.DockPadding.Bottom + 7);
if (e.ClipRectangle.IntersectsWith(bodyFrameRect))
res.AppBodyFrameBorder.DrawBorder(g, bodyFrameRect);
AlwaysShowMenuChanged += new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged);
}
Rectangle toolbarRect = new Rectangle(
_form.DockPadding.Left - 1,
_form.DockPadding.Top,
_form.ClientSize.Width - _form.DockPadding.Left - _form.DockPadding.Right + 2,
res.ToolbarBorder.MinimumHeight
);
if (e.ClipRectangle.IntersectsWith(toolbarRect))
res.ToolbarBorder.DrawBorder(g, toolbarRect);
private void commandShowMenu_Execute(object sender, EventArgs e)
{
AlwaysShowMenu = !_commandShowMenu.Latched;
}
g.CompositingQuality = CompositingQuality.HighQuality;
public bool WndProc(ref Message m)
{
switch ((uint)m.Msg)
{
case WM.NCHITTEST:
{
Point p = _form.PointToClient(new Point(m.LParam.ToInt32()));
// gripper
g.DrawImage(res.GripperImage, width - 15, height - 15, res.GripperImage.Width, res.GripperImage.Height);
if (_form.ClientRectangle.Contains(p))
{
// gripper
Size gripperSize = new Size(15,15);
if (new Rectangle(
_form.ClientSize.Width - gripperSize.Width,
_form.ClientSize.Height - gripperSize.Height,
gripperSize.Width,
gripperSize.Height).Contains(p))
{
m.Result = new IntPtr(HT.BOTTOMRIGHT) ;
return true ;
}
}
}
break;
}
private void _mouseFrameTimer_Tick(object sender, EventArgs e)
{
if (_inMenuLoop)
{
_mouseFrameTimer.Stop();
}
else if (!IsMouseInFrame())
{
ForceMenu = false;
_mouseFrameTimer.Stop();
}
}
case WM.ENTERMENULOOP:
_inMenuLoop = true;
ForceMenu = true;
break;
case WM.EXITMENULOOP:
_inMenuLoop = false;
if (!IsMouseInFrame())
ForceMenu = false;
else
_mouseFrameTimer.Start();
break;
}
return false;
}
private bool IsMouseInFrame()
{
RECT rect = new RECT();
User32.GetWindowRect(_form.Handle, ref rect);
Rectangle windowRect = RectangleHelper.Convert(rect);
return
windowRect.Contains(Control.MousePosition) &&
!_form.ClientRectangle.Contains(_form.PointToClient(Control.MousePosition));
}
private bool ForceMenu
{
get { return _forceMenu; }
set
{
if (_forceMenu != value)
{
// set value
_forceMenu = value;
private void ColorizedResources_GlobalColorizationChanged(object sender, EventArgs e)
{
try
{
if ( ControlHelper.ControlCanHandleInvoke(_form) )
{
_form.BeginInvoke(new ThreadStart(RefreshColors));
}
}
catch (Exception ex)
{
Trace.Fail(ex.ToString());
}
}
// update appearance
UpdateMenuVisibility();
private void RefreshColors()
{
ColorizedResources colRes = ColorizedResources.Instance;
colRes.Refresh();
colRes.FireColorizationChanged();
_form.Invalidate(true);
_form.Update();
}
// attempt to force accelerators (this isn't working!)
/*
int stateChange = _forceFrame ? UIS.CLEAR : UIS.SET ;
User32.SendMessage(_form.Handle, WM.CHANGEUISTATE, new UIntPtr(Convert.ToUInt32(
MessageHelper.MAKELONG(stateChange, UISF.HIDEACCEL).ToInt32())), IntPtr.Zero);
//_form.Update();
*/
}
}
}
private void _form_Load(object sender, EventArgs e)
{
UpdateMenuVisibility() ;
}
private void _form_Disposed(object sender, EventArgs e)
{
ColorizedResources.GlobalColorizationChanged -= new EventHandler(ColorizedResources_GlobalColorizationChanged);
AlwaysShowMenuChanged -= new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged);
}
public static bool AlwaysShowMenu
{
get { return ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").GetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, false); }
set
{
ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").SetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, value);
if (AlwaysShowMenuChanged != null)
AlwaysShowMenuChanged(null, EventArgs.Empty);
}
}
private void HiddenMenuFrameManager_AlwaysShowMenuChanged(object sender, EventArgs e)
{
if (_form.IsDisposed)
{
return;
}
if (_form.InvokeRequired)
{
_form.BeginInvoke(new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged), new object[] {sender, e});
return;
}
_alwaysShowMenu =
ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").GetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, false);
UpdateMenuVisibility();
_form.Update();
_commandShowMenu.Latched = _alwaysShowMenu;
Command commandMenu = ApplicationManager.CommandManager.Get(CommandId.Menu);
if (commandMenu != null)
commandMenu.On = !_alwaysShowMenu;
}
private void UpdateMenuVisibility()
{
//_form.ShowMainMenu = _alwaysShowMenu || _forceMenu ;
}
public void AddOwnedForm(Form f)
{
User32.SendMessage(_form.Handle, WM.ACTIVATE, new UIntPtr(1), IntPtr.Zero ) ;
}
/// <summary>
/// Restore normal painting.
/// </summary>
public void RemoveOwnedForm(Form f)
{
}
public void PaintBackground(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.InterpolationMode = InterpolationMode.Low;
g.CompositingMode = CompositingMode.SourceCopy;
Color light = res.FrameGradientLight;
int width = _form.ClientSize.Width;
int height = _form.ClientSize.Height;
using (Brush b = new SolidBrush(light))
g.FillRectangle(b, 0, 0, width, height);
g.CompositingMode = CompositingMode.SourceOver;
g.CompositingQuality = CompositingQuality.HighSpeed;
Rectangle bodyFrameRect = new Rectangle(
_form.DockPadding.Left - 5,
_form.DockPadding.Top,
_form.ClientSize.Width - _form.DockPadding.Right - _form.DockPadding.Left + 5 + 5,
_form.ClientSize.Height - _form.DockPadding.Top - _form.DockPadding.Bottom + 7);
if (e.ClipRectangle.IntersectsWith(bodyFrameRect))
res.AppBodyFrameBorder.DrawBorder(g, bodyFrameRect);
Rectangle toolbarRect = new Rectangle(
_form.DockPadding.Left - 1,
_form.DockPadding.Top,
_form.ClientSize.Width - _form.DockPadding.Left - _form.DockPadding.Right + 2,
res.ToolbarBorder.MinimumHeight
);
if (e.ClipRectangle.IntersectsWith(toolbarRect))
res.ToolbarBorder.DrawBorder(g, toolbarRect);
g.CompositingQuality = CompositingQuality.HighQuality;
// gripper
g.DrawImage(res.GripperImage, width - 15, height - 15, res.GripperImage.Width, res.GripperImage.Height);
}
private void _mouseFrameTimer_Tick(object sender, EventArgs e)
{
if (_inMenuLoop)
{
_mouseFrameTimer.Stop();
}
else if (!IsMouseInFrame())
{
ForceMenu = false;
_mouseFrameTimer.Stop();
}
}
private bool IsMouseInFrame()
{
RECT rect = new RECT();
User32.GetWindowRect(_form.Handle, ref rect);
Rectangle windowRect = RectangleHelper.Convert(rect);
return
windowRect.Contains(Control.MousePosition) &&
!_form.ClientRectangle.Contains(_form.PointToClient(Control.MousePosition));
}
private void ColorizedResources_GlobalColorizationChanged(object sender, EventArgs e)
{
try
{
if ( ControlHelper.ControlCanHandleInvoke(_form) )
{
_form.BeginInvoke(new ThreadStart(RefreshColors));
}
}
catch (Exception ex)
{
Trace.Fail(ex.ToString());
}
}
private void RefreshColors()
{
ColorizedResources colRes = ColorizedResources.Instance;
colRes.Refresh();
colRes.FireColorizationChanged();
_form.Invalidate(true);
_form.Update();
}
private void _form_Load(object sender, EventArgs e)
{
UpdateMenuVisibility() ;
}
private void _form_Disposed(object sender, EventArgs e)
{
ColorizedResources.GlobalColorizationChanged -= new EventHandler(ColorizedResources_GlobalColorizationChanged);
AlwaysShowMenuChanged -= new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged);
}
private void HiddenMenuFrameManager_AlwaysShowMenuChanged(object sender, EventArgs e)
{
if (_form.IsDisposed)
{
return;
}
if (_form.InvokeRequired)
{
_form.BeginInvoke(new EventHandler(HiddenMenuFrameManager_AlwaysShowMenuChanged), new object[] {sender, e});
return;
}
_alwaysShowMenu =
ApplicationEnvironment.PreferencesSettingsRoot.GetSubSettings("Appearance").GetBoolean(SatelliteApplicationForm.SHOW_FRAME_KEY, false);
UpdateMenuVisibility();
_form.Update();
_commandShowMenu.Latched = _alwaysShowMenu;
Command commandMenu = ApplicationManager.CommandManager.Get(CommandId.Menu);
if (commandMenu != null)
commandMenu.On = !_alwaysShowMenu;
}
public void AddOwnedForm(Form f)
{
User32.SendMessage(_form.Handle, WM.ACTIVATE, new UIntPtr(1), IntPtr.Zero ) ;
}
/// <summary>
/// Restore normal painting.
/// </summary>
public void RemoveOwnedForm(Form f)
{
}
}
}
}

View File

@ -13,210 +13,210 @@ using Project31.CoreServices;
namespace Project31.ApplicationFramework
{
/// <summary>
/// Provides a "tracking indicator" for use in splitter bars.
/// </summary>
internal class SplitterTrackingIndicator
{
/// <summary>
/// SRCCOPY ROP.
/// </summary>
private const int SRCCOPY = 0x00cc0020;
/// <summary>
/// Provides a "tracking indicator" for use in splitter bars.
/// </summary>
internal class SplitterTrackingIndicator
{
/// <summary>
/// SRCCOPY ROP.
/// </summary>
private const int SRCCOPY = 0x00cc0020;
/// <summary>
/// DCX_PARENTCLIP option for GetDCEx.
/// </summary>
private const int DCX_PARENTCLIP = 0x00000020;
/// <summary>
/// DCX_PARENTCLIP option for GetDCEx.
/// </summary>
private const int DCX_PARENTCLIP = 0x00000020;
/// <summary>
/// Valid indicator. Used to ensure that calls to Begin, Update and End are valid when
/// they are made.
/// </summary>
private bool valid = false;
/// <summary>
/// Valid indicator. Used to ensure that calls to Begin, Update and End are valid when
/// they are made.
/// </summary>
private bool valid = false;
/// <summary>
/// Control into which the tracking indicator will be drawn.
/// </summary>
private Control control;
/// <summary>
/// Control into which the tracking indicator will be drawn.
/// </summary>
private Control control;
/// <summary>
/// Graphics object for the control into which the tracking indicator will be drawn.
/// </summary>
private Graphics controlGraphics;
/// <summary>
/// Graphics object for the control into which the tracking indicator will be drawn.
/// </summary>
private Graphics controlGraphics;
/// <summary>
/// DC for the control into which the tracking indicator will be drawn.
/// </summary>
private IntPtr controlDC;
/// <summary>
/// DC for the control into which the tracking indicator will be drawn.
/// </summary>
private IntPtr controlDC;
/// <summary>
/// The capture bitmap. Used to capture the portion of the control that is being
/// overwritten by the tracking indicator so that it can be restored when the
/// tracking indicator is moved to a new location.
/// </summary>
private Bitmap captureBitmap;
/// <summary>
/// The capture bitmap. Used to capture the portion of the control that is being
/// overwritten by the tracking indicator so that it can be restored when the
/// tracking indicator is moved to a new location.
/// </summary>
private Bitmap captureBitmap;
/// <summary>
/// Last capture location where the tracking indicator was drawn.
/// </summary>
private Point lastCaptureLocation;
/// <summary>
/// Last capture location where the tracking indicator was drawn.
/// </summary>
private Point lastCaptureLocation;
/// <summary>
/// The tracking indicator bitmap.
/// </summary>
private Bitmap trackingIndicatorBitmap;
/// <summary>
/// The tracking indicator bitmap.
/// </summary>
private Bitmap trackingIndicatorBitmap;
/// <summary>
/// DllImport of Win32 GetDCEx.
/// </summary>
[DllImport("user32.dll")]
public static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr region, System.Int32 dw);
/// <summary>
/// DllImport of Win32 GetDCEx.
/// </summary>
[DllImport("user32.dll")]
public static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr region, System.Int32 dw);
/// <summary>
/// DllImport of GDI BitBlt.
/// </summary>
[DllImport("gdi32.dll")]
private static extern bool BitBlt( IntPtr hdcDest, // handle to destination DC (device context)
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
IntPtr hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
System.Int32 dwRop);// raster operation code
/// <summary>
/// DllImport of GDI BitBlt.
/// </summary>
[DllImport("gdi32.dll")]
private static extern bool BitBlt( IntPtr hdcDest, // handle to destination DC (device context)
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
IntPtr hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
System.Int32 dwRop);// raster operation code
/// <summary>
/// DllImport of Win32 ReleaseDC.
/// </summary>
[System.Runtime.InteropServices.DllImportAttribute("user32.dll")]
private static extern bool ReleaseDC(IntPtr hWnd, IntPtr dc);
/// <summary>
/// DllImport of Win32 ReleaseDC.
/// </summary>
[System.Runtime.InteropServices.DllImportAttribute("user32.dll")]
private static extern bool ReleaseDC(IntPtr hWnd, IntPtr dc);
/// <summary>
/// Initializes a new instance of the SplitterTrackingIndicator class.
/// </summary>
public SplitterTrackingIndicator()
{
}
/// <summary>
/// Initializes a new instance of the SplitterTrackingIndicator class.
/// </summary>
public SplitterTrackingIndicator()
{
}
/// <summary>
/// Begin a tracking indicator in the specified control using the specified rectangle.
/// </summary>
/// <param name="control">The control into which the tracking indicator will be drawn.</param>
/// <param name="rectangle">Rectangle structure that represents the tracking indicator rectangle, relative to the upper-left corner of the control into which it will be drawn.</param>
public void Begin(Control control, Rectangle rectangle)
{
// Can't Begin twice.
Debug.Assert(!valid, "Invalid nested Begin", "You must first call the End method of a SplitterTrackingIndicator before calling its Begin method again.");
if (valid)
End();
/// <summary>
/// Begin a tracking indicator in the specified control using the specified rectangle.
/// </summary>
/// <param name="control">The control into which the tracking indicator will be drawn.</param>
/// <param name="rectangle">Rectangle structure that represents the tracking indicator rectangle, relative to the upper-left corner of the control into which it will be drawn.</param>
public void Begin(Control control, Rectangle rectangle)
{
// Can't Begin twice.
Debug.Assert(!valid, "Invalid nested Begin", "You must first call the End method of a SplitterTrackingIndicator before calling its Begin method again.");
if (valid)
End();
// Save away the control. We need this so we can call ReleaseDC later on.
this.control = control;
// Save away the control. We need this so we can call ReleaseDC later on.
this.control = control;
// Get a DC for the "visible region" the specified control. Children are not clipped
// for this DC, which allows us to draw the tracking indicator over them.
controlDC = GetDCEx(control.Handle, System.IntPtr.Zero, DCX_PARENTCLIP);
// Get a DC for the "visible region" the specified control. Children are not clipped
// for this DC, which allows us to draw the tracking indicator over them.
controlDC = GetDCEx(control.Handle, System.IntPtr.Zero, DCX_PARENTCLIP);
// Get a graphics object for the DC.
controlGraphics = Graphics.FromHdc(controlDC);
// Get a graphics object for the DC.
controlGraphics = Graphics.FromHdc(controlDC);
// Instantiate the capture bitmap.
captureBitmap = new Bitmap(rectangle.Width, rectangle.Height);
// Instantiate the capture bitmap.
captureBitmap = new Bitmap(rectangle.Width, rectangle.Height);
// Instantiate and paint the tracking indicator bitmap.
trackingIndicatorBitmap = new Bitmap(rectangle.Width, rectangle.Height);
Graphics trackingIndicatorBitmapGraphics = Graphics.FromImage(trackingIndicatorBitmap);
HatchBrush hatchBrush = new HatchBrush( HatchStyle.Percent50,
Color.FromArgb(128, Color.Black),
Color.FromArgb(128, Color.White));
trackingIndicatorBitmapGraphics.FillRectangle(hatchBrush, new Rectangle(0, 0, rectangle.Width, rectangle.Height));
hatchBrush.Dispose();
trackingIndicatorBitmapGraphics.Dispose();
// Instantiate and paint the tracking indicator bitmap.
trackingIndicatorBitmap = new Bitmap(rectangle.Width, rectangle.Height);
Graphics trackingIndicatorBitmapGraphics = Graphics.FromImage(trackingIndicatorBitmap);
HatchBrush hatchBrush = new HatchBrush( HatchStyle.Percent50,
Color.FromArgb(128, Color.Black),
Color.FromArgb(128, Color.White));
trackingIndicatorBitmapGraphics.FillRectangle(hatchBrush, new Rectangle(0, 0, rectangle.Width, rectangle.Height));
hatchBrush.Dispose();
trackingIndicatorBitmapGraphics.Dispose();
// Draw the new tracking indicator.
DrawTrackingIndicator(rectangle.Location);
// Draw the new tracking indicator.
DrawTrackingIndicator(rectangle.Location);
// Valid now.
valid = true;
}
// Valid now.
valid = true;
}
/// <summary>
/// Update the location of the tracking indicator.
/// </summary>
/// <param name="location">The new location of the tracking indicator.</param>
public void Update(Point location)
{
// Can't Update without a Begin.
Debug.Assert(valid, "Invalid Update", "You must first call the Begin method of a SplitterTrackingIndicator before calling its Update method.");
if (!valid)
return;
/// <summary>
/// Update the location of the tracking indicator.
/// </summary>
/// <param name="location">The new location of the tracking indicator.</param>
public void Update(Point location)
{
// Can't Update without a Begin.
Debug.Assert(valid, "Invalid Update", "You must first call the Begin method of a SplitterTrackingIndicator before calling its Update method.");
if (!valid)
return;
// Undraw the last tracking indicator.
UndrawLastTrackingIndicator();
// Undraw the last tracking indicator.
UndrawLastTrackingIndicator();
// Draw the new tracking indicator.
DrawTrackingIndicator(location);
}
// Draw the new tracking indicator.
DrawTrackingIndicator(location);
}
/// <summary>
/// End the tracking indicator.
/// </summary>
public void End()
{
// Can't Update without a Begin.
Debug.Assert(valid, "Invalid End", "You must first call the Begin method of a SplitterTrackingIndicator before calling its End method.");
if (!valid)
return;
/// <summary>
/// End the tracking indicator.
/// </summary>
public void End()
{
// Can't Update without a Begin.
Debug.Assert(valid, "Invalid End", "You must first call the Begin method of a SplitterTrackingIndicator before calling its End method.");
if (!valid)
return;
// Undraw the last tracking indicator.
UndrawLastTrackingIndicator();
// Undraw the last tracking indicator.
UndrawLastTrackingIndicator();
// Cleanup the capture bitmap.
captureBitmap.Dispose();
// Cleanup the capture bitmap.
captureBitmap.Dispose();
// Dispose of the graphics context and DC for the control.
controlGraphics.Dispose();
ReleaseDC(control.Handle, controlDC);
// Dispose of the graphics context and DC for the control.
controlGraphics.Dispose();
ReleaseDC(control.Handle, controlDC);
// Not valid anymore.
valid = false;
}
// Not valid anymore.
valid = false;
}
/// <summary>
/// "Undraw" the last tracking indicator.
/// </summary>
private void UndrawLastTrackingIndicator()
{
controlGraphics.DrawImageUnscaled(captureBitmap, lastCaptureLocation);
}
/// <summary>
/// "Undraw" the last tracking indicator.
/// </summary>
private void UndrawLastTrackingIndicator()
{
controlGraphics.DrawImageUnscaled(captureBitmap, lastCaptureLocation);
}
/// <summary>
/// Draw the tracking indicator.
/// </summary>
private void DrawTrackingIndicator(Point location)
{
// BitBlt the contents of the specified rectangle of the control to the capture bitmap.
Graphics captureBitmapGraphics = Graphics.FromImage(captureBitmap);
System.IntPtr captureBitmapDC = captureBitmapGraphics.GetHdc();
BitBlt( captureBitmapDC, // handle to destination DC (device context)
0, // x-coord of destination upper-left corner
0, // y-coord of destination upper-left corner
captureBitmap.Width, // width of destination rectangle
captureBitmap.Height, // height of destination rectangle
controlDC, // handle to source DC
location.X, // x-coordinate of source upper-left corner
location.Y, // y-coordinate of source upper-left corner
SRCCOPY); // raster operation code
captureBitmapGraphics.ReleaseHdc(captureBitmapDC);
captureBitmapGraphics.Dispose();
/// <summary>
/// Draw the tracking indicator.
/// </summary>
private void DrawTrackingIndicator(Point location)
{
// BitBlt the contents of the specified rectangle of the control to the capture bitmap.
Graphics captureBitmapGraphics = Graphics.FromImage(captureBitmap);
System.IntPtr captureBitmapDC = captureBitmapGraphics.GetHdc();
BitBlt( captureBitmapDC, // handle to destination DC (device context)
0, // x-coord of destination upper-left corner
0, // y-coord of destination upper-left corner
captureBitmap.Width, // width of destination rectangle
captureBitmap.Height, // height of destination rectangle
controlDC, // handle to source DC
location.X, // x-coordinate of source upper-left corner
location.Y, // y-coordinate of source upper-left corner
SRCCOPY); // raster operation code
captureBitmapGraphics.ReleaseHdc(captureBitmapDC);
captureBitmapGraphics.Dispose();
// Draw the tracking indicator bitmap.
controlGraphics.DrawImageUnscaled(trackingIndicatorBitmap, location);
// Draw the tracking indicator bitmap.
controlGraphics.DrawImageUnscaled(trackingIndicatorBitmap, location);
// Remember the last capture location. UndrawLastTrackingIndicator uses this value
// to undraw this tracking indicator at this location.
lastCaptureLocation = location;
}
}
// Remember the last capture location. UndrawLastTrackingIndicator uses this value
// to undraw this tracking indicator at this location.
lastCaptureLocation = location;
}
}
}

View File

@ -1154,7 +1154,6 @@ namespace OpenLiveWriter.ApplicationFramework
#endregion Private Methods & Properties
#region Accessibility
protected override void AddAccessibleControlsToList(ArrayList list)
{

View File

@ -11,93 +11,93 @@ using System.Windows.Forms;
namespace Project31.ApplicationFramework
{
/// <summary>
/// ApplicationCommandBar lightweight control. Provides the CommandBarLightweightControl for
/// the ApplicationWorkspace.
/// </summary>
public class TabPageCommandBarLightweightControl : CommandBarLightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// ApplicationCommandBar lightweight control. Provides the CommandBarLightweightControl for
/// the ApplicationWorkspace.
/// </summary>
public class TabPageCommandBarLightweightControl : CommandBarLightweightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
public TabPageCommandBarLightweightControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
public TabPageCommandBarLightweightControl()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
/// <param name="container"></param>
public TabPageCommandBarLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Initializes a new instance of the ApplicationCommandBarLightweightControl class.
/// </summary>
/// <param name="container"></param>
public TabPageCommandBarLightweightControl(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Fill the background.
if (ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor == ApplicationManager.ApplicationStyle.TabPageCommandBarBottomColor)
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor))
e.Graphics.FillRectangle(solidBrush, VirtualClientRectangle);
else
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor, ApplicationManager.ApplicationStyle.TabPageCommandBarBottomColor, LinearGradientMode.Vertical))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
/// <summary>
/// Raises the Paint event.
/// </summary>
/// <param name="e">A PaintEventArgs that contains the event data.</param>
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
// Fill the background.
if (ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor == ApplicationManager.ApplicationStyle.TabPageCommandBarBottomColor)
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor))
e.Graphics.FillRectangle(solidBrush, VirtualClientRectangle);
else
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(VirtualClientRectangle, ApplicationManager.ApplicationStyle.TabPageCommandBarTopColor, ApplicationManager.ApplicationStyle.TabPageCommandBarBottomColor, LinearGradientMode.Vertical))
e.Graphics.FillRectangle(linearGradientBrush, VirtualClientRectangle);
// Draw the bottom line highlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarHighlightColor))
e.Graphics.FillRectangle(solidBrush, 0, 0, 1, VirtualHeight-1);
// Draw the bottom line highlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarHighlightColor))
e.Graphics.FillRectangle(solidBrush, 0, 0, 1, VirtualHeight-1);
// Draw the bottom line lowlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarLowlightColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-2, VirtualWidth, 1);
// Draw the bottom line lowlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarLowlightColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-2, VirtualWidth, 1);
// Draw the bottom line highlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarHighlightColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-1, VirtualWidth, 1);
// Draw the bottom line highlight color.
using (SolidBrush solidBrush = new SolidBrush(ApplicationManager.ApplicationStyle.TabPageCommandBarHighlightColor))
e.Graphics.FillRectangle(solidBrush, 0, VirtualHeight-1, VirtualWidth, 1);
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
}
}
// Call the base class's method so that registered delegates receive the event.
base.OnPaint(e);
}
}
}

Some files were not shown because too many files have changed in this diff Show More