/// <summary> /// /// </summary> /// <param name="m"></param> protected override void WndProc(ref Message m) { if (m.Msg == WM_POWERBROADCAST) { var handler = powerBroadCast; if (handler != null) { var args = new PowerBroardCastEventArgs((PowerBroadcastStatus)m.WParam.ToInt32()); handler(null, args); } } base.WndProc(ref m); }