private void OnOSUStatusChange(StatusChangeEvent @event) { osuStat = @event.CurrentStatus; #if (DEBUG) Sync.Tools.IO.CurrentIO.WriteColor(osuStat.Status + " " + osuStat.Artist + " - " + osuStat.Title, ConsoleColor.DarkCyan); #endif }
private IntPtr WndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) { if (msg == 74) { NativeMethods.COPYDATASTRUCT cb = (NativeMethods.COPYDATASTRUCT)Marshal.PtrToStructure(lParam, typeof(NativeMethods.COPYDATASTRUCT)); string[] info = Marshal.PtrToStringUni(cb.lpData, cb.cbData / 2).Split("\0".ToCharArray(), StringSplitOptions.None); OSUStatus stats = info; NowPlayingEvents.Instance.RaiseEventAsync(new StatusChangeEvent(stats)); } return(NativeMethods.DefWindowProcW(hWnd, msg, wParam, lParam)); }
public StatusChangeEvent(OSUStatus status) { CurrentStatus = status; }