コード例 #1
0
ファイル: Form1.cs プロジェクト: si-hb/Crestron-CIP
 private void ClientForm_Shown(object sender, EventArgs e)
 {
     Crestron            = new Crestron_CIP_Server();
     Crestron.Debug     += new EventHandler <StringEventArgs>(Crestron_Debug);
     Crestron.SetSerial += new EventHandler <SerialEventArgs>(Crestron_SetSerial);
     Crestron.StartServer();
 }
コード例 #2
0
 public CrestronDevice(byte IPID, Crestron_CIP_Server ControlSystem)
     : base(IPID)
 {
 }
コード例 #3
0
        public UiHandler(Crestron_CIP_Server parent)
        {
            this.parent = parent;

            // create all pages
            PageList.Add("Splash", new UiPage());
            PageList.Add("Login", new UiPage());
            PageList.Add("Cleaning", new UiPage());
            PageList.Add("Modes", new UiPage());
            PageList.Add("Menu", new UiPage());
            PageList.Add("User PINS", new UiPage());
            PageList.Add("Naming", new UiPage());
            PageList.Add("FBS Reset", new UiPage());
            PageList.Add("Admin", new UiPage());
            PageList.Add("CCTV", new UiPage());
            PageList.Add("Video", new UiPage());
            PageList.Add("AV", new UiPage());
            PageList.Add("Inputs", new UiPage());
            PageList.Add("Zones", new UiPage());
            PageList.Add("Stage Management", new UiPage());
            PageList.Add("Letern", new UiPage());
            PageList.Add("Lighting", new UiPage());
            PageList.Add("Foyer", new UiPage());
            PageList.Add("Operator", new UiPage());
            PageList.Add("User", new UiPage());
            PageList.Add("Guest", new UiPage());
            PageList.Add("Outputs", new UiPage());
            PageList.Add("Pages", new UiPage());
            PageList.Add("DVD", new UiPage());
            PageList.Add("Main", new UiPage());
            PageList.Add("Gallery", new UiPage());
            PageList.Add("Front Fill", new UiPage());
            PageList.Add("Audio", new UiPage());
            PageList.Add("Shutdown", new UiPage());
            PageList.Add("CCTV Presets", new UiPage());
            PageList.Add("CCTV Routing", new UiPage());
            PageList.Add("CCTV Matrix", new UiPage());
            PageList.Add("AV Presets", new UiPage());
            PageList.Add("AV Routing", new UiPage());
            PageList.Add("AV Matrix", new UiPage());
            // add page references (should be using if(PageList.ContainsKey("Main")))

/*
 *          PageList["Modes"].parentPage = PageList["Splash"];
 *          string[] modeNames = { "Reheasre", "Present", "Operate" };
 *          for (byte i = 1; i <= modeNames.Length; i++)
 *          {
 *              UiPage p = new UiPage();
 *              p.name = String.Format("Mode {0}", i+1);
 *              p.label = modeNames[i + 1];
 *              p.parentPage = PageList["Modes"];
 *              PageList.Add(p.name, p);
 *              PageList["Modes"].MainList.Add(i, p);
 *          }
 *          PageList["Modes"].Links.Add(1, PageList["Admin"]);
 *          PageList["Modes"].Links.Add(2, PageList["Shutdown"]);
 *
 *          PageList["Splash"].Links.Add(1, PageList["Login"]);
 *
 *          PageList["Login"].parentPage = PageList["Splash"];
 *          PageList["Login"].Links.Add(1, PageList["Modes"]);
 *          PageList["Login"].Links.Add(2, PageList["Cleaning"]);
 *
 *          PageList["Cleaning"].parentPage = PageList["Splash"];
 *          PageList["Cleaning"].Links.Add(1, PageList["Splash"]);
 *
 *          PageList["Shutdown"].parentPage = PageList["Splash"];
 *          string[] areaNames = { "Stage", "Auditorium", "Bio", "Paging", "Foyer" };
 *          for (byte i = 1; i <= areaNames.Length; i++)
 *          {
 *              UiPage p = new UiPage();
 *              p.name = String.Format("Area {0}", i + 1);
 *              p.label = areaNames[i + 1];
 *              p.parentPage = PageList["Shutdown"];
 *              PageList.Add(p.name, p);
 *              PageList["Shutdown"].MainList.Add(i, p);
 *          }
 *          PageList["Admin"].parentPage = PageList["Modes"];
 *          PageList["Admin"].MainList.Add(1, PageList["User PINS"]);
 *          PageList["Admin"].MainList.Add(2, PageList["Naming"]);
 *          PageList["Admin"].MainList.Add(3, PageList["FBS Reset"]);
 *          PageList["Admin"].Links.Add(1, PageList["Menu"]);
 *
 *          PageList["Menu"].parentPage = PageList["Modes"];
 *          PageList["Menu"].MainList.Add(1, PageList["CCTV"]);
 *          PageList["Menu"].MainList.Add(2, PageList["Video"]);
 *          PageList["Menu"].MainList.Add(3, PageList["AV"]);
 *          PageList["Menu"].MainList.Add(4, PageList["Inputs"]);
 *          PageList["Menu"].MainList.Add(5, PageList["Zones"]);
 *          PageList["Menu"].MainList.Add(6, PageList["Stage Management"]);
 *          PageList["Menu"].MainList.Add(7, PageList["Lectern"]);
 *          PageList["Menu"].MainList.Add(8, PageList["Lighting"]);
 *          PageList["Menu"].MainList.Add(9, PageList["Foyer"]);
 *          PageList["Menu"].Links.Add(1, PageList["Admin"]);
 *
 *          PageList["CCTV"].parentPage = PageList["Menu"];
 *          PageList["CCTV"].MainList.Add(1, PageList["CCTV Presets"]);
 *          PageList["CCTV"].MainList.Add(2, PageList["CCTV Routing"]);
 *          PageList["CCTV"].MainList.Add(3, PageList["CCTV Matrix"]);
 *          PageList["CCTV"].Links.Add(1, PageList["Menu"]);
 *
 *          PageList["CCTV Presets"].label = "Presets";
 *          PageList["CCTV Routing"].label = "Routing";
 *          PageList["CCTV Matrix" ].label = "Matrix";
 *
 *          PageList["AV"].parentPage = PageList["Menu"];
 *          PageList["AV"].MainList.Add(1, PageList["DVD"]);
 *          PageList["AV"].MainList.Add(2, PageList["AV Presets"]);
 *          PageList["AV"].MainList.Add(3, PageList["AV Routing"]);
 *          PageList["AV"].MainList.Add(4, PageList["AV Matrix"]);
 *          PageList["AV"].Links.Add(1, PageList["Menu"]);
 *
 *          PageList["AV Presets"].label = "Presets";
 *          PageList["AV Routing"].label = "Routing";
 *          PageList["AV Matrix" ].label = "Matrix";
 *
 *          // add names and default labels
 *          foreach (var p in PageList)
 *          {
 *              p.Value.name = p.Key;
 *              if (String.IsNullOrEmpty(p.Value.label)) p.Value.label = p.Key;
 *          }
 *
 */
            /////////////////////////////


            pages.Add(10, "Login");
            pages.Add(11, "Main");
            pages.Add(12, "Modes");

            OperatingModes.Add(1, "Rehearse");
            OperatingModes.Add(2, "Present");
            OperatingModes.Add(3, "Operate");

            AdminModes.Add(1, "Modes");
            AdminModes.Add(2, "Menu");
            AdminModes.Add(3, "User PINS");
            AdminModes.Add(4, "Naming");
            AdminModes.Add(5, "FBS Reset");

            MenuModes.Add(1, "Modes");
            MenuModes.Add(2, "Admin");
            MenuModes.Add(3, "CCTV");
            MenuModes.Add(4, "AV");
            MenuModes.Add(5, "Inputs");
            MenuModes.Add(6, "Zones");
            MenuModes.Add(7, "Stage Management");
            MenuModes.Add(8, "Letern");
            MenuModes.Add(9, "Lighting");
            MenuModes.Add(10, "Foyer");

            PinModes.Add(1, "Admin");
            PinModes.Add(2, "Operator");
            PinModes.Add(3, "User");
            PinModes.Add(4, "Guest");

            NamingModes.Add(1, "Inputs");
            NamingModes.Add(2, "Outputs");
            NamingModes.Add(3, "Presets");
            NamingModes.Add(4, "Modes");
            NamingModes.Add(5, "Pages");

            CctvModes.Add(1, "Menu");
            CctvModes.Add(2, "Presets");
            CctvModes.Add(3, "Routing");
            CctvModes.Add(4, "Matrix");

            AvModes.Add(1, "Menu");
            AvModes.Add(2, "Bluray");
            AvModes.Add(3, "Presets");
            AvModes.Add(4, "Routing");
            AvModes.Add(5, "Matrix");

            ZoneMuteModes.Add(1, "Menu");
            ZoneMuteModes.Add(2, "Main");
            ZoneMuteModes.Add(3, "Gallery");
            ZoneMuteModes.Add(4, "Front Fill");

            FoyerModes.Add(1, "Menu");
            FoyerModes.Add(2, "Audio");
            FoyerModes.Add(3, "AV");
            FoyerModes.Add(4, "Lighting");

            ShutDownModes.Add(1, "Modes");
            ShutDownModes.Add(2, "Admin");
            ShutDownModes.Add(3, "CCTV");
            ShutDownModes.Add(4, "AV");
            ShutDownModes.Add(5, "Inputs");
            ShutDownModes.Add(6, "Zones");

            //strJson = JsonConvert.SerializeObject(MenuModes);
            //{"1":"Modes","2":"Admin","3":"CCTV","4":"AV","5":"Inputs","6":"Zones","7":"Stage Management","8":"Letern","9":"Lighting","10":"Foyer"}
        }