c# - Pausing window wpf application -
i'd play video when no mouse action launch , cursor not moving 10 seconds. tried code:
private void dispatchertimer_tick(object sender, eventargs e) { test t = new test(); t.show(); } public void declencher() { try { while (mouse.captured != null) { dispatchertimer = new dispatchertimer(); dispatchertimer.tick += new eventhandler(dispatchertimer_tick); dispatchertimer.interval = new timespan(0, 0, 0, 0, 12); dispatchertimer.start(); messagebox.show("hhh"); } } catch { } }
i'd know how can test condition in wpf , best method it
check code
if (button1.content.equals("play")) { button1.content = "pause"; mediaelement1.play(); } else { button1.content = "play"; mediaelement1.pause(); }
Comments
Post a Comment