Example #1
0
 public static void SetVolume(int Volume)
 {
     if (IsRun())
     {
         using (NamedPipeClient client = new NamedPipeClient(".", "Play.Server"))
         {
             client.Query(new ServerMsg
             {
                 ServerMsgType = ServerMsgType.Volume,
                 IntValue      = Volume
             });
         }
     }
 }
Example #2
0
 /// <summary>
 /// 播放文件
 /// </summary>
 public static void Play(string Url)
 {
     StartPlayer();
     if (IsRun())
     {
         using (NamedPipeClient client = new NamedPipeClient(".", "Play.Server"))
         {
             client.Query(new ServerMsg
             {
                 ServerMsgType = ServerMsgType.OpenUrl,
                 Value         = Url
             });
         }
     }
 }