The Don
Environment Variables/Persistent Values in OpenSilver
Dear Community -
I am trying to find a way to store and recall user credentials (such as an API key from a back-end or other user-critical data) when using an OpenSilver project, and haven't had much luck.
I was wondering if the community could offer an insight on this.
What I've tried (without success) :
- Environment Variables (Using System.Environment).
- User Secrets.
- Storing a file in the file system.
Thank you, kindly!
9 replies
✅ Is use of IDisposable, using keyword for a UI wait indicator incorrect?
I have a wait indicator for WPF that implements
IDisposable
. When creating a new object of this IDisposasble
implementation wrapped in a using
keyword, it initializes the wait indicator on my WPF screen. Upon disposing, the wait indicator disappears.
This is the code I used before implementing IDisposable
:
Here I have an early return, so I have to call waiter.hide()
twice. This is a simple case, so it may seem trivial to call it more than once, but this can cause problems when the code is more complicated. Forgetting to hide()
will obviously hang the UI.
On the other hand, using this code:
Seems more simplistic and readable. I am wondering if there are any problems with this. If so, are there any alternatives to this?
Thanks!43 replies
❔ Data Plotting Library that Exports Directly to Image
Dear Community,
I am currently a SciChart WPF user that wants to export their charts to file. However, SciChart is a WPF library and uses WPF elements to render its charts, meaning that if I want to export a chart to an image, the end user has to first make the chart visible and then export the chart from there. This is not a feature I want in my user-friendly WPF software,
I'd like to use a free/open-source C# library that exports charts to an image file that looks similar to matplotlib does in Python just for the sake of exporting the chart to an image, so that I can use it alongside SciChart.
Any suggestions?
Thank you in advance!
3 replies
Running MongoDump from C-Sharp Program in Linux Docker Container
Dear community,
I am trying to write a Docker container that will automatically back up all my MongoDB data that's on another server. It should run mongodump on my MongoDb database (
dbName
) and then storing the archive as the designated file (mongoDumpPath
).
When I try to run this in C#, noting happens, (i.e. I can't see the archive file, the result
string is empty). However, when I copy and paste the mongoDumpCommand
string variable and paste it onto the bash shell of the container, it works perfectly.
Can you please advise? Thanks kindly!
EDIT: The StandardError output shows an "unable to execute binary file" even though chmod +x /usr/bin/mongodump
is in the Dockerfile.1 replies