Пример #1
0
        private void linkLabel2_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            frmLogin fL = new frmLogin();
            fL.Owner = this;

            DialogResult DR = fL.ShowDialog(this);

            if(DR == DialogResult.Abort)
            {
                fL.Dispose();
                return;
            }
            else
            {
                if(LUser == null) return;
                fL.Dispose();
                InitializeUserData();
            }
        }
Пример #2
0
        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);
        }