1

I have an application that takes various command line parameters. This works fine but I need to make a change and I was wanting some input as to the best way to handle this change.

Currently:

The application two gets called from application one. I do not have control over application one to pass it through as a reference to application two.

I pass the command line parameters needed from application one to application two as such:

applicationtwo.exe /AA username filename.txt

Change:

The initial load of the program is slow due to the connection to SQL Server. It's not horribly slow, we just have people on the phone with customers that do not want to wait 3-4 each time it opens.

I was thinking I could keep it running in the task bar and bringing it to the front once it's a called again, only allowing one instance of the program to open. I wasn't sure how to get the parameters back to it like I do the command line way though.

Anyone have a good suggestion on how to handle this?

Thanks as usual!

1 Answer 1

1

Are these command line parameters constantly changing based on the other application? If not why not make use of Application/User Settings to store them? This way the application will always have a reference to the settings since you are going to allow it to remain running via the task bar. If you do not want to use the Application/User Settings then simply storing a reference to the passed in arguments in a Singleton somewhere in your app should suffice.

If the values are indeed dynamic and changing then knowing how the parameters come down via application 1 would be needed. If they are fed to a file on the disk then your application 2 could simply read in that file periodically or initiated by the user on demand.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.