Exemple #1
0
        public void Set_DataFilePath(string fPath, int Index, CS_RecordSession oSession, CS_RecordEvent oEvent)
        {
            if (!(fPath.Equals("") || Index < 0 || Index >= DataFilePathes.Length))
            {
                DataFilePathes[Index] = fPath;

                if (!(oEvent == null || oSession == null))
                {
                    CS_RecordEvent CurrentEvent = null;

                    if (EventExists(oEvent.Name))
                    {
                        CurrentEvent = GetEvent(oEvent.Name);
                    }
                    else
                    {
                        AddEvent(oEvent);
                        CurrentEvent = GetEvent(oEvent.Name);
                    }

                    if (!(CurrentEvent.RecordSessionExists(oSession.Name)))
                    {
                        CurrentEvent.Sessions.Add(oSession.Clone());
                    }
                }
            }
        }
Exemple #2
0
        private bool Set_SessionProperties()
        {
            if (!(Txt_SessionName.Text.Equals("")))
            {
                if ((!(oEventParent.RecordSessionExists(Txt_SessionName.Text))) || (!bNewSession))
                {
                    oRecordSession.Name = Txt_SessionName.Text;
                }
                else
                {
                    MessageBox.Show("A record session already exists in the record event with the same name !", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
            }
            else
            {
                MessageBox.Show("Name of the record session cannot be empty !", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(false);
            }

            oRecordSession.SessionDate = DP_SessionDate.Value;
            oRecordSession.Comment     = rTxt_SessionComment.Text;

            oRecordSession.UserInfos = Ctrl_RecordUserInfo.Get_UserInformations();

            return(true);
        }