private void ForwardingServerWizard_Load(object sender, System.EventArgs e) { if(this.Owner is System_Properties) FrmParent = (Form1)this.Owner.Owner; else if(this.Owner is Form1) FrmParent = (Form1)this.Owner; else { MessageBox.Show("Illegal open attempt made on Forwarding Server Wizard"); return; } if(this.Tag is OysterClassLibrary.ForwardingServer) { FS = (OysterClassLibrary.ForwardingServer)this.Tag; tbFSAddress.Text = FS.Address; tbFSPort.Text = FS.Port.ToString(); OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); OysterClassLibrary.VideoStorageServers AV = F.ALLVideoStorageServers(); F.Dispose(); VSID = new string[AV.Count,2]; int iCount = 0; foreach(OysterClassLibrary.VideoStorageServer V in AV) { VSID[iCount,0] = V.ControlAddress + ":" + V.ControlPort.ToString(); VSID[iCount,1] = V.ID.ToString(); cbFSVSS.Items.Add(VSID[iCount,0]); if(V.ID == FS.VideoStorageServerID) cbFSVSS.Text = VSID[iCount,0]; iCount++; } this.Text = "Editing " + FS.Address + ":" + FS.Port.ToString(); } else { this.Text = "Creating New Forwarding Server"; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); OysterClassLibrary.VideoStorageServers AV = F.ALLVideoStorageServers(); int[] UO = F.GetUnassignedObjects(); F.Dispose(); VSID = new string[AV.Count,2]; int iCount = 0; foreach(OysterClassLibrary.VideoStorageServer V in AV) { VSID[iCount,0] = V.ControlAddress + ":" + V.ControlPort.ToString(); VSID[iCount,1] = V.ID.ToString(); cbFSVSS.Items.Add(VSID[iCount,0]); if(V.ID == UO[4]) cbFSVSS.Text = VSID[iCount,0]; iCount++; } } }
private void CardReaderWizard_Load(object sender, System.EventArgs e) { if(this.Owner is System_Properties) FrmParent = (Form1)this.Owner.Owner; else if(this.Owner is Form1) FrmParent = (Form1)this.Owner; else { MessageBox.Show("Illegal open attempt made on Forwarding Server Wizard"); return; } if(this.Tag is OysterClassLibrary.CardReader) { CR = (OysterClassLibrary.CardReader)this.Tag; tbCardReaderAddress.Text = CR.Address; tbCardReaderPort.Text = CR.Port.ToString(); chkIsOnSerialPort.Checked = CR.IsOnSerialPort; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); AR = F.ALLRooms(); F.Dispose(); RoomID = new string[AR.Count,2]; Counter = 0; foreach(OysterClassLibrary.Room R in AR) { cbCRRoom.Items.Add(R.Description); RoomID[Counter,0] = R.Description; RoomID[Counter,1] = R.ID.ToString(); Counter++; if(R.ID == CR.RoomID) { cbCRRoom.Text = R.Description; } } this.Text = "Editing " + CR.Address + ":" + CR.Port.ToString(); } else { this.Text = "Creating New Card Reader"; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); AR = F.ALLRooms(); int[] UO = F.GetUnassignedObjects(); F.Dispose(); RoomID = new string[AR.Count,2]; Counter = 0; foreach(OysterClassLibrary.Room R in AR) { cbCRRoom.Items.Add(R.Description); if(R.ID == UO[1]) cbCRRoom.Text = R.Description; RoomID[Counter,0] = R.Description; RoomID[Counter,1] = R.ID.ToString(); Counter++; } } }
private void RoomWizard_Load(object sender, System.EventArgs e) { if(this.Owner is System_Properties) FrmParent = (Form1)this.Owner.Owner; else if(this.Owner is Form1) FrmParent = (Form1)this.Owner; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); AV = F.ALLVideoStorageServers(); int[] UO = F.GetUnassignedObjects(); F.Dispose(); if(this.Tag is OysterClassLibrary.Room) { RM = (OysterClassLibrary.Room)this.Tag; tbDescription.Text = RM.Description; this.Text = "Editing " + RM.Description; string tt; foreach(OysterClassLibrary.VideoStorageServer VSS in AV) { cbVSS.Items.Add(VSS.ControlAddress + ": " + VSS.ControlPort.ToString()); if(VSS.ID == RM.VideoStorageServerID) { cbVSS.Text = VSS.ControlAddress + ": " + VSS.ControlPort.ToString(); tt = cbVSS.Text.ToString(); tt = VSS.ControlAddress; } } } else { this.Text = "Creating a new Scene"; foreach(OysterClassLibrary.VideoStorageServer VSS in AV) { if(VSS.ID == UO[4]) { cbVSS.Items.Add(VSS.ControlAddress + ": " + VSS.ControlPort.ToString()); cbVSS.Text = VSS.ControlAddress + ": " + VSS.ControlPort.ToString(); } else { cbVSS.Items.Add(VSS.ControlAddress + ": " + VSS.ControlPort.ToString()); } } } }
private void MediaBufferServerWizard_Load(object sender, System.EventArgs e) { if(this.Owner is System_Properties) FrmParent = (Form1)this.Owner.Owner; else if(this.Owner is Form1) FrmParent = (Form1)this.Owner; else { MessageBox.Show("Illegal open attempt made on Forwarding Server Wizard"); return; } if(this.Tag is OysterClassLibrary.MediaBufferServer) { MBS = (OysterClassLibrary.MediaBufferServer)this.Tag; tbAddress.Text = MBS.Address; tbPort.Text = MBS.Port.ToString(); tbFileDirectory.Text = MBS.StorageDirectory; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); OysterClassLibrary.ForwardingServers AF = F.ALLForwardingServers(); F.Dispose(); FSID = new string[AF.Count,2]; int iCount = 0; foreach(OysterClassLibrary.ForwardingServer FS in AF) { FSID[iCount,0] = FS.Address + ":" + FS.Port.ToString(); FSID[iCount,1] = FS.ID.ToString(); cbMBSFS.Items.Add(FSID[iCount,0]); if(FS.ID == MBS.ForwardingServerID) cbMBSFS.Text = FSID[iCount,0]; iCount++; } this.Text = "Editing " + MBS.Address + ":" + MBS.Port.ToString(); } else { this.Text = "Creating New Media Buffer Server"; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); OysterClassLibrary.ForwardingServers AF = F.ALLForwardingServers(); FSID = new string[AF.Count,2]; int iCount = 0; int[] UO = F.GetUnassignedObjects(); F.Dispose(); foreach(OysterClassLibrary.ForwardingServer FS in AF) { FSID[iCount,0] = FS.Address + ":" + FS.Port.ToString(); FSID[iCount,1] = FS.ID.ToString(); cbMBSFS.Items.Add(FSID[iCount,0]); if(FS.ID == UO[2]) cbMBSFS.Text = FSID[iCount,0]; iCount++; } } }