protected override void OnInvalidated(InvalidateEventArgs e) { if (!DrawNothing) { base.OnInvalidated(e); } }
protected override void OnInvalidated(InvalidateEventArgs e) { if (this.Visible && this.ThisReallyVisible()) { base.OnInvalidated(e); } }
/// <summary> /// Raises the Invalidated event. /// </summary> /// <param name="e"></param> private void OnInvalidated(InvalidateEventArgs e) { if (Invalidated != null) { Invalidated(this, e); } }
private void VerifyInvalidate(int index, int startY, int endY) { InvalidateEventArgs e = (InvalidateEventArgs)_rowInvalidates [index]; Assert.AreEqual(startY, e.StartY); Assert.AreEqual(endY, e.EndY); }
} //panelTextureCanvas_Paint() private void panelTextureCanvas_Invalidated(object sender, InvalidateEventArgs e) { //if( m_bitmapTextureCanvas != null ) //{ // panelTextureCanvas.BackgroundImage = m_bitmapTextureCanvas; //}//if }//panelTextureCanvas_Invalidated()
void Impact_Invalidated(object sender, InvalidateEventArgs e) { syncContext.Send(new SendOrPostCallback(delegate(object o) { UpdateAuthorInfo(Impact.GetSelectedAuthor()); }), this); }
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; }
protected virtual void OnInvalidated(InvalidateEventArgs e) { if (Invalidated != null) { Invalidated(this, e); } }
private void Renderers_Invalidated(object sender, InvalidateEventArgs e) { Rectangle rect = SurfaceToClient(e.InvalidRect); rect.Inflate(1, 1); Invalidate(rect); }
//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(); }
protected override void OnInvalidated(InvalidateEventArgs e) { base.OnInvalidated(e); //Invalidate parent this.Parent.Invalidate(this.ClientRectangle, false); }
protected override void OnInvalidated(InvalidateEventArgs e) { if (this.Visible) { base.OnInvalidated(e); } }
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); }
protected override void OnInvalidated(InvalidateEventArgs e) { if (this.BackgroundImage != null && this.AutoScrollMinSize != this.BackgroundImage.Size) { this.AutoScrollMinSize = this.BackgroundImage.Size; } base.OnInvalidated(e); }
protected override void OnInvalidated(InvalidateEventArgs e) { base.OnInvalidated(e); if (face != null) { face.Refresh(); } }
protected override void OnInvalidated(InvalidateEventArgs e) { if (mouseDown) { return; } base.OnInvalidated(e); }
//--- // 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(); } }
private void FormFieldControl_Invalidated(object sender, InvalidateEventArgs e) { if (_childControl != null) { _childControl.Refresh(); _childControl.Invalidate(); } }
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; }
protected override void OnInvalidated(InvalidateEventArgs e) { if (this.Columns.Count == 1) { Columns[0].Width = this.Width - 4; } base.OnInvalidated(e); }
protected override void OnInvalidated(InvalidateEventArgs e) { if (this.IsHandleCreated) { RedrawBuffer(); } base.OnInvalidated(e); }
protected override void OnInvalidated(InvalidateEventArgs e) { base.OnInvalidated(e); if (base.Parent != null) { base.Parent.Invalidate(base.ClientRectangle, false); } }
// 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; } }
private void Impact_Invalidated(object sender, InvalidateEventArgs e) { ThreadHelper.JoinableTaskFactory.Run( async() => { await this.SwitchToMainThreadAsync(); UpdateAuthorInfo(Impact.GetSelectedAuthor()); }); }
protected override void OnInvalidated(InvalidateEventArgs e) { base.OnInvalidated(e); if (_WatermarkContainer != null) { _WatermarkContainer.Invalidate(); } }
protected override void OnInvalidated(InvalidateEventArgs e) { if (mGLVisible) { UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eReDraw2D, ""); return; } base.OnInvalidated(e); }
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); }
/// <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(); }
/// <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); } }
/// <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(); }
protected override void OnInvalidated(InvalidateEventArgs e) { calls.Add(String.Format("OnInvalidated")); base.OnInvalidated (e); }