コード例 #1
0
        public static BitmapChangeColorPopUp Open(Bitmap bitmap, bool createMask)
        {
            if (_singleton == null)
            {
                _singleton = new BitmapChangeColorPopUp();
            }

            _singleton._bmp             = bitmap;
            _singleton._backColor       = Tilesheet.InferBackgroundColor(bitmap);
            _singleton.picBox.BackColor = _singleton._backColor;
            _singleton._isMask          = createMask;

            if (!createMask)
            {
                _singleton.lblMessage.Text = "Select color to change";
                _singleton.Text            = "Change Background";
            }
            else
            {
                _singleton.lblMessage.Text = "Select transparency key";
                _singleton.Text            = "Create Mask";
            }

            _singleton.Show();

            return(_singleton);
        }
コード例 #2
0
        public static BitmapChangeColorPopUp Open(Bitmap bitmap, bool createMask)
        {
            if (_singleton == null)
                _singleton = new BitmapChangeColorPopUp();

            _singleton._bmp = bitmap;
            _singleton._backColor = Tilesheet.InferBackgroundColor(bitmap);
            _singleton.picBox.BackColor = _singleton._backColor;
            _singleton._isMask = createMask;

            if (!createMask)
            {
                _singleton.lblMessage.Text = "Select color to change";
                _singleton.Text = "Change Background";
            }
            else
            {
                _singleton.lblMessage.Text = "Select transparency key";
                _singleton.Text = "Create Mask";
            }

            _singleton.Show();

            return _singleton;
        }
コード例 #3
0
 private void BitmapChangeColorPopUp_FormClosed(object sender, FormClosedEventArgs e)
 {
     _singleton = null;
 }
コード例 #4
0
 private void BitmapChangeColorPopUp_FormClosed(object sender, FormClosedEventArgs e)
 {
     _singleton = null;
 }