Skip to content
18 changes: 9 additions & 9 deletions src/Microsoft.Management.UI.Internal/CommonHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
namespace Microsoft.Management.UI
{
/// <summary>
/// Utilities in common in this assembly
/// Utilities in common in this assembly.
/// </summary>
internal static class CommonHelper
{
/// <summary>
/// Restore the values from the settings to the actual window position, size and state.
/// </summary>
/// <param name="target">the window we are setting position and size of</param>
/// <param name="userSettingTop">the value for top from the user settings</param>
/// <param name="userSettingLeft">the value for left from the user settings</param>
/// <param name="userSettingWidth">the value for width from the user settings</param>
/// <param name="userSettingHeight">the value for height from the user settings</param>
/// <param name="defaultWidth">the with used if <paramref name="userSettingWidth"/> is not valid</param>
/// <param name="defaultHeight">the height used if <paramref name="userSettingHeight"/> is not valid</param>
/// <param name="userSettingMaximized">true if the window is maximized in the user setting</param>
/// <param name="target">The window we are setting position and size of.</param>
/// <param name="userSettingTop">The value for top from the user settings.</param>
/// <param name="userSettingLeft">The value for left from the user settings.</param>
/// <param name="userSettingWidth">The value for width from the user settings.</param>
/// <param name="userSettingHeight">The value for height from the user settings.</param>
/// <param name="defaultWidth">The with used if <paramref name="userSettingWidth"/> is not valid.</param>
/// <param name="defaultHeight">The height used if <paramref name="userSettingHeight"/> is not valid.</param>
/// <param name="userSettingMaximized">True if the window is maximized in the user setting.</param>
internal static void SetStartingPositionAndSize(Window target, double userSettingTop, double userSettingLeft, double userSettingWidth, double userSettingHeight, double defaultWidth, double defaultHeight, bool userSettingMaximized)
{
bool leftInvalid = userSettingLeft < System.Windows.SystemParameters.VirtualScreenLeft ||
Expand Down

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions src/Microsoft.Management.UI.Internal/HelpWindow/HelpViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,45 @@ namespace Microsoft.Management.UI.Internal
/// ViewModel for the Help Dialog used to:
/// build the help document
/// search the help document
/// offer text for labels
/// offer text for labels.
/// </summary>
internal class HelpViewModel : INotifyPropertyChanged
{
/// <summary>
/// The builder for the help FlowDocument Paragraph used in a RichEditText control
/// The builder for the help FlowDocument Paragraph used in a RichEditText control.
/// </summary>
private readonly HelpParagraphBuilder helpBuilder;

/// <summary>
/// Searcher for selecting current matches in paragraph text
/// Searcher for selecting current matches in paragraph text.
/// </summary>
private readonly ParagraphSearcher searcher;

/// <summary>
/// Title of the help window
/// Title of the help window.
/// </summary>
private readonly string helpTitle;

/// <summary>
/// the zoom bound to the zoom slider value
/// the zoom bound to the zoom slider value.
/// </summary>
private double zoom = 100;

/// <summary>
/// Text to be found. This is bound to the find TextBox
/// Text to be found. This is bound to the find TextBox.
/// </summary>
private string findText;

/// <summary>
/// text for the number of matches found
/// text for the number of matches found.
/// </summary>
private string matchesLabel;

/// <summary>
/// Initializes a new instance of the HelpViewModel class
/// Initializes a new instance of the HelpViewModel class.
/// </summary>
/// <param name="psObj">object containing help</param>
/// <param name="documentParagraph">paragraph in which help text is built/searched</param>
/// <param name="psObj">Object containing help.</param>
/// <param name="documentParagraph">Paragraph in which help text is built/searched.</param>
internal HelpViewModel(PSObject psObj, Paragraph documentParagraph)
{
Debug.Assert(psObj != null, "ensured by caller");
Expand All @@ -70,13 +70,13 @@ internal HelpViewModel(PSObject psObj, Paragraph documentParagraph)

#region INotifyPropertyChanged Members
/// <summary>
/// Used to notify of property changes
/// Used to notify of property changes.
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
#endregion

/// <summary>
/// Gets or sets the Zoom bound to the zoom slider value
/// Gets or sets the Zoom bound to the zoom slider value.
/// </summary>
public double Zoom
{
Expand All @@ -95,7 +95,7 @@ public double Zoom
}

/// <summary>
/// Gets the value bound to the RichTextEdit zoom, which is calculated based on the zoom
/// Gets the value bound to the RichTextEdit zoom, which is calculated based on the zoom.
/// </summary>
public double ZoomLevel
{
Expand All @@ -106,7 +106,7 @@ public double ZoomLevel
}

/// <summary>
/// Gets the label to be displayed for the zoom
/// Gets the label to be displayed for the zoom.
/// </summary>
public string ZoomLabel
{
Expand All @@ -117,7 +117,7 @@ public string ZoomLabel
}

/// <summary>
/// Gets or sets the text to be found
/// Gets or sets the text to be found.
/// </summary>
public string FindText
{
Expand All @@ -135,7 +135,7 @@ public string FindText
}

/// <summary>
/// Gets the title of the window
/// Gets the title of the window.
/// </summary>
public string HelpTitle
{
Expand All @@ -146,7 +146,7 @@ public string HelpTitle
}

/// <summary>
/// Gets or sets the label for current matches
/// Gets or sets the label for current matches.
/// </summary>
public string MatchesLabel
{
Expand All @@ -163,7 +163,7 @@ public string MatchesLabel
}

/// <summary>
/// Gets a value indicating whether there are matches to go to
/// Gets a value indicating whether there are matches to go to.
/// </summary>
public bool CanGoToNextOrPrevious
{
Expand All @@ -174,15 +174,15 @@ public bool CanGoToNextOrPrevious
}

/// <summary>
/// Gets the searcher for selecting current matches in paragraph text
/// Gets the searcher for selecting current matches in paragraph text.
/// </summary>
internal ParagraphSearcher Searcher
{
get { return this.searcher; }
}

/// <summary>
/// Gets the paragraph builder used to write help content
/// Gets the paragraph builder used to write help content.
/// </summary>
internal HelpParagraphBuilder HelpBuilder
{
Expand All @@ -200,7 +200,7 @@ internal void Search()
}

/// <summary>
/// Increases Zoom if not above maximum
/// Increases Zoom if not above maximum.
/// </summary>
internal void ZoomIn()
{
Expand All @@ -211,7 +211,7 @@ internal void ZoomIn()
}

/// <summary>
/// Decreases Zoom if not below minimum
/// Decreases Zoom if not below minimum.
/// </summary>
internal void ZoomOut()
{
Expand All @@ -222,10 +222,10 @@ internal void ZoomOut()
}

/// <summary>
/// Called to update the matches label
/// Called to update the matches label.
/// </summary>
/// <param name="sender">event sender</param>
/// <param name="e">event arguments</param>
/// <param name="sender">Event sender.</param>
/// <param name="e">Event arguments.</param>
private void HelpBuilder_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "HighlightCount")
Expand All @@ -236,7 +236,7 @@ private void HelpBuilder_PropertyChanged(object sender, PropertyChangedEventArgs
}

/// <summary>
/// Sets the current matches label
/// Sets the current matches label.
/// </summary>
private void SetMatchesLabel()
{
Expand Down Expand Up @@ -268,9 +268,9 @@ private void SetMatchesLabel()
}

/// <summary>
/// Called internally to notify when a proiperty changed
/// Called internally to notify when a proiperty changed.
/// </summary>
/// <param name="propertyName">property name</param>
/// <param name="propertyName">Property name.</param>
private void OnNotifyPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = this.PropertyChanged;
Expand Down
Loading