Пример #1
0
 public GumpItem(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X      = GetInt32(1);
     _Y      = GetInt32(2);
     _GumpId = GetInt32(3);
 }
Пример #2
0
 public GumpAlphaRegion(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X      = GetInt32(1);
     _Y      = GetInt32(2);
     _Width  = GetInt32(3);
     _Height = GetInt32(4);
 }
Пример #3
0
 public GumpLabel(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X     = GetInt32(1);
     _Y     = GetInt32(2);
     _Color = GetInt32(3);
     _Text  = GetText(GetInt32(4));
 }
Пример #4
0
 public GumpItemColor(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X      = GetInt32(1);
     Y      = GetInt32(2);
     GumpId = GetInt32(3);
     Color  = GetInt32(4);
 }
Пример #5
0
 public GumpImageTiled(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X      = GetInt32(1);
     _Y      = GetInt32(2);
     _Width  = GetInt32(3);
     _Height = GetInt32(4);
     _GumpId = GetInt32(5);
 }
Пример #6
0
 public GumpBackground(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X      = GetInt32(1);
     Y      = GetInt32(2);
     GumpId = GetInt32(3);
     Width  = GetInt32(4);
     Height = GetInt32(5);
 }
Пример #7
0
 public GumpRadio(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X            = GetInt32(1);
     Y            = GetInt32(2);
     InactiveId   = GetInt32(3);
     ActiveId     = GetInt32(4);
     InitialState = GetBoolean(5);
     SwitchId     = GetInt32(6);
 }
Пример #8
0
 public GumpCheck(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X            = GetInt32(1);
     _Y            = GetInt32(2);
     _InactiveId   = GetInt32(3);
     _ActiveId     = GetInt32(4);
     _InitialState = GetBoolean(5);
     _SwitchId     = GetInt32(6);
 }
Пример #9
0
 public GumpLabelCropped(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X      = GetInt32(1);
     _Y      = GetInt32(2);
     _Width  = GetInt32(3);
     _Height = GetInt32(4);
     _Color  = GetInt32(5);
     _Text   = GetText(GetInt32(6));
 }
Пример #10
0
 public GumpButton(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X         = GetInt32(1);
     _Y         = GetInt32(2);
     _NormalId  = GetInt32(3);
     _PressedId = GetInt32(4);
     _Type      = GetInt32(5);
     _Param     = GetInt32(6);
     _ButtonId  = GetInt32(7);
 }
Пример #11
0
 public GumpHtml(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X          = GetInt32(1);
     _Y          = GetInt32(2);
     _Width      = GetInt32(3);
     _Height     = GetInt32(4);
     _Text       = GetText(GetInt32(5));
     _Background = GetBoolean(6);
     _Scrollbar  = GetBoolean(7);
 }
Пример #12
0
 public GumpTextEntry(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X           = GetInt32(1);
     _Y           = GetInt32(2);
     _Width       = GetInt32(3);
     _Height      = GetInt32(4);
     _Color       = GetInt32(5);
     _EntryId     = GetInt32(6);
     _InitialText = GetText(GetInt32(7));
 }
Пример #13
0
 public GumpHtmlLocalizedColor(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X          = GetInt32(1);
     _Y          = GetInt32(2);
     _Width      = GetInt32(3);
     _Height     = GetInt32(4);
     _Number     = GetUInt32(5);
     _Background = GetBoolean(6);
     _Scrollbar  = GetBoolean(7);
     _Color      = GetInt32(8);
 }
Пример #14
0
 public GumpTextEntryLimited(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X           = GetInt32(1);
     Y           = GetInt32(2);
     Width       = GetInt32(3);
     Height      = GetInt32(4);
     Color       = GetInt32(5);
     EntryId     = GetInt32(6);
     InitialText = GetText(GetInt32(7));
     Textlen     = GetInt32(1);
 }
Пример #15
0
 public GumpHtmlLocalizedArgs(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X          = GetInt32(1);
     Y          = GetInt32(2);
     Width      = GetInt32(3);
     Height     = GetInt32(4);
     Background = GetBoolean(5);
     Scrollbar  = GetBoolean(6);
     Color      = GetInt32(7);
     Number     = GetUInt32(8);
     Args       = GetString(9);
 }
Пример #16
0
 public GumpImageTiledButton(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _X         = GetInt32(1);
     _Y         = GetInt32(2);
     _NormalID  = GetInt32(3);
     _PressedID = GetInt32(4);
     _Type      = GetInt32(5);
     _Param     = GetInt32(6);
     _ButtonID  = GetInt32(7);
     _ItemID    = GetInt32(8);
     _Hue       = GetInt32(9);
     _Width     = GetInt32(10);
     _Height    = GetInt32(11);
 }
Пример #17
0
 public GumpImageTiledButton(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     X         = GetInt32(1);
     Y         = GetInt32(2);
     NormalID  = GetInt32(3);
     PressedID = GetInt32(4);
     Type      = GetInt32(5);
     Param     = GetInt32(6);
     ButtonID  = GetInt32(7);
     ItemID    = GetInt32(8);
     Hue       = GetInt32(9);
     Width     = GetInt32(10);
     Height    = GetInt32(11);
 }
Пример #18
0
        public GumpImage(string[] commands, GenericGumpPacket parent)
            : base(commands, parent)
        {
            _X      = GetInt32(1);
            _Y      = GetInt32(2);
            _GumpId = GetInt32(3);

            if (commands.Length > 4)
            {
                _Color = Int32.Parse(commands[4].Substring(4));
            }
            else
            {
                _Color = 0;
            }
        }
Пример #19
0
        public GumpHtmlLocalized(string[] commands, GenericGumpPacket parent)
            : base(commands, parent)
        {
            _X      = GetInt32(1);
            _Y      = GetInt32(2);
            _Width  = GetInt32(3);
            _Height = GetInt32(4);
            _Number = GetUInt32(5);

            if (commands.Length < 8)
            {
                _Background = false;
                _Scrollbar  = false;
            }
            else
            {
                _Background = GetBoolean(6);
                _Scrollbar  = GetBoolean(7);
            }
        }
Пример #20
0
 public GumpAlphaRegion( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Width = GetInt32( 3 );
     _Height = GetInt32( 4 );
 }
Пример #21
0
        public GumpHtmlLocalized( string[] commands, GenericGumpPacket parent )
            : base(commands, parent)
        {
            _X = GetInt32( 1 );
            _Y = GetInt32( 2 );
            _Width = GetInt32( 3 );
            _Height = GetInt32( 4 );
            _Number = GetUInt32( 5 );

            if ( commands.Length < 8 )
            {
                _Background = false;
                _Scrollbar = false;
            }
            else
            {
                _Background = GetBoolean( 6 );
                _Scrollbar = GetBoolean( 7 );
            }
        }
Пример #22
0
 public GumpEntry(string[] commands, GenericGumpPacket parent)
 {
     _Commands = commands;
     _Parent   = parent;
 }
Пример #23
0
 public GumpEntry( string[] commands, GenericGumpPacket parent )
 {
     _Commands = commands;
     _Parent = parent;
 }
Пример #24
0
 public GumpGroup( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _Group = GetInt32( 1 );
 }
Пример #25
0
 public GumpTooltip( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _Number = GetInt32( 1 );
 }
Пример #26
0
 public GumpButton( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _NormalId = GetInt32( 3 );
     _PressedId = GetInt32( 4 );
     _Type = GetInt32( 5 );
     _Param = GetInt32( 6 );
     _ButtonId = GetInt32( 7 );
 }
Пример #27
0
        /// <summary>
        /// Generates class and saves it to stream.
        /// </summary>
        /// <param name="stream">Stream to write to.</param>
        /// <param name="gump">Gump to generate.</param>
        public static void Generate( Stream stream, GenericGumpPacket gump )
        {
            UltimaStringCollection clilocs = Globals.Instance.Clilocs;

            using ( UltimaClassWriter writer = new UltimaClassWriter( stream ) )
            {
                writer.WriteUsing( "System" );
                writer.WriteUsing( "Server" );
                writer.WriteUsing( "Server.Gumps" );
                writer.WriteUsing( "Server.Network" );
                writer.WriteLine();
                writer.BeginNamespace( "Server.Gumps" );

                string className = "GenericGump";

                writer.BeginClass( className, "Gump" );
                writer.BeginConstructor( "public", className, null, String.Format( "{0}, {1}", gump.X, gump.Y ) );

                for ( int i = 0; i < gump.Entries.Count; i++ )
                {
                    GumpEntry entry = gump.Entries[ i ];
                    bool space = entry is GumpPage;

                    if ( space && i != 0 )
                        writer.WriteLine();

                    writer.WriteWithIndent( entry.GetRunUOLine() );

                    // Comment
                    int cliloc = 0;

                    if ( entry is GumpHtmlLocalized )
                        cliloc = (int) ( (GumpHtmlLocalized) entry ).Number;
                    else if ( entry is GumpHtmlLocalizedColor )
                        cliloc = (int) ( (GumpHtmlLocalizedColor) entry ).Number;
                    else if ( entry is GumpHtmlLocalizedArgs )
                        cliloc = (int) ( (GumpHtmlLocalizedArgs) entry ).Number;

                    if ( cliloc > 0 && clilocs != null )
                    {
                        string clilocText = clilocs.GetString( cliloc );

                        if ( !String.IsNullOrEmpty( clilocText ) )
                            writer.WriteLine( " // {0}", clilocText );
                        else
                            writer.WriteLine();
                    }
                    else
                        writer.WriteLine();

                    if ( space && i < gump.Entries.Count )
                        writer.WriteLine();
                }

                writer.EndConstructor();
                writer.WriteLine();
                writer.BeginOverrideMethod( "public", "void", "OnResponse", "NetState sender, RelayInfo info" );
                writer.EndMethod();
                writer.EndClass();
                writer.EndNamespace();

                App.Window.ShowNotification( NotificationType.Info, "Gump generation complete" );
            }
        }
Пример #28
0
 public ECHandleInput(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
 }
Пример #29
0
 public GumpTooltip(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _Number = GetInt32(1);
 }
Пример #30
0
 public GumpPage(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _Page = GetInt32(1);
 }
Пример #31
0
 public GumpItemProperty(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     Serial = GetUInt32(1);
 }
Пример #32
0
        public static GumpEntry Create(string[] commands, GenericGumpPacket parent)
        {
            string command = commands[0].ToLower();

            if (command.StartsWith("kr_"))
            {
                command = command.Substring(3, command.Length - 3);
            }

            switch (command)
            {
            case "nomove":
                return(new GumpNotDragable(commands, parent));

            case "noclose":
                return(new GumpNotClosable(commands, parent));

            case "nodispose":
                return(new GumpNotDisposable(commands, parent));

            case "noresize":
                return(new GumpNotResizable(commands, parent));

            case "checkertrans":
                return(new GumpAlphaRegion(commands, parent));

            case "resizepic":
                return(new GumpBackground(commands, parent));

            case "button":
                return(new GumpButton(commands, parent));

            case "checkbox":
                return(new GumpCheck(commands, parent));

            case "group":
                return(new GumpGroup(commands, parent));

            case "htmlgump":
                return(new GumpHtml(commands, parent));

            case "xmfhtmlgump":
                return(new GumpHtmlLocalized(commands, parent));

            case "xmfhtmlgumpcolor":
                return(new GumpHtmlLocalizedColor(commands, parent));

            case "xmfhtmltok":
                return(new GumpHtmlLocalizedArgs(commands, parent));

            case "gumppic":
                return(new GumpImage(commands, parent));

            case "gumppictiled":
                return(new GumpImageTiled(commands, parent));

            case "buttontileart":
                return(new GumpImageTiledButton(commands, parent));

            case "tilepic":
                return(new GumpItem(commands, parent));

            case "tilepichue":
                return(new GumpItemColor(commands, parent));

            case "text":
                return(new GumpLabel(commands, parent));

            case "croppedtext":
                return(new GumpLabelCropped(commands, parent));

            case "page":
                return(new GumpPage(commands, parent));

            case "radio":
                return(new GumpRadio(commands, parent));

            case "textentry":
                return(new GumpTextEntry(commands, parent));

            case "tooltip":
                return(new GumpTooltip(commands, parent));

            case "mastergump":
                return(null);

            default:
                throw new ArgumentException();
            }
        }
Пример #33
0
 public GumpGroup(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
     _Group = GetInt32(1);
 }
Пример #34
0
 public GumpPage( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _Page = GetInt32( 1 );
 }
Пример #35
0
        public GumpImage( string[] commands, GenericGumpPacket parent )
            : base(commands, parent)
        {
            _X = GetInt32( 1 );
            _Y = GetInt32( 2 );
            _GumpId = GetInt32( 3 );

            if ( commands.Length > 4 )
                _Color = Int32.Parse( commands[ 4 ].Substring( 4 ) );
            else
                _Color = 0;
        }
Пример #36
0
 public GumpTextEntry( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Width = GetInt32( 3 );
     _Height = GetInt32( 4 );
     _Color = GetInt32( 5 );
     _EntryId = GetInt32( 6 );
     _InitialText = GetText( GetInt32( 7 ) );
 }
Пример #37
0
 public GumpImageTiledButton( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _NormalID = GetInt32( 3 );
     _PressedID = GetInt32( 4 );
     _Type = GetInt32( 5 );
     _Param = GetInt32( 6 );
     _ButtonID = GetInt32( 7 );
     _ItemID = GetInt32( 8 );
     _Hue = GetInt32( 9 );
     _Width = GetInt32( 10 );
     _Height = GetInt32( 11 );
 }
Пример #38
0
 public GumpBackground( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _GumpId = GetInt32( 3 );
     _Width = GetInt32( 4 );
     _Height = GetInt32( 5 );
 }
Пример #39
0
 public GumpItemColor( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _GumpId = GetInt32( 3 );
     _Color = GetInt32( 4 );
 }
Пример #40
0
 public GumpCheck( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _InactiveId = GetInt32( 3 );
     _ActiveId = GetInt32( 4 );
     _InitialState = GetBoolean( 5 );
     _SwitchId = GetInt32( 6 );
 }
Пример #41
0
 public GumpLabel( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Color = GetInt32( 3 );
     _Text = GetText( GetInt32( 4 ) );
 }
Пример #42
0
        public static GumpEntry Create( string[] commands, GenericGumpPacket parent )
        {
            string command = commands[ 0 ].ToLower();

            if ( command.StartsWith( "kr_" ) )
                command = command.Substring( 3, command.Length - 3 );

            switch ( command )
            {
                case "nomove":
                return new GumpNotDragable( commands, parent );
                case "noclose":
                return new GumpNotClosable( commands, parent );
                case "nodispose":
                return new GumpNotDisposable( commands, parent );
                case "noresize":
                return new GumpNotResizable( commands, parent );
                case "checkertrans":
                return new GumpAlphaRegion( commands, parent );
                case "resizepic":
                return new GumpBackground( commands, parent );
                case "button":
                return new GumpButton( commands, parent );
                case "checkbox":
                return new GumpCheck( commands, parent );
                case "group":
                return new GumpGroup( commands, parent );
                case "htmlgump":
                return new GumpHtml( commands, parent );
                case "xmfhtmlgump":
                return new GumpHtmlLocalized( commands, parent );
                case "xmfhtmlgumpcolor":
                return new GumpHtmlLocalizedColor( commands, parent );
                case "xmfhtmltok":
                return new GumpHtmlLocalizedArgs( commands, parent );
                case "gumppic":
                return new GumpImage( commands, parent );
                case "gumppictiled":
                return new GumpImageTiled( commands, parent );
                case "buttontileart":
                return new GumpImageTiledButton( commands, parent );
                case "tilepic":
                return new GumpItem( commands, parent );
                case "tilepichue":
                return new GumpItemColor( commands, parent );
                case "text":
                return new GumpLabel( commands, parent );
                case "croppedtext":
                return new GumpLabelCropped( commands, parent );
                case "page":
                return new GumpPage( commands, parent );
                case "radio":
                return new GumpRadio( commands, parent );
                case "textentry":
                return new GumpTextEntry( commands, parent );
                case "tooltip":
                return new GumpTooltip( commands, parent );
                case "mastergump":
                return null;

                default:
                throw new ArgumentException();
            }
        }
Пример #43
0
 public GumpLabelCropped( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Width = GetInt32( 3 );
     _Height = GetInt32( 4 );
     _Color = GetInt32( 5 );
     _Text = GetText( GetInt32( 6 ) );
 }
Пример #44
0
 public GumpHtml( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Width = GetInt32( 3 );
     _Height = GetInt32( 4 );
     _Text = GetText( GetInt32( 5 ) );
     _Background = GetBoolean( 6 );
     _Scrollbar = GetBoolean( 7 );
 }
Пример #45
0
 public GumpNotResizable( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
 }
Пример #46
0
 public GumpHtmlLocalizedColor( string[] commands, GenericGumpPacket parent )
     : base(commands, parent)
 {
     _X = GetInt32( 1 );
     _Y = GetInt32( 2 );
     _Width = GetInt32( 3 );
     _Height = GetInt32( 4 );
     _Number = GetUInt32( 5 );
     _Background = GetBoolean( 6 );
     _Scrollbar = GetBoolean( 7 );
     _Color = GetInt32( 8 );
 }
Пример #47
0
 public GumpNotResizable(string[] commands, GenericGumpPacket parent)
     : base(commands, parent)
 {
 }