コード例 #1
0
        /// <summary>
        /// Проверяет, требуется ли сохранение теста.
        /// </summary>
        /// <returns></returns>
        private Boolean CheckSave()
        {
            if (Survey.Equals(_survey, new Survey("", "", "", new Question("Выбор одного правильного ответа", "", -1, null, new String[] { "", "" }))))
            {
                return(true);
            }

            return((_file != "" && _file != null)
                ? Survey.Equals(_survey, new Survey(_file))
                : false);
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            SurveyReadOnlyViewModel that = obj as SurveyReadOnlyViewModel;

            if (that == null)
            {
                return(false);
            }
            return(_survey.Equals(that._survey));
        }
コード例 #3
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLQuestionColumn)obj;

            //reference types
            if (!Object.Equals(ColumnText, other.ColumnText))
            {
                return(false);
            }
            //value types
            if (!Survey.Equals(other.Survey))
            {
                return(false);
            }
            if (!Question.Equals(other.Question))
            {
                return(false);
            }
            if (!ColumnId.Equals(other.ColumnId))
            {
                return(false);
            }
            if (!DisplayOrder.Equals(other.DisplayOrder))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }

            return(true);
        }
コード例 #4
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLFile)obj;

            //reference types
            if (!Object.Equals(OriginalFileName, other.OriginalFileName))
            {
                return(false);
            }
            if (!Object.Equals(ManagedFileName, other.ManagedFileName))
            {
                return(false);
            }
            if (!Object.Equals(Extension, other.Extension))
            {
                return(false);
            }
            if (!Object.Equals(InventoryPath, other.InventoryPath))
            {
                return(false);
            }
            //value types
            if (!Client.Equals(other.Client))
            {
                return(false);
            }
            if (!FileId.Equals(other.FileId))
            {
                return(false);
            }
            if (!Survey.Equals(other.Survey))
            {
                return(false);
            }
            if (!Size.Equals(other.Size))
            {
                return(false);
            }
            if (!Status.Equals(other.Status))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }
            if (!Width.Equals(other.Width))
            {
                return(false);
            }
            if (!Height.Equals(other.Height))
            {
                return(false);
            }

            return(true);
        }
コード例 #5
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLQuestionOption)obj;

            //reference types
            if (!Object.Equals(OptionText, other.OptionText))
            {
                return(false);
            }
            if (!Object.Equals(CustomId, other.CustomId))
            {
                return(false);
            }
            if (!Object.Equals(SkipToWebUrl, other.SkipToWebUrl))
            {
                return(false);
            }
            //value types
            if (!Survey.Equals(other.Survey))
            {
                return(false);
            }
            if (!Question.Equals(other.Question))
            {
                return(false);
            }
            if (!OptionId.Equals(other.OptionId))
            {
                return(false);
            }
            if (!OptionType.Equals(other.OptionType))
            {
                return(false);
            }
            if (!DisplayOrder.Equals(other.DisplayOrder))
            {
                return(false);
            }
            if (!OptionValue.Equals(other.OptionValue))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }
            if (!SkipTo.Equals(other.SkipTo))
            {
                return(false);
            }
            if (!SkipToPage.Equals(other.SkipToPage))
            {
                return(false);
            }
            if (!SkipToQuestion.Equals(other.SkipToQuestion))
            {
                return(false);
            }

            return(true);
        }
コード例 #6
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLSurveyPage)obj;

            //reference types
            if (!Object.Equals(CustomId, other.CustomId))
            {
                return(false);
            }
            if (!Object.Equals(SkipToWebUrl, other.SkipToWebUrl))
            {
                return(false);
            }
            if (!Object.Equals(ShowTitle, other.ShowTitle))
            {
                return(false);
            }
            if (!Object.Equals(Description, other.Description))
            {
                return(false);
            }
            //value types
            if (!Survey.Equals(other.Survey))
            {
                return(false);
            }
            if (!PageId.Equals(other.PageId))
            {
                return(false);
            }
            if (!DisplayOrder.Equals(other.DisplayOrder))
            {
                return(false);
            }
            if (!PreviousPage.Equals(other.PreviousPage))
            {
                return(false);
            }
            if (!NextPage.Equals(other.NextPage))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }
            if (!SkipTo.Equals(other.SkipTo))
            {
                return(false);
            }
            if (!SkipToPage.Equals(other.SkipToPage))
            {
                return(false);
            }

            return(true);
        }