time-out computer shutdown
##The program that your computer writes about the closing of the foundation you want.
Hello friends,
I've written an easy project for users who are starting to code in c #.
To perform this project, the program named visual studio must be installed on your computer.
All you need to do is use the process. Enter the hour and minute you want it to close and continue processing. Your computer will then automatically shut down.
Roads to be used:
Insert button
add timer
interface editing
if else use
shutdown event usage
Button 1 Code:
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "C:\Windows\system32\shutdown.exe";
psi.Arguments = "-f -s -t 0";
Process.Start(psi);
Button 2 Click Code:
textBox1.Enabled = false;
textBox2.Enabled = false;
textBox3.Enabled = false;
timer1.Start();
Timer Code:
string hour, minute, second;
hour = textBox1.Text;
minute = textBox2.Text;
second = textBox3.Text;
My Github Project Picture:
Interface:
Code And Interface:
A suitable example for a beginner coders. I hope you will like it.
Github Project Link: https://github.com/mrdmr/pc_shutdown_app
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved yet. See the Utopian Rules. Please edit your contribution to reapply for approval.
You may edit your post here, as shown below:
You can contact us on Discord.
[utopian-moderator]
updating Post.
Before I accept, could you add a README/documentation in your repro?
Done! https://github.com/mrdmr/pc_shutdown_app/blob/master/README.md
Please could you format your README, it is currently not read-able.
Edited.
Your contribution cannot be approved because it does not follow the Utopian Rules, and is considered as plagiarism. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever.
The code has been quite similar with little changes from here
You can contact us on Discord.
[utopian-moderator]