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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -