protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhColorGroupStyleAddedOrRemoved);

                _barShiftStrategy = new SelectableListNodeList(_doc.BarShiftStrategy);
            }
            if (_view != null)
            {
                _view.IndependentColor   = _doc.IndependentColor;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.Pen = _doc.Pen;
                _view.UseUniformCrossSectionThickness = _doc.UseUniformCrossSectionThickness;

                _view.BarShiftStrategy = _barShiftStrategy;

                _view.IsEnabledNumberOfBarsInOneDirection = _doc.BarShiftStrategy == BarShiftStrategy3D.ManualFirstXThenY || _doc.BarShiftStrategy == BarShiftStrategy3D.ManualFirstYThenX;
                _view.BarShiftMaxItemsInOneDirection      = _doc.BarShiftMaxItemsInOneDirection;

                _view.InnerGapX             = _doc.InnerGapX;
                _view.OuterGapX             = _doc.OuterGapX;
                _view.InnerGapY             = _doc.InnerGapY;
                _view.OuterGapY             = _doc.OuterGapY;
                _view.UsePhysicalBaseValueV = _doc.UsePhysicalBaseValue;
                _view.LogicalBaseValueV     = _doc.UsePhysicalBaseValue ? 0 : _doc.BaseValue;
                _view.StartAtPreviousItem   = _doc.StartAtPreviousItem;
                _view.GapV = _doc.PreviousItemGapV;
            }
        }
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhIndependentColorChanged);

                var symbolTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(IScatterSymbol));
                _symbolShapeChoices = new SelectableListNodeList();
                foreach (var ty in symbolTypes)
                {
                    _symbolShapeChoices.Add(new SelectableListNode(ty.Name, ty, ty == _doc.Shape.GetType()));
                }
            }
            if (_view != null)
            {
                // now we have to set all dialog elements to the right values
                _view.IndependentColor   = _doc.IndependentColor;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.SymbolMaterial     = _doc.Material;

                _view.SymbolShape = _doc.Shape;

                _view.IndependentSymbolSize    = _doc.IndependentSymbolSize;
                _view.SymbolSize               = _doc.SymbolSize;
                _view.SkipFrequency            = _doc.SkipFrequency;
                _view.IndependentSkipFrequency = _doc.IndependentSkipFrequency;
            }
        }
Esempio n. 3
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhColorGroupStyleAddedOrRemoved);
                InitializeLineConnectionChoices();
            }

            if (_view != null)
            {
                // Line properties
                _view.InitializeLineConnect(_lineConnectChoices);
                _view.ConnectCircular              = _doc.ConnectCircular;
                _view.IgnoreMissingDataPoints      = _doc.IgnoreMissingDataPoints;
                _view.IndependentLineColor         = _doc.IndependentLineColor;
                _view.IndependentDashStyle         = _doc.IndependentDashStyle;
                _view.ShowPlotColorsOnlyForLinePen = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentLineColor);
                _view.LinePen = _doc.LinePen;

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;
                _view.UseSymbolGap          = _doc.UseSymbolGap;
                _view.SymbolGapOffset       = _doc.SymbolGapOffset;
                _view.SymbolGapFactor       = _doc.SymbolGapFactor;
            }
        }
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhIndependentColorChanged);

                _meaningOfValues = new SelectableListNodeList(_doc.MeaningOfValues);
            }
            if (_view != null)
            {
                _view.IndependentColor       = _doc.IndependentColor;
                _view.IndependentDashPattern = _doc.IndependentDashPattern;
                _view.ShowPlotColorsOnly     = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.Pen = _doc.Pen;

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;

                _view.LineWidth1Offset = _doc.LineWidth1Offset;
                _view.LineWidth1Factor = _doc.LineWidth1Factor;

                _view.LineWidth2Offset = _doc.LineWidth2Offset;
                _view.LineWidth2Factor = _doc.LineWidth2Factor;

                _view.EndCapSizeOffset = _doc.EndCapSizeOffset;
                _view.EndCapSizeFactor = _doc.EndCapSizeFactor;

                _view.ForceVisibilityOfEndCap = _doc.ForceVisibilityOfEndCap;

                _view.UseSymbolGap    = _doc.UseSymbolGap;
                _view.SymbolGapOffset = _doc.SymbolGapOffset;
                _view.SymbolGapFactor = _doc.SymbolGapFactor;

                _view.SkipFrequency            = _doc.SkipFrequency;
                _view.IndependentSkipFrequency = _doc.IndependentSkipFrequency;

                _view.IndependentOnShiftingGroupStyles = _doc.IndependentOnShiftingGroupStyles;

                _view.Initialize_MeaningOfValues(_meaningOfValues);

                // Errors

                _view.UseCommonErrorColumn = _doc.UseCommonErrorColumn;

                if (_doc.UseCommonErrorColumn)
                {
                    InitializeCommonErrorColumnText();
                }
                else
                {
                    InitializePositiveErrorColumnText();
                    InitializeNegativeErrorColumnText();
                }
            }
        }
Esempio n. 5
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhIndependentColorChanged);

                _meaningOfValues = new SelectableListNodeList(_doc.MeaningOfValues);
            }
            if (_view != null)
            {
                _view.UseManualVectorLength = _doc.UseManualVectorLength;
                _view.VectorLengthOffset    = _doc.VectorLengthOffset;
                _view.VectorLengthFactor    = _doc.VectorLengthFactor;

                _view.IndependentColor   = _doc.IndependentColor;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.Pen = _doc.Pen;

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;

                _view.LineWidth1Offset = _doc.LineWidth1Offset;
                _view.LineWidth1Factor = _doc.LineWidth1Factor;

                _view.LineWidth2Offset = _doc.LineWidth2Offset;
                _view.LineWidth2Factor = _doc.LineWidth2Factor;

                _view.EndCapSizeOffset = _doc.EndCapSizeOffset;
                _view.EndCapSizeFactor = _doc.EndCapSizeFactor;

                _view.UseSymbolGap    = _doc.UseSymbolGap;
                _view.SymbolGapOffset = _doc.SymbolGapOffset;
                _view.SymbolGapFactor = _doc.SymbolGapFactor;

                _view.SkipFrequency            = _doc.SkipFrequency;
                _view.IndependentSkipFrequency = _doc.IndependentSkipFrequency;

                _view.IndependentOnShiftingGroupStyles = _doc.IndependentOnShiftingGroupStyles;

                _view.Initialize_MeaningOfValues(_meaningOfValues);

                // Errors

                InitializeColumnXText();
                InitializeColumnYText();
                InitializeColumnZText();
            }
        }
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhIndependentColorChanged);

                InitializeDropLineChoices();
            }
            if (_view != null)
            {
                _view.IndependentSkipFrequency = _doc.IndependentSkipFrequency;
                _view.SkipFrequency            = _doc.SkipFrequency;
                _view.InitializeDropLineConditions(_dropLineChoices);

                _view.AdditionalDropTargetIsEnabled = _doc.AdditionalDropTargetIsEnabled;
                _view.AdditionalDropTargetPerpendicularAxisNumber = _doc.AdditionalDropTargetPerpendicularAxisNumber;
                _view.AdditionalDropTargetUsePhysicalBaseValue    = _doc.AdditionalDropTargetUsePhysicalBaseValue;
                _view.AdditionalDropTargetBaseValue = _doc.AdditionalDropTargetBaseValue;

                // now we have to set all dialog elements to the right values
                _view.IndependentColor   = _doc.IndependentColor;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.Pen = _doc.Pen;

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;

                _view.LineWidth1Offset = _doc.LineWidth1Offset;
                _view.LineWidth1Factor = _doc.LineWidth1Factor;

                _view.LineWidth2Offset = _doc.LineWidth2Offset;
                _view.LineWidth2Factor = _doc.LineWidth2Factor;

                _view.GapAtStartOffset = _doc.GapAtStartOffset;
                _view.GapAtStartFactor = _doc.GapAtStartFactor;
                _view.GapAtEndOffset   = _doc.GapAtEndOffset;
                _view.GapAtEndFactor   = _doc.GapAtEndFactor;
            }
        }
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhColorGroupStyleAddedOrRemoved);
                InitializeLineConnectionChoices();
                _fillColorLinkageChoices  = new SelectableListNodeList(_doc.FillColorLinkage);
                _frameColorLinkageChoices = new SelectableListNodeList(_doc.FrameColorLinkage);
                InitializeFillDirectionChoices();
            }

            if (_view != null)
            {
                // Line properties
                _view.InitializeLineConnect(_lineConnectChoices);
                _view.ConnectCircular                  = _doc.ConnectCircular;
                _view.IgnoreMissingDataPoints          = _doc.IgnoreMissingDataPoints;
                _view.IndependentOnShiftingGroupStyles = _doc.IndependentOnShiftingGroupStyles;
                _view.FramePen = _doc.FramePen;

                // Fill area
                _view.InitializeFillColorLinkage(_fillColorLinkageChoices);
                _view.InitializeFrameColorLinkage(_frameColorLinkageChoices);
                _view.ShowPlotColorsOnlyForFillBrush = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.FillColorLinkage);
                _view.ShowPlotColorsOnlyForFramePen  = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.FrameColorLinkage);
                _view.FillBrush = null != _doc.FillBrush ? _doc.FillBrush : new BrushX(NamedColors.Transparent);
                _view.InitializeFillDirection(_areaFillDirectionChoices);
            }
        }
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhColorGroupStyleAddedOrRemoved);
            }
            if (_view != null)
            {
                _view.UseFill = _doc.FillBrush != null && _doc.FillBrush.IsVisible;
                _view.IndependentFillColor           = _doc.IndependentFillColor;
                _view.ShowPlotColorsOnlyForFillBrush = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentFillColor);
                _view.FillBrush = null != _doc.FillBrush ? _doc.FillBrush : new BrushX(NamedColors.Transparent);

                _view.UseFrame = _doc.FramePen != null && _doc.FramePen.IsVisible;
                _view.IndependentFrameColor         = _doc.IndependentFrameColor;
                _view.ShowPlotColorsOnlyForFramePen = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentFrameColor);
                _view.FramePen = null != _doc.FramePen ? _doc.FramePen : new PenX(NamedColors.Transparent);

                _view.InnerGap             = _doc.InnerGap;
                _view.OuterGap             = _doc.OuterGap;
                _view.UsePhysicalBaseValue = _doc.UsePhysicalBaseValue;
                _view.BaseValue            = _doc.UsePhysicalBaseValue ? 0 : _doc.BaseValue;
                _view.StartAtPreviousItem  = _doc.StartAtPreviousItem;
                _view.YGap = _doc.PreviousItemYGap;
            }
        }
Esempio n. 9
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker        = new ColorGroupStylePresenceTracker(_doc, EhColorGroupStyleAddedOrRemoved);
                _alignmentXChoices             = new SelectableListNodeList(_doc.AlignmentX);
                _alignmentYChoices             = new SelectableListNodeList(_doc.AlignmentY);
                _backgroundColorLinkageChoices = new SelectableListNodeList(_doc.BackgroundColorLinkage);

                InitializeAttachmentDirectionChoices();
            }

            if (null != _view)
            {
                // Data

                _view.SkipFrequency                    = _doc.SkipFrequency;
                _view.IndependentSkipFrequency         = _doc.IndependentSkipFrequency;
                _view.IgnoreMissingDataPoints          = _doc.IgnoreMissingDataPoints;
                _view.IndependentOnShiftingGroupStyles = _doc.IndependentOnShiftingGroupStyles;

                _view.LabelFormatString = _doc.LabelFormatString;

                InitializeLabelColumnText();

                // Visual

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;

                _view.FontSizeOffset     = _doc.FontSizeOffset;
                _view.FontSizeFactor     = _doc.FontSizeFactor;
                _view.SelectedFont       = _doc.Font;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.IndependentColor   = _doc.IndependentColor;
                _view.LabelBrush         = _doc.LabelBrush;
                _view.Init_AlignmentX(_alignmentXChoices);
                _view.Init_AlignmentY(_alignmentYChoices);
                _view.AttachToAxis = _doc.AttachedAxis != null;
                _view.Init_AttachedAxis(_attachmentDirectionChoices);
                _view.SelectedRotation = _doc.Rotation;

                _view.OffsetXPoints          = _doc.OffsetXPoints;
                _view.OffsetXEmUnits         = _doc.OffsetXEmUnits;
                _view.OffsetXSymbolSizeUnits = _doc.OffsetXSymbolSizeUnits;

                _view.OffsetYPoints          = _doc.OffsetYPoints;
                _view.OffsetYEmUnits         = _doc.OffsetYEmUnits;
                _view.OffsetYSymbolSizeUnits = _doc.OffsetYSymbolSizeUnits;

                _view.Background = _doc.BackgroundStyle;
                _view.InitializeBackgroundColorLinkage(_backgroundColorLinkageChoices);
            }
        }
Esempio n. 10
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _colorGroupStyleTracker = new ColorGroupStylePresenceTracker(_doc, EhIndependentColorChanged);

                // Frame
                var frameTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(IScatterSymbolFrame));
                _symbolFrameChoices = new SelectableListNodeList
                {
                    new SelectableListNode("No frame", null, false)
                };
                foreach (var ty in frameTypes)
                {
                    _symbolFrameChoices.Add(new SelectableListNode(ty.Name, ty, false));
                }

                // Insets
                var insetTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(IScatterSymbolInset));
                _symbolInsetChoices = new SelectableListNodeList
                {
                    new SelectableListNode("No inset", null, false)
                };
                foreach (var ty in insetTypes)
                {
                    _symbolInsetChoices.Add(new SelectableListNode(ty.Name, ty, false));
                }
            }
            if (_view != null)
            {
                _view.IndependentSkipFrequency         = _doc.IndependentSkipFrequency;
                _view.SkipFrequency                    = _doc.SkipFrequency;
                _view.IgnoreMissingDataPoints          = _doc.IgnoreMissingDataPoints;
                _view.IndependentOnShiftingGroupStyles = _doc.IndependentOnShiftingGroupStyles;

                _view.IndependentScatterSymbol = _doc.IndependentScatterSymbol;
                _view.ScatterSymbol            = _doc.ScatterSymbol;

                // now we have to set all dialog elements to the right values
                _view.IndependentColor   = _doc.IndependentColor;
                _view.ShowPlotColorsOnly = _colorGroupStyleTracker.MustUsePlotColorsOnly(_doc.IndependentColor);
                _view.Color = _doc.Color;

                _view.IndependentSymbolSize = _doc.IndependentSymbolSize;
                _view.SymbolSize            = _doc.SymbolSize;

                _view.OverrideFrame = _doc.OverrideFrame;
                _symbolFrameChoices.ForEachDo(node => node.IsSelected = _doc.OverriddenFrame?.GetType() == (Type)node.Tag);
                _view.Frame = _symbolFrameChoices;

                _view.OverrideInset = _doc.OverrideInset;
                _symbolInsetChoices.ForEachDo(node => node.IsSelected = _doc.OverriddenInset?.GetType() == (Type)node.Tag);
                _view.Inset = _symbolInsetChoices;

                _view.OverrideAbsoluteStructureWidth   = _doc.OverrideStructureWidthOffset.HasValue;
                _view.OverriddenAbsoluteStructureWidth = _doc.OverrideStructureWidthOffset ?? 0;

                _view.OverrideRelativeStructureWidth   = _doc.OverrideStructureWidthFactor.HasValue;
                _view.OverriddenRelativeStructureWidth = _doc.OverrideStructureWidthFactor ?? 0;

                _view.OverridePlotColorInfluence   = _doc.OverridePlotColorInfluence.HasValue;
                _view.OverriddenPlotColorInfluence = _doc.OverridePlotColorInfluence ?? PlotColorInfluence.None;

                _view.OverrideFillColor    = _doc.OverrideFillColor.HasValue;
                _view.OverriddenFillColor  = _doc.OverrideFillColor ?? _doc.ScatterSymbol.FillColor;
                _view.OverrideFrameColor   = _doc.OverrideFrameColor.HasValue;
                _view.OverriddenFrameColor = _doc.OverrideFrameColor ?? _doc.ScatterSymbol.Frame?.Color ?? NamedColors.Transparent;
                _view.OverrideInsetColor   = _doc.OverrideInsetColor.HasValue;
                _view.OverriddenInsetColor = _doc.OverrideInsetColor ?? _doc.ScatterSymbol.Inset?.Color ?? NamedColors.Transparent;

                EhScatterSymbolChanged();
            }
        }