public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { drawingGraphics.Color(GetColor()); drawingGraphics.FillRectangle(new Rectangle(0, 0, Size.Width, Size.Height)); base.Draw(drawingGraphics); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if (this.DrawingAction != null) { this.DrawingAction(drawingGraphics); } }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { drawingGraphics.Style(this.TitleStyle) .DrawMultiLineText(this.title, this.Size.Width, this.textHeight); if (this.Content != null) { this.Content.Draw(drawingGraphics.CreateChild(this.Content.Location)); } }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if (Background != null) { int backgroundSize = 0; while (backgroundSize < this.Size.Height) { drawingGraphics.DrawImage(Background, 0, backgroundSize); backgroundSize += Background.Size.Height; } } base.Draw(drawingGraphics); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { //drawingGraphics.DrawText("*"); return; if (FleuxApplication.ScaleToLogic(1) == 1) // no need scale _image.PaintIcon(drawingGraphics.Graphics, drawingGraphics.CalculateX(0), drawingGraphics.CalculateY(0)); else // scale original image according to screen factor _image.PaintBackground(drawingGraphics.Graphics, new Rectangle( drawingGraphics.CalculateX(0), drawingGraphics.CalculateY(0), Size.Width.ToPixels(), Size.Height.ToPixels())); /* Color transparentKeyColor = Color.Black; // DEFAULT BLACK, IF IT IS NOT POSSIBLE TO READ FROM IMAGE if (_image != null) transparentKeyColor = _image.GetPixel(0, 0); drawingGraphics.DrawImage(_image, 0, 0, Size.Width, Size.Height, transparentKeyColor); */ }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { drawingGraphics.Color(System.Drawing.Color.Blue).FillRectangle(0,0,this.Size.Width, this.Size.Height); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if(this._visible) base.Draw(drawingGraphics); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { base.Draw(drawingGraphics); try { for (int i = 0; i < _status.Count; i++) { if (_status[i] != "") { drawingGraphics.DrawImage(ResourceManager.Instance.GetBitmapFromEmbeddedResource(_status[i], this.GetType().Assembly), 48 * i, (this.Size.Height - _imageSize.Height) / 2, _imageSize.Width, _imageSize.Height, _transparentKeyColor); if (_status[i] == "battery-state.png") // Рисуем батарею { var x1 = 48 * i + 3; var x2 = 48 * i + 22; var y1 = (this.Size.Height - _imageSize.Height) / 2 + 10 + 1; var y2 = (this.Size.Height - _imageSize.Height) / 2 + 18 ; var l = (int)(_batteryPower / 5); if (_typeColorIcon == "white") { drawingGraphics.Color(Color.White); } else { drawingGraphics.Color(Color.Black); } if (_batteryColor) { if (_batteryPower <= 20) { drawingGraphics.Color(Color.Red); } if ((_batteryPower > 20) && (_batteryPower <= 40)) { drawingGraphics.Color(Color.Orange); } if ((_batteryPower > 40) && (_batteryPower <= 60)) { drawingGraphics.Color(Color.Yellow); } if ((_batteryPower > 60) && (_batteryPower <= 80)) { drawingGraphics.Color(Color.Green); } } drawingGraphics.FillRectangle(x1, y1, x1 + l, y2); } } } } catch (Exception) { } drawingGraphics.Style(new TextStyle(_fontName, _fontSize.ToLogic(), _fontColor)); var _text = DateTime.Now.ToString(_timeString); var _height = drawingGraphics.CalculateMultilineTextHeight("0", _clock_size); drawingGraphics.MoveTo(this.Size.Width - _clock_size, (this.Size.Height - _height) / 2).DrawCenterText(_text, _clock_size); }
protected virtual void HandleSizeChanged(object sender, Fleux.UIElements.Events.SizeChangedEventArgs e) { Target.Size = e.New; }
/// <summary> /// Draw only background image. /// If no background image is specified, background color is specified for owner control /// </summary> /// <param name="drawingGraphics"></param> public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if (_image != null) drawingGraphics.Graphics.DrawImage(_image, drawingGraphics.CalculateX(0), drawingGraphics.CalculateY(0)); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if (Image == null) { // draw crossed rectangle for empty image drawingGraphics.PenWidth(MetroTheme.PhoneBorderThickness.BorderThickness.Pixels); drawingGraphics.Color(MetroTheme.PhoneTextBoxBorderBrush); drawingGraphics.DrawRectangle(0, 0, Size.Width, Size.Height); drawingGraphics.DrawLine(0, 0, Size.Width, Size.Height); drawingGraphics.DrawLine(0, Size.Height, Size.Width, 0); } else base.Draw(drawingGraphics); }
protected void OnNavigateRequest(Fleux.Core.FleuxPage destinationPage) { EventHandler<NavigateRequestEventArgs> localHandler = NavigateRequest; if (localHandler != null) localHandler(this, new NavigateRequestEventArgs(destinationPage)); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { //drawingGraphics.Color(Color.Black).FillRectangle(new Rectangle(0, 0, this.Size.Width, this.Size.Height)); base.Draw(drawingGraphics); }
public override void Draw(Fleux.Core.GraphicsHelpers.IDrawingGraphics drawingGraphics) { if ((_buffer == null) || (_needRepaint)) { var newbuffer = new DoubleBuffer(new Size(Size.Width, (_needAnimateTile) ? Size.Height + NameRectHeight() : Size.Height)); PaintBuffer(newbuffer.Graphics, new Rectangle(0, 0, Size.Width, Size.Height)); _buffer = newbuffer; _offsetY = 0; _needRepaint = false; } drawingGraphics.DrawImage(_buffer.Image, new Rectangle(0, 0, Size.Width, Size.Height), new Rectangle(0, _offsetY, Size.Width, Size.Height)); }