private void btnEditNote_Click(object sender, System.EventArgs e)
        {
            if(lvNotes.SelectedItems.Count == 0)
            {
                btnEditNote.Enabled = false;
                btnDeleteNote.Enabled = false;
                return;
            }
            bool ResumePlaying = false;
            if(PreviewPlayer.IsPlaying)
            {
                PreviewPlayer.PauseAllPlayers();
                ResumePlaying = true;
            }
            OCL.Note N = (OCL.Note)lvNotes.SelectedItems[0].Tag;

            frmNote FN = new frmNote(frmParent.LUser,RS,N);
            FN.ShowDialog(this);
            if(ResumePlaying)
            {
                PreviewPlayer.PlayAllPlayers();
            }
            UpdateNotes();
        }
 private void btnAddNote_Click(object sender, System.EventArgs e)
 {
     OCL.Note CN = null;
     frmNote FN = new frmNote(frmParent.LUser,RS,CN);
     bool ResumePlaying = false;
     if(PreviewPlayer.IsPlaying)
     {
         PreviewPlayer.PauseAllPlayers();
         ResumePlaying = true;
     }
     FN.txtTime.Text = PreviewPlayer.CurrentPlaybackTimeString;
     DialogResult DR = FN.ShowDialog(this);
     if(ResumePlaying)
     {
         PreviewPlayer.PlayAllPlayers();
     }
     UpdateNotes();
 }
Exemple #3
0
        private void btnEditNote_Click(object sender, System.EventArgs e)
        {
            if(!IsPresentationMode)
            {
                if(lvNotes.SelectedItems.Count == 0) return;
            }
            else
                if(lvPNotes.SelectedItems.Count == 0) return;

            if(!IsPresentationMode)
            {
                if(lvNotes.SelectedItems[0].Tag is OCL.Note)
                {
                    OCL.Note N = (OCL.Note)lvNotes.SelectedItems[0].Tag;

                    frmNote fN = new frmNote();
                    fN.CurrentNote = N;
                    fN.IsNewNote = false;
                    fN.CurrentRecording = OSystem.GetRecordingById(N.RecordingID);
                    fN.tbDescription.Text = N.Description;
                    string[] SyncTime = N.SyncTime.Split(":".ToCharArray());
                    fN.tbHours.Text = SyncTime[0];
                    fN.tbMinutes.Text = SyncTime[1];
                    fN.tbSeconds.Text = SyncTime[2];
                    fN.ShowInTaskbar = false;
                    //this.Visible = false;
                    DialogResult DR = fN.ShowDialog(this);
                    UpdateNotes();
                    //this.Visible = true;
                    fN.Dispose();
                }
            }
            else
            {
                if(lvPNotes.SelectedItems[0].Tag is OCL.Note)
                {
                    OCL.Note N = (OCL.Note)lvPNotes.SelectedItems[0].Tag;

                    frmNote fN = new frmNote();
                    fN.CurrentNote = N;
                    fN.IsNewNote = false;
                    fN.tbDescription.Text = N.Description;
                    string[] SyncTime = N.SyncTime.Split(":".ToCharArray());
                    fN.tbHours.Text = SyncTime[0];
                    fN.tbMinutes.Text = SyncTime[1];
                    fN.tbSeconds.Text = SyncTime[2];
                    fN.ShowInTaskbar = false;
                    //this.Visible = false;
                    DialogResult DR = fN.ShowDialog(this);
                    UpdateNotes();

                    //this.Visible = true;
                    fN.Dispose();
                }
            }
        }
Exemple #4
0
        private void btnNewNote_Click(object sender, System.EventArgs e)
        {
            bool bResumePlayingAfterPauseForNote = false;
            frmNote fN = new frmNote();
            OCL.Recording CRecording = null;
            if((lblMediaTitle.Tag is OCL.Recording)&&(lblMediaTitle.Visible))
            {
                CRecording = (OCL.Recording)lblMediaTitle.Tag;
                if(UP.Visible == true)
                {
                    try
                    {

                        bResumePlayingAfterPauseForNote = true;
                        imgPause_Click(imgPause,new EventArgs());

                    }
                    catch(Exception Err)
                    {
                        string peekit = Err.Message;
                    }
                    string[]sTime = {"00","00","00"};
                    try
                    {
                        sTime = GetSyncTimeFromString(GetTimeFromSeconds(UP.CurrentPlaybackTime_Sec));
                    }
                    catch(Exception Err)
                    {
                        string peekit = Err.Message;
                    }
                    fN.tbHours.Text = sTime[0];
                    fN.tbMinutes.Text = sTime[1];
                    fN.tbSeconds.Text = sTime[2];
                }

            }
            else if(listView1.SelectedItems.Count > 0)
            {
                if(listView1.SelectedItems[0].Tag is OCL.Recording)
                {
                    CRecording = (OCL.Recording)listView1.SelectedItems[0].Tag;
                }
            }

            if(CRecording == null)
            {
                MessageBox.Show("Application lost reference to current media","Application Error detected");
                return;
            }
            fN.ShowInTaskbar = false;
            fN.CurrentRecording = CRecording;
            fN.IsNewNote = true;
            //this.Visible = false;
            DialogResult DR = fN.ShowDialog(this);

            UpdateNotes();
            //this.Visible = true;
            fN.Dispose();
            if(bResumePlayingAfterPauseForNote)
            {
                bResumePlayingAfterPauseForNote = false;
                try
                {
                    imgPlay_Click(imgPlay, new System.EventArgs());
                }
                catch(Exception Err)
                {
                    string iP = Err.Message;
                }
            }
        }
Exemple #5
0
        private void btnNewNote_Click(object sender, System.EventArgs e)
        {
            bool bResumePlayingAfterPauseForNote = false;
            frmNote fN = new frmNote();

            if(CurrentRecordingSession == null)
            {
                MessageBox.Show("Application lost reference to current media","Application Error detected");
                return;
            }
            if(UP.Visible == true)
            {
                try
                {
                    bResumePlayingAfterPauseForNote = true;
                    imgPause_Click(imgPause,new EventArgs());
                }
                catch(Exception Err)
                {
                    string peekit = Err.Message;
                }
                string[]sTime = {"00","00","00"};
                try
                {
                    sTime = GetSyncTimeFromString(GetTimeFromSeconds(UP.CurrentPlaybackTime_Sec));
                }
                catch(Exception Err)
                {
                    string peekit = Err.Message;
                }
                fN.tbHours.Text = sTime[0];
                fN.tbMinutes.Text = sTime[1];
                fN.tbSeconds.Text = sTime[2];
            }

            fN.ShowInTaskbar = false;
            fN.CurrentRecordingSession = CurrentRecordingSession;
            fN.IsNewNote = true;
            //this.Visible = false;
            DialogResult DR = fN.ShowDialog(this);

            UpdateNotes();
            //this.Visible = true;
            fN.Dispose();
            if(bResumePlayingAfterPauseForNote)
            {
                bResumePlayingAfterPauseForNote = false;
                try
                {
                    //this.Play();
                }
                catch(Exception Err)
                {
                    string iP = Err.Message;
                }
            }
        }