Esempio n. 1
0
        public FormDeTest()
        {
            InitializeComponent();
            Unit u = new Unit();

            UnitResistance r = new UnitResistance()
            {
                Fire      = 0,
                Ice       = 0,
                Lightning = 0,
                Water     = 0,
                Wind      = 0,
                Earth     = 0,
                Light     = 0,
                Dark      = 0,

                Poison        = 0,
                Blind         = 0,
                Sleep         = 0,
                Silence       = 0,
                Paralysis     = 0,
                Confuse       = 0,
                Disease       = 0,
                Petrification = 0,
            };

            u.Resistance = r;

            //this.CreateUnitResTableView(u.Resistance, this.tableRes);
            //this.InitializeResizingListView();
        }
Esempio n. 2
0
        private void CreateUnitResTableView(UnitResistance res, TableLayoutPanel table)
        {
            table.Bounds = new Rectangle(new Point(10, 10), new Size(400, 200));

            table.RowCount    = 6;
            table.ColumnCount = 8;



            table.Controls.Add(new Label()
            {
                Text = "Element Resistance"
            }, 0, 0);
            table.SetColumnSpan(table.GetControlFromPosition(0, 0), 8);
            table.SetRowSpan(table.GetControlFromPosition(0, 0), 1);

            table.Controls.Add(new Label()
            {
                Text = "Statut Ailment Resistance"
            }, 0, 3);
            table.SetColumnSpan(table.GetControlFromPosition(0, 3), 8);
            table.SetRowSpan(table.GetControlFromPosition(0, 3), 1);

            // Element
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Fire_Resistance")
            }, 0, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Ice_Resistance")
            }, 1, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Lightning_Resistance")
            }, 2, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Water_Resistance")
            }, 3, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Wind_Resistance")
            }, 4, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Earth_Resistance")
            }, 5, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Light_Resistance")
            }, 6, 1);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Dark_Resistance")
            }, 7, 1);
            // Number
            table.Controls.Add(new Label()
            {
                Text = res.Fire.ToString()
            }, 0, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Ice.ToString()
            }, 1, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Lightning.ToString()
            }, 2, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Water.ToString()
            }, 3, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Wind.ToString()
            }, 4, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Earth.ToString()
            }, 5, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Light.ToString()
            }, 6, 2);
            table.Controls.Add(new Label()
            {
                Text = res.Dark.ToString()
            }, 7, 2);



            // Ailment
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Poison_Resistance")
            }, 0, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Blind_Resistance")
            }, 1, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Sleep_Resistance")
            }, 2, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Silence_Resistance")
            }, 3, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Paralysis_Resistance")
            }, 4, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Confuse_Resistance")
            }, 5, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Disease_Resistance")
            }, 6, 4);
            table.Controls.Add(new Label()
            {
                Image = (Image)rm.GetObject("Icon-Petrification_Resistance")
            }, 7, 4);
            // Number
            table.Controls.Add(new Label()
            {
                Text = res.Poison.ToString()
            }, 0, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Blind.ToString()
            }, 1, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Sleep.ToString()
            }, 2, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Silence.ToString()
            }, 3, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Paralysis.ToString()
            }, 4, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Confuse.ToString()
            }, 5, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Disease.ToString()
            }, 6, 5);
            table.Controls.Add(new Label()
            {
                Text = res.Petrification.ToString()
            }, 7, 5);
        }