protected void Page_Load(object sender, EventArgs e) { (Master as Principal).PageTitle = "Module Test : 0x21"; litErrorGeneric.Visible = false; _m = Application["icc"] as IccClient; _bAddress = 0; if (byte.TryParse(Request.QueryString["addr"], out _bAddress)) { if (Module.IsAddressValid(_bAddress)) { _module = _m.Modules[_bAddress] as LightingModule; if (_module == null) { Response.Redirect("~/settings"); } if (!Page.IsPostBack) { RefreshTable(); } } else { Response.Redirect("~/settings"); } } else { Response.Redirect("~/settings"); } }
public frmTest20(IccClient client, GenPurpModule module) { Client = client; Module = module; InitializeComponent(); this.Text = string.Format("General Purpose Module: {0}", Module.ToString()); }
public frmTest21(IccClient client, LightingModule module) { Client = client; Module = module; InitializeComponent(); this.Text = string.Format("Lighting Module: {0}", Module.ToString()); PopulateOutputLists(this); #if DEBUG // Init default outputs lstStartLinear1sOutput1.SelectedIndex = 0xF; lstStopLinear2sOutput1.SelectedIndex = 0xF; lstStartTungOutput1.SelectedIndex = 0xF; lstStopTungOutput1.SelectedIndex = 0xF; lstStartMono1Output1.SelectedIndex = 0x1; lstStartMono2Output1.SelectedIndex = 0x2; lstStartDualOutput1.SelectedIndex = 0x1; lstStartDualOutput2.SelectedIndex = 0x2; lstStartOldMonoOutput1.SelectedIndex = 0xF; lstStartOldDualOutput1.SelectedIndex = 0xE; lstStartOldDualOutput2.SelectedIndex = 0xF; lstTrafficLightFraMonoOutput1.SelectedIndex = 0x8; lstTrafficLightFraMonoOutput2.SelectedIndex = 0x7; lstTrafficLightFraMonoOutput3.SelectedIndex = 0xF; lstTrafficLightFraDualOutput1.SelectedIndex = 0x8; lstTrafficLightFraDualOutput2.SelectedIndex = 0x7; lstTrafficLightFraDualOutput3.SelectedIndex = 0xF; lstTrafficLightFraDualOutput4.SelectedIndex = 0x6; lstTrafficLightFraDualOutput5.SelectedIndex = 0x5; lstTrafficLightFraDualOutput6.SelectedIndex = 0xE; lstTrafficLightDeuMonoOutput1.SelectedIndex = 0x8; lstTrafficLightDeuMonoOutput2.SelectedIndex = 0x7; lstTrafficLightDeuMonoOutput3.SelectedIndex = 0xF; lstTrafficLightDeuDualOutput1.SelectedIndex = 0x8; lstTrafficLightDeuDualOutput2.SelectedIndex = 0x7; lstTrafficLightDeuDualOutput3.SelectedIndex = 0xF; lstTrafficLightDeuDualOutput4.SelectedIndex = 0x6; lstTrafficLightDeuDualOutput5.SelectedIndex = 0x5; lstTrafficLightDeuDualOutput6.SelectedIndex = 0xE; lstChaserOutput1.SelectedIndex = 0x8; lstChaserOutput2.SelectedIndex = 0x7; lstChaserOutput3.SelectedIndex = 0xF; lstChaserOutput4.SelectedIndex = 0x6; lstChaserOutput5.SelectedIndex = 0x5; lstChaserOutput6.SelectedIndex = 0xE; lstChaserOutput7.SelectedIndex = 0xD; lstChaserOutput8.SelectedIndex = 0x0; lstArcWeldingOutput1.SelectedIndex = 0x1; lstCameraFlashOutput1.SelectedIndex = 0x2; lstFireOutput1.SelectedIndex = 0xD; lstFireOutput2.SelectedIndex = 0xE; #endif }
protected void Page_Load(object sender, EventArgs e) { (Master as Principal).PageTitle = "View server log"; _m = Application["icc"] as IccClient; #warning Implement log client //rpt.DataSource = _m.GetServerLog(); //rpt.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { (Master as Principal).PageTitle = "Settings"; litErrorAddressType.Visible = false; litErrorDescription.Visible = false; litErrorGeneric.Visible = false; _m = Application["icc"] as IccClient; if (!Page.IsPostBack) { RefreshTable(); } }
private void frmMaster_Shown(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; PrintConnectStatus(ConnectionStatus.Connecting); PrintStatus(string.Format("Connecting to server '{0}' on command port...", Configuration.Config.ServerSettings.ServerName)); Client = new IccClient(Configuration.Config.ServerSettings.ServerName, Configuration.Config.ServerSettings.ServerCommandPort, Configuration.Config.ServerSettings.ServerLogPort); Client.LogClient.EntryReceived += LogClient_EntryReceived; if (!Client.Connected) { PrintStatus(Client.LastError); PrintConnectStatus(ConnectionStatus.NotConnected); } else { PrintConnectStatus(ConnectionStatus.Connected); PrintStatus("Connected"); PopulateModules(); } SplashScreen.CanBeClosed = true; this.Cursor = Cursors.Default; }
protected void Application_Start(object sender, EventArgs e) { var m = new IccClient(ConfigurationManager.AppSettings["IccServerName"]); Application["icc"] = m; }