Пример #1
0
        public Photoinfo(Info info, Byte[] photo)
        {
            this.Date___Time = DateTime.Now;
            this.Situation   = info.eventName;
            this.Photo       = photo;

            Emotion emotions = info.emotion;

            if (emotions == 0)
            {
                this.Unknown = true;
            }
            else
            {
                this.Unknown = false;
            }

            this.Happy     = emotions.HasFlag(Emotion.HAPPY);
            this.Sad       = emotions.HasFlag(Emotion.SAD);
            this.Angry     = emotions.HasFlag(Emotion.ANGRY);
            this.Confused  = emotions.HasFlag(Emotion.CONFUSED);
            this.Suprised  = emotions.HasFlag(Emotion.SURPRISED);
            this.Calm      = emotions.HasFlag(Emotion.CALM);
            this.Fear      = emotions.HasFlag(Emotion.FEAR);
            this.Disgusted = emotions.HasFlag(Emotion.DISGUSTED);
        }