コード例 #1
0
    public Form1()
    {
        InitializeComponent();
        //Create new Instance of UserControl:
        ImageWithText chamption = new ImageWithText();

        //Set Image and Name:
        chamption.SetChampionName("Ashe");
        chamption.SetChampionImage(Properties.Resources.Ashe);
        //Add to Window:
        this.Controls.Add(chamption);
    }
コード例 #2
0
            public CounterItem(int x, int y, int w, int h)
            {
                AcceptMouseInput = true;
                WantUpdateSize   = false;
                CanMove          = true;

                X      = x;
                Y      = y;
                Width  = w;
                Height = h;

                _image = new ImageWithText();
                Add(_image);
            }
コード例 #3
0
    public Form1()
    {
        InitializeComponent();
        //Create new Instance of UserControl:
        //Simple:
        ImageWithText champion = new ImageWithText();
        //Advanced (pass parameters in construcor):
        ImageWithText champion = new ImageWithText(Properties.Resources.Ashe, "Ashe");

        //Set Image and Name (if not set in constructor:)
        champion.SetChampionName("Ashe");
        champion.SetChampionImage(Properties.Resources.Ashe);
        //Add to Window:
        this.Controls.Add(chamption);
    }
コード例 #4
0
ファイル: CounterBarGump.cs プロジェクト: soufflee/ClassicUO
            public CounterItem(int x, int y, int w, int h)
            {
                AcceptMouseInput       = true;
                WantUpdateSize         = false;
                CanMove                = true;
                CanCloseWithRightClick = false;

                X      = x;
                Y      = y;
                Width  = w;
                Height = h;

                _image = new ImageWithText();
                Add(_image);

                ContextMenu = new ContextMenuControl();
                ContextMenu.Add(ResGumps.UseObject, Use);
                ContextMenu.Add(ResGumps.Remove, RemoveItem);
            }
コード例 #5
0
            public CounterItem(int x, int y, int w, int h)
            {
                AcceptMouseInput       = true;
                WantUpdateSize         = false;
                CanMove                = true;
                CanCloseWithRightClick = false;

                X      = x;
                Y      = y;
                Width  = w;
                Height = h;

                _image = new ImageWithText();
                Add(_image);

                ContextMenu = new ContextMenuControl();
                ContextMenu.Add("Use object (Double click)", Use);
                ContextMenu.Add("Remove (ALT + Right click)", RemoveItem);
            }
コード例 #6
0
 public object ConvertSourceToObject(PublishedPropertyType propertyType, object source, bool preview)
 {
     return(ImageWithText.Deserialize(source as string));
 }