Beispiel #1
0
        void AddItem(int i, int buttonx, int buttony, global.Item item, EventHandler type)
        {
            PictureBox button = new PictureBox();

            button.InitialImage  = null;
            button.SizeMode      = PictureBoxSizeMode.Zoom;
            button.ImageLocation = "https://cdn.discordapp.com/attachments/" + item.imgurl;
            button.Tag           = i;
            button.Size          = new Size(buttonx, buttony);
            button.Click        += type;
            button.Cursor        = Cursors.Hand;

            Label lbl = new Label();

            lbl.Text      = item.swapsTo;
            lbl.ForeColor = global.TextColor;
            lbl.Font      = new Font("Segoe UI", 8.5f, FontStyle.Regular);
            lbl.Location  = new Point(35, 149);


            Panel panel = new Panel();

            panel.Size = new Size(buttonx, buttony + 35);
            panel.Controls.Add(button);
            panel.Controls.Add(lbl);
            skinsflowlayout.Controls.Add(panel);
        }
Beispiel #2
0
 public swap(int item)
 {
     InitializeComponent();
     BackColor           = global.ItemsBG;
     log.BackColor       = global.ItemsBG;
     SwapB.ForeColor     = global.TextColor;
     SwapB.BackColor     = global.Button;
     log.ForeColor       = global.TextColor;
     SelectedItem        = global.ItemList[item];
     Text                = SelectedItem.swapsFrom + " --> " + SelectedItem.swapsTo;
     image.ImageLocation = "https://cdn.discordapp.com/attachments/" + SelectedItem.swapsfromImageURL;
     if (global.ReadSetting(global.Setting.swaplogs1420).Contains(SelectedItem.swapsFrom + " To " + SelectedItem.swapsTo + ","))
     {
         label3.ForeColor = Color.Lime;
         label3.Text      = "ON";
         SwapB.Text       = "Revert";
     }
     else
     {
         label3.ForeColor = Color.Red;
         label3.Text      = "OFF";
         SwapB.Text       = "Convert";
     }
 }