int Sizez;// the overall size of the Viewbox for precent calcs /*********************************** * Author: Angelo M Sanches * inish the form *************************************/ public PatternModel(int nSize) { InitializeComponent(); Fill = FillTypes.Value; Colours = ColourTypes.red; Sizez = nSize; }
protected override void FillSystemColumnInfo(ArrayList array) { MetaClass mc = MetaClass.Load(InnerMetaClassName); FillTypes fillTypes = FillTypes.CopyValue | FillTypes.Custom | FillTypes.Default; array.Add(new ColumnInfo(mc.SystemMetaFields["Login"], fillTypes)); array.Add(new ColumnInfo(mc.SystemMetaFields["FirstName"], fillTypes)); array.Add(new ColumnInfo(mc.SystemMetaFields["LastName"], fillTypes)); array.Add(new ColumnInfo(mc.SystemMetaFields["Password"], fillTypes)); array.Add(new ColumnInfo(mc.SystemMetaFields["Email"], fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Phone", "Phone", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Fax", "Fax", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Mobile", "Mobile", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Company", "Company", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "JobTitle", "JobTitle", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Department", "Department", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); array.Add(new ColumnInfo(MetaField.CreateVirtual(mc.Namespace, "Location", "Location", "", MetaDataType.ShortString, 255, true, false, false, false), fillTypes)); }
private FillStyle ReadFillStyle(SWFDataTypeReader shapeReader, Tag format) { FillStyle style = new FillStyle(); style.Type = (FillType)shapeReader.ReadUI8(); if (style.Type == FillType.Solid) { if (format == Tag.DefineShape3 || format == Tag.DefineShape4) /* Assuming shape4 goes here. Spec is ambiguous. */ { style.Colour = shapeReader.ReadRGBA(); } else if (format == Tag.DefineShape || format == Tag.DefineShape2) { style.Colour = shapeReader.ReadRGB(); } else { throw new SWFModellerException(SWFModellerError.SWFParsing, "Bad tag format for fill style"); } } if (style.Type == FillType.LinearGradient || style.Type == FillType.RadialGradient || style.Type == FillType.FocalGradient) { style.FillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); if (style.Type == FillType.LinearGradient || style.Type == FillType.RadialGradient) { style.Gradient = this.ReadGradient(shapeReader, format); } else /* FocalGradient */ { style.Gradient = this.ReadFocalGradient(shapeReader); } } if (FillTypes.IsBitmap(style.Type)) { int cid = shapeReader.ReadUI16(); /* Some fills have this magic number in them which seems to deliberately not * reference a bitmap. The spec is silent on the matter. Oh flash, you * stammering ape. */ if (cid != 0x0000FFFF) { style.Bitmap = this.ImageFinder.FindImage(cid); } style.FillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); } return(style); }
public ColumnInfo(MetaField field, FillTypes fillType, bool isSystemDictionary) { if (field == null) throw new ArgumentNullException("field"); _field = field; _fillType = fillType; _isSystemDictionary = isSystemDictionary & field.IsSystem; }
public Gradient(FillTypes fillTypes) : base(FillTypes.LinearGradient) { colors = new List <Color> { Wind.Graphics.Colors.Black, Wind.Graphics.Colors.White }; stops = new List <double> { 0, 1 }; }
public sym_circle(int unit, float penSize, FillTypes fill, PointF center, float radius) { this.Unit = unit; this.PenSize = penSize; this.Fill = fill; this.Position = center; this.Radius = radius; }
/*********************************** * Author: Angelo M Sanches * switchs the ui for overall percent/Value and sets the fill return state *************************************/ private void RaBu_Percent_CheckedChanged(object sender, EventArgs e) { if (RaBu_Percent.Checked) { TrBa_Percent.Enabled = true; TrBa_Value.Enabled = false; Fill = FillTypes.Percent; } }
public sym_polygon(int unit, float penSize, FillTypes fill, List <PointF> vertex) { this.Unit = unit; this.PenSize = penSize; this.Fill = fill; this.Vertex = vertex; this.NumVertex = vertex.Count; }
public RuleItem(string srcColumnName, Type srcColumnType, string destColumnName, MetaDataType destColumnType, bool destColumnSystem, FillTypes fillType, string customValue) { _srcColumnName = srcColumnName; _srcColumnType = srcColumnType; _destColumnName = destColumnName; _destColumnType = destColumnType; _destColumnSystem = destColumnSystem; _fillType = fillType; _customValue = customValue; }
public Gradient(List <Color> colors, FillTypes type) : base(type) { this.colors = colors; int count = colors.Count; for (int i = 0; i < count; i++) { stops.Add(i / count); } }
public sym_rectangle(int unit, float penSize, FillTypes fill, PointF p1, PointF p2) { Unit = unit; this.PenSize = penSize; this.Fill = fill; this.P1 = p1; this.P2 = p2; }
public ColumnInfo(MetaField field, FillTypes fillType, bool isSystemDictionary) { if (field == null) { throw new ArgumentNullException("field"); } _field = field; _fillType = fillType; _isSystemDictionary = isSystemDictionary & field.IsSystem; }
public static string FillTypeToString(FillTypes fill) { switch (fill) { case FillTypes.None: return("N"); case FillTypes.PenColor: return("F"); case FillTypes.BackgroundColor: return("f"); } return("N"); }
public RuleItem(string srcColumnName, Type srcColumnType, MetaField destColumn, FillTypes fillType, string customValue) { if (destColumn == null) throw new ArgumentNullException("destColumn"); _srcColumnName = srcColumnName; _srcColumnType = srcColumnType; _destColumnName = destColumn.Name; _destColumnType = destColumn.DataType; _destColumnSystem = destColumn.IsSystem; _fillType = fillType; _customValue = customValue; }
private MorphFillStyle ReadMorphFillStyle(SWFDataTypeReader shapeReader) { MorphFillStyle style = new MorphFillStyle(); style.Type = (FillType)shapeReader.ReadUI8(); if (style.Type == FillType.Solid) { style.StartColour = shapeReader.ReadRGBA(); style.EndColour = shapeReader.ReadRGBA(); } if (style.Type == FillType.LinearGradient || style.Type == FillType.RadialGradient) { style.StartFillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); style.EndFillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); if (style.Type == FillType.LinearGradient || style.Type == FillType.RadialGradient) { style.Gradient = this.ReadMorphGradient(shapeReader); } } if (FillTypes.IsBitmap(style.Type)) { int cid = shapeReader.ReadUI16(); /* Some fills have this magic number in them which seems to deliberately not * reference a bitmap. The spec is silent on the matter. Oh flash, you * bumbling simian. */ if (cid != 0x0000FFFF) { style.Bitmap = this.ImageFinder.FindImage(cid); } style.StartFillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); style.EndFillMatrix = shapeReader.ReadMatrix(); shapeReader.Align8(); } return(style); }
public Gradient(List <Color> colors, List <double> stops, FillTypes type) : base(type) { this.colors = colors; this.stops = stops; int countA = colors.Count; int countB = stops.Count; double start = stops[stops.Count - 1]; double step = (1 - start) / (countA - countB); for (int i = countB; i < countA; i++) { stops.Add(start + i * step); } }
public RuleItem(string srcColumnName, Type srcColumnType, MetaField destColumn, FillTypes fillType, string customValue) { if (destColumn == null) { throw new ArgumentNullException("destColumn"); } _srcColumnName = srcColumnName; _srcColumnType = srcColumnType; _destColumnName = destColumn.Name; _destColumnType = destColumn.DataType; _destColumnSystem = destColumn.IsSystem; _fillType = fillType; _customValue = customValue; }
protected virtual int AddVertex(List <ToolpathPreviewVertex> vertices, int layerIndex, Vector3d point, FillTypeFlags fillType, Vector2d dimensions, double feedrate, Vector3d miterNormal, Vector2d crossSectionVertex, double secant, float brightness, int pointCount) { Vector3d offset = miterNormal * (dimensions.x * crossSectionVertex.x * secant) + new Vector3d(0, 0, dimensions.y * crossSectionVertex.y); Vector3d vertex = point + offset; Vector3f color = FillTypes[(int)FillTypeFlags.Unknown].Color; if (FillTypes.TryGetValue((int)fillType, out var fillInfo)) { color = fillInfo.Color; } vertices.Add(VertexFactory(layerIndex, fillType, dimensions, feedrate, brightness, pointCount, vertex, color)); return(vertices.Count - 1); }
public LinearMeterBase() { this.m_FillType = FillTypes.Fill; this.m_FillColor = Color.FromArgb(128, 16, 16); this.m_FillColorInRange = Color.FromArgb(16, 128, 16); this.m_FillAreaBackcolor = Color.LightGray; this.m_BorderColor = Color.DimGray; this.m_BorderWidth = 8; this.m_TargetValue = 50.0; this.m_ScaleTargetValue = true; this.m_TolerancePlus = 10.0; this.m_ToleranceMinus = 10.0; this.m_MajorDivisions = 2; this.m_MinorDivisions = 5; this.m_ShowValidRangeMarker = true; this.m_ShowValue = true; base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); }
public static Rule XmlDeserialize(string fileName) { Rule rule = new Rule(); XmlDocument doc = new XmlDocument(); doc.PreserveWhitespace = true; doc.Load(fileName); XmlNode ruleNode = doc.SelectSingleNode("Rule"); rule._id = Int32.Parse(ruleNode.SelectSingleNode("Id").InnerText, CultureInfo.InvariantCulture); rule._innerClassName = ruleNode.SelectSingleNode("InnerClassName").InnerText; for (int i = 0; i < ruleNode.ChildNodes.Count; i++) { if (ruleNode.ChildNodes[i].Attributes != null && ruleNode.ChildNodes[i].Attributes["auto"] != null) { rule._attributes.Add(ruleNode.ChildNodes[i].Name, ruleNode.ChildNodes[i].InnerText); } } XmlNodeList itemNodes = ruleNode.SelectNodes("RuleItem"); foreach (XmlNode itemNode in itemNodes) { string sourColName = itemNode.SelectSingleNode("SourColumnName").InnerText; Type sourColType = Type.GetType(itemNode.SelectSingleNode("SourColumnType").InnerText); string destColName = itemNode.SelectSingleNode("DestColumnName").InnerText; MetaDataType destColType = (MetaDataType)Enum.Parse(typeof(MetaDataType), itemNode.SelectSingleNode("DestColumnType").InnerText); bool destColSystem = Boolean.Parse(itemNode.SelectSingleNode("DestColumnSystem").InnerText); FillTypes fillType = (FillTypes)Enum.Parse(typeof(FillTypes), itemNode.SelectSingleNode("FillType").InnerText); string customValue = itemNode.SelectSingleNode("CustomValue").InnerText; rule.Add(new RuleItem(sourColName, sourColType, destColName, destColType, destColSystem, fillType, customValue)); } return(rule); }
private bool EntityDependsOnActor() { return(FillTypes.Contains(EntityType.Actor) || FillTypes.Contains(EntityType.MovieActor)); }
private bool EntityDependsOnGenre() { return(FillTypes.Contains(EntityType.Genre) || FillTypes.Contains(EntityType.Movie) || FillTypes.Contains(EntityType.MovieActor) || FillTypes.Contains(EntityType.Schedule) || FillTypes.Contains(EntityType.Reservation) || FillTypes.Contains(EntityType.SeatReservation)); }
private bool EntityDependsOnUser() { return(FillTypes.Contains(EntityType.User) || FillTypes.Contains(EntityType.Reservation) || FillTypes.Contains(EntityType.SeatReservation)); }
public Fill(FillTypes filltype, double d) { this.FillType = filltype; this.StitchWidth = d; }
private bool EntityDependsOnRole() { return(FillTypes.Contains(EntityType.Role) || FillTypes.Contains(EntityType.City) || FillTypes.Contains(EntityType.Address) || FillTypes.Contains(EntityType.User) || FillTypes.Contains(EntityType.Reservation) || FillTypes.Contains(EntityType.SeatReservation)); }
public RuleItem(string srcColumnName, Type srcColumnType, string destColumnName, MetaDataType destColumnType, bool destColumnSystem, FillTypes fillType) : this(srcColumnName, srcColumnType, destColumnName, destColumnType, destColumnSystem, fillType, "") { }
protected Fill(FillTypes type) : base() { this.type = type; }
public RuleItem(string srcColumnName, Type srcColumnType, MetaField destColumn, FillTypes fillType) : this(srcColumnName, srcColumnType, destColumn, fillType, "") { }
public RuleItem(MetaField destColumn, FillTypes fillType) : this("", typeof(string), destColumn, fillType, "") { }
public RuleItem(string destColumnName, MetaDataType destColumnType, bool destColumnSystem, FillTypes fillType, string customValue) : this("", typeof(string), destColumnName, destColumnType, destColumnSystem, fillType, customValue) { }
void FillSquare(Square square, Number number, FillTypes type) { //Validate first if (square == null) throw new Exception("Not a valid square id"); if (number == null) throw new Exception("Not a valid number"); //Set the number and type square.Fill(number, type); //Solve? if (AutoSolve) Solve(); }
void set_fill_type_int(int value) { FillType = (FillTypes)value; }
public Fill(Fill fill) : base() { this.type = fill.type; this.background = new Color(fill.background); }
public ColumnInfo(MetaField field, FillTypes fillType) { _field = field; _fillType = fillType; }
public ColumnInfo() { _fillType = FillTypes.None; }
internal void Fill(Number number, FillTypes type) { //It can be null only for the first time if (Number != null) { //Old number; raise an event to let the sudoku to handle the availability of the other squares if (!this.Number.IsZero) this.NumberChanging(this); //Deassign the square from the old number Number.DeassignSquare(this); } //Set the type FillType = type; //Assign the new number to this square & let the number know it (there is a cross reference) Number = number; Number.AssignSquare(this); //Raise an event to let the sudoku to handle the availability of the other squares (again) if (NumberChanged != null) this.NumberChanged(this); }