This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newValue = easeFunction( | |
elapsedTime, | |
initialValue, | |
totalChange, | |
totalDuration | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x => x.Name == "Bob" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _Persons = _PersonList.Where(x => x.Name == "Bob"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _Persons = from person in _PersonList | |
where person.Name == "Bob" | |
select person; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[STAThread()] | |
static void Main(string[] args) | |
{ | |
Console.Title = "Call App"; | |
// hide the console window | |
setConsoleWindowVisibility(false, Console.Title); | |
// look for all running instances of the app | |
var runningProcessByName = Process.GetProcessesByName("notepad"); | |
if (runningProcessByName.Length == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DllImport("User32.dll")] | |
private static extern bool SetForegroundWindow(IntPtr hWnd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var runningProcessByName = Process.GetProcessesByName("notepad"); | |
if (runningProcessByName.Length == 0) | |
{ | |
Process.Start("notepad.exe"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Console.Title = "Call App"; | |
// hide the console window | |
setConsoleWindowVisibility(false, Console.Title); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void setConsoleWindowVisibility(bool visible, string title) | |
{ | |
IntPtr hWnd = FindWindow(null, title); | |
if (hWnd != IntPtr.Zero) | |
{ | |
if (!visible) | |
//Hide the window | |
ShowWindow(hWnd, 0); // 0 = SW_HIDE | |
else | |
//Show window again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DllImport("user32.dll")] | |
public static extern IntPtr FindWindow( | |
string lpClassName,string lpWindowName); | |
[DllImport("user32.dll")] | |
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); |