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++;
                }
            }
        }
Exemple #2
0
        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());
                    }

                }
            }
        }