Exemplo n.º 1
0
        //button on tap
        void btn_TapEvent(object sender)
        {
            Bitmap bmp = new Bitmap(Resources.GetBytes(Resources.BinaryResources.setan), Bitmap.BitmapImageType.Jpeg);

            img.Visible = true;
            img.Bitmap  = bmp;

            img.Invalidate();
            Thread.Sleep(2000);
            img.Visible = false;
            img.Invalidate();
            window.Invalidate();
        }
Exemplo n.º 2
0
        void changeState()
        {
            Bitmap bmp;

            IsEmpty = !IsEmpty;
            if (IsEmpty)
            {
                if (picAvail == null)
                {
                    var temp = new GT.Picture(Resources.GetBytes(Resources.BinaryResources.empty), GT.Picture.PictureEncoding.JPEG);
                    picAvail = temp.MakeBitmap();
                }
                bmp      = picAvail;
                txt.Text = "Available";
            }
            else
            {
                if (picNotAvail == null)
                {
                    var temp = new GT.Picture(Resources.GetBytes(Resources.BinaryResources.full), GT.Picture.PictureEncoding.JPEG);
                    picNotAvail = temp.MakeBitmap();
                }
                bmp      = picNotAvail;
                txt.Text = "Being Used";
            }
            img.Bitmap = bmp;
            img.Invalidate();
            txt.Invalidate();
        }