De1337
De1337
CC#
Created by De1337 on 6/18/2024 in #help
freeze winform app until loop exits
I have an app running and when a specific button is hit it runs a bunch of tasks. I want to freeze the tasks at one point until a loop is finished. Not sure why this code isn't doing that:
loop = true;

//loop while receiving data to prevent going past this point until the end
while (loop == true)
{
//upon data receipt from tracer, send data to dataReceivedHandler function
port.DataReceived += new SerialDataReceivedEventHandler(dataRecievedHandler);
}
loop = true;

//loop while receiving data to prevent going past this point until the end
while (loop == true)
{
//upon data receipt from tracer, send data to dataReceivedHandler function
port.DataReceived += new SerialDataReceivedEventHandler(dataRecievedHandler);
}
Later in the code I have a loop=false in my dataReceivedHandlerFuntion to break the loop but code after this code is executing prematurely
9 replies
CC#
Created by De1337 on 3/11/2024 in #help
Password Control
Hi, I have a simple WinForms app that uploads something to an SFTP server. I am trying to control the login to this SFTP properly but not sure how to both secure the password and still pass it in the connection string. I know about using DPAPI but that would not translate between machines when installing the app. Is there a way to safely store a password for decryption to use in this way? My best guess so far is to enter the password after install and use DPAPI to hash it. It's an extra install step I'd like to avoid if there's a better way.
6 replies
CC#
Created by De1337 on 2/26/2024 in #help
ClickOnce Publish with SFTP
Anyone have any luck making this happen? I can get it to push to an FTP but hate having that on my production server. Anytime I try and push with SFTP I get an error of Unable to create the Web site 'sftp://companyname.com/updates'
1 replies
CC#
Created by De1337 on 10/30/2023 in #help
❔ WinForm Draw Polygon from Radius Info
I am interfacing with a piece of hardware that give out shapes in the form of radius in mm. I am trying to draw the shape on a winForm but all the draw options I see require the actual points rather than radius. Is there a way to accomplish this?
7 replies