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
92 changes: 69 additions & 23 deletions RemoteApplicationPublisher/RemoteAppEditWindow.Designer.cs

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

34 changes: 25 additions & 9 deletions RemoteApplicationPublisher/RemoteAppEditWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class RemoteAppEditWindow : Form
// Hard coded for now. This needs to be found dynamically.
private string remoteLauncher = @"C:\Program Files\OneIdentity\RemoteApp Launcher\OI-SG-RemoteApp-Launcher.exe";
private string commandLineTemplate = @"--cmd ""{0}"" --args ""{{username}}{{password}}{{asset}}""";

private string enableDebug = @"--enable-debug";

public RemoteAppEditWindow(RemoteAppMainWindow mainWindow)
{
Expand Down Expand Up @@ -55,10 +55,7 @@ public RemoteApp CreateRemoteApp()
HelpSystem.SetupTips(this);
CommandLineOptionCombo.SelectedIndex = 1;

if (DoBrowsePath() == true)
{
SaveAndEditWindow();
}
EditRemoteApp(new RemoteApp());

Dispose();
return RemoteApp;
Expand All @@ -76,7 +73,7 @@ private void SetToolTips()
}

public void LoadValues()
{
{
ShortNameText.Text = RemoteApp.Name;
FullNameText.Text = RemoteApp.FullName;
PathText.Text = RemoteApp.Path;
Expand Down Expand Up @@ -116,8 +113,9 @@ private bool DoBrowsePath()
var title = RemoteAppFunction.GetEXETitle(FilePath);
if (string.IsNullOrEmpty(ShortNameText.Text))
RemoteApp.Name = RemoteAppFunction.FixShortAppName(title);
if (string.IsNullOrEmpty(FullNameText.Text))
RemoteApp.FullName = title;
else
RemoteApp.Name = ShortNameText.Text;
RemoteApp.FullName = title;
}
LoadValues();
DoBrowsePathRet = true;
Expand Down Expand Up @@ -299,6 +297,24 @@ private void checkBoxOILauncher_CheckedChanged(object sender, EventArgs e)
PathText.Enabled = !checkBoxOILauncher.Checked;
BrowsePath.Enabled = !checkBoxOILauncher.Checked;
CommandLineOptionCombo.Enabled = !checkBoxOILauncher.Checked;
}
}

private void PathText_TextChanged(object sender, EventArgs e)
{
this.textBoxFullPath.Text = this.PathText.Text + " " + this.CommandLineText.Text;
}

private void CommandLineText_TextChanged(object sender, EventArgs e)
{
this.textBoxFullPath.Text = this.PathText.Text + " " + this.CommandLineText.Text;
}

private void checkBoxDebug_CheckedChanged(object sender, EventArgs e)
{
if (this.checkBoxDebug.Checked && !this.CommandLineText.Text.Contains(enableDebug))
this.CommandLineText.Text += enableDebug;
if (!this.checkBoxDebug.Checked && this.CommandLineText.Text.Contains(enableDebug))
this.CommandLineText.Text = this.CommandLineText.Text.Replace(enableDebug,"");
}
}
}
Loading