Exemplo n.º 1
0
        /// <summary>
        /// 插入一条职位历史
        /// </summary>
        public int CreatePositionHistory(PositionHistory obj)
        {
            //int pkid;
            //SqlCommand cmd = new SqlCommand();
            //cmd.Parameters.Add(_PKID, SqlDbType.Int).Direction = ParameterDirection.Output;
            //cmd.Parameters.Add(_PositionID, SqlDbType.Int).Value = positionHistory.Position.ParameterID;
            //cmd.Parameters.Add(_PositionName, SqlDbType.NVarChar, 50).Value = positionHistory.Position.Name;
            //cmd.Parameters.Add(_PositionGradeName, SqlDbType.NVarChar, 50).Value = positionHistory.Position.Grade.Name;
            //cmd.Parameters.Add(_OperatorName, SqlDbType.NVarChar, 50).Value = positionHistory.Operator.Name;
            //cmd.Parameters.Add(_OperationTime, SqlDbType.DateTime).Value = positionHistory.OperationTime;
            //cmd.Parameters.Add(_PositionGradeSequence, SqlDbType.Int).Value = positionHistory.Position.Grade.Sequence;
            //SqlHelper.ExecuteNonQueryReturnPKID("PositionHistoryInsert", cmd, out pkid);
            //return pkid;

            int        pkid;
            SqlCommand cm = new SqlCommand();

            AddParameters(obj, cm);
            cm.Parameters.AddWithValue("@PKID", 0);
            cm.Parameters["@PKID"].Direction = ParameterDirection.Output;
            SqlHelper.ExecuteNonQueryReturnPKID("PositionHistoryInsert", cm, out pkid);
            obj.PKID = pkid;
            UpdateChildren(obj);
            return(pkid);
        }
 public static bool PositionHistoryCompare(Dictionary <BoardPosition, PositionHistory> boardHistory,
                                           BoardPosition position, PositionHistory history)
 {
     return((boardHistory.Keys.Where(
                 key => key.RowPosition == position.RowPosition && key.ColumnPosition == position.ColumnPosition)
             .Select(key => boardHistory[key])).Any(historyToCompare => historyToCompare == history));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Prints the position history.
        /// </summary>
        public void PrintPositionHistory()
        {
            var positionHistory = new Stack <Position>(PositionHistory.Reverse());

            while (positionHistory.Count > 1)
            {
                Debug.WriteLine($"({positionHistory.Pop()}) to ({positionHistory.Peek()})");
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Moves the chess piece back to the previous position.
 /// </summary>
 public void MoveBack()
 {
     if (PositionHistory.Count < 2)
     {
         throw new InvalidOperationException("No previous position to go back to.");
     }
     PositionHistory.Pop();
     Position = PositionHistory.Peek();
     Moves++;
 }
Exemplo n.º 5
0
 private static void ReplaceHistory(Dictionary <BoardPosition, PositionHistory> boardHistory,
                                    BoardPosition position, PositionHistory historyToChangeTo)
 {
     foreach (
         var key in
         boardHistory.Keys.Where(
             key => key.RowPosition == position.RowPosition && key.ColumnPosition == position.ColumnPosition)
         )
     {
         boardHistory[key] = historyToChangeTo;
         break;
     }
 }
Exemplo n.º 6
0
        private void BackUpPosition()
        {
            List <Position> positionList = _IPositionBll.GetAllPosition();

            foreach (Position position in positionList)
            {
                PositionHistory positionHistory = new PositionHistory();
                positionHistory.Operator                = _OperatorAccount;
                positionHistory.Position                = _IPositionBll.GetPositionById(position.Id, null);
                positionHistory.Position.Grade          = new PositionGrade(0, "", "");
                positionHistory.Position.Grade.Sequence = 0;
                positionHistory.OperationTime           = _DtNow;
                _DalPositionHistory.CreatePositionHistory(positionHistory);
            }
        }
Exemplo n.º 7
0
        public PositionHistory GetPositionHistoryByPKID(int pkid)
        {
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.Add("@PKID", SqlDbType.Int).Value = pkid;
            using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetPositionHistoryByPKID", cmd))
            {
                while (sdr.Read())
                {
                    PositionHistory positionHistory = FetchPositionHistory(sdr);
                    return(positionHistory);
                }
            }
            return(null);
        }
Exemplo n.º 8
0
        private static void AddParameters(PositionHistory obj, SqlCommand cm)
        {
            cm.Parameters.AddWithValue("@OperatorName", obj.Operator.Name);
            cm.Parameters.AddWithValue("@OperationTime", obj.OperationTime);
            cm.Parameters.AddWithValue("@PositionGradeName", obj.Position.Grade.Name);
            cm.Parameters.AddWithValue("@PositionGradeSequence", obj.Position.Grade.Sequence);

            cm.Parameters.AddWithValue("@PositionID", obj.Position.Id);
            cm.Parameters.AddWithValue("@PositionName", obj.Position.Name);
            cm.Parameters.AddWithValue("@PositionDescription", obj.Position.Description);
            cm.Parameters.AddWithValue("@Number", obj.Position.Number);
            if (obj.Position.Reviewer != null && obj.Position.Reviewer.Id != 0)
            {
                cm.Parameters.AddWithValue("@ReviewerID", obj.Position.Reviewer.Id);
                cm.Parameters.AddWithValue("@ReviewerName", obj.Position.Reviewer.Name);
            }
            else
            {
                cm.Parameters.AddWithValue("@ReviewerID", DBNull.Value);
                cm.Parameters.AddWithValue("@ReviewerName", DBNull.Value);
            }
            cm.Parameters.AddWithValue("@PositionStatus", obj.Position.PositionStatus.Id);
            cm.Parameters.AddWithValue("@Version", obj.Position.Version);
            if (obj.Position.Commencement != DateTime.MinValue)
            {
                cm.Parameters.AddWithValue("@Commencement", obj.Position.Commencement);
            }
            else
            {
                cm.Parameters.AddWithValue("@Commencement", DBNull.Value);
            }
            cm.Parameters.AddWithValue("@Summary", obj.Position.Summary);
            cm.Parameters.AddWithValue("@MainDuties", obj.Position.MainDuties);
            cm.Parameters.AddWithValue("@ReportScope", obj.Position.ReportScope);
            cm.Parameters.AddWithValue("@ControlScope", obj.Position.ControlScope);
            cm.Parameters.AddWithValue("@Coordination", obj.Position.Coordination);
            cm.Parameters.AddWithValue("@Authority", obj.Position.Authority);
            cm.Parameters.AddWithValue("@Education", obj.Position.Education);
            cm.Parameters.AddWithValue("@ProfessionalBackground", obj.Position.ProfessionalBackground);
            cm.Parameters.AddWithValue("@WorkExperience", obj.Position.WorkExperience);
            cm.Parameters.AddWithValue("@Qualification", obj.Position.Qualification);
            cm.Parameters.AddWithValue("@Competence", obj.Position.Competence);
            cm.Parameters.AddWithValue("@OtherRequirements", obj.Position.OtherRequirements);
            cm.Parameters.AddWithValue("@KnowledgeAndSkills", obj.Position.KnowledgeAndSkills);
            cm.Parameters.AddWithValue("@RelatedProcesses", obj.Position.RelatedProcesses);
            cm.Parameters.AddWithValue("@ManagementSkills", obj.Position.ManagementSkills);
            cm.Parameters.AddWithValue("@AuxiliarySkills", obj.Position.AuxiliarySkills);
        }
        public PositionViewModel(PositionHistory postionhistory)
        {
            _Postion = postionhistory != null && postionhistory.Position != null
                           ? postionhistory.Position
                           : new Position();
            _OperateTime =
                postionhistory != null
                    ? postionhistory.OperationTime.ToShortDateString() + " " +
                postionhistory.OperationTime.ToShortTimeString()
                    : string.Empty;

            _OperateName =
                postionhistory != null && postionhistory.Operator != null && postionhistory.Operator.Name != null
                    ? postionhistory.Operator.Name
                    : string.Empty;
            _HistoryID = postionhistory.PKID.ToString();
        }
Exemplo n.º 10
0
        private static PositionHistory FetchPositionHistory(IDataRecord dr)
        {
            if (dr == null)
            {
                return(null);
            }

            PositionHistory positionHistory = new PositionHistory();

            positionHistory.PKID            = Convert.ToInt32(dr["PKID"]);
            positionHistory.OperationTime   = Convert.ToDateTime(dr["OperationTime"]);
            positionHistory.Operator        = new Account(0, "", dr["OperatorName"].ToString());
            positionHistory.Position        = FetchPosition(dr);
            positionHistory.Position.Nature = GetPositionNatureByPositionID(positionHistory.PKID);

            return(positionHistory);
        }
Exemplo n.º 11
0
        private void GetPositionHistoryByID()
        {
            List <Performance.Error> errors = new List <Performance.Error>();
            PositionViewModel        pvm    = null;

            try
            {
                PositionHistory p =
                    InstanceFactory.CreatePositionHistoryFacade().GetPositionHistoryByPKID(
                        Convert.ToInt32(_Context.Request.Params["HistoryId"]));
                pvm = new PositionViewModel(p);
            }
            catch (Exception e)
            {
                errors.Add(new Performance.Error("lblMessage", e.Message));
            }
            _ResponseString = string.Format("{{\"item\":{0},\"error\":{1}}}", JsonConvert.SerializeObject(pvm),
                                            JsonConvert.SerializeObject(errors));
        }
Exemplo n.º 12
0
        private static void UpdateChildren(PositionHistory obj)
        {
            foreach (PositionNature nature in obj.Position.Nature)
            {
                SqlCommand cm1 = new SqlCommand();
                cm1.Parameters.AddWithValue("@Name", nature.Name);
                cm1.Parameters.AddWithValue("@Description", nature.Description);
                cm1.Parameters.AddWithValue("@PKID", 0);
                cm1.Parameters["@PKID"].Direction = ParameterDirection.Output;
                int pkid;
                SqlHelper.ExecuteNonQueryReturnPKID("AddPositionNature", cm1, out pkid);

                SqlCommand cm = new SqlCommand();
                cm.Parameters.AddWithValue("@PositionID", obj.PKID);
                cm.Parameters.AddWithValue("@PositionNatureID", pkid);
                cm.Parameters.AddWithValue("@PKID", 0);
                cm.Parameters["@PKID"].Direction = ParameterDirection.Output;
                SqlHelper.ExecuteNonQueryReturnPKID("InsertPositionNatureRelationship", cm, out pkid);
            }
        }
Exemplo n.º 13
0
        public BaseCellItem MoveForward(Game game, bool random, int gameSpeed)
        {
            int times = 1;

            if (random)
            {
                times = Randomizer.RandomizeNumber(1, game.Size);
            }
            Console.WriteLine(string.Format("The player will move to the {0} for {1} time(s)!", Facing.ToString(), times));

            BaseCellItem cell = null;

            for (int i = 0; i < times; i++)
            {
                Thread.Sleep(gameSpeed);
                cell = ScanForward(game);
                //scanCount += 1;
                if (cell.CellItemType == CellItemType.Wall)
                {
                    Console.WriteLine("The player ran into a thick wall and cannot move forward. Aborting the remaining moves, if any.");
                    break;
                }

                // remove the player from its current cell
                game.ClearCell(Position.Row, Position.Column);

                // assign new coordinates to the player
                Position.Row    = cell.Position.Row;
                Position.Column = cell.Position.Column;

                game.AssignPlayerToCell(this);

                var newCoordinates = new Tuple <int, int>(Position.Row, Position.Column);

                Console.WriteLine(string.Format("Player moved to coordinates [{0},{1}]", Position.Row, Position.Column));
                if (PositionHistory.Contains(newCoordinates))
                {
                    Metrics.backtrackCount++;
                }
                PositionHistory.Add(newCoordinates);
                //moveCount += 1;
                Metrics.moveCount++;

                if (cell.CellItemType == CellItemType.Pit)
                {
                    // die
                    Console.WriteLine("The player died a horrible death.");
                    break;
                }
                else if (cell.CellItemType == CellItemType.GoldenSquare)
                {
                    // win
                    Console.WriteLine("The player has struck gold.");
                    break;
                }
                else if (cell.CellItemType == CellItemType.Beacon)
                {
                    // clue
                    Console.WriteLine("The player has found a beacon.");
                    break;
                }
            }
            return(cell);
        }
Exemplo n.º 14
0
        private bool PlayerVictoryCheck(PositionHistory pieceToLookFor, BoardPosition position)
        {
            var piecesInARow = 1;

            // starting with the right/left check
            // check the right
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, 1))
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition + 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, 2))
                {
                    _winningPositionValues.Add(position.RowPosition, position.ColumnPosition + 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, 3))
                    {
                        _winningPositionValues.Add(position.RowPosition, position.ColumnPosition + 3);
                        piecesInARow++;
                    }
                }
            }
            // then left
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, -1))
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition - 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, -2))
                {
                    _winningPositionValues.Add(position.RowPosition, position.ColumnPosition - 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 0, -3))
                    {
                        _winningPositionValues.Add(position.RowPosition, position.ColumnPosition - 3);
                        piecesInARow++;
                    }
                }
            }

            if (piecesInARow >= 4)
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition);
                return(true);
            }
            _winningPositionValues.Clear();
            piecesInARow = 1; // reset count for next line check

            // check diagonal /
            // check upper right
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 1, 1))
            {
                _winningPositionValues.Add(position.RowPosition + 1, position.ColumnPosition + 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 2, 2))
                {
                    _winningPositionValues.Add(position.RowPosition + 2, position.ColumnPosition + 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 3, 3))
                    {
                        _winningPositionValues.Add(position.RowPosition + 3, position.ColumnPosition + 3);
                        piecesInARow++;
                    }
                }
            }
            // then lower left
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -1, -1))
            {
                _winningPositionValues.Add(position.RowPosition - 1, position.ColumnPosition - 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -2, -2))
                {
                    _winningPositionValues.Add(position.RowPosition - 2, position.ColumnPosition - 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -3, -3))
                    {
                        _winningPositionValues.Add(position.RowPosition - 3, position.ColumnPosition - 3);
                        piecesInARow++;
                    }
                }
            }

            if (piecesInARow >= 4)
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition);
                return(true);
            }
            _winningPositionValues.Clear();
            piecesInARow = 1;

            // check top/bottom line
            // check top
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 1, 0))
            {
                _winningPositionValues.Add(position.RowPosition + 1, position.ColumnPosition);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 2, 0))
                {
                    _winningPositionValues.Add(position.RowPosition + 2, position.ColumnPosition);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 3, 0))
                    {
                        _winningPositionValues.Add(position.RowPosition + 3, position.ColumnPosition);
                        piecesInARow++;
                    }
                }
            }
            // then bottom
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -1, 0))
            {
                _winningPositionValues.Add(position.RowPosition - 1, position.ColumnPosition);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -2, 0))
                {
                    _winningPositionValues.Add(position.RowPosition - 2, position.ColumnPosition);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -3, 0))
                    {
                        _winningPositionValues.Add(position.RowPosition - 3, position.ColumnPosition);
                        piecesInARow++;
                    }
                }
            }

            if (piecesInARow >= 4)
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition);
                return(true);
            }
            _winningPositionValues.Clear();
            piecesInARow = 1;

            // check diagonal \
            // check upper left
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 1, -1))
            {
                _winningPositionValues.Add(position.RowPosition + 1, position.ColumnPosition - 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 2, -2))
                {
                    _winningPositionValues.Add(position.RowPosition + 2, position.ColumnPosition - 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, 3, -3))
                    {
                        _winningPositionValues.Add(position.RowPosition + 3, position.ColumnPosition - 3);
                        piecesInARow++;
                    }
                }
            }
            // then lower right
            if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -1, 1))
            {
                _winningPositionValues.Add(position.RowPosition - 1, position.ColumnPosition + 1);
                piecesInARow++;

                if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -2, 2))
                {
                    _winningPositionValues.Add(position.RowPosition - 2, position.ColumnPosition + 2);
                    piecesInARow++;

                    if (CustomComparer.PositionHistoryCompare(BoardHistory, position, pieceToLookFor, -3, 3))
                    {
                        _winningPositionValues.Add(position.RowPosition - 3, position.ColumnPosition + 3);
                        piecesInARow++;
                    }
                }
            }

            if (piecesInARow >= 4)
            {
                _winningPositionValues.Add(position.RowPosition, position.ColumnPosition);
                return(true);
            }

            _winningPositionValues.Clear();
            return(false);
        }
Exemplo n.º 15
0
 /// <summary>
 /// Moves the chess piece to the provided position.
 /// </summary>
 /// <param name="position"></param>
 public void Move(Position position)
 {
     PositionHistory.Push(position);
     Position = position;
     Moves++;
 }
Exemplo n.º 16
0
    void    Update()
    {
        float delta_time = Time.deltaTime;

        this.is_trigger = false;

        Vector2 current_position = Input.mousePosition.xy();

        Vector2 move_vector = current_position - this.previous_position;

        float move_speed = move_vector.magnitude / delta_time;

        this.recent_max = Mathf.Max(this.recent_max, move_speed);

        //

        PositionHistory history = new PositionHistory();

        history.position   = current_position;
        history.delta_time = delta_time;

        this.histories.Add(history);

        // ---------------------------------------------------------------- //
        // 次の状態に移るかどうかを、チェックする.

        switch (this.step.do_transition())
        {
        case STEP.IDLE:
        {
            do
            {
                if (!Input.GetMouseButton(0))
                {
                    break;
                }
                if (move_speed < SPEED_THRESHOLD)
                {
                    break;
                }

                this.step.set_next(STEP.SLIDING);
            } while(false);
        }
        break;

        case STEP.SLIDING:
        {
            do
            {
                if (!Input.GetMouseButton(0))
                {
                    this.on_slide_finish(delta_time, move_speed, move_vector);
                    this.step.set_next(STEP.IDLE);
                    break;
                }
                if (move_speed < SPEED_THRESHOLD)
                {
                    this.step.set_next(STEP.STOP_RESPITE);
                    break;
                }
            } while(false);
        }
        break;

        case STEP.STOP_RESPITE:
        {
            do
            {
                // ボタンが離されたら成功.
                if (!Input.GetMouseButton(0))
                {
                    this.on_slide_finish(delta_time, move_speed, move_vector);
                    this.step.set_next(STEP.IDLE);
                    break;
                }

                // スライド速度が超遅くなったらボタン離し待ちへ.
                if (move_speed < SPEED_THRESHOLD_TO_STOP)
                {
                    this.step.set_next(STEP.WAIT_RELEASE);
                    break;
                }

                // スライド速度が早くなったら、再度スライド中へ復帰.
                if (move_speed > SPEED_THRESHOLD)
                {
                    this.step.set_next(STEP.SLIDING);
                    break;
                }

                // ある程度時間がたったらボタン離し待ちへ.
                if (this.step.get_time() > RESPIRE_TIME)
                {
                    this.step.set_next(STEP.WAIT_RELEASE);
                    break;
                }
            } while(false);
        }
        break;

        case STEP.WAIT_RELEASE:
        {
            do
            {
                if (this.step.get_time() > 0.1f)
                {
                    this.step.set_next(STEP.IDLE);
                    break;
                }
                if (!Input.GetMouseButton(0))
                {
                    this.on_slide_finish(delta_time, move_speed, move_vector);
                    this.step.set_next(STEP.IDLE);
                    break;
                }
            } while(false);
        }
        break;
        }

        // ---------------------------------------------------------------- //
        // 状態が遷移したときの初期化.

        while (this.step.get_next() != STEP.NONE)
        {
            switch (this.step.do_initialize())
            {
            case STEP.SLIDING:
            {
                this.slide_time     = 0.0f;
                this.slide_distance = 0.0f;

                this.histories.Clear();
            }
            break;
            }
        }

        // ---------------------------------------------------------------- //
        // 各状態での実行処理.

        switch (this.step.do_execution(delta_time))
        {
        case STEP.SLIDING:
        {
            this.slide_time     += delta_time;
            this.slide_distance += move_vector.magnitude;

            this.slide_direction = move_vector;
            this.slide_direction.Normalize();

            this.slide_power = move_speed;
        }
        break;
        }

        // ---------------------------------------------------------------- //

        //dbPrint.setLocate(10, 10);
        //dbPrint.print(this.recent_max);

        this.previous_position = current_position;
    }
Exemplo n.º 17
0
 private void OnEventReceived(BaseEvent ommEvent)
 {
     if (ommEvent == null)
     {
         return;
     }
     if (ommEvent is EventDECTSubscriptionMode dectSubscriptionMode)
     {
         DECTSubscriptionModeChanged?.Invoke(this, new OmmEventArgs <EventDECTSubscriptionMode>(dectSubscriptionMode));
     }
     else if (ommEvent is EventAlarmCallProgress alarmCallProgress)
     {
         AlarmCallProgress?.Invoke(this, new OmmEventArgs <EventAlarmCallProgress>(alarmCallProgress));
     }
     else if (ommEvent is EventRFPSummary rfpSummary)
     {
         RfpSummary?.Invoke(this, new OmmEventArgs <EventRFPSummary>(rfpSummary));
     }
     else if (ommEvent is EventPPDevSummary ppDevSummary)
     {
         PPDevSummary?.Invoke(this, new OmmEventArgs <EventPPDevSummary>(ppDevSummary));
     }
     else if (ommEvent is EventPPUserSummary ppUserSummary)
     {
         PPUserSummary?.Invoke(this, new OmmEventArgs <EventPPUserSummary>(ppUserSummary));
     }
     else if (ommEvent is EventPPDevCnf ppDevCnf)
     {
         PPDevCnf?.Invoke(this, new OmmEventArgs <EventPPDevCnf>(ppDevCnf));
     }
     else if (ommEvent is EventPPUserCnf ppUserCnf)
     {
         PPUserCnf?.Invoke(this, new OmmEventArgs <EventPPUserCnf>(ppUserCnf));
     }
     else if (ommEvent is EventPPCnf ppCnf)
     {
         PPCnf?.Invoke(this, new OmmEventArgs <EventPPCnf>(ppCnf));
     }
     else if (ommEvent is EventRFPState rfpState)
     {
         RFPState?.Invoke(this, new OmmEventArgs <EventRFPState>(rfpState));
     }
     else if (ommEvent is EventRFPCnf rfpCnf)
     {
         RFPCnf?.Invoke(this, new OmmEventArgs <EventRFPCnf>(rfpCnf));
     }
     else if (ommEvent is EventRFPSyncRel rfpSyncRel)
     {
         RFPSyncRel?.Invoke(this, new OmmEventArgs <EventRFPSyncRel>(rfpSyncRel));
     }
     else if (ommEvent is EventRFPSyncQuality rfpSyncQuality)
     {
         RFPSyncQuality?.Invoke(this, new OmmEventArgs <EventRFPSyncQuality>(rfpSyncQuality));
     }
     else if (ommEvent is EventStbStateChange stbStateChange)
     {
         StbStateChange?.Invoke(this, new OmmEventArgs <EventStbStateChange>(stbStateChange));
     }
     else if (ommEvent is EventLicenseCnf licenseCnf)
     {
         LicenseCnf?.Invoke(this, new OmmEventArgs <EventLicenseCnf>(licenseCnf));
     }
     else if (ommEvent is EventMessageProgress messageProgress)
     {
         MessageProgress?.Invoke(this, new OmmEventArgs <EventMessageProgress>(messageProgress));
     }
     else if (ommEvent is EventMessageConfirmation messageConfirmation)
     {
         MessageConfirmation?.Invoke(this, new OmmEventArgs <EventMessageConfirmation>(messageConfirmation));
     }
     else if (ommEvent is EventMessageQueueEmpty messageQueueEmpty)
     {
         MessageQueueEmpty?.Invoke(this, new OmmEventArgs <EventMessageQueueEmpty>(messageQueueEmpty));
     }
     else if (ommEvent is EventMessageSend messageSend)
     {
         MessageSend?.Invoke(this, new OmmEventArgs <EventMessageSend>(messageSend));
     }
     else if (ommEvent is EventPositionHistory positionHistory)
     {
         PositionHistory?.Invoke(this, new OmmEventArgs <EventPositionHistory>(positionHistory));
     }
     else if (ommEvent is EventPositionInfo positionInfo)
     {
         PositionInfo?.Invoke(this, new OmmEventArgs <EventPositionInfo>(positionInfo));
     }
     else if (ommEvent is EventPositionTrack positionTrack)
     {
         PositionTrack?.Invoke(this, new OmmEventArgs <EventPositionTrack>(positionTrack));
     }
     else if (ommEvent is EventPositionRequest positionRequest)
     {
         PositionRequest?.Invoke(this, new OmmEventArgs <EventPositionRequest>(positionRequest));
     }
     else if (ommEvent is EventPPState ppState)
     {
         PPState?.Invoke(this, new OmmEventArgs <EventPPState>(ppState));
     }
     else if (ommEvent is EventDECTAuthCodeCnf dectAuthCodeCnf)
     {
         DECTAuthCodeCnf?.Invoke(this, new OmmEventArgs <EventDECTAuthCodeCnf>(dectAuthCodeCnf));
     }
 }