Esempio n. 1
0
 /// <summary>
 /// Thread safe set of the size of the picture of this form.
 /// </summary>
 /// <param name="newSize">A <see cref="Size"/> with the new size.</param>
 protected void ThreadSafeSetSize(Size newSize)
 {
     if (this.Picture.InvokeRequired)
     {
         SetSizeCallback d = new SetSizeCallback(this.ThreadSafeSetSize);
         this.Picture.Invoke(d, new object[] { newSize });
     }
     else
     {
         this.Picture.Size = newSize;
     }
 }
Esempio n. 2
0
 private void setFileBarSize(int size)
 {
     if (this.pictureBoxProgressBar.InvokeRequired)
     {
         SetSizeCallback d = new SetSizeCallback(setFileBarSize);
         this.Invoke(d, new object[] { size });
     }
     else
     {
         pictureBoxProgressBar.Width = size;
     }
 }
 private void ChangeSize(Size size)
 {
     if (this.InvokeRequired)
     {
         SetSizeCallback d = new SetSizeCallback(ChangeSize);
         if (this.IsHandleCreated && !this.IsDisposed)
         {
             try
             {
                 this.Invoke(d, new object[] { size });
             }
             catch { }
         }
     }
     else
     {
         this.Size = size;
     }
 }
Esempio n. 4
0
        private void ChangeSize(Size size)
        {
            if (this.InvokeRequired)
            {
                SetSizeCallback d = new SetSizeCallback(ChangeSize);
                if (this.IsHandleCreated && !this.IsDisposed)
                {
                    try
                    {
                        this.Invoke(d, new object[] { size });
                    }
                    catch { }
                }
            }
            else
            {
                this.Size = size;

                this.MaximumSize     = new Size(0, 0);
                this.FormBorderStyle = FormBorderStyle.Sizable;
            }
        }
        private void ChangeSize(Size size)
        {
            if (this.InvokeRequired)
            {
                SetSizeCallback d = new SetSizeCallback(ChangeSize);
                if (this.IsHandleCreated && !this.IsDisposed)
                {
                    try
                    {
                        this.Invoke(d, new object[] { size });
                    }
                    catch { }
                }
            }
            else
            {
                this.Size = size;

                this.MaximumSize = new Size(0, 0);
                this.FormBorderStyle = FormBorderStyle.Sizable;

            }
        }
Esempio n. 6
0
 /// <summary>
 /// Thread safe set of the size of the picture of this form.
 /// </summary>
 /// <param name="newSize">A <see cref="Size"/> with the new size.</param>
 protected void ThreadSafeSetSize(Size newSize)
 {
   if (this.Picture.InvokeRequired)
   {
     SetSizeCallback d = new SetSizeCallback(this.ThreadSafeSetSize);
     this.Picture.Invoke(d, new object[] { newSize });
   }
   else
   {
     this.Picture.Size = newSize;
   }
 }