private void Button1_Click(object sender, System.EventArgs e) { //System.Net.IPAddress CurrentIP = System.Net.Dns.Resolve(Environment.MachineName).AddressList[0]; String sSafeLocalHost = System.Net.Dns.Resolve(Environment.MachineName).HostName; OSystem = new OCL.Oyster(sSafeLocalHost,13075); try { LU = OSystem.Login(tbLoginId.Text,tbPassword.Text); } catch(Exception Err) { Msg.Value = Err.Message; } tbPassword.Text = ""; if(LU == null) { Msg.Value = "Invalid LoginId or Password"; } else { Session["Oyster"] = OSystem; Session["User"] = LU; Response.Redirect("frmMain.aspx",true); } }
public frmFindSource(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,bool EditingSystem) { // // Required for Windows Form Designer support // InitializeComponent(); this.OSystem = OSystem; this.AccessingUser = AccessingUser; this.EditingSystem = EditingSystem; }
private void btnOK_Click(object sender, System.EventArgs e) { if(lvUsers.SelectedItems.Count == 0) { this.DialogResult = DialogResult.None; MessageBox.Show("Please select a user.","No user detected"); return; } this.SelectedUser = (OCL.User)lvUsers.SelectedItems[0].Tag; this.DialogResult = DialogResult.OK; }
public frmFindSource(ArrayList ExcludingSources,ref OCL.Oyster OSystem, ref OCL.User AccessingUser) { // // Required for Windows Form Designer support // InitializeComponent(); this.OSystem = OSystem; this.AccessingUser = AccessingUser; this.ExcludingSources = ExcludingSources; }
public frmFindControl(ArrayList ExcludingControls,OCL.Scene CurrentScene,ref OCL.Oyster OSystem, ref OCL.User AccessingUser) { // // Required for Windows Form Designer support // InitializeComponent(); this.OSystem = OSystem; this.AccessingUser = AccessingUser; this.ExcludingControls = ExcludingControls; this.CurrentScene = CurrentScene; }
public frmUserPermissions(ref OCL.User AccessingUser,ref OCL.Oyster OSystem) { // // Required for Windows Form Designer support // InitializeComponent(); this.AccessingUser = AccessingUser; this.OSystem = OSystem; // // TODO: Add any constructor code after InitializeComponent call // }
public frmFindGroup(ref OCL.User LUser, ref OCL.Oyster OSystem, OCL.Group SelectedGroup) { this.LUser = LUser; this.OSystem = OSystem; this.SelectedGroup = SelectedGroup; // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public frmNote(OCL.User AccessingUser,OCL.RecordingSession RS,OCL.Note CN) { this.AccessingUser = AccessingUser; this.RS = RS; this.CN = CN; // // Required for Windows Form Designer support // InitializeComponent(); NewFiles = new ArrayList(); DeletedFiles = new ArrayList(); // // TODO: Add any constructor code after InitializeComponent call // }
public frmCreateScene(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,OCL.Scene CurrentScene) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // this.OSystem = OSystem; this.AccessingUser = AccessingUser; this.CurrentScene = CurrentScene; this.Text = CarverLab.Utility.AppInfo.Title + ": Edit Scene Dialog: Editing " + CurrentScene.Description; }
public frmNote(OCL.User AccessingUser,OCL.RecordingSession RS,OCL.Note CN) { this.AccessingUser = AccessingUser; this.RS = RS; this.CN = CN; // // Required for Windows Form Designer support // InitializeComponent(); NewFiles = new ArrayList(); DeletedFiles = new ArrayList(); OysterFTP = new OCL.FTPTransfer(); OysterFTP.On_TransferProgress +=new OCL.FTPTransfer.FTPTransferEventHandler(OysterFTP_On_TransferProgress); // // TODO: Add any constructor code after InitializeComponent call // }
public frmScenePermissions(ref OCL.Oyster OSystem, ref OCL.User AccessingUser,OCL.Group G,OCL.Scene S) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // this.OSystem = OSystem; this.AccessingUser = AccessingUser; this.CurrentScene = S; this.CurrentGroup = G; this.Text = G.Description + "'s " + S.Description + " Permissions"; this.groupBox1.Text = "Modify User's access to " + S.Description + " in group " + G.Description; this.gbScenes.Text = "Current permissions for " + S.Description; }
private void InitializeHardCopy() { string ErrorString = ""; frmHardCopyOptions PO = new frmHardCopyOptions(); if(!PO.CurrentHardCopyOptions.HasBeenSaved) { if(PO.ShowDialog() != DialogResult.OK) { Application.Exit(); return; } } /// Check Temporary Path Exist string UserTemperoraryPath = PO.CurrentHardCopyOptions.DefaultTemporaryDirectory; System.IO.DirectoryInfo DI = null; miEmptyTempFolder.Enabled = false; try { if(!System.IO.Directory.Exists(UserTemperoraryPath)) { DI = System.IO.Directory.CreateDirectory(UserTemperoraryPath); } else { DI = new System.IO.DirectoryInfo(UserTemperoraryPath); } System.IO.FileInfo[] FIS = DI.GetFiles(); if(FIS.Length > 0) { miEmptyTempFolder.Enabled = true; } System.IO.DirectoryInfo[] DIS = DI.GetDirectories(); if(DIS.Length > 0) { miEmptyTempFolder.Enabled = true; } } catch(Exception Err) { string perror = Err.Message; } TryItAgain:{} // string Server = "o-prototype"; // int iPort = 13075; try { OSystem = new OCL.Oyster(PO.CurrentHardCopyOptions.DefaultOysterAddress,PO.CurrentHardCopyOptions.DefaultOysterConnectionPort); } catch(Exception Err) { ErrorString = Err.Message; if(MessageBox.Show("Do you wish to open Player Configuration?","Unable to communicate with Oyster Server",MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else { if(PO.ShowDialog() == DialogResult.OK) { goto TryItAgain; } else { Application.Exit(); return; } } } frmLogin fL = new frmLogin(ref OSystem); if(fL.ShowDialog(this)!= DialogResult.OK) { Application.Exit(); return; } LUser = fL.Me; fL.Dispose(); // OCL.RecordingSessions ARS = LUser.AllVisibleRecordingSessions(LUser); // foreach(OCL.RecordingSession RS in ARS) // { // ListViewItem LVI = lvSearchResults.Items.Add(RS.Description); // LVI.SubItems.Add(RS.CreatedDate.ToString()); // OCL.User Owner = OSystem.GetUserById(RS.OwnerID); // LVI.SubItems.Add(Owner.Description); // LVI.SubItems.Add(RS.IsPresentation.ToString()); // LVI.SubItems.Add(RS.CurrentRecordings(LUser).Count.ToString()); // LVI.Tag = RS; // } frmSO = new frmSearchOptions(); PO.Dispose(); //sLocalDrive = GetRegistryValue(MAJORSECTION,MINORSECTION,MINISECTION,KEYSECTION,"D:"); }
private void frmMain_Load(object sender, System.EventArgs e) { string ErrorString = ""; CarverLab.SharedForms.Oyster.frmOptions PO = new CarverLab.SharedForms.Oyster.frmOptions(); if(!PO.CurrentPlayerOptions.HasBeenSaved) { if(PO.ShowDialog() != DialogResult.OK) { Application.Exit(); return; } } TryItAgain:{} ErrorString = ""; try { OSystem = new OCL.Oyster(PO.CurrentPlayerOptions.DefaultOysterAddress,PO.CurrentPlayerOptions.DefaultOysterConnectionPort); } catch(Exception Err) { ErrorString = Err.Message; if(MessageBox.Show("Do you wish to open Player Configuration?","Unable to communicate with Oyster Server",MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else { if(PO.ShowDialog() == DialogResult.OK) { goto TryItAgain; } else { Application.Exit(); return; } } } CarverLab.SharedForms.Oyster.frmLogin fL = new CarverLab.SharedForms.Oyster.frmLogin(ref OSystem); if (fL.ShowDialog(this)!= DialogResult.OK) { Application.Exit(); return; } LUser = fL.LoginUser; fL.Dispose(); tbVolume.Value = 50; axWindowsMediaPlayer1.settings.volume = tbVolume.Value; txtSearchCriteria.Text = ""; lblPlayerStatus.Text = ""; rangeBarBookmark.TotalMaximum = 100; rangeBarBookmark.TotalMinimum = 0; rangeBarBookmark.RangeMaximum = 100; rangeBarBookmark.RangeMinimum = 0; axWindowsMediaPlayer1.Buffering += new AxWMPLib._WMPOCXEvents_BufferingEventHandler(axWindowsMediaPlayer1_Buffering); axWindowsMediaPlayer1.ErrorEvent += new EventHandler(axWindowsMediaPlayer1_ErrorEvent); axWindowsMediaPlayer1.MediaChange += new AxWMPLib._WMPOCXEvents_MediaChangeEventHandler(axWindowsMediaPlayer1_MediaChange); axWindowsMediaPlayer1.OpenPlaylistSwitch += new AxWMPLib._WMPOCXEvents_OpenPlaylistSwitchEventHandler(axWindowsMediaPlayer1_OpenPlaylistSwitch); axWindowsMediaPlayer1.OpenStateChange += new AxWMPLib._WMPOCXEvents_OpenStateChangeEventHandler(axWindowsMediaPlayer1_OpenStateChange); axWindowsMediaPlayer1.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(axWindowsMediaPlayer1_PlayStateChange); axWindowsMediaPlayer1.StatusChange += new EventHandler(axWindowsMediaPlayer1_StatusChange); axWindowsMediaPlayer1.CurrentItemChange += new AxWMPLib._WMPOCXEvents_CurrentItemChangeEventHandler(axWindowsMediaPlayer1_CurrentItemChange); }
private void frmFindSession_Load(object sender, System.EventArgs e) { this.Text = CarverLabUtility.AppInfo.Title + " - " + this.Tag.ToString(); sLocalDrive = GetDiscLocation(); lblRecordingIdentifier.Text = "No Angles"; TryAgain:{} string Server = System.Net.Dns.Resolve(Environment.MachineName).HostName; //int iPort = 13075; try { // OSystem = new OCL.Oyster(); OysterDataBaseService.RemoteFunctions AlternateRF = new OysterDataBaseService.RemoteFunctions(); OSystem = new OCL.Oyster(AlternateRF); } catch(Exception Err) { string PeekError = Err.Message; if(MessageBox.Show("Do you wish to try again?","Unable to communicate with Oyster Server: " + Server,MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else goto TryAgain; } try { LUser = OSystem.Login("splat","splat"); int iError = 0; if(LUser == null) /*Generate An Error*/ iError = Convert.ToInt32("HereComesAnError",10); if(iError == 0) iError = 0; } catch(Exception Err) { string PeekError = Err.Message; MessageBox.Show("Unknown error occurred. Closing Application","Unknown Error"); Application.Exit(); return; } // PreviewPlayer.IsUMPlayer = false; PreviewPlayer.CurrentPlayerType = OysterPlaybackControls.PlayerType.WindowMediaPlayer; OCL.RecordingSessions ARS = LUser.AllVisibleRecordingSessions(LUser); foreach(OCL.RecordingSession RS in ARS) { ListViewItem LVI = lvSearchResults.Items.Add(RS.Description); LVI.SubItems.Add(RS.CreatedDate.ToString()); //OCL.User Owner = OSystem.GetUserById(RS.OwnerID); //LVI.SubItems.Add(Owner.Description); //LVI.SubItems.Add(RS.IsPresentation.ToString()); //LVI.SubItems.Add(RS.CurrentRecordings(LUser).Count.ToString()); LVI.Tag = RS; } sLocalDrive = GetDiscLocation(); frmSO = new frmSearchOptions(); }
private void tmrGeneral_Tick(object sender, System.EventArgs e) { tmrGeneral.Enabled = false; ShowHide(); frmRecordOptions frmOps = new frmRecordOptions(); if (!frmOps.CurrentRecordOptions.HasBeenSaved) { if (frmOps.ShowDialog() != System.Windows.Forms.DialogResult.OK) { Application.Exit(); return; } } mLogger.WriteLog("Displaying Login screen..."); OCL.Oyster oyster = new OCL.Oyster(frmOps.CurrentRecordOptions.DefaultOysterAddress,frmOps.CurrentRecordOptions.DefaultOysterConnectionPort); frmLogin frm = new frmLogin(ref oyster); if (frm.ShowDialog(this) != System.Windows.Forms.DialogResult.OK) { //m_bExitWithoutAsking = true; Application.Exit(); //this.Close(); return; } m_me = frm.LoginUser; this.TopMost = true; frmIV = new frmInvisible(this); frmIV.Show(); frmIV.Hide(); }
private void CardReaderEvent(string CardNumber) { if(LUser == null) { try { OSystem = new OCL.Oyster(); LUser = OSystem.GetUserByCardNumberRaw(CardNumber); if(LUser == null) return; InitializeUserData(); } catch(Exception Err) { MessageBox.Show(Err.Message,"Error detected"); return; } } else { LogOffUser(); } }
private void InitializePlayer() { string ErrorString = ""; //bool bTryAgain = false; // string Server = "o-prototype"; // int iPort = 13075; frmPlayerOptions PO = new frmPlayerOptions(); if(!PO.CurrentPlayerOptions.HasBeenSaved) { if(PO.ShowDialog() != DialogResult.OK) { Application.Exit(); return; } } //goto SkipAll; TryItAgain:{} ErrorString = ""; //bTryAgain = false; try { OSystem = new OCL.Oyster(PO.CurrentPlayerOptions.DefaultOysterAddress,PO.CurrentPlayerOptions.DefaultOysterConnectionPort); } catch(Exception Err) { ErrorString = Err.Message; if(MessageBox.Show("Do you wish to open Player Configuration?","Unable to communicate with Oyster Server",MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else { if(PO.ShowDialog() == DialogResult.OK) { goto TryItAgain; } else { Application.Exit(); return; } } } frmLogin fL = new frmLogin(ref OSystem); if(fL.ShowDialog(this)!= DialogResult.OK) { Application.Exit(); return; } LUser = fL.LoginUser; fL.Dispose(); //SkipAll:{} PO.Dispose(); frmSO = new frmSearchOptions(); // OCL.RecordingSessions ARS = LUser.AllVisibleRecordingSessions(LUser); // foreach(OCL.RecordingSession RS in ARS) // { // ListViewItem LVI = lvSearchResults.Items.Add(RS.Description); // LVI.SubItems.Add(RS.CreatedDate.ToString()); // OCL.User Owner = OSystem.GetUserById(RS.OwnerID); // LVI.SubItems.Add(Owner.Description); // LVI.SubItems.Add(RS.IsPresentation.ToString()); // LVI.SubItems.Add(RS.CurrentRecordings(LUser).Count.ToString()); // LVI.Tag = RS; // } // dtpStartTime.Value = DateTime.Parse(DateTime.Now.Month + "/" + (DateTime.Now.Day - 1) + "/" + DateTime.Now.Year); // dtpStopTime.Value = DateTime.Parse(DateTime.Now.Month + "/" + (DateTime.Now.Day + 1) + "/" + DateTime.Now.Year); radioButton2_CheckedChanged(rbStoredMedia,EventArgs.Empty); }
public void OpenScene(OCL.Scene SC, OCL.User AccessingUser, AxUMediaControlLib.AxUMediaPlayer Preview_Player) { pLUser = AccessingUser; PreviewPlayer = Preview_Player; PlayBackPlayers = new ArrayList(); TStatusChecker = new System.Timers.Timer(500); TStatusChecker.Elapsed +=new System.Timers.ElapsedEventHandler(TStatusChecker_Elapsed); CameraAngles = new ArrayList(); }
static void RunTest() { O = new OCL.Oyster(); //TEST USER FUNCTIONS. Msg("Acquiring Super User.."); SUser = O.GetUserById(23); if(SUser == null) { Msg("Failed to Aquire SuperUser...aborting app"); System.Threading.Thread.CurrentThread.Abort(); } Msg("Passed"); Msg("Starting User Functions Test"); UserTest(); Msg("Starting Recording Functions Test"); RecordingTest(); }
private void frmMain_Load(object sender, System.EventArgs e) { string ErrorString = ""; CarverLab.SharedForms.Oyster.frmOptions PO = new CarverLab.SharedForms.Oyster.frmOptions(); if(!PO.CurrentPlayerOptions.HasBeenSaved) { if(PO.ShowDialog() != DialogResult.OK) { Application.Exit(); return; } } TryItAgain:{} ErrorString = ""; try { OSystem = new OCL.Oyster(PO.CurrentPlayerOptions.DefaultOysterAddress,PO.CurrentPlayerOptions.DefaultOysterConnectionPort); } catch(Exception Err) { ErrorString = Err.Message; if(MessageBox.Show("Do you wish to open Player Configuration?","Unable to communicate with Oyster Server",MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else { if(PO.ShowDialog() == DialogResult.OK) { goto TryItAgain; } else { Application.Exit(); return; } } } CarverLab.SharedForms.Oyster.frmLogin fL = new CarverLab.SharedForms.Oyster.frmLogin(ref OSystem); if (fL.ShowDialog(this)!= DialogResult.OK) { Application.Exit(); return; } LUser = fL.LoginUser; fL.Dispose(); /// Initialize Main Page this.Text = "Oyster Content Author"; tbSessionName.Text = DateTime.Now.ToString(); tbContentGroup.Text = "None"; tbContentGroup.Tag = null; tbContentOwner.Text = LUser.Description; tbContentOwner.Tag = LUser; }
private void Page_Load(object sender, System.EventArgs e) { if(!this.IsPostBack) { O = (OCL.Oyster)Session["Oyster"]; LU = (OCL.User)Session["User"]; string IPAddress = ""; string SNMask = ""; string GateWay = ""; bool IsDHCP = false; GetNetStats(out IPAddress,out SNMask,out GateWay,out IsDHCP); tbIPAddress.Text = FormatIPAddress(IPAddress); tbSubNetMask.Text = FormatIPAddress(SNMask); tbGateWay.Text = FormatIPAddress(GateWay); if(IsDHCP) { rbDHCP.Items[0].Selected = true; rbDHCP.Items[1].Selected = false; } else { rbDHCP.Items[0].Selected = false; rbDHCP.Items[1].Selected = true; } } }
private void LogOffUser() { string speek = ""; LUser = null; OSystem = null; //TabRecordings_Click(TabRecordings,new System.EventArgs()); ShowButtons(NoButtons); DisplayMode(false); UP.Size = new System.Drawing.Size(600,388); UP.Stop(); UP.Visible = false; lblMediaTitle.Tag = null; lblMediaTitle.Visible = false; lblPlayTime.Visible = false; PlayerButtons(false); UPCamera.Stop(); UP2.Stop(); UP2.Visible = false; pnlLogin.Visible = true; pnlLogin.BringToFront(); listView1.Items.Clear(); try { ShowViewerControls(false); // MP.Visible = false; // MP.Hide(); } catch(Exception Err) { speek = Err.Message; } try { UP.Stop(); } catch(Exception Err) { speek = Err.Message; } }
private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e) { if(ListBox1.SelectedItem.Value == "") { Button2.Enabled = false; return; } int UserId = Convert.ToInt32(ListBox1.SelectedItem.Value); O = (OCL.Oyster)Session["Oyster"]; LU = (OCL.User)Session["User"]; OCL.User U = O.GetUserById(UserId); tbFirstName.Text = U.FirstName; tbMiddleName.Text = U.MiddleName; tbLastName.Text = U.LastName; tbLoginId.Text = U.LoginName; tbPassword.Text = "***********************"; cb.Checked = U.CanRecord; Session["SelectedUser"] = U; Button2.Enabled = true; // OCL.Group DefaultGroup = (OCL.Group)O.GetUnassignedObject(OCL.OysterUnassignedObjects.Group); // if(LU.CanEditAllUsers) // { // btnUserPermissions.Enabled = true; // } // else // { // OCL.Permission P = DefaultGroup.GetObjectPermission(LU,LU,U); // if(P != null) // { // btnUserPermissions.Enabled = P.CanEdit; // } // else // { // btnUserPermissions.Enabled = false; // } // } }
public void OpenRecordingSession(OCL.RecordingSession RS, OCL.User AccessingUser,AxUMediaControlLib.AxUMediaPlayer Preview_Player, AxUMediaControlLib.AxUMediaPlayer PlayBack_Player) { pLUser = AccessingUser; PreviewPlayer = Preview_Player; PlayBackPlayers = new ArrayList(); if(PlayBack_Player != null) PlayBackPlayers.Add(PlayBack_Player); TStatusChecker = new System.Timers.Timer(500); TStatusChecker.Elapsed +=new System.Timers.ElapsedEventHandler(TStatusChecker_Elapsed); CameraAngles = new ArrayList(); CurrentRecordingSession = RS; PresentationViews = RS.CurrentRecordings(pLUser); if(RS.IsPresentation) { foreach(OCL.Recording CurrentRecording in PresentationViews) { OCL.VideoStorageServer VSS = CurrentRecording.CurrentVideoStorageServer; OCL.VideoStorageServerType VST = VSS.CurrentVideoStorageServerType; if(CurrentRecording.IsPrimaryCamera) { CurrentCameraIndex = CameraAngles.Count; CameraAngles.Add(CurrentRecording); try { if(VST.Description == "Windows Media Server") { try { PreviewPlayer.Stop(); } catch(Exception Err) { string sPeek = Err.Message; } PreviewPlayer.UseTCP(); PreviewPlayer.UseMediaServer(VSS.ControlAddress + ":5119"); PreviewPlayer.UseFile(VSS.StorageDirectory + @"\" + CurrentRecording.Description); } } catch(Exception Err) { MessageBox.Show(Err.Message,"Error occurred while loading media"); return; } } else if(CurrentRecording.IsDesktopCapture) { try { if(PlayBackPlayers.Count != 1) { throw new Exception("Functional Error: Not enough cameras are available to display Presentation"); } if(VST.Description == "Windows Media Server") { try { ((AxUMediaControlLib.AxUMediaPlayer)PlayBackPlayers[0]).Stop(); } catch(Exception Err) { string sPeek = Err.Message; } ((AxUMediaControlLib.AxUMediaPlayer)PlayBackPlayers[0]).UseTCP(); ((AxUMediaControlLib.AxUMediaPlayer)PlayBackPlayers[0]).UseMediaServer(VSS.ControlAddress + ":5119"); ((AxUMediaControlLib.AxUMediaPlayer)PlayBackPlayers[0]).UseFile(VSS.StorageDirectory + @"\" + CurrentRecording.Description); } } catch(Exception Err) { MessageBox.Show(Err.Message,"Error occurred while loading media"); return; } } else { CameraAngles.Add(CurrentRecording); } } } else { CurrentCameraIndex = 0; bool bFirstPass = true; foreach(OCL.Recording CurrentRecording in PresentationViews) { OCL.VideoStorageServer VSS = CurrentRecording.CurrentVideoStorageServer; OCL.VideoStorageServerType VST = VSS.CurrentVideoStorageServerType; if(bFirstPass) { bFirstPass = false; CurrentCameraIndex = CameraAngles.Count; CameraAngles.Add(CurrentRecording); try { if(VST.Description == "Windows Media Server") { try { PreviewPlayer.Stop(); } catch(Exception Err) { string sPeek = Err.Message; } PreviewPlayer.UseTCP(); PreviewPlayer.UseMediaServer(VSS.ControlAddress + ":5119"); PreviewPlayer.UseFile(VSS.StorageDirectory + @"\" + CurrentRecording.Description); } } catch(Exception Err) { MessageBox.Show(Err.Message,"Error occurred while loading media"); return; } } else CameraAngles.Add(CurrentRecording); } } this.Play(); TStatusChecker.Enabled = true; return; }
private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if(!this.IsPostBack) { Users = new ArrayList(); //O = new OCL.Oyster("OME-Prototype",13075); //OCL.User LU = O.GetUserByCardNumber("YeahBaby!"); O = (OCL.Oyster)Session["Oyster"]; LU = (OCL.User)Session["User"]; OCL.Users OUsers = O.AllVisibleUsers(LU); foreach(OCL.User U in OUsers) { Users.Add(U); } ListBox1.DataSource = Users; ListBox1.DataTextField = "Description"; ListBox1.DataValueField = "Id"; ListBox1.DataBind(); } }
private void frmMain_Load(object sender, System.EventArgs e) { this.Text = CarverLab.Utility.AppInfo.Title; string ErrorString = ""; CarverLab.SharedForms.Oyster.frmOptions PO = new CarverLab.SharedForms.Oyster.frmOptions(); if(!PO.CurrentPlayerOptions.HasBeenSaved) { if(PO.ShowDialog() != DialogResult.OK) { Application.Exit(); return; } } TryItAgain:{} ErrorString = ""; try { OSystem = new OCL.Oyster(PO.CurrentPlayerOptions.DefaultOysterAddress,PO.CurrentPlayerOptions.DefaultOysterConnectionPort); } catch(Exception Err) { ErrorString = Err.Message; if(MessageBox.Show("Do you wish to open System Configuration?","Unable to communicate with Oyster Server",MessageBoxButtons.RetryCancel)== DialogResult.Cancel) { Application.Exit(); return; } else { if(PO.ShowDialog() == DialogResult.OK) { goto TryItAgain; } else { Application.Exit(); return; } } } CarverLab.SharedForms.Oyster.frmLogin fL = new CarverLab.SharedForms.Oyster.frmLogin(ref OSystem); if (fL.ShowDialog(this)!= DialogResult.OK) { Application.Exit(); return; } LUser = fL.LoginUser; fL.Dispose(); /// Initialize Main Page tbSearchUsers.Text = ""; OCL.Group DefaultGroup = (OCL.Group)OSystem.GetUnassignedObject(OCL.OysterUnassignedObjects.Group); btnTabUserNew.Enabled = DefaultGroup.CanAddUsers(LUser); }
private void UserWizard_Load(object sender, System.EventArgs e) { if(this.Owner is frmMain) FrmParent = (frmMain)this.Owner; else { MessageBox.Show("Illegal open attempt made on User Wizard"); this.DialogResult = DialogResult.Abort; return; } if(this.Tag is OCL.User) { EditUser = (OCL.User)this.Tag; IsEditUser = true; tbFirstName.Text = EditUser.FirstName; tbMiddleName.Text = EditUser.MiddleName; tbLastName.Text = EditUser.LastName; tbLoginName.Text = EditUser.LoginName; tbPassword.Text = "*******************";//EditUser.Password; tbIDCard.Text = EditUser.CardNumber; cbCanRecord.Checked = EditUser.CanRecord; this.Text = "Edit User (1 of 3)"; return; } this.Text = "Create New User (1 of 3)"; pnlName.Focus(); tbFirstName.Select(); }
private void LogOffUser() { string speek = ""; LUser = null; OSystem = null; //TabRecordings_Click(TabRecordings,new System.EventArgs()); ShowButtons(NoButtons); pnlLogin.Visible = true; pnlLogin.BringToFront(); listView1.Items.Clear(); try { ShowViewerControls(false); // MP.Visible = false; // MP.Hide(); } catch(Exception Err) { speek = Err.Message; } try { UP.Stop(); } catch(Exception Err) { speek = Err.Message; } }