Various Scripts and Application Code Segments for .NET, VB, C#, C++, C, Java, JavaScript, HTML, Python, Perl, AutoIT, Batch, ASP Classic, Objective-C, Swift, Unreal Engine 4, Unity3D & others. Also contains numerous IT tidbits, procedures, and tricks including Technology Hacks on various platforms.
Tuesday, September 28, 2010
Running from a Schedule in C#
This snippet shows you how to schedule a given command in C#. First you need two controls for time. We'll name them both txtDate and txtTime in this example. txtDate and txtTime are both short date and short time controls. This snippet just compares the txtTime/txtDate with the current time, and then if the condition is met it runs the subroutine.
if (DateTime.Now.ToShortDateString() ==
txtDate.Text &&
DateTime.Now.ToLongTimeString() ==
txtTime.Text)
{
runmelater = false;
this.runCommand(Password1, UserName1, Command1);
this.EnableControl();
}
Subscribe to:
Post Comments (Atom)
Generating "Always On Top" NSWindow in macOS across all detected displays
Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift Langues, you m...
-
In Unreal Engine 4 you will eventually need Linear Interpolation between two values to do something like ping pong between two float val...
-
Recently Possess () has been deprecated from UE4 , and when writing classes based on AAIController you have to use the function OnPossess ...
-
Often we intermingle C++ and Blueprints, and need for the two to communicate. With Behavior Trees, using ENUMs is an everyday occurrence an...
No comments:
Post a Comment