I have an application that is hard coded with an API key....it works, perfectly fine.
I created a login screen so other people can use it with their API key.
It will not hold the API key, I have tried assigning it to a public property, I have tried creating a class to hold it in a property and then call to that class to get it, I created a textbox that was hidden and tried to write it to the hidden textbox....
I run the program, the first run through it works - the api key is there, it has been properly passed, but the moment it calls another method (the get method calls a datagrid view which is populated in another method by making selections form the json objects)....the API key is null and the json is null - hard coded - no problem. I don't understand why it goes to null, and I don't understand why the json goes to null - they are both properties which is how the different methods are able to populate the datagrid view without keep calling to the API.
I have seen solutions online, that require like 4 pages of code (exaggeration for effect) - and I just feel like....it can't be that hard can it? to simply pass a passkey to another viewmodel.
I am using Caliburn Micro for the MVVM model, dependency injection stuff - if that helps.
Thanks for any help offered, because this one has me stumped, I mentioned 3 things above - but I have tried like 15 stupid ideas that I am too embarrassed to post....
I created a login screen so other people can use it with their API key.
It will not hold the API key, I have tried assigning it to a public property, I have tried creating a class to hold it in a property and then call to that class to get it, I created a textbox that was hidden and tried to write it to the hidden textbox....
I run the program, the first run through it works - the api key is there, it has been properly passed, but the moment it calls another method (the get method calls a datagrid view which is populated in another method by making selections form the json objects)....the API key is null and the json is null - hard coded - no problem. I don't understand why it goes to null, and I don't understand why the json goes to null - they are both properties which is how the different methods are able to populate the datagrid view without keep calling to the API.
I have seen solutions online, that require like 4 pages of code (exaggeration for effect) - and I just feel like....it can't be that hard can it? to simply pass a passkey to another viewmodel.
I am using Caliburn Micro for the MVVM model, dependency injection stuff - if that helps.
Thanks for any help offered, because this one has me stumped, I mentioned 3 things above - but I have tried like 15 stupid ideas that I am too embarrassed to post....