Beispiel #1
0
        public void CreatScreenElementTypeShouldSucceed()
        {
            //Act
            var result = new ScreenElementType();

            //Assert
            result.Should().NotBeNull();
        }
Beispiel #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;
        }
        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;
        }
            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);
                }
            }
Beispiel #5
0
 internal static ScreenElement Create(ScreenElementType type, string name)
 {
     return new ScreenElement() { ElementType = type, Name = name };
 }
Beispiel #6
0
 public MacroBuilder AddClick(ScreenElementType element)
 {
     return AddClick(element, string.Format("Click {0}", element));
 }