コード例 #1
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _lowerInclusive = new SelectableListNodeList();
                _upperInclusive = new SelectableListNodeList();

                _lowerInclusive.Add(new SelectableListNode("<", false, !_doc.IsLowerValueInclusive));
                _lowerInclusive.Add(new SelectableListNode("<=", true, _doc.IsLowerValueInclusive));

                _upperInclusive.Add(new SelectableListNode("<", false, !_doc.IsUpperValueInclusive));
                _upperInclusive.Add(new SelectableListNode("<=", true, _doc.IsUpperValueInclusive));
            }
            if (null != _view)
            {
                _view.LowerValue = _doc.LowerValue;
                _view.Init_LowerInclusive(_lowerInclusive);
                _view.UpperValue = _doc.UpperValue;
                _view.Init_UpperInclusive(_upperInclusive);

                View_InitializeColumn();
            }
        }
コード例 #2
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _xColumn = _doc.RowHeaderColumn;
                _yColumn = _doc.ColumnHeaderColumn;
                // Initialize value columns
                _valueColumns.Clear();
                for (int i = 0; i < _doc.ColumnCount; ++i)
                {
                    var col = _doc.GetDataColumnProxy(i);
                    _valueColumns.Add(new SelectableListNode(col.Document != null ? col.Document.FullName : "Unresolved column", col, false));
                }

                CalcMaxPossiblePlotRangeTo();

                // Initialize tables
                string[] tables = Current.Project.DataTableCollection.GetSortedTableNames();

                string dataTableName = _doc.DataTable == null ? string.Empty : _doc.DataTable.Name;

                _availableTables.Clear();
                foreach (var tableName in tables)
                {
                    _availableTables.Add(new SelectableListNode(tableName, Current.Project.DataTableCollection[tableName], dataTableName == tableName));
                }

                // Initialize columns
                FillAvailableColumnList();

                _rowsController = new Common.AscendingIntegerCollectionController();
                _rowsController.InitializeDocument(_doc.ParticipatingDataRows.Clone());
            }

            if (null != _view)
            {
                EhSelectedColumnKindChanged(); // ask view which column kind is now selected
                UpdateButtonEnablingInView();  // do that in every case, even if nothing has changed

                _view.InitializeAvailableTables(_availableTables);
                _view.InitializeAvailableColumns(_availableColumns);

                _view.GroupNumber = _doc.GroupNumber;
                _view.UseAllAvailableDataColumns = _doc.UseAllAvailableDataColumnsOfGroup;
                _view.UseAllAvailableDataRows    = _doc.UseAllAvailableDataRows;

                _view.Initialize_XColumn(_xColumn == null ? string.Empty : _xColumn.FullName);
                _view.Initialize_YColumn(_yColumn == null ? string.Empty : _yColumn.FullName);
                _view.Initialize_VColumns(_valueColumns);
                CalcMaxPossiblePlotRangeTo();

                if (_rowsController.ViewObject == null)
                {
                    Current.Gui.FindAndAttachControlTo(_rowsController);
                }
                _view.Initialize_DataRowsControl(_rowsController.ViewObject);
            }
        }
コード例 #3
0
        /// <summary>
        /// Fills the list with all items (tables, graphs, and subfolders) of the current project folder.
        /// </summary>
        /// <returns>List of items.</returns>
        public override SelectableListNodeList GetItemList()
        {
            _list = new SelectableListNodeList();
            if (!Current.Project.Folders.ContainsFolder(_folderName))
            {
                return(_list);
            }

            var subfolderList = Current.Project.Folders.GetSubfoldersAsStringList(_folderName, false);

            //subfolderList.Sort();
            foreach (var o in subfolderList)
            {
                _list.Add(GetBrowserListItem(o));
            }

            var itemList = Current.Project.Folders.GetItemsInFolder(_folderName);

            //itemList.Sort(CompareItemsByName);
            foreach (var o in itemList)
            {
                _list.Add(GetBrowserListItemFromObject(o, false));
            }

            return(_list);
        }
コード例 #4
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                if (null == _propertyTypes)
                {
                    _propertyTypes = new SelectableListNodeList();
                }
                else
                {
                    _propertyTypes.Clear();
                }

                _propertyTypes.Add(new SelectableListNode("String", typeof(string), (_doc.PropertyValue is string) || (null == _doc.PropertyValue)));
                _propertyTypes.Add(new SelectableListNode("Double", typeof(double), _doc.PropertyValue is double));
                _propertyTypes.Add(new SelectableListNode("Integer", typeof(int), _doc.PropertyValue is int));
                _propertyTypes.Add(new SelectableListNode("DateTime", typeof(DateTime), _doc.PropertyValue is DateTime));
            }

            if (null != _view)
            {
                _view.PropertyName  = _doc.PropertyName;
                _view.PropertyTypes = _propertyTypes;
                ShowPropertyValue();
            }
        }
コード例 #5
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                FillAvailableUnitsDictionary();
                GetAvailableUnitsForQuantity(_quantity, _availableUnits);

                _includedUnits.Clear();
                foreach (var unit in _doc.FixedUnits)
                {
                    if (unit is UnitWithLimitedPrefixes lpUnit)
                    {
                        _prefixesForUnit[lpUnit.Unit] = new List <SIPrefix>(lpUnit.Prefixes);
                        _includedUnits.Add(new SelectableListNode(lpUnit.Unit.Name, lpUnit.Unit, false));
                    }
                    else
                    {
                        _prefixesForUnit[unit] = new List <SIPrefix>(new[] { SIPrefix.None });
                        _includedUnits.Add(new SelectableListNode(unit.Name, unit, false));
                    }
                }

                UpdateAllPrefixedUnits(_allChoosenPrefixedUnits);

                AddToIncludedUnits             = Current.Gui.NewRelayCommand(EhAddToIncludedUnits);
                RemoveFromIncludedUnits        = Current.Gui.NewRelayCommand(EhRemoveFromIncludedUnits);
                SelectedPrefixesChangedCommand = Current.Gui.NewRelayCommand(EhSelectedPrefixesChangedCommand);
            }
        }
コード例 #6
0
    void Initialize(bool bInit)
    {
      if (_view != null)
      {
        _view.ShowLine = true;

        _view.LinePen = _doc.AxisPen;
        _view.MajorPen = _doc.MajorPen;
        _view.MinorPen = _doc.MinorPen;

        _view.MajorTickLength = _doc.MajorTickLength;
        _view.MinorTickLength = _doc.MinorTickLength;

        SelectableListNodeList list = new SelectableListNodeList();

        list.Clear();
        if (_doc.CachedAxisInformation != null)
        {
          list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstDownSide, null, _doc.FirstDownMajorTicks));
          list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstUpSide, null, _doc.FirstUpMajorTicks));
        }
        _view.MajorPenTicks = list;


        list.Clear();
        if (_doc.CachedAxisInformation != null)
        {
          list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstDownSide, null, _doc.FirstDownMinorTicks));
          list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstUpSide, null, _doc.FirstUpMinorTicks));
        }
        _view.MinorPenTicks = list;

      }
    }
コード例 #7
0
        void Initialize(bool bInit)
        {
            if (_view != null)
            {
                _view.ShowLine = true;

                _view.LinePen  = _doc.AxisPen;
                _view.MajorPen = _doc.MajorPen;
                _view.MinorPen = _doc.MinorPen;

                _view.MajorTickLength = _doc.MajorTickLength;
                _view.MinorTickLength = _doc.MinorTickLength;

                SelectableListNodeList list = new SelectableListNodeList();

                list.Clear();
                if (_doc.CachedAxisInformation != null)
                {
                    list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstDownSide, null, _doc.FirstDownMajorTicks));
                    list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstUpSide, null, _doc.FirstUpMajorTicks));
                }
                _view.MajorPenTicks = list;


                list.Clear();
                if (_doc.CachedAxisInformation != null)
                {
                    list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstDownSide, null, _doc.FirstDownMinorTicks));
                    list.Add(new SelectableListNode(_doc.CachedAxisInformation.NameOfFirstUpSide, null, _doc.FirstUpMinorTicks));
                }
                _view.MinorPenTicks = list;
            }
        }
コード例 #8
0
        private void FillAvailableColumnList()
        {
            _availableColumns.Clear();

            var       node = _availableTables.FirstSelectedNode;
            DataTable tg   = node == null ? null : node.Tag as DataTable;

            if (null != tg)
            {
                if (_areDataColumnsShown)
                {
                    for (int i = 0; i < tg.DataColumnCount; ++i)
                    {
                        _availableColumns.Add(new SelectableListNode(tg.DataColumns.GetColumnName(i), tg.DataColumns[i], false));
                    }
                }
                else
                {
                    for (int i = 0; i < tg.PropertyColumnCount; ++i)
                    {
                        _availableColumns.Add(new SelectableListNode(tg.PropertyColumns.GetColumnName(i), tg.PropertyColumns[i], false));
                    }
                }
            }

            if (null != _view)
            {
                _view.InitializeAvailableColumns(_availableColumns);
            }
        }
コード例 #9
0
 void BuildOriginList()
 {
     _originList = new SelectableListNodeList();
     _originList.Add(new SelectableListNode("-90°", -1, -1 == _doc.ScaleOrigin));
     _originList.Add(new SelectableListNode("0°", 0, 0 == _doc.ScaleOrigin));
     _originList.Add(new SelectableListNode("90°", 1, 1 == _doc.ScaleOrigin));
     _originList.Add(new SelectableListNode("180°", 2, 2 == _doc.ScaleOrigin));
     _originList.Add(new SelectableListNode("270°", 3, 3 == _doc.ScaleOrigin));
 }
コード例 #10
0
ファイル: FileListController.cs プロジェクト: olesar/Altaxo
        private void fileCreated(object sender, FileSystemEventArgs e)
        {
            Action method = delegate
            {
                var info = new FileInfo(e.FullPath);
                _fileList.Add(new FileListItem(e.FullPath));
            };

            Current.Dispatcher.InvokeIfRequired(method);
        }
コード例 #11
0
        public override SelectableListNodeList GetItemList()
        {
            _list = new SelectableListNodeList();
            foreach (Altaxo.Graph.Gdi.GraphDocument t in Current.Project.GraphDocumentCollection)
            {
                _list.Add(GetBrowserListItem(t, true));
            }
            foreach (Altaxo.Graph.Graph3D.GraphDocument t in Current.Project.Graph3DDocumentCollection)
            {
                _list.Add(GetBrowserListItem(t, true));
            }

            return(_list);
        }
コード例 #12
0
        /// <summary>
        /// Get the list of size types in dependence of whether or not we have a linked layer.
        /// </summary>
        /// <returns>List of possible size types.</returns>
        SelectableListNodeList GetSizeTypeList()
        {
            SelectableListNodeList list  = new SelectableListNodeList();
            XYPlotLayerSizeType    toadd = XYPlotLayerSizeType.AbsoluteValue;

            list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
            toadd = XYPlotLayerSizeType.RelativeToGraphDocument;
            list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
            if (null != m_LinkedLayer)
            {
                toadd = XYPlotLayerSizeType.RelativeToLinkedLayer;
                list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
            }
            return(list);
        }
コード例 #13
0
ファイル: ShapeGroupController.cs プロジェクト: olesar/Altaxo
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _itemList = new SelectableListNodeList();

                foreach (var d in _doc.GroupedObjects)
                {
                    var node = new SelectableListNode(d.GetType().ToString(), d, false);
                    _itemList.Add(node);
                }

                _locationController = (IMVCANController)Current.Gui.GetController(new object[] { _doc.Location }, typeof(IMVCANController), UseDocument.Directly);
                Current.Gui.FindAndAttachControlTo(_locationController);
            }

            if (_view != null)
            {
                _view.InitializeItemList(_itemList);

                _view.LocationView = _locationController.ViewObject;
            }
        }
コード例 #14
0
        private void InitXYColumns()
        {
            var        srcData          = _doc.DataTable.DataColumns;
            var        columnsToProcess = _doc.GetDataColumns(ConvertXYVToMatrixDataAndOptions.ColumnV);
            DataColumn columnX          = _doc.GetDataColumnOrNull(ConvertXYVToMatrixDataAndOptions.ColumnX);
            DataColumn columnY          = _doc.GetDataColumnOrNull(ConvertXYVToMatrixDataAndOptions.ColumnY);

            _choicesXColumn.Clear();
            foreach (var col in srcData.Columns)
            {
                _choicesXColumn.Add(new SelectableListNode(srcData.GetColumnName(col), col, object.ReferenceEquals(columnX, col)));
            }

            _choicesYColumn.Clear();
            foreach (var col in srcData.Columns)
            {
                _choicesYColumn.Add(new SelectableListNode(srcData.GetColumnName(col), col, object.ReferenceEquals(columnY, col)));
            }

            if (null != _view)
            {
                _view.InitializeXColumn(_choicesXColumn);
                _view.InitializeYColumn(_choicesYColumn);
            }
        }
コード例 #15
0
ファイル: StyleListController.cs プロジェクト: olesar/Altaxo
        protected virtual void Controller_CurrentItems_Initialize()
        {
            if (null == _currentItems)
            {
                _currentItems = new SelectableListNodeList();
            }
            else
            {
                _currentItems.Clear();
            }

            foreach (var currentItem in _doc)
            {
                _currentItems.Add(new SelectableListNode(ToDisplayName(currentItem), currentItem, false));
            }
        }
コード例 #16
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                // available row selection types
                var types = ReflectionService.GetNonAbstractSubclassesOf(typeof(IRowSelection));
                _rowSelectionSimpleTypes     = new SelectableListNodeList();
                _rowSelectionCollectionTypes = new SelectableListNodeList();
                foreach (var type in types)
                {
                    if (typeof(IRowSelectionCollection).IsAssignableFrom(type))
                    {
                        _rowSelectionCollectionTypes.Add(new SelectableListNode(type.Name, type, false));
                    }
                    else
                    {
                        _rowSelectionSimpleTypes.Add(new SelectableListNode(type.Name, type, false));
                    }
                }

                // RS entries
                _rsEntryList = new List <RSEntry>();
                ConvertRowSelectionToListOfRSEntries(_doc, _rsEntryList, 0);
                AmendRSEntryListWithDetailControllers(_rsEntryList);
            }

            if (null != _view)
            {
                _view.InitRowSelections(_rsEntryList, _rowSelectionSimpleTypes, _rowSelectionCollectionTypes);
            }
        }
コード例 #17
0
        private void InitializeAvailablePropertyList()
        {
            _availablePropertyKeys = new SelectableListNodeList();

            var sortedKeys = new List <Altaxo.Main.Properties.PropertyKeyBase>(Altaxo.Main.Properties.PropertyKeyBase.AllRegisteredPropertyKeys);

            sortedKeys.Sort((x, y) => string.Compare(x.PropertyName, y.PropertyName));

            foreach (var prop in sortedKeys)
            {
                // show only the keys that are applicable to the topmost property bag in the hierarchy
                if (0 == (prop.ApplicationLevel & _doc.TopmostBagInformation.ApplicationLevel))
                {
                    continue;
                }
                if ((PropertyLevel.Document == (prop.ApplicationLevel & _doc.TopmostBagInformation.ApplicationLevel)))
                {
                    if (!Altaxo.Main.Services.ReflectionService.IsSubClassOfOrImplements(_doc.TopmostBagInformation.ApplicationItemType, prop.ApplicationItemType))
                    {
                        continue;
                    }
                }

                var node = new MyListNode(prop.PropertyName, prop)
                {
                    Text1S = prop.PropertyType.Name
                };

                _availablePropertyKeys.Add(node);
            }
        }
コード例 #18
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _propertyList = new SelectableListNodeList();
                foreach (var entry in _doc)
                {
                    string key   = entry.Key;
                    object value = entry.Value;

                    var node = new MyListNode(key, key)
                    {
                        Text1a = value == null ? "n.a." : value.GetType().Name,
                        Text2a = value == null ? "null" : value.ToString()
                    };

                    _propertyList.Add(node);
                }
            }
            if (null != _view)
            {
                _view.PropertyList = _propertyList;
            }
        }
コード例 #19
0
        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;
            }
        }
コード例 #20
0
        private void InitChoicesCyclingVariableAndChoicesAverageColumns()
        {
            var                srcData                          = _doc.DataTable.DataColumns;
            var                columnsToProcess                 = _doc.GetDataColumns(ExpandCyclingVariableColumnDataAndOptions.ColumnsParticipatingIdentifier);
            DataColumn         columnWithCyclingVariable        = _doc.GetDataColumnOrNull(ExpandCyclingVariableColumnDataAndOptions.ColumnWithCyclingVariableIdentifier);
            IList <DataColumn> columnsToAverageOverRepeatPeriod = _doc.GetDataColumns(ExpandCyclingVariableColumnDataAndOptions.ColumnsToAverageIdentifier);

            _choicesCyclingVar.Clear();
            foreach (var col in srcData.Columns)
            {
                _choicesCyclingVar.Add(new SelectableListNode(srcData.GetColumnName(col), col, object.ReferenceEquals(columnWithCyclingVariable, col)));
            }

            _choicesColsToAverage.Clear();
            foreach (var col in srcData.Columns)
            {
                _choicesColsToAverage.Add(new SelectableListNode
                                              (srcData.GetColumnName(col), col, columnsToAverageOverRepeatPeriod.Contains(col)));
            }

            if (null != _view)
            {
                _view.InitializeCyclingVariableColumn(_choicesCyclingVar);
                _view.InitializeColumnsToAverage(_choicesColsToAverage);
            }
        }
コード例 #21
0
        public void InitScaleTypes(bool initData)
        {
            if (initData)
            {
                _scaleTypes = new SelectableListNodeList();
                Type[] classes;

                if (_lockScaleType) // if the scale type is locked (i.e.) can not be chosen by the user, we simply offer only the one scale type we have now
                {
                    classes = new Type[] { _doc.GetType() }
                }
                ;
                else
                {
                    classes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(Scale));
                }

                for (int i = 0; i < classes.Length; i++)
                {
                    if (classes[i] == typeof(LinkedScale))
                    {
                        continue;
                    }
                    var node = new SelectableListNode(Current.Gui.GetUserFriendlyClassName(classes[i]), classes[i], ScaleToEdit.GetType() == classes[i]);
                    _scaleTypes.Add(node);
                }
            }

            if (null != _view)
            {
                _view.InitializeAxisType(_scaleTypes);
            }
        }
コード例 #22
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                // Label sides
                _labelSides = new Collections.SelectableListNodeList
                {
                    new Collections.SelectableListNode("Automatic", null, null == _doc.LabelSide)
                };
                var list = new List <Collections.SelectableListNode>();
                if (_doc.CachedAxisInformation != null)
                {
                    list.Add(new Collections.SelectableListNode(_doc.CachedAxisInformation.NameOfFirstDownSide, CSAxisSide.FirstDown, _doc.LabelSide == CSAxisSide.FirstDown));
                    list.Add(new Collections.SelectableListNode(_doc.CachedAxisInformation.NameOfFirstUpSide, CSAxisSide.FirstUp, _doc.LabelSide == CSAxisSide.FirstUp));
                }
                list.Sort((x, y) => string.Compare(x.Text, y.Text));
                _labelSides.AddRange(list);

                // horizontal and vertical alignment
                _alignmentChoicesX = new Collections.SelectableListNodeList(_doc.AlignmentX);
                _alignmentChoicesY = new Collections.SelectableListNodeList(_doc.AlignmentY);
                _alignmentChoicesZ = new Collections.SelectableListNodeList(_doc.AlignmentZ);

                // label formatting type
                var labelTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(Altaxo.Graph.Graph3D.LabelFormatting.ILabelFormatting));
                _labelStyles = new Collections.SelectableListNodeList();
                for (int i = 0; i < labelTypes.Length; ++i)
                {
                    _labelStyles.Add(new Collections.SelectableListNode(labelTypes[i].Name, labelTypes[i], labelTypes[i] == _doc.LabelFormat.GetType()));
                }

                _labelFormattingSpecificController = (IMVCANController)Current.Gui.GetControllerAndControl(new object[] { _doc.LabelFormat }, typeof(IMVCANController), UseDocument.Directly);
            }

            if (null != _view)
            {
                _view.LabelFont     = _doc.Font;
                _view.LabelMaterial = _doc.Brush;
                _view.AlignmentX_Initialize(_alignmentChoicesX);
                _view.AlignmentY_Initialize(_alignmentChoicesY);
                _view.AlignmentZ_Initialize(_alignmentChoicesY);
                _view.AutomaticAlignment       = _doc.AutomaticAlignment;
                _view.RotationX                = _doc.RotationX;
                _view.RotationY                = _doc.RotationY;
                _view.RotationZ                = _doc.RotationZ;
                _view.OffsetX                  = _doc.OffsetX;
                _view.OffsetY                  = _doc.OffsetY;
                _view.OffsetZ                  = _doc.OffsetZ;
                _view.Background               = _doc.BackgroundStyle;
                _view.SuppressedLabelsByValue  = GUIConversion.ToString(_doc.SuppressedLabels.ByValues);
                _view.SuppressedLabelsByNumber = GUIConversion.ToString(_doc.SuppressedLabels.ByNumbers);
                _view.PrefixText               = _doc.PrefixText;
                _view.PostfixText              = _doc.SuffixText;
                _view.LabelSides               = _labelSides;
                _view.LabelStyle_Initialize(_labelStyles);
                _view.LabelFormattingSpecificGuiControl = null == _labelFormattingSpecificController ? null : _labelFormattingSpecificController.ViewObject;
            }
        }
コード例 #23
0
        private void SetCoordinateSystemDependentObjects(CSLineID id)
        {
            // Scales
            _listOfScales = new SelectableListNodeList
            {
                new SelectableListNode("Z-Scale", 0, false)
            };

            // Axes
            // collect the AxisStyleIdentifier from the actual layer and also all possible AxisStyleIdentifier
            _axisControl = new Dictionary <CSLineID, AxisStyleControllerConditionalGlue>();
            _listOfAxes  = new SelectableListNodeList();
            foreach (CSLineID ids in _doc.CoordinateSystem.GetJoinedAxisStyleIdentifier(_doc.AxisStyles.AxisStyleIDs, new CSLineID[] { id }))
            {
                CSAxisInformation info = _doc.CoordinateSystem.GetAxisStyleInformation(ids);
                var axisInfo           = new AxisStyleControllerConditionalGlue(info, _doc.AxisStyles);
                _axisControl.Add(info.Identifier, axisInfo);
                _listOfAxes.Add(new SelectableListNode(info.NameOfAxisStyle, info.Identifier, false));
            }

            // Planes
            _listOfPlanes   = new SelectableListNodeList();
            _currentPlaneID = CSPlaneID.Front;
            _listOfPlanes.Add(new SelectableListNode("Front", _currentPlaneID, true));
        }
コード例 #24
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _doc.NewTable = _doc.OriginalTable;

                // Initialize tables
                string[] tables = Current.Project.DataTableCollection.GetSortedTableNames();

                _availableTables.Clear();
                DataTable tg = _doc.OriginalTable;
                foreach (var tableName in tables)
                {
                    _availableTables.Add(new SelectableListNode(tableName, Current.Project.DataTableCollection[tableName], tg != null && tg.Name == tableName));
                }

                TriggerUpdateOfMatchingTables();
            }

            if (null != _view)
            {
                _view.AvailableTables_Initialize(_availableTables);
                _view.MatchingTables_Initialize(_matchingTables);
                _view.Diagnostics_Initialize(0, 0, 0);
            }
        }
コード例 #25
0
ファイル: ColorModelController.cs プロジェクト: olesar/Altaxo
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _availableColorModels = new SelectableListNodeList();

                var models = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(IColorModel));

                _currentColorModel = new ColorModelRGB();
                foreach (var modelType in models)
                {
                    _availableColorModels.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(modelType), modelType, modelType == _currentColorModel.GetType()));
                }

                // Text only color models
                _availableTextOnlyColorModels = new SelectableListNodeList();
                var textOnlyModels = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(ITextOnlyColorModel));

                _currentTextOnlyColorModel = new TextOnlyColorModelRGB();
                foreach (var modelType in textOnlyModels)
                {
                    _availableTextOnlyColorModels.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(modelType), modelType, modelType == _currentTextOnlyColorModel.GetType()));
                }
            }
            if (null != _view)
            {
                _view.InitializeAvailableColorModels(_availableColorModels);
                _view.InitializeAvailableTextOnlyColorModels(_availableTextOnlyColorModels);
                _view.InitializeColorModel(_currentColorModel, false);
                _view.InitializeTextOnlyColorModel(_currentTextOnlyColorModel, false);
                _view.InitializeCurrentColor(_doc);
            }
        }
コード例 #26
0
        public void EhView_RemoveNormalGroupStyle()
        {
            for (int i = _currentNormalStyles.Count - 1; i >= 0; i--)
            {
                CheckableSelectableListNode selected = _currentNormalStyles[i];
                if (!selected.IsSelected)
                {
                    continue;
                }

                _doc.RemoveType((Type)selected.Tag);

                _currentNormalStyles.RemoveAt(i);
                if (i < _currentNoOfItemsThatCanHaveChilds)
                {
                    _currentNoOfItemsThatCanHaveChilds--;
                }

                _availableNormalStyles.Add(new SelectableListNode(
                                               Current.Gui.GetUserFriendlyClassName((Type)selected.Tag),
                                               selected.Tag,
                                               true));
            }

            UpdateCurrentNormalIndentation();
            _view.InitializeAvailableNormalGroupStyles(_availableNormalStyles);
            _view.InitializeCurrentNormalGroupStyles(_currentNormalStyles);
        }
コード例 #27
0
        private void InitializeExistingPropertyValuesList()
        {
            var sortedNames = new List <KeyValuePair <string, string> >(); // key is the property key string, value is the property name

            foreach (var key in _doc.GetAllPropertyNames())
            {
                string keyName = PropertyKeyBase.GetPropertyName(key);
                if (null == keyName)
                {
                    keyName = key;
                }
                sortedNames.Add(new KeyValuePair <string, string>(key, keyName));
            }
            sortedNames.Sort(((entry1, entry2) => string.Compare(entry1.Value, entry2.Value))); // sort the entries not by the key, but by the keyname

            _propertyList = new SelectableListNodeList();

            foreach (var entry in sortedNames)
            {
                if (_doc.TryGetValue <object>(entry.Key, !_showAllProperties, out var value, out var bag, out var bagInfo))
                {
                    var node = new MyListNode(entry.Value, new Tuple <string, string, IPropertyBag>(entry.Key, entry.Value, bag))
                    {
                        Text1S = value == null ? "n.a." : value.GetType().Name,
                        Text2S = value == null ? "null" : value.ToString().Replace('\n', '_').Replace('\r', '_'),
                        Text3S = bagInfo.Name
                    };

                    _propertyList.Add(node);
                }
            }
        }
コード例 #28
0
ファイル: FilterEditController.cs プロジェクト: Altaxo/Altaxo
		private void Initialize(bool initData)
		{
			if (initData)
			{
				_operatorChoices = new SelectableListNodeList();
				foreach (var s in new string[] { "", "=", ">", ">=", "<", "<=", "<>" })
					_operatorChoices.Add(new SelectableListNode(s, s, false));

				_value = _field.Filter;
			}
			if (null != _view)
			{
				_view.SetOperatorChoices(_operatorChoices);

				// initialize value
				_view.SetValueText(_value);

				// initialize fields
				if (_value.Length > 0)
				{
					Match m = _rx1.Match(_value);
					if (m.Success)
					{
						SetOperatorText(m.Groups[2].Value);
						_view.SingleValueText = m.Groups[3].Value;
					}
					m = _rx2.Match(_value);
					if (m.Success)
					{
						_view.IntervalFromText = m.Groups[2].Value;
						_view.intervalToText = m.Groups[3].Value;
					}
				}
			}
		}
コード例 #29
0
        /// <summary>
        /// Fills the "x values column combobox" with the appropriate column names.
        /// </summary>
        /// <remarks>The column names are either from property columns (if a spectrum is from a row) or from a table column
        ///  (if the spectrum is from a column).<para/>
        /// In either case, only DataColumns that have the <see cref="Altaxo.Data.INumericColumn"/> interface are shown in the combobox.</remarks>
        public void FillXValuesColumnBox()
        {
            Altaxo.Data.DataColumnCollection colcol;
            if (m_CreateSpectrumFrom == CreateSpectrumFrom.Row)
            {
                colcol = m_Table.PropCols;
            }
            else
            {
                colcol = m_Table.DataColumns;
            }

            // Fill the Combo Box with Column names
            var colnames = new SelectableListNodeList();

            for (int i = 0; i < colcol.ColumnCount; i++)
            {
                if (colcol[i] is Altaxo.Data.INumericColumn)
                {
                    colnames.Add(new SelectableListNode(colcol.GetColumnName(i), colcol[i], 0 == i));
                }
            }

            // now set the contents of the combo box
            _view.FillXValuesColumnBox(colnames);
            _view.EnableXValuesColumnBox = true;
        }
コード例 #30
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                // predefined styles
                string[] names = G3DPlotStyleCollectionTemplates.GetAvailableNames();
                _predefinedStyleSetsAvailable = new SelectableListNodeList();
                for (int i = 0; i < names.Length; ++i)
                {
                    _predefinedStyleSetsAvailable.Add(new SelectableListNode(names[i], i, false));
                }

                // single styles
                _singleStylesAvailable = new SelectableListNodeList();
                Type[] avtypes = ReflectionService.GetNonAbstractSubclassesOf(typeof(IG3DPlotStyle));
                for (int i = 0; i < avtypes.Length; i++)
                {
                    if (avtypes[i] != typeof(G3DPlotStyleCollection))
                    {
                        _singleStylesAvailable.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(avtypes[i]), avtypes[i], false));
                    }
                }

                BuildCurrentStyleListNodeList();
            }

            if (null != _view)
            {
                _view.InitializePredefinedStyles(_predefinedStyleSetsAvailable);
                _view.InitializeAvailableStyleList(_singleStylesAvailable);
                _view.InitializeStyleList(_currentItems);
            }
        }
コード例 #31
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _axisTemplates = new SelectableListNodeList();
                foreach (var style in _doc.AxisStyles)
                {
                    var node = new SelectableListNode(style.NameOfAxisStyle, style, style.Identifier == _doc.TemplateStyle);
                    _axisTemplates.Add(node);
                }
                var selNode = _axisTemplates.FirstSelectedNode;
                if (null == selNode && 0 != _axisTemplates.Count)
                {
                    selNode            = _axisTemplates[0];
                    selNode.IsSelected = true;
                }
                if (null != selNode)
                {
                    _doc.TemplateStyle = (selNode.Tag as CSAxisInformation).Identifier;
                }
            }
            if (null != _view)
            {
                _view.MoveAxis = _doc.MoveAxis;
                _view.InitializeAxisTemplates(_axisTemplates);
                SetViewAccordingToAxisIdentifier();
            }
        }
コード例 #32
0
        private void InitParticipatingColumns()
        {
            // Initialize value columns
            _valueColumns.Clear();
            var columnProxies = _doc.GetDataColumnProxies(DecomposeByColumnContentDataAndOptions.ColumnsParticipatingIdentifier);

            foreach (var colProxy in columnProxies)
            {
                _valueColumns.Add(new SelectableListNode(colProxy.Document != null ? colProxy.Document.FullName : "Unresolved column", colProxy.Clone(), false)); // clone of colProxy is important for apply later on
            }

            if (null != _view)
            {
                _view.InitializeParticipatingColumns(_valueColumns);
            }
        }
コード例 #33
0
ファイル: EnumFlagController.cs プロジェクト: Altaxo/Altaxo
		private void Initialize(bool initData)
		{
			if (initData)
			{
				_list = new SelectableListNodeList();
				var values = System.Enum.GetValues(_doc.GetType());
				foreach (var val in values)
				{
					var node = new SelectableListNode(System.Enum.GetName(_doc.GetType(), val), val, IsChecked(val, _tempDoc));
					node.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(EhNode_PropertyChanged);
					_list.Add(node);
				}
			}

			if (_view != null)
			{
				_view.Initialize(_list);
			}
		}
コード例 #34
0
		public void InitRowSelections(List<RSEntry> rowSelections, SelectableListNodeList rowSelectionSimpleTypes, SelectableListNodeList rowSelectionCollectionTypes)
		{
			_rowSelections = rowSelections;

			_guiStackPanel.Children.Clear();

			for (int i = 0; i < _rowSelections.Count; ++i)
			{
				var rsItem = _rowSelections[i];

				var rsGuiItem = rsItem.GuiItem as RowSelectionItemControl;

				if (null == rsGuiItem)
				{
					var selTypes = new SelectableListNodeList();

					if (rsItem.RowSelection is IRowSelectionCollection)
					{
						foreach (var item in rowSelectionCollectionTypes)
						{
							selTypes.Add(new SelectableListNode(item.Text, item.Tag, rsItem.RowSelection.GetType() == (Type)item.Tag));
						}
					}
					else // simple type
					{
						foreach (var item in rowSelectionSimpleTypes)
						{
							selTypes.Add(new SelectableListNode(item.Text, item.Tag, rsItem.RowSelection.GetType() == (Type)item.Tag));
						}
					}

					rsGuiItem = new RowSelectionItemControl(selTypes, rsItem.DetailsController?.ViewObject);
				}

				rsGuiItem.Tag = i;
				rsGuiItem.IndentationLevel = rsItem.IndentationLevel;
				rsGuiItem.RowSelectionDetailControl = rsItem.DetailsController?.ViewObject;
				rsItem.GuiItem = rsGuiItem;
				_guiStackPanel.Children.Add(rsGuiItem);
			}
		}
コード例 #35
0
		private void Initialize(bool initData)
		{
			if (initData)
			{
				_xCommonColumns = new SelectableListNodeList();
				_yCommonColumns = new SelectableListNodeList();

				var names = _doc.GetCommonColumnNamesOrderedByAppearanceInFirstTable();
				bool isFirst = true;
				foreach (var name in names)
				{
					_xCommonColumns.Add(new SelectableListNode(name, name, name == _doc.XCommonColumnNameForPlot || (isFirst && null == _doc.XCommonColumnNameForPlot)));
					_yCommonColumns.Add(new SelectableListNode(name, name, false));
					isFirst = false;
				}
			}

			if (null != _view)
			{
				_view.InitializeXCommonColumns(_xCommonColumns);
				_view.InitializeYCommonColumns(_yCommonColumns);
				_view.UseCurrentXColumn = _doc.XCommonColumnNameForPlot == null;
			}
		}
コード例 #36
0
ファイル: ItemHandler.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Fills the list with all tables in the project.
		/// </summary>
		/// <returns>List of all tables.</returns>
		public override SelectableListNodeList GetItemList()
		{
			_list = new SelectableListNodeList();
			foreach (var t in Current.Project.DataTableCollection)
				_list.Add(GetBrowserListItem(t, true));

			return _list;
		}
コード例 #37
0
ファイル: ItemHandler.cs プロジェクト: Altaxo/Altaxo
		/// <summary>
		/// Fills the list with all items (tables, graphs, and subfolders) of the current project folder.
		/// </summary>
		/// <returns>List of items.</returns>
		public override SelectableListNodeList GetItemList()
		{
			_list = new SelectableListNodeList();
			if (!Current.Project.Folders.ContainsFolder(_folderName))
				return _list;

			var subfolderList = Current.Project.Folders.GetSubfoldersAsStringList(_folderName, false);
			//subfolderList.Sort();
			foreach (var o in subfolderList)
			{
				_list.Add(GetBrowserListItem(o));
			}

			var itemList = Current.Project.Folders.GetItemsInFolder(_folderName);
			//itemList.Sort(CompareItemsByName);
			foreach (var o in itemList)
			{
				_list.Add(GetBrowserListItemFromObject(o, false));
			}

			return _list;
		}
コード例 #38
0
    void Initialize(bool initDoc)
    {
      if (initDoc)
      {
        // available Update modes
        _availableUpdateModes = new SelectableListNodeList();
        foreach (object obj in Enum.GetValues(typeof(PlotGroupStrictness)))
          _availableUpdateModes.Add(new SelectableListNode(obj.ToString(), obj, ((PlotGroupStrictness)obj) == PlotGroupStrictness.Normal));

        Type[] types;
        // Transfo-Styles
        _currentTransfoStyle = _doc.CoordinateTransformingStyle == null ? null : _doc.CoordinateTransformingStyle.GetType();
        _availableTransfoStyles = new SelectableListNodeList();
        _availableTransfoStyles.Add(new SelectableListNode("None",null,null==_currentTransfoStyle));
         types = ReflectionService.GetNonAbstractSubclassesOf(typeof(ICoordinateTransformingGroupStyle));
        foreach (Type t in types)
        {
            _availableTransfoStyles.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(t), t, t==_currentTransfoStyle));
        }

        // Normal Styles
        _availableNormalStyles = new SelectableListNodeList();
        if (_parent != null) // if possible, collect only those styles that are applicable
        {
          PlotGroupStyleCollection avstyles = new PlotGroupStyleCollection();
          _parent.CollectStyles(avstyles);
          foreach(IPlotGroupStyle style in avstyles)
          {
            if(!_doc.ContainsType(style.GetType()))
            _availableNormalStyles.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(style.GetType()),style.GetType(),false));
          }
        }
        else // or else, find all available styles
        {
          types = ReflectionService.GetNonAbstractSubclassesOf(typeof(IPlotGroupStyle));
          foreach (Type t in types)
          {
            if (!_doc.ContainsType(t))
              _availableNormalStyles.Add(new SelectableListNode(Current.Gui.GetUserFriendlyClassName(t), t, false));
          }
        }

        _currentNormalStyles = new CheckableSelectableListNodeList();
        _currentStepItems = 0;
          // first those items that have no childs
        foreach (IPlotGroupStyle s in _doc)
        {
          CheckableSelectableListNode node = new CheckableSelectableListNode(Current.Gui.GetUserFriendlyClassName(s.GetType()), s.GetType(), false, false);

          if (s.CanHaveChilds())
          {
            node.Checked = s.IsStepEnabled;
            _currentNormalStyles.Insert(_currentStepItems, node);
            _currentStepItems++;
          }
          else
          {
            node.Checked = s.IsStepEnabled;
            _currentNormalStyles.Add(node);
          }
        }
        
       UpdateCurrentNormalOrder(); // bring the items in the right order
      }
      if (_view != null)
      {
        _view.InitializeAvailableCoordinateTransformingGroupStyles(_availableTransfoStyles);
        _view.InitializeAvailableNormalGroupStyles(_availableNormalStyles);
        _view.InitializeCurrentNormalGroupStyles(_currentNormalStyles);
        _view.InitializeUpdateMode(_availableUpdateModes, _doc.InheritFromParentGroups, _doc.DistributeToChildGroups);
      }
    }
コード例 #39
0
		public void ChangeRowSelection(int idx, SelectableListNodeList rowSelectionTypes)
		{
			var rsItem = _rowSelections[idx];
			var rsGuiItem = rsItem.GuiItem as RowSelectionItemControl;

			if (null == rsGuiItem)
			{
				var selTypes = new SelectableListNodeList();
				foreach (var item in rowSelectionTypes)
				{
					selTypes.Add(new SelectableListNode(item.Text, item.Tag, rsItem.RowSelection.GetType() == (Type)item.Tag));
				}

				rsGuiItem = new RowSelectionItemControl(selTypes, rsItem.DetailsController?.ViewObject);
			}

			rsGuiItem.Tag = idx;
			rsGuiItem.IndentationLevel = rsItem.IndentationLevel;
			rsGuiItem.RowSelectionDetailControl = rsItem.DetailsController?.ViewObject;
			rsItem.GuiItem = rsGuiItem;

			_guiStackPanel.Children.RemoveAt(idx);
			_guiStackPanel.Children.Insert(idx, rsGuiItem);
		}
コード例 #40
0
ファイル: PenControlsGlue.cs プロジェクト: Altaxo/Altaxo
		public void InitializeCrossSectionCombobox()
		{
			_crossSectionChoices = new SelectableListNodeList();
			var selectableTypes = Altaxo.Main.Services.ReflectionService.GetNonAbstractSubclassesOf(typeof(ICrossSectionOfLine));

			foreach (var t in selectableTypes)
			{
				_crossSectionChoices.Add(new SelectableListNode(t.Name, t, t == _pen.CrossSection.GetType()));
			}

			GuiHelper.Initialize(_cbCrossSection, _crossSectionChoices);
		}
コード例 #41
0
		private void Initialize(bool initData)
		{
			if (initData)
			{
				_tableList = new SelectableListNodeList();
				foreach (var tablePath in _doc.TablesToChange.Keys)
				{
					_tableList.Add(new MyXTableListNode(tablePath[tablePath.Count - 1], tablePath, false));
				}

				_listOfSelectedTableNames = new List<string>();
				_substringReplacementCandidatesList = new SelectableListNodeList();
				_commonSubstringsList = new SelectableListNodeList();
			}
			if (null != _view)
			{
				_view.InitializeExchangeTableList(_tableList);
			}
		}
コード例 #42
0
		/// <summary>
		/// This fills the "Extend file name by column" combobox with appropriate column names.
		/// </summary>
		/// <remarks>The columns shown are either table columns (if a spectrum is a single row), or
		/// a property column (if a spectrum is a single column).</remarks>
		public void FillExtFileNameColumnBox()
		{
			Altaxo.Data.DataColumnCollection colcol;
			if (this.m_CreateSpectrumFrom == CreateSpectrumFrom.Row)
				colcol = m_Table.DataColumns;
			else
				colcol = m_Table.PropCols;

			// Fill the Combo Box with Column names
			var colnames = new SelectableListNodeList();
			for (int i = 0; i < colcol.ColumnCount; i++)
				colnames.Add(new SelectableListNode(colcol.GetColumnName(i), colcol[i], i == 0));

			// now set the contents of the combo box
			_view.FillExtFileNameColumnBox(colnames);
			_view.EnableExtFileNameColumnBox = true;
		}
コード例 #43
0
		/// <summary>Searches for common substrings in the selected table names. The character entity here is not a character from a string, but a name part, as created by <see cref="SplitNameIntoParts"/>.</summary>
		private void UpdateListOfCommonSubstringsSubfolderWise()
		{
			List<string[]> words = new List<string[]>();

			foreach (var tableName in _listOfSelectedTableNames)
			{
				var parts = SplitNameIntoParts(tableName);
				words.Add(parts);
			}
			var gsa = Altaxo.Collections.Text.GeneralizedSuffixArray.FromSeparateWords(words, true);
			var lcs = new Altaxo.Collections.Text.LongestCommonSubstringA(gsa) { StoreVerboseResults = true };
			lcs.Evaluate();
			if (lcs.MaximumNumberOfWordsWithCommonSubstring == _listOfSelectedTableNames.Count)
			{
				_commonSubstringsList = new SelectableListNodeList();
				foreach (var pos in lcs.GetSubstringPositionsCommonToTheNumberOfWords(_listOfSelectedTableNames.Count))
				{
					var first = pos.FirstPosition;
					var commonString = JoinPartsToName(words[first.WordIndex], first.Start, first.Count);
					var poss = new List<Altaxo.Collections.Text.SubstringPosition>();

					foreach (var entry in pos) // we have to convert our positions which ar subfolderWise into character-wise positions
					{
						var word = words[entry.WordIndex];
						var toStart = JoinPartsToName(word, 0, entry.Start);
						poss.Add(new Collections.Text.SubstringPosition(entry.WordIndex, toStart.Length, commonString.Length));
					}
					_commonSubstringsList.Add(new SelectableListNode(commonString, poss, false));
				}
				_commonSubstringsList[0].IsSelected = true;
			}
		}
コード例 #44
0
ファイル: ItemHandler.cs プロジェクト: Altaxo/Altaxo
		public override SelectableListNodeList GetItemList()
		{
			_list = new SelectableListNodeList();
			foreach (Altaxo.Graph.Gdi.GraphDocument t in Current.Project.GraphDocumentCollection)
				_list.Add(GetBrowserListItem(t, true));
			foreach (Altaxo.Graph.Graph3D.GraphDocument t in Current.Project.Graph3DDocumentCollection)
				_list.Add(GetBrowserListItem(t, true));

			return _list;
		}
コード例 #45
0
		/// <summary>Evaluates substrings that are common to all (!) of the <see cref="_listOfSelectedTableNames"/> and updates the <see cref="_commonSubstringsList">list of common substrings</see> with the result.</summary>
		private void UpdateListOfCommonSubstringsCharacterWise()
		{
			var gsa = Altaxo.Collections.Text.GeneralizedSuffixArray.FromSeparateWords(_listOfSelectedTableNames, true);
			var lcs = new Altaxo.Collections.Text.LongestCommonSubstringA(gsa) { StoreVerboseResults = true };
			lcs.Evaluate();
			if (lcs.MaximumNumberOfWordsWithCommonSubstring == _listOfSelectedTableNames.Count)
			{
				_commonSubstringsList = new SelectableListNodeList();
				foreach (var pos in lcs.GetSubstringPositionsCommonToTheNumberOfWords(_listOfSelectedTableNames.Count))
				{
					var first = pos.FirstPosition;
					var commonString = _listOfSelectedTableNames[first.WordIndex].Substring(first.Start, first.Count);
					_commonSubstringsList.Add(new SelectableListNode(commonString, pos, false));
				}
				_commonSubstringsList[0].IsSelected = true;
			}
		}
コード例 #46
0
 void InitializeLinkedAxisChoices()
 {
   SelectableListNodeList list = new SelectableListNodeList();
   list.Add(new SelectableListNode("None",null,m_LinkedLayer==null));
   if (null != m_Layer.ParentLayerList)
   {
     for (int i = 0; i < m_Layer.ParentLayerList.Count; i++)
     {
       if (!m_Layer.IsLayerDependentOnMe(m_Layer.ParentLayerList[i]))
         list.Add(new SelectableListNode("XYPlotLayer " + i.ToString(),m_Layer.ParentLayerList[i],m_Layer.ParentLayerList[i]==m_LinkedLayer));
     }
   }
   View.InitializeLinkedLayer(list);
 }
コード例 #47
0
 /// <summary>
 /// Get the list of size types in dependence of whether or not we have a linked layer.
 /// </summary>
 /// <returns>List of possible size types.</returns>
 SelectableListNodeList GetSizeTypeList()
 {
   SelectableListNodeList list = new SelectableListNodeList();
   XYPlotLayerSizeType toadd = XYPlotLayerSizeType.AbsoluteValue;
   list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
   toadd = XYPlotLayerSizeType.RelativeToGraphDocument;
   list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
   if (null != m_LinkedLayer)
   {
     toadd = XYPlotLayerSizeType.RelativeToLinkedLayer;
     list.Add(new SelectableListNode(Current.Gui.GetUserFriendlyName(toadd), toadd, false));
   }
   return list;
 }