private void On_Click(object sender, EventArgs e) { //turn on, update status Status.Text = "Turning Projector On"; c.turnOn(); Status.Text = "Projector is now:" + c.powerQuery().ToString(); }
public string getProjectorStatus() { if (m_objProjectorConnection != null) { return(m_objProjectorConnection.powerQuery().ToString()); } else { return("No Status Available"); } }
private void connect_Click(object sender, EventArgs e) { System.Net.IPAddress address = null; if (System.Net.IPAddress.TryParse(ipAddress.Text, out address)) { Status.Text = "Connecting to " + address.ToString(); c = new PJLinkConnection(ipAddress.Text, "JBMIAProjectorLink"); LampStatusCommand l = new LampStatusCommand(); int hours = l.getHoursOfLamp(1); string status = l.getStatusOfLamp(1).ToString(); string power = c.powerQuery().ToString(); ProjectorInfo pi = new ProjectorInfo(); Status.Text = "Connected. \n Projector is now: " + power + "\n" + "\nstatus: " + status + "\nlamphours: " + hours; Status.Text += "\nFan:" + pi.FanStatus; Status.Text += " Lamp:" + pi.LampStatus; Status.Text += " Input:" + pi.Input; Status.Text += "\nCover:" + pi.CoverStatus; Status.Text += " Filter:" + pi.FilterStatus; Status.Text += " NumLamps:" + pi.NumOfLamps; Status.Text += "\nOthers:" + pi.PowerStatus; } else { Status.Text = "Invalid IP Address Entered"; } }