Install-Package Microsoft.Office.Interop.Excel
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 class AsyncHelper | |
{ | |
private static readonly TaskFactory _taskFactory = new | |
TaskFactory(CancellationToken.None, | |
TaskCreationOptions.None, | |
TaskContinuationOptions.None, | |
TaskScheduler.Default); | |
public static TResult RunSync<TResult>(Func<Task<TResult>> func) | |
=> _taskFactory |
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
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Globalization; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Windows.Forms; |
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 InvokeIfRequired<T>(this T control, Action<T> action) where T : Control | |
{ | |
if (control.InvokeRequired) | |
{ | |
control.Invoke(new Action(() => action(control))); | |
} | |
else | |
{ | |
action(control); | |
} |
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
/* | |
[script info] | |
version = 2.4 | |
description = wrap selected text in %symbols% | |
author = davebrny | |
source = git.io/v1neW | |
*/ | |
;Set tray icon | |
Menu, Tray, Icon, wrap.ico |
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
; Add icon - just place icon file in same forlder | |
Menu, Tray, Icon, Toggle.ico | |
ToggleWinMinimize(TheWindowTitle) | |
{ | |
SetTitleMatchMode,2 | |
DetectHiddenWindows, Off | |
If WinActive(TheWindowTitle) | |
WinMinimize, %TheWindowTitle% |
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
;------------------------------------------------------------------------------ | |
; Settings | |
;------------------------------------------------------------------------------ | |
#NoEnv ; For security | |
#SingleInstance force | |
SetTitleMatchMode,2 | |
;Set tray icon | |
;Menu, Tray, Icon, AutoCorrect.ico |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
; Add icon - just place icon file in same forlder | |
Menu, Tray, Icon, fire.ico | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance Force |