Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 62 additions & 24 deletions RemoteApplicationPublisher/RemoteAppEditWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 31 additions & 8 deletions RemoteApplicationPublisher/RemoteAppEditWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public RemoteApp CreateRemoteApp()
Text = "New RemoteApp";
Size = MinimumSize;
HelpSystem.SetupTips(this);
CommandLineOptionCombo.SelectedIndex = 1;
radioButtonOptional.Checked = true;

EditRemoteApp(new RemoteApp());

Expand All @@ -78,9 +78,22 @@ public void LoadValues()
FullNameText.Text = RemoteApp.FullName;
PathText.Text = RemoteApp.Path;
CommandLineText.Text = RemoteApp.CommandLine;
CommandLineOptionCombo.SelectedIndex = RemoteApp.CommandLineOption;
switch (RemoteApp.CommandLineOption)
{
case 0:
radioButtonDisabled.Checked = true;
break;
case 1:
radioButtonOptional.Checked = true;
break;
case 2:
radioButtonEnforced.Checked = true;
break;
}
checkBoxOILauncher.Checked = RemoteApp.UseLauncher;

checkBoxDebug.Checked = CommandLineText.Text.Contains(enableDebug);

Icon = RemoteAppFunction.ReturnIcon(RemoteApp.Path);
}

Expand Down Expand Up @@ -195,12 +208,22 @@ private void SaveAndEditWindow()
}
else
{
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, CommandLineOptionCombo.SelectedIndex, PathText.Text, 0, 0);
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, GetCommandLineOption(), PathText.Text, 0, 0);
Text = "Properties of " + FullNameText.Text;
ShowDialog();
}
}

private int GetCommandLineOption()
{
var option = 1;
if (radioButtonDisabled.Checked)
option = 0;
else if (radioButtonEnforced.Checked)
option = 2;
return option;
}

private void SaveAndCloseOrWindow()
{
if (string.IsNullOrEmpty(ShortNameText.Text))
Expand Down Expand Up @@ -230,7 +253,7 @@ private void SaveAndCloseOrWindow()
}
else
{
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, CommandLineOptionCombo.SelectedIndex, PathText.Text, 0, 0);
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, GetCommandLineOption(), PathText.Text, 0, 0);
Close();
}
}
Expand Down Expand Up @@ -259,7 +282,7 @@ private void SaveAndClose()
}
else
{
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, CommandLineOptionCombo.SelectedIndex, PathText.Text, 0, 0);
SaveRemoteApp(ShortNameText.Text.Trim(), FullNameText.Text, PathText.Text, PathText.Text, CommandLineText.Text, GetCommandLineOption(), PathText.Text, 0, 0);
Close();
}
}
Expand All @@ -277,7 +300,7 @@ private void checkBoxOILauncher_CheckedChanged(object sender, EventArgs e)
{
RemoteAppOriginalPath = PathText.Text;
PathText.Text = remoteLauncher;
CommandLineOptionCombo.SelectedIndex = 2;
radioButtonEnforced.Checked = true;
CommandLineText.Text = string.Format(commandLineTemplate, RemoteAppOriginalPath);
}
else
Expand All @@ -289,14 +312,14 @@ private void checkBoxOILauncher_CheckedChanged(object sender, EventArgs e)
RemoteAppOriginalPath = currentApp.VPath;
}
PathText.Text = RemoteAppOriginalPath;
CommandLineOptionCombo.SelectedIndex = 1;
radioButtonOptional.Checked = true;
CommandLineText.Text = string.Empty;
}
}

PathText.Enabled = !checkBoxOILauncher.Checked;
BrowsePath.Enabled = !checkBoxOILauncher.Checked;
CommandLineOptionCombo.Enabled = !checkBoxOILauncher.Checked;
panelOptions.Enabled = !checkBoxOILauncher.Checked;
}

private void PathText_TextChanged(object sender, EventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions RemoteApplicationPublisher/RemoteAppEditWindow.resx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA1iMAAAJNU0Z0AUkBTAIBAQkB
AAFoAQIBaAECARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAMAATADAAEBAQABIAYAATD/
AAGAAQIBgAECARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAMAATADAAEBAQABIAYAATD/
AB8AAysBQQMGAQgYAAMGAQgDKwFB1AADKwFBATMBMAHyAf8CQAGyAf0DBgEIEAADBgEIAisBfgH8ARUB
EwHqAf8DKwFBzAADKwFBATwBOgH1Af8BRwFFAfoB/wE8ATkB9gH/AisBfgH8AwYBCAgAAwYBCAIrAX4B
/AElASMB8QH/ATABLgH2Af8BFQETAeoB/wMrAUHIAAMeASsBPwE8AfYB/wFJAUYB+gH/AVUBVAL/AT0B
Expand All @@ -75,7 +75,7 @@
/wFSAVAC/wE7ATkB9wH/ASMBIQHuAf8DHgEr3AADHgErAUEBPwH3Af8BXQFaAv8BPQE6Av8BOwE4Av8B
VgFUAv8BLAEqAfAB/wMeASvgAAMGAQgCQAG1Af0BYQFdAv8BQgE/Av8BPwE8Av8BWgFYAv8CQAGzAf0D
BgEI3AADBgEIAisBfgH8AVQBUQH7Af8BgAFiAv8BYgFfAv8BYAFdAv8BXQFbAv8BQgFAAfcB/wIrAX4B
/AMGAQjUAAMGAQgBOAEyAX4B/AFbAVgB/QH/AYYBggL/AVoBVwH8Af8BSAFGAfgB/wFEAUEB9wH/AVEB
/AMGAQjUAAMGAQgBNQEvAX4B/AFbAVgB/QH/AYYBggL/AVoBVwH8Af8BSAFGAfgB/wFEAUEB9wH/AVEB
TgH6Af8BXwFdAv8BRAFBAfcB/wIrAX4B/AMGAQjMAAMGAQgCQAG4Af0BYQFeAf4B/wGKAYcC/wFgAV0B
/QH/AVABTQH7Af8DHgErAx4BKwFFAUIB+AH/AVIBUAH6Af8BYQFeAv8BRQFDAfcB/wIrAX4B/AMEAQXI
AAMXAR8BXgFbAv8BgQFiAv8BgQFiAf4B/wFYAVUB/QH/Ax4BKwgAAx4BKwFGAUMB+AH/AVMBUQH7Af8B
Expand Down