Skip to content

Commit a3a6956

Browse files
committed
Implement logic for TigerVNC
1 parent 0c60bf0 commit a3a6956

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Source/NETworkManager.Profiles/Application/PowerShell.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ public static PowerShellSessionInfo CreateSessionInfo(ProfileInfo profile)
1010
// Get group info
1111
GroupInfo group = ProfileManager.GetGroup(profile.Group);
1212

13-
var info = new PowerShellSessionInfo
13+
return new PowerShellSessionInfo
1414
{
1515
EnableRemoteConsole = profile.PowerShell_EnableRemoteConsole,
1616
Host = profile.Host,
1717

1818
AdditionalCommandLine = profile.PowerShell_OverrideAdditionalCommandLine ? profile.PowerShell_AdditionalCommandLine : (group.PowerShell_OverrideAdditionalCommandLine ? group.PowerShell_AdditionalCommandLine : SettingsManager.Current.PowerShell_AdditionalCommandLine),
1919
ExecutionPolicy = profile.PowerShell_OverrideExecutionPolicy ? profile.PowerShell_ExecutionPolicy : (group.PowerShell_OverrideExecutionPolicy ? group.PowerShell_ExecutionPolicy : SettingsManager.Current.PowerShell_ExecutionPolicy)
2020
};
21-
22-
return info;
2321
}
2422
}
2523
}

Source/NETworkManager.Profiles/Application/TigerVNC.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ namespace NETworkManager.Profiles.Application
66
{
77
public static class TigerVNC
88
{
9-
public static TigerVNCSessionInfo CreateSessionInfo(ProfileInfo profileInfo)
9+
public static TigerVNCSessionInfo CreateSessionInfo(ProfileInfo profile)
1010
{
11-
var info = new TigerVNCSessionInfo
11+
// Get group info
12+
GroupInfo group = ProfileManager.GetGroup(profile.Group);
13+
14+
return new TigerVNCSessionInfo
1215
{
13-
Host = profileInfo.TigerVNC_Host,
14-
Port = profileInfo.TigerVNC_OverridePort ? profileInfo.TigerVNC_Port : SettingsManager.Current.TigerVNC_Port
15-
};
16+
Host = profile.TigerVNC_Host,
1617

17-
return info;
18+
Port = profile.TigerVNC_OverridePort ? profile.TigerVNC_Port : (group.TigerVNC_OverridePort ? group.TigerVNC_Port : SettingsManager.Current.TigerVNC_Port)
19+
};
1820
}
1921
}
2022
}

0 commit comments

Comments
 (0)