protected DrawText(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) { throw new ArgumentNullException("info"); } try { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); this.ShapeType = STATIC_OBJ_TYPE.ID_TEXT; TextValue = info.GetString("TextValue"); font = FontXmlConverter.ConvertToFont(info.GetString("font")); Orientation = (TextOrientation)info.GetInt32("Orientation"); TextBlinking = info.GetBoolean("TextBlinking"); textAlignment = (TextAlignment)info.GetInt32("textAlignment"); IsFix = info.GetBoolean("IsFix"); TextColor = (Color)info.GetValue("TextColor", TextColor.GetType()); _shapefill.FillColor = info.GetString("ShapeFill"); _shapeoutline.LineStyle = info.GetString("shapeoutline"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public ShapeFill(ShapeFill tocopy) { this.FillColor = tocopy.FillColor; //blinking = tocopy.Blinking; //fillcolor11 = tocopy.fillcolor11; //fillcolor21 = tocopy.fillcolor21; //fillcolor12 = tocopy.fillcolor12; //fillcolor22 = tocopy.fillcolor22; //filltype = tocopy.filltype; //fillgradienttype = tocopy.fillgradienttype; //hatchstyle = tocopy.hatchstyle; }
public DrawPolygon(PageList _parent) : base(_parent) { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); Resizeable = true; //pointArray = new ArrayList(); ShapeType = STATIC_OBJ_TYPE.ID_POLYGON; shapefill.FillColor = Common.LastFillColor; shapeoutline.LineStyle = Common.LastLineStyle; Propertylist.Add("BorderWidth,Border Width,DINT"); Propertylist.Add("BorderColor,Border Color,Color"); Propertylist.Add("BorderBlinking,Border Blinking,BOOL"); //LoadCursor(); Initialize(); }
public DrawRectangle(PageList _parent) : base(_parent) { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); Resizeable = true; SetRectangle(0, 0, 1, 1); ShapeType = STATIC_OBJ_TYPE.ID_RECT; shapefill.FillColor = Common.LastFillColor; shapeoutline.LineStyle = Common.LastLineStyle; Propertylist.Add("BorderWidth,Border Width,DINT"); Propertylist.Add("BorderColor,Border Color,Color"); Propertylist.Add("BorderBlinking,Border Blinking,BOOL"); Propertylist.Add("Color1,Fill Color 1,Color"); Propertylist.Add("Color2,Fill Color 2,Color"); Propertylist.Add("Blinking,Blinking,BOOL"); Propertylist.Add("Visible,Visible,BOOL"); }
//private void LoadCursor() //{ // try // { // handleCursor = new Cursor(Application.StartupPath + "\\Polygon.cur"); // //m_Cursor = new Cursor(GetType(), "Rectangle.cur"); // } // catch (NullReferenceException e) // { // MessageBox.Show(e.Message.ToString()); // } //} protected DrawPolygon(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) { throw new ArgumentNullException("info"); } try { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); this.ShapeType = STATIC_OBJ_TYPE.ID_POLYLINE; Points = info.GetString("Points"); _shapefill.FillColor = info.GetString("ShapeFill"); _shapeoutline.LineStyle = info.GetString("shapeoutline"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public DrawText(PageList _parent) : base(_parent) { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); Resizeable = true; //SetRectangle(0, 0, 1,1); _theText = ""; this.ShapeType = STATIC_OBJ_TYPE.ID_TEXT; shapefill.FillColor = Common.LastFillColor; shapeoutline.LineStyle = Common.LastLineStyle; Propertylist.Add("Text,Text,STRING"); Propertylist.Add("TextColor,Text Color,Color"); Propertylist.Add("TextBlinking,Text Blinking,BOOL"); Propertylist.Add("BorderWidth,Border Width,DINT"); Propertylist.Add("BorderColor,Border Color,Color"); Propertylist.Add("BorderBlinking,Border Blinking,BOOL"); Propertylist.Add("Color1,Fill Color,Color"); Propertylist.Add("Visible,Visible,BOOL"); Initialize(); }
protected DrawRectangle(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) { throw new ArgumentNullException("info"); } try { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); this.ShapeType = STATIC_OBJ_TYPE.ID_RECT; _roundnessx = info.GetInt32("RoundnessX"); _roundnessy = info.GetInt32("RoundnessY"); _shapefill.FillColor = info.GetString("ShapeFill"); _shapeoutline.LineStyle = info.GetString("shapeoutline"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public DrawRectangle(PageList _parent, int x, int y, int width, int height) : base(_parent) { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); Resizeable = true; Center = new Point(x + (width / 2), y + (height / 2)); _rectangle.X = x; _rectangle.Y = y; _rectangle.Width = width; _rectangle.Height = height; ShapeType = STATIC_OBJ_TYPE.ID_RECT; shapefill.FillColor = Common.LastFillColor; shapeoutline.LineStyle = Common.LastLineStyle; TipText = String.Format("_rectangle Center @ {0}, {1}", Center.X, Center.Y); Propertylist.Add("BorderWidth,Border Width,DINT"); Propertylist.Add("BorderColor,Border Color,Color"); Propertylist.Add("BorderBlinking,Border Blinking,BOOL"); Propertylist.Add("Color1,Fill Color 1,Color"); Propertylist.Add("Color2,Fill Color 2,Color"); Propertylist.Add("Blinking,Blinking,BOOL"); Propertylist.Add("Visible,Visible,BOOL"); }
public DrawText(PageList _parent, int x, int y, string textToDraw, Font textFont, Color textColor) : base(_parent) { _shapeoutline = new ShapeOutline(this); _shapefill = new ShapeFill(this); Resizeable = true; _rectangle.X = x; _rectangle.Y = y; _theText = textToDraw; _font = textFont; TextColor = textColor; this.ShapeType = STATIC_OBJ_TYPE.ID_TEXT; shapefill.FillColor = Common.LastFillColor; shapeoutline.LineStyle = Common.LastLineStyle; Propertylist.Add("Text,Text,STRING"); Propertylist.Add("TextColor,Text Color,Color"); Propertylist.Add("TextBlinking,Text Blinking,BOOL"); Propertylist.Add("BorderWidth,Border Width,DINT"); Propertylist.Add("BorderColor,Border Color,Color"); Propertylist.Add("BorderBlinking,Border Blinking,BOOL"); Propertylist.Add("Color1,Fill Color,Color"); Propertylist.Add("Visible,Visible,BOOL"); Initialize(); }
public void SelecactiveColor(ref Color bcolor, ref Color fColor1, ref Color fColor2, ShapeFill shapefill, ShapeOutline shapeoutline) { if (Common.Blinking && shapeoutline.BoarderBlinking) { bcolor = shapeoutline.BoarderColor2; } else { bcolor = shapeoutline.BoarderColor1; } switch (shapefill.FillType) { case FillTypePatern.Transparent: break; case FillTypePatern.Solid: //Brush b; if (Common.Blinking && shapefill.Blinking) { fColor1 = shapefill.FillColor12; } else { fColor1 = shapefill.FillColor11; } break; case FillTypePatern.Hatched: if (Common.Blinking && shapefill.Blinking) { fColor1 = Color.Transparent; } else { fColor1 = shapefill.FillColor11; } break; case FillTypePatern.Gradient: if (Common.Blinking && shapefill.Blinking) { fColor1 = shapefill.FillColor12; fColor2 = shapefill.FillColor22; } else { fColor1 = shapefill.FillColor11; fColor2 = shapefill.FillColor21; } break; } }