Пример #1
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            if (c_Overview != null)
                c_Overview.Invalidate();
        }
Пример #2
0
 void Impact_Invalidated(object sender, InvalidateEventArgs e)
 {
     syncContext.Send(new SendOrPostCallback(delegate(object o)
     {
         UpdateAuthorInfo(Impact.GetSelectedAuthor());
     }), this);
 }
Пример #3
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            if (_Cell != null && _SuspendUpdate == false)
                _Cell.InvalidateRender();
        }
Пример #4
0
 private void Child_Invalidated(object sender, WinForms.InvalidateEventArgs e)
 {
     Dispatcher.Invoke(delegate
     {
         UpdateView();
     });
 }
Пример #5
0
 void Form1_Invalidated(object sender, InvalidateEventArgs e)
 {
     foreach (Control item in tableLayoutPanel1.Controls)
     {
         if (item is CountdownStage)
             ((CountdownStage)item).refresh();
     }
 }
Пример #6
0
 void InvalidateWalls(object sender, InvalidateEventArgs e)
 {
     var tab = sender as TabControl;
     if (tab == null) return;
     var page = tab.SelectedTab;
     var pictureBox = page.Controls["wallset"] as PictureBox;
     pictureBox.Width = (int)(ContainerWidth * Zoom);
     pictureBox.Height = (int)(maxWallSetHeight * Zoom);
 }
Пример #7
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            // Set the font and colour
            Font = MaterialTypography.GetFont(Style);
            if (ForeColor == SystemColors.ControlText)
                ForeColor = MaterialTheme.CurrentTheme.Text;

            base.OnInvalidated(e);
        }
Пример #8
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     //Check if there is a placeholder
     if (placeholderContainer != null)
     {
         //if there is a placeholder it should also be invalidated();
         placeholderContainer.Invalidate();
     }
 }
Пример #9
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     //Check if there is a watermark
     if (waterMarkContainer != null)
     {
         //if there is a watermark it should also be invalidated();
         waterMarkContainer.Invalidate();
     }
 }
Пример #10
0
 private void method_7(object sender, InvalidateEventArgs e)
 {
     if (base.IsQWindowForm && !base.DesignMode)
     {
         Control   control     = sender as Control;
         Rectangle invalidRect = e.InvalidRect;
         invalidRect.Offset(control.Location);
         this.Invalidate(invalidRect);
     }
 }
 private void TransparentCommandBarControl_Invalidated(object sender, InvalidateEventArgs e)
 {
     Point absLoc = _parent.PointToScreen(e.InvalidRect.Location);
     Point relLoc = PointToClient(absLoc);
     Rectangle relRect = new Rectangle(relLoc, e.InvalidRect.Size);
     if (ClientRectangle.IntersectsWith(relRect))
     {
         relRect.Intersect(ClientRectangle);
         Invalidate(relRect);
     }
 }
Пример #12
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            if (!this.IsHandleCreated || this.IsDisposed || _DisplayItem == null || _Painting) return;
            _Painting = true;
            try
            {
                if (_DisplayItem.NeedRecalcSize)
                    _DisplayItem.RecalcSize();
                Bitmap oldContent = this.ContentImage;
                Bitmap b = null;
                bool clearBitmap = false;
                if (oldContent != null && oldContent.Width == _DisplayItem.WidthInternal && oldContent.Height == _DisplayItem.HeightInternal)
                {
                    b = oldContent;
                    clearBitmap = true;
                }
                else
                {
                    if (oldContent != null) oldContent.Dispose();
                    b = new Bitmap(_DisplayItem.WidthInternal, _DisplayItem.HeightInternal, PixelFormat.Format32bppArgb);
                }

                using (Graphics g = Graphics.FromImage(b))
                {
                    if (clearBitmap) g.Clear(Color.Transparent);
                    g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                    g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
                    ItemPaintArgs p = GetItemPaintArgs(g);
                    _DisplayItem.Paint(p);
                }
                this.ContentImage = b;
                //if (oldContent != null) oldContent.Dispose();
            }
            finally
            {
                _Painting = false;
            }
            base.OnInvalidated(e);
        }
        private void PiecesGraph_Invalidated(object sender, InvalidateEventArgs e)
        {
            if (valid) return;
            using (Graphics g = Graphics.FromImage(bmp))
            {
                g.Clear(BackColor);
                int c_bit = 0, num_bits, bits_got;
                float bitsperrow = (bmp.Width > 0 ? len / (float)bmp.Width : 0), chunk_done;

                if (bitsperrow > 0)
                {
                    for (int n = 0; n < bmp.Width; n++)
                    {
                        num_bits = (int)(bitsperrow * (n + 1)) - c_bit;
                        bits_got = 0;
                        for (int i = 0; i < num_bits; i++)
                        {
                            if (BitGet(bits, len, c_bit + i))
                                bits_got++;
                        }
                        if (num_bits > 0)
                            chunk_done = bits_got / (float)num_bits;
                        else if (BitGet(bits, len, c_bit))
                            chunk_done = 1;
                        else
                            chunk_done = 0;

                        Color fill = Color.FromArgb((int)(BackColor.R * (1 - chunk_done) + (ForeColor.R) * chunk_done),
                            (int)(BackColor.G * (1 - chunk_done) + (ForeColor.G) * chunk_done),
                            (int)(BackColor.B * (1 - chunk_done) + (ForeColor.B) * chunk_done));

                        g.DrawLine(new Pen(fill), n, 0, n, bmp.Height);

                        c_bit += num_bits;
                    }
                }
            }
            valid = true;
        }
Пример #14
0
 private void OnGridInvalidated(object sender, InvalidateEventArgs e)
 {
     if (_lastCaptionBackColor != _grid.CaptionBackColor ||
         _lastCaptionForeColor != _grid.CaptionForeColor)
     {
         if (CaptionColorsChanged != null)
             CaptionColorsChanged(this, EventArgs.Empty);
     }
 }
Пример #15
0
 private void control_Invalidated(object sender, InvalidateEventArgs e)
 {
     EndEdit();
 }
Пример #16
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     throw null;
 }
 /// <summary>
 /// Invalidete menuitem and overflowpanel button
 /// </summary>
 /// <param name="e"></param>
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     overFlowPanelButton.Invalidate();
     contextMenuItem.Invalidate();
     base.OnInvalidated(e);
 }
Пример #18
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     updateBindingSourceWork();
 }
Пример #19
0
 private void drawarea_Invalidated(object sender, InvalidateEventArgs e)
 {
     //msg.Text = e.InvalidRect + "";
       //mydraw();
 }
Пример #20
0
 /// <summary>
 /// Performs custom actions and raises the <see cref="E:System.Windows.Forms.Control.Invalidated"></see> event</summary>
 /// <param name="e">An <see cref="T:System.EventArgs"></see> that contains the event data</param>
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     m_columnHeaders.Invalidate();
     base.OnInvalidated(e);
 }
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     SetPanelArrowPosition();
     panelArrowBtn.Invalidate();
     base.OnInvalidated(e);
 }
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
 }
Пример #23
0
 void Impact_Invalidated(object sender, InvalidateEventArgs e)
 {
     syncContext.Send(o => UpdateAuthorInfo(Impact.GetSelectedAuthor()), this);
 }
Пример #24
0
 private void ReportView_Invalidated(object sender, System.Windows.Forms.InvalidateEventArgs e)
 {
     RefreshResults();
 }
Пример #25
0
 private void TitleBar_Invalidated(object sender, System.Windows.Forms.InvalidateEventArgs e)
 {
     CloseWindowButton.Invalidate();
     MaximizeWindowButton.Invalidate();
     MinimizeWindowButton.Invalidate();
 }
Пример #26
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     if (this.Visible && this.ThisReallyVisible())
         base.OnInvalidated(e);
 }
Пример #27
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
 }
Пример #28
0
        private void Tb_fkyj_Invalidated(object sender, System.Windows.Forms.InvalidateEventArgs e)
        {
            DuiTextBox dtb = sender as DuiTextBox;

            dl_yjlen.Text = (1000 - (dtb.Text.Length)).ToString();
        }
Пример #29
0
        /// <summary>
        /// Invalidates a portion of the document. The given region is then tagged
        /// for rerendering during the next call to Update.
        /// </summary>
        /// <param name="roi">The region of interest to be invalidated.</param>
        public void Invalidate(PdnRegion roi)
        {
            Dirty = true;

            foreach (Rectangle rect in roi.GetRegionScansReadOnlyInt())
            {
                rect.Intersect(this.Bounds);
                updateRegion.Add(rect);

                if (!rect.IsEmpty)
                {
                    InvalidateEventArgs iea = new InvalidateEventArgs(rect);
                    OnInvalidated(iea);
                }
            }
        }
Пример #30
0
		private void ListView_Invalidated (object sender, InvalidateEventArgs e)
		{
			// When the ListView is invalidated, we need to invalidate
			// the child controls.
			header_control.Invalidate ();
			item_control.Invalidate ();
		}
Пример #31
0
 /// <summary>
 /// Handles the Invalidated event that is raised from any contained Layer.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void LayerInvalidatedHandler(object sender, InvalidateEventArgs e)
 {
     Invalidate(e.InvalidRect);
 }
Пример #32
0
 /// <summary>
 /// Raises the <see cref="E:System.Windows.Forms.Control.Invalidated" /> event.
 /// </summary>
 /// <param name="e">An <see cref="T:System.Windows.Forms.InvalidateEventArgs" /> that contains the event data.</param>
 protected override void OnInvalidated(System.Windows.Forms.InvalidateEventArgs e)
 {
     base.OnInvalidated(e);
     ParentForm.Text = Text;
 }
Пример #33
0
 /// <summary>
 /// Raises the Invalidated event.
 /// </summary>
 /// <param name="e"></param>
 private void OnInvalidated(InvalidateEventArgs e)
 {
     if (Invalidated != null)
     {
         Invalidated(this, e);
     }
 }
Пример #34
0
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("invalidated");
     base.OnInvalidated(e);
 }
 private void OnIsOffScreen(object sender, SWF.InvalidateEventArgs e)
 {
     RaiseAutomationPropertyChangedEvent();
 }
Пример #36
0
 // If the height of the contained control (property grid) changes
 // we need to adjust the height of the item control to match it
 void editControl_Invalidated(object sender, InvalidateEventArgs e)
 {
     Height = m_editControl.Height;
 }
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
     captionBand.Invalidate();
     base.OnInvalidated(e);
 }
Пример #38
0
 /// <summary>
 /// Invalidates the canvas.
 /// </summary>
 protected override void OnInvalidated(InvalidateEventArgs e)
 {
   base.OnInvalidated(e);
   this.canvas.Invalidate();
 }
Пример #39
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            InvalidateScrollbar();

            base.OnInvalidated(e);
        }
Пример #40
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            base.OnInvalidated(e);

            //Invalidate parent
            if(Parent != null)
                Parent.Invalidate(this.ClientRectangle, false);
        }
Пример #41
0
        protected override void OnInvalidated(InvalidateEventArgs e)
        {
            // Measure that width of the text
            using (var graphics = CreateGraphics())
                _labelSize = graphics.MeasureString(Label.ToUpper(), MaterialTypography.Button).ToSize();
            // Ensure that button respect the minimum size
            Width = Math.Max(_labelSize.Width + Padding.Horizontal, _minimumWidth);

            base.OnInvalidated(e);
        }