Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DefectId: 40044 & 40055] New Solution Application Validation and Environment Platform initialization #3581

Merged
merged 5 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions Ginger/Ginger/SolutionWindows/AddApplicationPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ public void SetAgent(ApplicationPlatform selectedApp)
case ePlatformType.Java:
agent.DriverType = Agent.eDriverType.JavaDriver;
break;
case ePlatformType.MainFrame:
agent.DriverType = Agent.eDriverType.MainFrame3270;
break;
manas-droid marked this conversation as resolved.
Show resolved Hide resolved
default:
Reporter.ToUser(eUserMsgKey.StaticWarnMessage, "No default driver set for first agent");
break;
Expand Down
10 changes: 9 additions & 1 deletion Ginger/Ginger/SolutionWindows/AddSolutionPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public partial class AddSolutionPage : Page
Solution mSolution;
GenericWindow _pageGenericWin = null;
private ePlatformType SelectedPlatform = ePlatformType.NA;
private bool isApplicationDetailsSet = false;
private string mainAppDescription = string.Empty;
manas-droid marked this conversation as resolved.
Show resolved Hide resolved
public AddSolutionPage(Solution s)
{
InitializeComponent();
Expand All @@ -68,7 +70,7 @@ private void OKButton_Click(object sender, RoutedEventArgs e)
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
//check name and folder inputs exists
if (SolutionNameTextBox.Text.Trim() == string.Empty || SolutionFolderTextBox.Text.Trim() == string.Empty
|| UCEncryptionKey.EncryptionKeyPasswordBox.Password.Trim() == string.Empty)
|| UCEncryptionKey.EncryptionKeyPasswordBox.Password.Trim() == string.Empty || !isApplicationDetailsSet)
{
Mouse.OverrideCursor = null;
Reporter.ToUser(eUserMsgKey.MissingAddSolutionInputs);
Expand All @@ -87,6 +89,7 @@ private void OKButton_Click(object sender, RoutedEventArgs e)
ApplicationPlatform MainApplicationPlatform = new ApplicationPlatform();
MainApplicationPlatform.AppName = ApplicationLabel.Content.ToString();
MainApplicationPlatform.Platform = SelectedPlatform;
MainApplicationPlatform.Description = mainAppDescription;

mSolution.ApplicationPlatforms.Add(MainApplicationPlatform);
mSolution.EncryptionKey = UCEncryptionKey.EncryptionKeyPasswordBox.Password;
Expand Down Expand Up @@ -218,6 +221,9 @@ void AddFirstAgentForSolutionForApplicationPlatfrom(ApplicationPlatform MainAppl
case ePlatformType.Java:
agent.DriverType = Agent.eDriverType.JavaDriver;
break;
case ePlatformType.MainFrame:
agent.DriverType = Agent.eDriverType.MainFrame3270;
break;
default:
Reporter.ToUser(eUserMsgKey.StaticWarnMessage, "No default driver set for first agent");
break;
Expand Down Expand Up @@ -313,6 +319,8 @@ private void SelectButton_Click(object sender, RoutedEventArgs e)
xApplicationImage.ImageType = ApplicationPlatform.GetPlatformImage(mSolution.ApplicationPlatforms[0].Platform);
xApplicationImage.Visibility = Visibility.Visible;
SelectedPlatform = mSolution.ApplicationPlatforms[0].Platform;
mainAppDescription = mSolution.ApplicationPlatforms[0].Description;
isApplicationDetailsSet = true;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private void Duplicate(object sender, RoutedEventArgs e)
{
EnvApplication copy = (EnvApplication)EnvApplication.CreateCopy();
copy.Name = copy.Name + "_copy";
copy.Platform = EnvApplication.Platform;
manas-droid marked this conversation as resolved.
Show resolved Hide resolved
ProjEnvironment.Applications.Add(copy);
ProjEnvironment.SaveBackup();//to mark the env as changed
mTreeView.Tree.RefreshSelectedTreeNodeParent();
Expand Down
Loading