////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public void Set(PermitionTypes permitionType, bool value)
        ///
        /// \brief Sets to all design phases.
        ///
        /// \par Description.
        ///      Set to all the entries of the Design phases.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 25/07/2017
        ///
        /// \param permitionType (PermitionTypes) - Type of the permition.
        /// \param value         (bool) - true to value.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public void Set(PermitionTypes permitionType, bool value)
        {
            permissions[(int)MainWindow.ActivationPhases.Initiated, (int)permitionType] = value;
            permissions[(int)MainWindow.ActivationPhases.Loaded, (int)permitionType]    = value;
            permissions[(int)MainWindow.ActivationPhases.Checked, (int)permitionType]   = value;
            permissions[(int)MainWindow.ActivationPhases.Created, (int)permitionType]   = value;
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public bool CheckPermition(PermitionTypes permitionType, ElementWindow sender)
        ///
        /// \brief Check permition.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 25/07/2017
        ///
        /// \param permitionType (PermitionTypes) - Type of the permition.
        /// \param sender        (ElementWindow) - The sender.
        ///
        /// \return True if it succeeds, false if it fails.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public bool CheckPermition(PermitionTypes permitionType, ElementWindow sender)
        {
            // If the sender is an ElementWindow currently presented the check should be bypasses
            if (Permissions.IsWindowPresented(sender))
            {
                return(true);
            }
            return(permissions[(int)MainWindow.ActivationPhase, (int)permitionType]);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn public void Set(MainWindow.ActivationPhases activationPhase, PermitionTypes permitionTypes, bool value)
        ///
        /// \brief Sets.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 25/07/2017
        ///
        /// \param activationPhase (ActivationPhases) - The activation phase.
        /// \param permitionTypes  (PermitionTypes) - List of types of the permissions.
        /// \param value           (bool) - true to value.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public void Set(MainWindow.ActivationPhases activationPhase, PermitionTypes permitionTypes, bool value)
        {
            permissions[(int)activationPhase, (int)permitionTypes] = value;
        }