private void LoadSwitcherObject(SwitcherPassword gswitcherp)
        {
            textBox1.Text = gswitcherp.Password;

            if (gswitcherp.Activated)
            {
                checkBox1.Checked = true;
            }
            if (gswitcherp.Inversion)
            {
                checkBox2.Checked = true;
            }

            if (gswitcherp.GameSprite.PathImage[0] != null)
            {
                pictureBox1.Image = new Bitmap(gswitcherp.GameSprite.PathImage[0]);
            }

            if (gswitcherp.GameSprite.PathImage[1] != null)
            {
                pictureBox2.Image = new Bitmap(gswitcherp.GameSprite.PathImage[1]);
            }

            temppath[0] = gswitcherp.GameSprite.PathImage[0];
            temppath[1] = gswitcherp.GameSprite.PathImage[1];
        }
 public SwitcherPasswordPropForm(SwitcherPassword switcherpassword, Level level)
 {
     InitializeComponent();
     this.switcherpassword = switcherpassword;
     this.level            = level;
     LoadSwitcherObject(switcherpassword);
     ShowActivObjects(switcherpassword.CanActivateObject);
 }
        private void Save(SwitcherPassword gswitcherp)
        {
            gswitcherp.Inversion = checkBox2.Checked;
            gswitcherp.Activated = checkBox1.Checked;

            gswitcherp.UserSizeImage = gswitcherp.GameSprite.PathImage[0] != temppath[0] ? new SizeF(0, 0) : gswitcherp.UserSizeImage;

            gswitcherp.GameSprite.PathImage[0] = temppath[0];
            gswitcherp.GameSprite.PathImage[1] = temppath[1];
            gswitcherp.Password = textBox1.Text;

            ISprite isprite = gswitcherp;

            isprite.LoadSprite();
        }