private void ShowDisplay(int Display) { Close_Dialog = false; ListViewItem LV = new ListViewItem(); // EnableLV = false; OysterClassLibrary.Functions F = new OysterClassLibrary.Functions(); g_treeView1_View = Display; switch(Display) { case ShowGroupInfo: // IsCreating = false; pnlCameraInfo.Visible = false; pnlGroupInfo.Visible = true; pnlUserInfo.Visible = false; pnlRecordingInfo.Visible = false; tbGroupDescription.Text = ""; pnlGroupInfo.Enabled = true; //Disable controls tbGroupDescription.ReadOnly = true; cbGroupOwner.Visible = false; tbGroupOwner.Visible = true; tbGroupOwner.ReadOnly = true; lbGroupOwner.Visible = true; lbGroupDescription.ForeColor = Color.Black; if(g_objSection == null) break; string test= ""; lstvMembersOfGroup.Items.Clear(); OysterClassLibrary.SectionType ThisUT = F.GetSectionType(g_objSection.CreatedBySectionType.NextSectionTypeID); OysterClassLibrary.User Owner; Owner = F.GetUser(g_objSection.OwnerID); if(g_objSection.CreatedBySectionType.ID == OSystem.SectionTypeSysAdmin.ID) { lbGroupLabel.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription + ": " + g_objSection.Description; lbGroupOwner.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription; test = ThisUT.Description; test = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription; tbGroupDescription.Text = g_objSection.Description; lbGroupOwner.Visible = false; tbGroupOwner.Visible = false; cbGroupOwner.Visible = false; lbGroupDescription.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; lbMembersOfGroup.Text = "Members of " + g_objSection.CreatedBySectionType.CreatesSectionTypeDescription ; } else if((g_objSection.IsRoot != false)&&(g_objSection.CreatedBySectionType.ID != OSystem.SectionTypeSysAdmin.NextSectionTypeID)) { lbGroupLabel.Text = "Viewing: " + g_objSection.Description; tbGroupDescription.Text = g_objSection.Description; lbGroupOwner.Text = g_objSection.CreatedBySectionType.Description; test = g_objSection.CreatedBySectionType.Description; lbGroupDescription.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription+ " Name"; lbMembersOfGroup.Text = "Members of " + g_objSection.CreatedBySectionType.CreatesSectionTypeDescription; } else if(g_objSection.IsRoot == false) { lbGroupLabel.Text = "Viewing: " + g_objSection.Description; lbGroupOwner.Text = g_objSection.CreatedBySectionType.Description; tbGroupDescription.Text = g_objSection.Description; test = g_objSection.CreatedBySectionType.Description; OysterClassLibrary.Section RootBody = F.GetRootSection(g_objSection.ID); string testme = RootBody.CreatedBySectionType.CreatesSectionTypeDescription; lbGroupDescription.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; lbMembersOfGroup.Text = "Members of " + g_objSection.CreatedBySectionType.CreatesSectionTypeDescription; } else { lbGroupLabel.Text = "Viewing: " + g_objSection.Description; tbGroupDescription.Text = g_objSection.Description; lbGroupDescription.Text = g_objSection.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; lbMembersOfGroup.Text = "Members of " + g_objSection.CreatedBySectionType.CreatesSectionTypeDescription; OysterClassLibrary.SectionType UT = F.GetSectionType(g_objSection.CreatedBySectionType.NextSectionTypeID); lbGroupOwner.Text = g_objSection.CreatedBySectionType.Description; } cbGroupOwner.Items.Clear(); cbGroupOwner.Items.Add(Owner.Description); cbGroupOwner.Text = Owner.Description; tbGroupOwner.Text = Owner.Description; tbGroupOwner.BringToFront(); foreach(OysterClassLibrary.User UU in g_objSection.AllUsersInHierarchy) { ListViewItem LVB = lstvMembersOfGroup.Items.Add(UU.LastName); LVB.SubItems.Add(UU.FirstName); LVB.SubItems.Add(UU.MiddleName); LVB.Tag = UU; } pnlGroupInfo.Refresh(); break; case ShowUserInfo: //IsCreating = false; pnlCameraInfo.Visible = false; pnlGroupInfo.Visible = false; pnlUserInfo.Visible = true; pnlRecordingInfo.Visible = false; //Disable Controls tbLoginName.ReadOnly = true; tbFirstName.ReadOnly =true; tbMiddleName.ReadOnly = true; tbLastName.ReadOnly = true; tbPassword.ReadOnly = true; tbCardNumber.ReadOnly = true; lbLoginName.ForeColor = System.Drawing.Color.Black; lbFirstName.ForeColor = System.Drawing.Color.Black; lbMiddleName.ForeColor = System.Drawing.Color.Black; lbLastName.ForeColor = System.Drawing.Color.Black; lbPassword.ForeColor = System.Drawing.Color.Black; lbCardNumber.ForeColor = System.Drawing.Color.Black; lvMemberGroup.Items.Clear(); if(g_objUser == null) { break; } lbUserInfo.Text = "Viewing User: "******""; tbLastName.Text = ""; tbMiddleName.Text = ""; tbCardNumber.Text = ""; tbPassword.Text = ""; tbFirstName.Text = ""; return; } else { tbLoginName.Text = g_objUser.LoginName; tbLastName.Text = g_objUser.LastName; tbMiddleName.Text = g_objUser.MiddleName; tbCardNumber.Text = "*******************"; //g_objUser.CardNumber; tbPassword.Text = "*******************";//g_objUser.Password; tbFirstName.Text = g_objUser.FirstName; } string testinfo = ""; OysterClassLibrary.Sections MembersOf = g_objUser.AllMemberSections; //F.GetMemberSections(g_objUser.ID,false); foreach(OysterClassLibrary.Section Member in MembersOf) { string tester = Member.Description; int testcount = MembersOf.Count; OysterClassLibrary.User OwnerUser; OwnerUser = F.GetUser(Member.OwnerID); tester = Member.IsRoot.ToString(); tester = Member.CreatedBySectionType.ID.ToString(); tester = OSystem.SectionTypeSysAdmin.ID.ToString(); if((Member.IsRoot == true)&&(Member.CreatedBySectionType.ID != OSystem.SectionTypeSysAdmin.ID)&&(Member.CreatedBySectionType.ID != OSystem.SectionTypeSysAdmin.NextSectionTypeID)) { tester = Member.CreatedBySectionType.CreatesSectionTypeDescription; //clmBodyName.Text = tester + " Name"; LV = lvMemberGroup.Items.Add(Member.Description); OysterClassLibrary.SectionType UT = F.GetSectionType(Member.CreatedBySectionType.NextSectionTypeID); LV.SubItems.Add(tester); LV.Tag = Member; tester = Member.Description; testcount = MembersOf.Count; } else if(Member.IsRoot == false) { OysterClassLibrary.SectionType nUT = F.GetSectionType(Member.CreatedBySectionType.NextSectionTypeID); OysterClassLibrary.Section RootSection = F.GetRootSection(Member.ID); if(RootSection != null) { //clmBodyName.Text = RootSection.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; tester = RootSection.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; } else { //clmBodyName.Text = Member.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; tester = Member.CreatedBySectionType.CreatesSectionTypeDescription + " Name"; } testinfo = nUT.Description; testinfo = Member.CreatedBySectionType.Description; LV = lvMemberGroup.Items.Add(Member.Description); LV.SubItems.Add(tester); LV.Tag = Member; tester = Member.Description; testcount = MembersOf.Count; } else { if(Member.CreatedBySectionType.PreviousSectionTypeID != -99) { tester = Member.CreatedBySectionType.CreatesSectionTypeDescription; OysterClassLibrary.SectionType nUT = F.GetSectionType(OSystem.SectionTypeSysAdmin.NextSectionTypeID); //clmOwnerName.Text = nUT.Description; //clmBodyName.Text = tester + " Name"; LV= lvMemberGroup.Items.Add(Member.Description); LV.SubItems.Add(tester); LV.Tag = Member; tester = Member.Description; tester = Member.CreatedBySectionType.Description; tester = nUT.Description; testcount = MembersOf.Count; } } } lbFirstName.ForeColor = System.Drawing.Color.Black; lbLastName.ForeColor = System.Drawing.Color.Black; pnlUserInfo.Refresh(); break; case ShowCameraInfo: pnlGroupInfo.Visible = false; pnlUserInfo.Visible = false; pnlRecordingInfo.Visible = false; //MediaPlayer.Visible = false; pnlMediaPlayer.Visible =false; pnlCameraInfo.Visible = true; if(g_objRecording == null) break; break; case ShowRecordingInfo: pnlCameraInfo.Visible = false; pnlGroupInfo.Visible = false; pnlUserInfo.Visible = false; pnlRecordingInfo.Visible = true; //MediaPlayer.Visible = true; pnlMediaPlayer.Visible =true; if(g_objRecording == null) break; lbRecordingInfo.Text = "Viewing Recording: " + g_objRecording.DisplayName; btnPlay.Visible =true; btnPause.Visible = true; btnStop.Visible = true; btnForward.Visible =true; btnReverse.Visible = true; btnGoTo.Visible = true; tbHR.Visible = true; tbMin.Visible = true; tbSec.Visible = true; lbc1.Visible = true; lbc2.Visible = true; btnPlay.Enabled = true; btnPause.Enabled = false; btnStop.Enabled = false; btnReverse.Enabled = false; btnForward.Enabled = false; btnGoTo.Enabled = false; tbHR.Enabled = false; tbMin.Enabled = false; tbSec.Enabled = false; break; case ShowSystemInfo: pnlCameraInfo.Visible = false; pnlRecordingInfo.Visible = false; break; } F.Dispose(); }