Skip to content

Commit 4a8760c

Browse files
committed
Update
1 parent d6fb92d commit 4a8760c

41 files changed

Lines changed: 352 additions & 332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/NETworkManager.Converters/ApplicationNameToIconConverter.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
using System.Globalization;
33
using System.Windows.Controls;
44
using System.Windows.Data;
5-
using NETworkManager.Models;
5+
using NETworkManager.Models.Application;
66

77
namespace NETworkManager.Converters
88
{
99
/// <summary>
10-
/// Convert <see cref="Application.Name"/> to icon (<see cref="Canvas"/>) or wise versa.
10+
/// Convert <see cref="Name"/> to icon (<see cref="Canvas"/>) or wise versa.
1111
/// </summary>
1212
public sealed class ApplicationNameToIconConverter : IValueConverter
1313
{
1414
/// <summary>
15-
/// Convert <see cref="Application.Name"/> to icon (<see cref="Canvas"/>).
15+
/// Convert <see cref="Name"/> to icon (<see cref="Canvas"/>).
1616
/// </summary>
17-
/// <param name="value">Object from type <see cref="Application.Name"/>.</param>
17+
/// <param name="value">Object from type <see cref="Name"/>.</param>
1818
/// <param name="targetType"></param>
1919
/// <param name="parameter"></param>
2020
/// <param name="culture"></param>
2121
/// <returns>Icon (cref="Canvas"/>).</returns>
2222
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
2323
{
24-
if (!(value is Models.Application.Name name))
24+
if (!(value is Name name))
2525
return null;
2626

2727
return Application.GetIcon(name);

Source/NETworkManager.Converters/ApplicationNameToTranslatedStringConverter.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
using NETworkManager.Localization.Translators;
22
using NETworkManager.Models;
3+
using NETworkManager.Models.Application;
34
using System;
45
using System.Globalization;
56
using System.Windows.Data;
67

78
namespace NETworkManager.Converters
89
{
910
/// <summary>
10-
/// Convert <see cref="Application.Name"/> to translated <see cref="string"/> or wise versa.
11+
/// Convert <see cref="Name"/> to translated <see cref="string"/> or wise versa.
1112
/// </summary>
1213
public sealed class ApplicationNameToTranslatedStringConverter : IValueConverter
1314
{
1415
/// <summary>
15-
/// Convert <see cref="Application.Name"/> to translated <see cref="string"/>.
16+
/// Convert <see cref="Name"/> to translated <see cref="string"/>.
1617
/// </summary>
17-
/// <param name="value">Object from type <see cref="Application.Name"/>.</param>
18+
/// <param name="value">Object from type <see cref="Name"/>.</param>
1819
/// <param name="targetType"></param>
1920
/// <param name="parameter"></param>
2021
/// <param name="culture"></param>
21-
/// <returns>Translated <see cref="Application.Name"/>.</returns>
22+
/// <returns>Translated <see cref="Name"/>.</returns>
2223
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
2324
{
24-
if (!(value is Models.Application.Name name))
25+
if (!(value is Name name))
2526
return "-/-";
2627

2728
return ApplicationNameTranslator.GetInstance().Translate(name);

Source/NETworkManager.Documentation/DocumentationManager.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using NETworkManager.Localization;
2-
using NETworkManager.Models;
2+
using NETworkManager.Models.Application;
33
using NETworkManager.Utilities;
44
using System.Collections.Generic;
55
using System.Diagnostics;
@@ -75,53 +75,53 @@ private static void OpenDocumentationAction(object documentationIdentifier)
7575
OpenDocumentation((DocumentationIdentifier) documentationIdentifier);
7676
}
7777

78-
public static DocumentationIdentifier GetIdentifierByAppliactionName(Application.Name name)
78+
public static DocumentationIdentifier GetIdentifierByAppliactionName(Name name)
7979
{
8080
switch (name)
8181
{
82-
case Application.Name.Dashboard:
82+
case Name.Dashboard:
8383
return DocumentationIdentifier.ApplicationDashboard;
84-
case Application.Name.NetworkInterface:
84+
case Name.NetworkInterface:
8585
return DocumentationIdentifier.ApplicationNetworkInterface;
86-
case Application.Name.WiFi:
86+
case Name.WiFi:
8787
return DocumentationIdentifier.ApplicationWiFi;
88-
case Application.Name.IPScanner:
88+
case Name.IPScanner:
8989
return DocumentationIdentifier.ApplicationIPScanner;
90-
case Application.Name.PortScanner:
90+
case Name.PortScanner:
9191
return DocumentationIdentifier.ApplicationPortScanner;
92-
case Application.Name.Ping:
92+
case Name.Ping:
9393
return DocumentationIdentifier.ApplicationPing;
94-
case Application.Name.Traceroute:
94+
case Name.Traceroute:
9595
return DocumentationIdentifier.ApplicationTraceroute;
96-
case Application.Name.DNSLookup:
96+
case Name.DNSLookup:
9797
return DocumentationIdentifier.ApplicationDnsLookup;
98-
case Application.Name.RemoteDesktop:
98+
case Name.RemoteDesktop:
9999
return DocumentationIdentifier.ApplicationRemoteDesktop;
100-
case Application.Name.PowerShell:
100+
case Name.PowerShell:
101101
return DocumentationIdentifier.ApplicationPowerShell;
102-
case Application.Name.PuTTY:
102+
case Name.PuTTY:
103103
return DocumentationIdentifier.ApplicationPutty;
104-
case Application.Name.TigerVNC:
104+
case Name.TigerVNC:
105105
return DocumentationIdentifier.ApplicationTigerVNC;
106-
case Application.Name.SNMP:
106+
case Name.SNMP:
107107
return DocumentationIdentifier.ApplicationSnmp;
108-
case Application.Name.WakeOnLAN:
108+
case Name.WakeOnLAN:
109109
return DocumentationIdentifier.ApplicationWakeOnLan;
110-
case Application.Name.HTTPHeaders:
110+
case Name.HTTPHeaders:
111111
return DocumentationIdentifier.ApplicationHttpHeaders;
112-
case Application.Name.Whois:
112+
case Name.Whois:
113113
return DocumentationIdentifier.ApplicationWhois;
114-
case Application.Name.SubnetCalculator:
114+
case Name.SubnetCalculator:
115115
return DocumentationIdentifier.ApplicationSubnetCalculator;
116-
case Application.Name.Lookup:
116+
case Name.Lookup:
117117
return DocumentationIdentifier.ApplicationLookup;
118-
case Application.Name.Connections:
118+
case Name.Connections:
119119
return DocumentationIdentifier.ApplicationConnections;
120-
case Application.Name.Listeners:
120+
case Name.Listeners:
121121
return DocumentationIdentifier.ApplicationListeners;
122-
case Application.Name.ARPTable:
122+
case Name.ARPTable:
123123
return DocumentationIdentifier.ApplicationArpTable;
124-
case Application.Name.None:
124+
case Name.None:
125125
return DocumentationIdentifier.Default;
126126
default:
127127
return DocumentationIdentifier.Default;

Source/NETworkManager.Localization/Translators/ApplicationNameTranslator.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using NETworkManager.Models;
1+
using NETworkManager.Models.Application;
22
using NETworkManager.Utilities;
33

44
namespace NETworkManager.Localization.Translators
55
{
66
/// <summary>
7-
/// Class to translate <see cref="Application.Name"/>.
7+
/// Class to translate <see cref="Name"/>.
88
/// </summary>
99
public class ApplicationNameTranslator : SingletonBase<ApplicationNameTranslator>, ILocalizationStringTranslator
1010
{
@@ -14,10 +14,10 @@ public class ApplicationNameTranslator : SingletonBase<ApplicationNameTranslator
1414
private const string _identifier = "ApplicationName_";
1515

1616
/// <summary>
17-
/// Method to translate <see cref="Application.Name"/>.
17+
/// Method to translate <see cref="Name"/>.
1818
/// </summary>
19-
/// <param name="value"><see cref="Application.Name"/> as <see cref="string"/>.</param>
20-
/// <returns>Translated <see cref="Application.Name"/>.</returns>
19+
/// <param name="value"><see cref="Name"/> as <see cref="string"/>.</param>
20+
/// <returns>Translated <see cref="Name"/>.</returns>
2121
public string Translate(string value)
2222
{
2323
var translation = Resources.Strings.ResourceManager.GetString(_identifier + value, LocalizationManager.GetInstance().Culture);
@@ -26,11 +26,11 @@ public string Translate(string value)
2626
}
2727

2828
/// <summary>
29-
/// Method to translate <see cref="Application.Name"/>.
29+
/// Method to translate <see cref="Name"/>.
3030
/// </summary>
31-
/// <param name="name"><see cref="Application.Name"/>.</param>
32-
/// <returns>Translated <see cref="Application.Name"/>.</returns>
33-
public string Translate(Application.Name name)
31+
/// <param name="name"><see cref="Name"/>.</param>
32+
/// <returns>Translated <see cref="Name"/>.</returns>
33+
public string Translate(Name name)
3434
{
3535
return Translate(name.ToString());
3636
}

Source/NETworkManager.Models/Application.Name.cs

Lines changed: 0 additions & 136 deletions
This file was deleted.

Source/NETworkManager.Models/Application.cs renamed to Source/NETworkManager.Models/Application/Application.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
using System.Linq;
55
using System.Windows.Controls;
66

7-
namespace NETworkManager.Models
7+
namespace NETworkManager.Models.Application
88
{
99
/// <summary>
1010
/// Provides methods to manage networkmanger applications.
1111
/// </summary>
12-
public static partial class Application
12+
public static class Application
1313
{
1414
/// <summary>
1515
/// Method to return all available applications in.

Source/NETworkManager.Models/ApplicationInfo.cs renamed to Source/NETworkManager.Models/Application/ApplicationInfo.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace NETworkManager.Models
1+
namespace NETworkManager.Models.Application
22
{
33
/// <summary>
44
/// Stores informations about an application.
@@ -8,7 +8,7 @@ public class ApplicationInfo
88
/// <summary>
99
/// Name of the application.
1010
/// </summary>
11-
public Application.Name Name { get; set; }
11+
public Name Name { get; set; }
1212

1313
/// <summary>
1414
/// Indicates that the application is visible to the user.
@@ -24,10 +24,10 @@ public ApplicationInfo()
2424
}
2525

2626
/// <summary>
27-
/// Initializes a new instance of the <see cref="ApplicationInfo"/> class and passes the <see cref="Application.Name"/> as paramteter.
27+
/// Initializes a new instance of the <see cref="ApplicationInfo"/> class and passes the <see cref="Name"/> as paramteter.
2828
/// </summary>
29-
/// <param name="name"><see cref="Application.Name"/></param>
30-
public ApplicationInfo(Application.Name name)
29+
/// <param name="name"><see cref="Name"/></param>
30+
public ApplicationInfo(Name name)
3131
{
3232
Name = name;
3333
IsVisible = true;

0 commit comments

Comments
 (0)