public static extern bool RegisterWaitForSingleObject( out IntPtr phNewWaitObject, [In] IntPtr hObject, WAITORTIMERCALLBACKFUNC Callback, [In] IntPtr Context, uint dwMilliseconds, WT dwFlags);
private void Delete_Click(object sender, EventArgs e) { Base.Rows.Clear(); Base.Refresh(); AT.ReadOnly = false; Process.Clear(); AT.Clear(); BT.Clear(); WT.Clear(); TT.Clear(); panel2.BackColor = Color.Transparent; panel3.BackColor = Color.Transparent; panel4.BackColor = Color.Transparent; panel5.BackColor = Color.Transparent; panel6.BackColor = Color.Transparent; panel7.BackColor = Color.Transparent; label21.ForeColor = Color.WhiteSmoke; s1.ForeColor = Color.WhiteSmoke; s2.ForeColor = Color.WhiteSmoke; s3.ForeColor = Color.WhiteSmoke; s4.ForeColor = Color.WhiteSmoke; s5.ForeColor = Color.WhiteSmoke; s6.ForeColor = Color.WhiteSmoke; bs1.ForeColor = Color.WhiteSmoke; bs2.ForeColor = Color.WhiteSmoke; bs3.ForeColor = Color.WhiteSmoke; bs4.ForeColor = Color.WhiteSmoke; bs5.ForeColor = Color.WhiteSmoke; p1.ForeColor = Color.WhiteSmoke; p2.ForeColor = Color.WhiteSmoke; p3.ForeColor = Color.WhiteSmoke; p4.ForeColor = Color.WhiteSmoke; p5.ForeColor = Color.WhiteSmoke; }
private void Delete_Click(object sender, EventArgs e) { Base.Rows.Clear(); Base.Refresh(); AT.ReadOnly = false; Process.Clear(); AT.Clear(); BT.Clear(); WT.Clear(); TT.Clear(); }
private void checkUpdates() { try { WT.CheckForSourceForgeUpdates("sc2extmaphack", Program.ApplicationVersion); this.shouldClose = true; } catch (ThreadAbortException) { } catch (Exception exception) { WT.ReportCrash(exception, Program.ApplicationTitle + " " + Program.ApplicationVersion, null, null, true); } }
private void Sing_CheckedChanged(object sender, EventArgs e) { Base.Rows.Clear(); Base.Refresh(); AT.ReadOnly = false; Process.Clear(); AT.Clear(); BT.Clear(); WT.Clear(); TT.Clear(); panel2.BackColor = Color.Transparent; panel3.BackColor = Color.Transparent; panel4.BackColor = Color.Transparent; panel5.BackColor = Color.Transparent; panel6.BackColor = Color.Transparent; panel7.BackColor = Color.Transparent; label21.ForeColor = Color.WhiteSmoke; s1.ForeColor = Color.WhiteSmoke; s2.ForeColor = Color.WhiteSmoke; s3.ForeColor = Color.WhiteSmoke; s4.ForeColor = Color.WhiteSmoke; s5.ForeColor = Color.WhiteSmoke; s6.ForeColor = Color.WhiteSmoke; bs1.ForeColor = Color.WhiteSmoke; bs2.ForeColor = Color.WhiteSmoke; bs3.ForeColor = Color.WhiteSmoke; bs4.ForeColor = Color.WhiteSmoke; bs5.ForeColor = Color.WhiteSmoke; p1.ForeColor = Color.WhiteSmoke; p2.ForeColor = Color.WhiteSmoke; p3.ForeColor = Color.WhiteSmoke; p4.ForeColor = Color.WhiteSmoke; p5.ForeColor = Color.WhiteSmoke; progressBar1.Value = 0; progressBar2.Value = 0; progressBar3.Value = 0; progressBar4.Value = 0; progressBar5.Value = 0; progressBar1.Visible = false; progressBar2.Visible = false; progressBar3.Visible = false; progressBar4.Visible = false; progressBar5.Visible = false; }
private static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException); Application.ThreadException += new ThreadExceptionEventHandler(OnFormsUnhandledException); try { Ini.IniFile file = new Ini.IniFile(MainWindow.settings_path); if (file.Exists()) { file.Load(); try { if (bool.Parse(file["OptionsUpdates"]["chkAutoUpdate"])) { if (CheckUpdates()) { return; } } } catch { if (CheckUpdates()) { return; } } } if (!DirectX_HUDs.AeroEnabled) { MessageBox.Show("Desktop Window Manager (DWM) is not enabled. Without DWM, the DirectX overlays used by this program will have a significant performance penalty and may not work properly.\n\nDWM is only available on Windows Vista and later, and requires the Aero theme.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } runApplication(); } catch (ThreadAbortException) { } catch (Exception exception) { WT.ReportCrash(exception, ApplicationTitle + " " + ApplicationVersion); } }
private static extern bool RegisterWaitForSingleObject(out SafeRegisteredWaitHandle phNewWaitObject, [In] IntPtr hObject, WaitOrTimerCallback Callback, [In] IntPtr Context, uint dwMilliseconds, WT dwFlags);
private static extern bool _CreateTimerQueueTimer(out SafeTimerQueueTimerHandle phNewTimer, [In] TimerQueueHandle TimerQueue, WaitOrTimerCallback Callback, [In] IntPtr Parameter, uint DueTime, uint Period, WT Flags);
public static bool RegisterWaitForSingleObject(out SafeRegisteredWaitHandle phNewWaitObject, ISyncHandle hObject, WaitOrTimerCallback Callback, IntPtr Context, uint dwMilliseconds, WT dwFlags) => RegisterWaitForSingleObject(out phNewWaitObject, hObject?.DangerousGetHandle() ?? IntPtr.Zero, Callback, Context, dwMilliseconds, dwFlags);
public static extern bool QueueUserWorkItem(PTHREAD_START_ROUTINE Function, [In] IntPtr Context, WT Flags);
private static void OnUnhandledException(Object sender, UnhandledExceptionEventArgs e) { WT.ReportCrash((Exception)e.ExceptionObject, "oops!"); }
public static extern IntPtr RegisterWaitForSingleObjectEx( [In] IntPtr hObject, WAITORTIMERCALLBACKFUNC Callback, [In] IntPtr Context, uint dwMilliseconds, WT dwFlags);
public static extern bool QueueUserWorkItem(ThreadProc Function, [In] IntPtr Context, WT Flags);
public static extern bool CreateTimerQueueTimer(out TimerQueueTimerHandle phNewTimer, [In] TimerQueueHandle TimerQueue, WaitOrTimerCallback Callback, [In, Optional] IntPtr Parameter, uint DueTime, [Optional] uint Period, [Optional] WT Flags);
private static void OnFormsUnhandledException(Object sender, ThreadExceptionEventArgs e) { WT.ReportCrash(e.Exception, "oops!"); }
public static extern bool CreateTimerQueueTimer( out IntPtr phNewTimer, [In] IntPtr TimerQueue, WAITORTIMERCALLBACKFUNC Callback, [In] IntPtr Parameter, uint DueTime, uint Period, WT Flags);
public static extern bool CreateTimerQueueTimer(out IntPtr phNewTimer, [In] IntPtr TimerQueue, WaitOrTimerCallback Callback, [In] IntPtr Parameter, uint DueTime, uint Period, WT Flags);
public static extern bool QueueUserWorkItem(PTHREAD_START_ROUTINE Function, [In] IntPtr Context, WT Flags);
public static bool CreateTimerQueueTimer(out SafeTimerQueueTimerHandle phNewTimer, [In] SafeTimerQueueHandle TimerQueue, WaitOrTimerCallback Callback, [In] IntPtr Parameter, uint DueTime, uint Period, WT Flags) { var b = _CreateTimerQueueTimer(out phNewTimer, TimerQueue, Callback, Parameter, DueTime, Period, Flags); if (b) { phNewTimer.TimerQueue = TimerQueue; } return(b); }
/// <summary>Gets a value that combines <see cref="WT"/> flags values with a new maximum threadpool thread count limit.</summary> /// <param name="Flags">The desired flags.</param> /// <param name="Limit">The threadpool thread count limit. The default is 500.</param> /// <returns>A <see cref="WT"/> value that has been augmented with the limit.</returns> public static WT WT_SET_MAX_THREADPOOL_THREADS(WT Flags, ushort Limit) => Flags | (WT)((uint)Limit << 16);
public static extern bool RegisterWaitForSingleObject(out IntPtr phNewWaitObject, [In] IntPtr hObject, WaitOrTimerCallback Callback, [In] IntPtr Context, uint dwMilliseconds, WT dwFlags);