Пример #1
0
 public void OpenSendOnClick()
 {
     if (ty_ip.text != "" && ty_port.text == "" && ty_order.text == "")
     {
         PJLinkConnection c  = new PJLinkConnection(ty_ip.text);
         PowerCommand     pc = new PowerCommand(Power.ON);
         c.sendCommandAsync(pc, OpenProjection);
     }
     else if (ty_ip.text != "" && ty_port.text != "" && ty_order.text == "")
     {
         PJLinkConnection c  = new PJLinkConnection(ty_ip.text, int.Parse(ty_port.text));
         PowerCommand     pc = new PowerCommand(Power.ON);
         c.sendCommandAsync(pc, OpenProjection);
     }
     else if (ty_ip.text != "" && ty_port.text == "" && ty_order.text != "")
     {
         PJLinkConnection c  = new PJLinkConnection(ty_ip.text, ty_order.text);
         PowerCommand     pc = new PowerCommand(Power.ON);
         c.sendCommandAsync(pc, OpenProjection);
     }
     else if (ty_ip.text != "" && ty_port.text == "" && ty_order.text == "")
     {
         PJLinkConnection c  = new PJLinkConnection(ty_ip.text, int.Parse(ty_port.text), ty_order.text);
         PowerCommand     pc = new PowerCommand(Power.ON);
         c.sendCommandAsync(pc, OpenProjection);
     }
 }
Пример #2
0
 public void Open()
 {
     while (FacilityControl.Instance.sceneDatas[scene_num].projections.Count == 0)
     {
         scene_num++;
     }
     if ((type == ProjectionType.ONE && current_scene == scene_num) || type == ProjectionType.ALL)
     {
         PJLinkConnection c  = new PJLinkConnection(FacilityControl.Instance.sceneDatas[scene_num].projections[projections_num].ip);
         PowerCommand     pc = new PowerCommand(power);
         c.sendCommandAsync(pc, OpenProjection);
     }
     else
     {
     }
 }