minor code clean up

This commit is contained in:
Sean Kaim
2018-07-27 17:02:51 -04:00
parent 7c8c7d482a
commit f852a4d341
3 changed files with 29 additions and 10 deletions

View File

@@ -2777,6 +2777,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Must Be Between 0 and 255.
/// </summary>
internal static string strIPRange {
get {
return ResourceManager.GetString("strIPRange", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to CTRL-ALT-DEL.
/// </summary>
@@ -4308,6 +4317,15 @@ namespace mRemoteNG {
}
}
/// <summary>
/// Looks up a localized string similar to Out Of Range.
/// </summary>
internal static string strOutOfRange {
get {
return ResourceManager.GetString("strOutOfRange", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Panel Name.
/// </summary>

View File

@@ -2679,4 +2679,10 @@ This page will walk you through the process of upgrading your connections file o
<data name="strCreateEmptyPanelOnStartUp" xml:space="preserve">
<value>Create an empty panel when mRemoteNG starts</value>
</data>
<data name="strIPRange" xml:space="preserve">
<value>Must Be Between 0 and 255</value>
</data>
<data name="strOutOfRange" xml:space="preserve">
<value>Out Of Range</value>
</data>
</root>

View File

@@ -29,9 +29,8 @@ namespace mRemoteNG.UI.Controls
/** Sets and Gets the tooltiptext on toolTip1 */
public string ToolTipText
{
get
{ return toolTip1.GetToolTip(Octet1); }
set
get => toolTip1.GetToolTip(Octet1);
set
{
toolTip1.SetToolTip(Octet1,value);
toolTip1.SetToolTip(Octet2,value);
@@ -46,12 +45,8 @@ namespace mRemoteNG.UI.Controls
/** Set or Get the string that represents the value in the box */
public override string Text
{
get
{
return Octet1.Text + @"." + Octet2.Text + @"." + Octet3.Text + @"." + Octet4.Text;
}
set
get => Octet1.Text + @"." + Octet2.Text + @"." + Octet3.Text + @"." + Octet4.Text;
set
{
if (!string.IsNullOrEmpty(value))
{
@@ -245,7 +240,7 @@ namespace mRemoteNG.UI.Controls
if(theValue >=0 && theValue <= 255)
return true;
MessageBox.Show("Must Be Between 0 and 255","Out Of Range");
MessageBox.Show(Language.strIPRange,Language.strOutOfRange);
return false;
}
catch