예제 #1
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (!DrawNothing)
     {
         base.OnInvalidated(e);
     }
 }
예제 #2
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.Visible && this.ThisReallyVisible())
     {
         base.OnInvalidated(e);
     }
 }
예제 #3
0
 /// <summary>
 /// Raises the Invalidated event.
 /// </summary>
 /// <param name="e"></param>
 private void OnInvalidated(InvalidateEventArgs e)
 {
     if (Invalidated != null)
     {
         Invalidated(this, e);
     }
 }
예제 #4
0
        private void VerifyInvalidate(int index, int startY, int endY)
        {
            InvalidateEventArgs e = (InvalidateEventArgs)_rowInvalidates [index];

            Assert.AreEqual(startY, e.StartY);
            Assert.AreEqual(endY, e.EndY);
        }
예제 #5
0
        }         //panelTextureCanvas_Paint()

        private void panelTextureCanvas_Invalidated(object sender, InvalidateEventArgs e)
        {
            //if( m_bitmapTextureCanvas != null )
            //{
            //    panelTextureCanvas.BackgroundImage = m_bitmapTextureCanvas;
            //}//if
        }//panelTextureCanvas_Invalidated()
예제 #6
0
 void Impact_Invalidated(object sender, InvalidateEventArgs e)
 {
     syncContext.Send(new SendOrPostCallback(delegate(object o)
     {
         UpdateAuthorInfo(Impact.GetSelectedAuthor());
     }), this);
 }
예제 #7
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            mForeBrush   = new SolidBrush(ForeColor);
            mBackBrush   = new SolidBrush(BackColor);
            mButtonBrush = new SolidBrush(mButtonColor);

            mButtonRect     = new Rectangle(ClientRectangle.Width - (SystemInformation.VerticalScrollBarWidth + 1), 0, SystemInformation.VerticalScrollBarWidth + 1, ClientRectangle.Height);
            mButtonIconRect = new Rectangle(mButtonRect.Left + (mButtonRect.Width - mButtonIcon.Width) / 2, mButtonRect.Top + (mButtonRect.Height - mButtonIcon.Height) / 2, mButtonIcon.Width, mButtonIcon.Height);

            mTextRect = new Rectangle(1 + mTextPadding.Left, 1 + mTextPadding.Top, ClientRectangle.Width - (2 + mButtonRect.Width + mTextPadding.Horizontal), ClientRectangle.Height - (2 + mTextPadding.Vertical));

            mDrawBuffer = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
            mDrawBuffer.MakeTransparent(Color.Transparent);

            using (Graphics bufferGraphics = Graphics.FromImage(mDrawBuffer))
            {
                bufferGraphics.Clear(BackColor);
                bufferGraphics.FillRectangle(mButtonBrush, mButtonRect);
                bufferGraphics.DrawImageUnscaled(mButtonIcon, mButtonIconRect);
                ControlPaint.DrawBorder(bufferGraphics, ClientRectangle, mBorderColor, ButtonBorderStyle.Solid);
            }

            mDrawTextBuffer = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
            mDrawTextBuffer.MakeTransparent(Color.Transparent);
            using (Graphics graphics = Graphics.FromImage(mDrawTextBuffer))
            {
                graphics.Clear(Color.Transparent);
                graphics.FillRectangle((Focused && DrawFocusRectangle) ? mFocusBrush : mBackBrush, mTextRect);
                graphics.DrawString((SelectedItem != null) ? SelectedItem.ToString() : Text, Font, mForeBrush, mTextRect, StringFormat.GenericDefault);
            }

            base.OnInvalidated(e);
        }
    protected override void OnInvalidated(InvalidateEventArgs e)
    {
        //Exit if no parent, or _curParent already set.
        if (Parent == null || _curParent != null)
        {
            return;
        }

        base.OnInvalidated(e);

        //Recurse until parent form is found:
        Control parentForm = Parent;

        while (!(parentForm is Form))
        {
            if (parentForm.Parent == null)
            {
                return;                                     //Break if this is a null - indicates parent not yet created.
            }
            parentForm = parentForm.Parent;
        }
        //Have now found parent form at the top of the ancestor tree.
        // be nice and remove the event from the old parent
        if (_curParent != null)
        {
            _curParent.ResizeEnd -= MyDataGridView_ResizeEnd;
        }
        // now update _curParent to the new Parent
        _curParent = (Form)parentForm;

        //Add the resized event handler
        _curParent.ResizeEnd += MyDataGridView_ResizeEnd;
    }
예제 #9
0
 protected virtual void OnInvalidated(InvalidateEventArgs e)
 {
     if (Invalidated != null)
     {
         Invalidated(this, e);
     }
 }
예제 #10
0
        private void Renderers_Invalidated(object sender, InvalidateEventArgs e)
        {
            Rectangle rect = SurfaceToClient(e.InvalidRect);

            rect.Inflate(1, 1);
            Invalidate(rect);
        }
예제 #11
0
        //only way I could find to monitor when row data in the grid changes
        void grid_Invalidated(object sender, InvalidateEventArgs e)
        {
#if DENALI || SQL2014
            CheckButtonIcons();
#endif
            RefreshHighlights();
        }
예제 #12
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            //Invalidate parent
            this.Parent.Invalidate(this.ClientRectangle, false);
        }
예제 #13
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.Visible)
     {
         base.OnInvalidated(e);
     }
 }
예제 #14
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     MoverLib.MoverLib ml = new MoverLib.MoverLib();
     ml.Start();
     //    MessageBox.Show(ml.geteventstate().ToString());
     ml.TestEvent += new MoverLib.MoverLib.TestingEventHandler(ev);
 }
예제 #15
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.BackgroundImage != null && this.AutoScrollMinSize != this.BackgroundImage.Size)
     {
         this.AutoScrollMinSize = this.BackgroundImage.Size;
     }
     base.OnInvalidated(e);
 }
예제 #16
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     if (face != null)
     {
         face.Refresh();
     }
 }
예제 #17
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (mouseDown)
     {
         return;
     }
     base.OnInvalidated(e);
 }
예제 #18
0
        //---
        //  static int ooo = 0;
        #region 重写方法 画圆角
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            //if(ooo!=1)
            SetReion();

            //  ooo = 1;
            base.OnInvalidated(e);
        }
 private void LvSessionsInvalidated(object sender, InvalidateEventArgs e)
 {
     // believe me this is not my preferred way of dealing with a sessionid reset, but no events are thrown when doing this so I'm forced to do it like this
     if (FiddlerApplication.UI.lvSessions.Items.Count == 0)
     {
         this.applicationInterface.ResetSessionIds();
     }
 }
예제 #20
0
 private void FormFieldControl_Invalidated(object sender, InvalidateEventArgs e)
 {
     if (_childControl != null)
     {
         _childControl.Refresh();
         _childControl.Invalidate();
     }
 }
예제 #21
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);
            string res = (string)results [results.Count - 1];

            results [results.Count - 1] = string.Concat(res, "," + e.InvalidRect.ToString());
            //results.Add ("OnInvalidate," + e.InvalidRect.ToString ());
        }
        //Event is called when the Form is Refreshed/Invalidated
        private void Form1_Invalidate(object sender, InvalidateEventArgs e)
        {
            //updates the Text of labelGeneration to the amount of generations
            labelGeneration.Text = selectedTab.grid.generation.ToString() + ". Generation";

            //updates the maximum of trackBarGen to the amount of generations
            this.trackBarGen.Maximum = selectedTab.grid.allGens.Count;
        }
예제 #23
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.Columns.Count == 1)
     {
         Columns[0].Width = this.Width - 4;
     }
     base.OnInvalidated(e);
 }
예제 #24
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.IsHandleCreated)
     {
         RedrawBuffer();
     }
     base.OnInvalidated(e);
 }
예제 #25
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     if (base.Parent != null)
     {
         base.Parent.Invalidate(base.ClientRectangle, false);
     }
 }
예제 #26
0
 // Resets the item tags.
 private void listView1_Invalidated(object sender, InvalidateEventArgs e)
 {
     //foreach (ListViewItem item in _listView1.Items)
     {
         // if (item == null) return;
         // item.Tag = null;
     }
 }
예제 #27
0
 private void Impact_Invalidated(object sender, InvalidateEventArgs e)
 {
     ThreadHelper.JoinableTaskFactory.Run(
         async() =>
     {
         await this.SwitchToMainThreadAsync();
         UpdateAuthorInfo(Impact.GetSelectedAuthor());
     });
 }
예제 #28
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            if (_WatermarkContainer != null)
            {
                _WatermarkContainer.Invalidate();
            }
        }
예제 #29
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (mGLVisible)
     {
         UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eReDraw2D, "");
         return;
     }
     base.OnInvalidated(e);
 }
예제 #30
0
파일: ChildForm.cs 프로젝트: HDBread/GM
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            Size bitmapSize = this.doc.CurrentBMSize;

            // set correct scrollbars
            this.AutoScrollMinSize = new Size((int)(bitmapSize.Width * this.scaleFactor),
                                              (int)(bitmapSize.Height * this.scaleFactor));
            base.OnInvalidated(e);
        }
예제 #31
0
 /// <summary>
 /// Occurs when selected form was invalidated
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event argument</param>
 private void OnFormInvalidated(object sender, InvalidateEventArgs e)
 {
     Invalidate();
 }
예제 #32
0
 /// <summary>
 /// Invalidate the renderer
 /// </summary>
 /// <param name="bounds">bounds to invalidate</param>
 public virtual void Invalidate(Rectangle bounds)
 {
    EventHandler<InvalidateEventArgs> handler = Invalidated;
    if (handler != null)
    {
       InvalidateEventArgs args = new InvalidateEventArgs(bounds);
       handler(this, args);
    }
 }
예제 #33
0
 /// <summary>
 /// Occurs when renderer is invalidated
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event arguments</param>
 private void OnRendererInvalidated(object sender, InvalidateEventArgs e)
 {
    if (e.Bounds.IsEmpty)
    {
       Invalidate();
    }
    else
    {
       Invalidate(e.Bounds);
    }
 }
 /// <summary>
 /// Occurs when the select next renderer is invalidated
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event argument</param>
 private void OnSelectNextRendererInvalidated(object sender, InvalidateEventArgs e)
 {
     _selectNextPreview.Invalidate();
 }
예제 #35
0
파일: events.cs 프로젝트: hitswa/winforms
		protected override void OnInvalidated(InvalidateEventArgs e) {
			calls.Add(String.Format("OnInvalidated"));
			base.OnInvalidated (e);
		}