Austin9675
Austin9675
CC#
Created by Austin9675 on 2/1/2024 in #help
Timer issue
Can anyone help me find out why my timer is decreasing by 2 instead of 1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace PowerOps { public partial class SystemShutDown : Form { int timeLeft; bool timerRunning = false; public SystemShutDown() { InitializeComponent(); shutDown.Interval = 1000; shutDown.Tick += shutDown_Tick; } private void shutDown_Tick(object sender, EventArgs e) { timer(sender, e); } public void timer(object sender, EventArgs e) { if (timeLeft > 0) { timeLeft--; timerTextLabel.Text = $"Time Left: {timeLeft / 60:D2} minutes {timeLeft % 60:D2} seconds"; } else { MessageBox.Show("Time's up!", "Countdown Complete"); timerRunning = false; shutDown.Stop(); } } public void startButton_Click(object sender, EventArgs e) { if (!timerRunning) { int countDown = int.Parse(timerBox.Text) * 60; timeLeft = countDown; timerTextLabel.Text = $"Time Left: {timeLeft / 60:D2}:{timeLeft % 60:D2}"; shutDown.Interval = 1000; shutDown.Start(); timerRunning = true; } }
} }
1 replies
CC#
Created by Austin9675 on 1/28/2024 in #help
Unity Error
No description
13 replies
CC#
Created by Austin9675 on 1/24/2024 in #help
Finding a game file
I am making a UI for setting up a dedicated server for a game on steam, the problem im having is that the program can find the directory that the file is in but it cannot find the file it needs to write to, its a configuration file if that matters at all, so im basically wondering if theres anything special i need to do
2 replies
CC#
Created by Austin9675 on 1/19/2024 in #help
File writing
No description
4 replies
CC#
Created by Austin9675 on 1/6/2024 in #help
Reading files
No description
6 replies
CC#
Created by Austin9675 on 1/4/2024 in #help
FiveM script
No description
7 replies
CC#
Created by Austin9675 on 1/2/2024 in #help
working with System IO
No description
8 replies
CC#
Created by Austin9675 on 12/13/2023 in #help
Recommendations
I have learned the basics of c# but thats literally all i know how to do, i want to get into some other things like learning to use system IO and being able to make useful programs, basically what im asking for is a list of websites or anything really that you may have learned off of and someone like myself can read and learn off of to expand my C# knowledge
5 replies
CC#
Created by Austin9675 on 9/26/2023 in #help
Using global variables
I have a quick question, say i have a variable named moneyOwed and i wanted to display that on any single page of the forms instead of being stuck to one page, how would i do that?
7 replies
CC#
Created by Austin9675 on 9/7/2023 in #help
SSD Help
1 replies
CC#
Created by Austin9675 on 8/24/2023 in #help
Winforms int problem
6 replies
CC#
Created by Austin9675 on 8/23/2023 in #help
Data or int issue
6 replies
CC#
Created by Austin9675 on 8/23/2023 in #help
Read file C#
11 replies
CC#
Created by Austin9675 on 7/17/2023 in #help
❔ Duplicating data
13 replies