C
C#10mo ago
Tyler

❔ New to C#, trying to create a gui that lets me start/stop my discord bot on a remote linux machine

I am new to c#, but trying to learn. I have a simple gui with a start and stop button at the moment. I believe I have ssh setup in the cs files, but when I click the buttons, nothing happens and I am really not sure where to go to see any errors or output.
16 Replies
Tyler
Tyler10mo ago
this is the basic gui This code link is for my file MainForm.cs https://mystb.in/InexpensiveThumbsBased This code link is for my SSHManager.cs https://mystb.in/DetailedCareyLoading Any help in understanding what I am doing wrong is much appreciated. Once I get it working, I will work on making it look better. Ideally, pressing the start button runs this command on the remote linux machine sudo systemctl start bub.service and pressing the stop button runs this command sudo systemctl stop bub.service $code
MODiX
MODiX10mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Pobiega
Pobiega10mo ago
Have you tried debugging it?
Tyler
Tyler10mo ago
im gonna be honest, I am new to visual studio debugging, so im not sure what im looking at, but the codes not giving me any errors, just a couple warnings
Pobiega
Pobiega10mo ago
you need to verify that sending a command actually works, so perhaps make it send touch test etc if you had errors, you wouldnt be able to build/run
Tyler
Tyler10mo ago
Pobiega
Pobiega10mo ago
debugging is stepping through the program line by line to see if it does waht you want $debug
MODiX
MODiX10mo ago
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
Pobiega
Pobiega10mo ago
read this, give it a try I need to do something, I'll be back in ~20 min if you havent figured it out by then, we can screenshare and try
Tyler
Tyler10mo ago
ok! yeah im still lost sadly
Pobiega
Pobiega10mo ago
Alright, I'm back
Tyler
Tyler10mo ago
so I walked through setting break points, but im not sure what im looking for to be honest
Pobiega
Pobiega10mo ago
Alright #dev-vc-1 You comming?
Tyler
Tyler10mo ago
$vps
Accord
Accord10mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ I can't fill my inputs when I click the "update" buttonIn order not to write it again, I am giving the stack overflow link. I will be grateful if you could❔ I don't know where to put handle error in my projectI use DDD in my project and this project makes CRUD. In infrastructure, there are a logic to call a ❔ Using XML to modify Nuget nuspec filesI am trying to take data from my old nuget packages nuspec file then I want to get the data from ea✅ Can't have interface with abstract static method as parameter in blazor componentI have interface and class like this: ```cs interface IFoo { static abstract IFoo Create(); void❔ Authentication on a ASP.NET application hosted on IISHi, I'm very new to deployment on IIS, and I'm very sure that it's just some configuration that isn'❔ newbie here. how to make combobox display values from 2d array 2nd column, and do nothing if null?this is visual studio windows form app combobox so i have a combobox called category. if i click the❔ Process Start with unicode charactersHello, I'm having issues with the following code to launch process when they are on directories wit❔ Uno using c# consolebasically as a school project we were asked to make a uno game code with certain rules, Me and my te❔ newbie here. how to check for duplicate string vs a combobox list?im not too sure how to write this. so from combobox textbox i should be able to write something e.g.❔ XAML accessing property of parent views elementI have this structure in XAML: `<RelativeLayout> <Grid1> <tabView> <tabView