/// <summary> /// Synchronizes the properties. /// </summary> /// <param name="series">The series.</param> protected override void SynchronizeProperties(OxyPlot.Series.Series series) { base.SynchronizeProperties(series); var s = (OxyPlot.Series.LineSeries)series; s.Color = Color.ToOxyColor(); s.StrokeThickness = StrokeThickness; s.LineStyle = LineStyle; s.MarkerResolution = MarkerResolution; s.MarkerSize = MarkerSize; s.MarkerStroke = MarkerStroke.ToOxyColor(); s.MarkerType = MarkerType; s.MarkerStrokeThickness = MarkerStrokeThickness; s.Dashes = Dashes; s.LineJoin = LineJoin; s.MarkerFill = MarkerFill.ToOxyColor(); s.MarkerOutline = (MarkerOutline ?? Enumerable.Empty <Point>()).Select(point => point.ToScreenPoint()).ToArray(); s.MinimumSegmentLength = MinimumSegmentLength; s.LabelFormatString = LabelFormatString; s.LabelMargin = LabelMargin; s.LineLegendPosition = LineLegendPosition; s.BrokenLineColor = BrokenLineColor.ToOxyColor(); s.BrokenLineStyle = BrokenLineStyle; s.BrokenLineThickness = BrokenLineThickness; s.Decimator = Decimator; s.InterpolationAlgorithm = this.InterpolationAlgorithm; }
/// <summary> /// Writes the content of the current row into a binary stream. /// May be used to compare instances of data rows. /// </summary> /// <param name="w">The binary stream to write to.</param> public override void Dump(BinaryWriter w) { base.Dump(w); w.Write(Longitude); w.Write(Latitude); w.Write(Caption ?? string.Empty); // font is not variable between rows now, so we skip it // write font... todo if font becomes variable // ditto ForeColor w.Write(MarkerSize); w.Write(MarkerFill.ToArgb()); w.Write(MarkerStroke.ToArgb()); w.Write((int)MarkerShape); }
private void CmbStrokeTypeSelectedIndexChanged(object sender, EventArgs e) { if (_ignoreChanges) { return; } var oldStroke = ccStrokes.SelectedStroke; var oldStrokeStyle = oldStroke.StrokeStyle; int index = ccStrokes.Strokes.IndexOf(ccStrokes.SelectedStroke); if (index == -1) { return; } StrokeStyle strokeStyle = Global.ParseEnum <StrokeStyle>(cmbStrokeType.SelectedIndex); IStroke newStroke = null; switch (strokeStyle) { case StrokeStyle.Cartographic: newStroke = new CartographicStroke(); break; case StrokeStyle.Simple: newStroke = new SimpleStroke(); break; case StrokeStyle.Marker: newStroke = new MarkerStroke(); break; default: cmbStrokeType.SelectedIndex = Global.GetEnumIndex(oldStrokeStyle); MessageBox.Show("暂未实现"); return; } StrokeStyle newStrokeStyle = newStroke.StrokeStyle; newStroke.CopyProperties(oldStroke); ccStrokes.Strokes[index] = newStroke; ccStrokes.RefreshList(); ccStrokes.SelectedStroke = newStroke; }
/// <summary> /// Synchronizes the properties. /// </summary> /// <param name="series">The series.</param> protected override void SynchronizeProperties(OxyPlot.Series.Series series) { base.SynchronizeProperties(series); var s = (OxyPlot.Series.ScatterSeries <T>)series; s.MarkerFill = MarkerFill.ToOxyColor(); s.MarkerStroke = MarkerStroke.ToOxyColor(); s.MarkerStrokeThickness = MarkerStrokeThickness; s.MarkerType = MarkerType; s.MarkerSize = MarkerSize; s.DataFieldX = DataFieldX; s.DataFieldY = DataFieldY; s.DataFieldSize = DataFieldSize; s.DataFieldValue = DataFieldValue; s.DataFieldTag = DataFieldTag; s.ItemsSource = Items; s.BinSize = BinSize; s.Mapping = Mapping; s.MarkerOutline = MarkerOutline; s.ColorAxisKey = ColorAxisKey; }