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); } }
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(); }