Пример #1
0
        public void CreatScreenElementTypeShouldSucceed()
        {
            //Act
            var result = new ScreenElementType();

            //Assert
            result.Should().NotBeNull();
        }
Пример #2
0
        public MacroBuilder AddClick(ScreenElementType element, string comment)
        {
            _steps.Add(new MacroClickStep()
            {
                X = this.ScreenElements[element].X,
                Y = this.ScreenElements[element].Y,
                Description = string.Concat("Click ", element),
                StepNumber = _steps.Count + 1,
                Comment = comment,
                ScreenElement = element
            });

            return this;
        }
Пример #3
0
        public ScreenElement(Guid id, string name, string description, Icon icon, bool showOperationIcon, ScreenElementType screenElementType, string image)
        {
            if (id == default(Guid))
            {
                throw Error.Argument(string.Format("{0} can't be default guid.", nameof(id)));
            }

            if (string.IsNullOrEmpty(name))
            {
                throw Error.ArgumentNull(string.Format("{0} can't be empty.", nameof(name)));
            }

            Id                = id;
            Name              = name;
            Description       = description;
            Icon              = icon;
            ShowOperationIcon = showOperationIcon;
            ScreenElementType = screenElementType;
            Image             = image;
        }
Пример #4
0
            public ScreenElement(ScreenElement OtherElement)
            {
                Index             = OtherElement.Index;
                X                 = OtherElement.X;
                Y                 = OtherElement.Y;
                SearchObjectIndex = OtherElement.SearchObjectIndex;
                Repeats           = OtherElement.Repeats;
                Repeats2          = OtherElement.Repeats2;
                Char              = OtherElement.Char;
                Color             = OtherElement.Color;
                Type              = OtherElement.Type;
                TargetX           = OtherElement.TargetX;
                TargetY           = OtherElement.TargetY;
                TargetLevel       = OtherElement.TargetLevel;
                Flags             = OtherElement.Flags;

                if (OtherElement.Object != null)
                {
                    Object = new GameObject(OtherElement.Object);
                }
            }
Пример #5
0
 internal static ScreenElement Create(ScreenElementType type, string name)
 {
     return new ScreenElement() { ElementType = type, Name = name };
 }
Пример #6
0
 public MacroBuilder AddClick(ScreenElementType element)
 {
     return AddClick(element, string.Format("Click {0}", element));
 }