コード例 #1
0
        private void EditCurrent()
        {
            __layoutEdition.Items.Clear();

            if (CurrentShape == null)
            {
                __layoutEdition.Visibility = Visibility.Collapsed;
            }
            else
            {
                // Editable components
                foreach (Base _component in CurrentShape.TypeInfo.EditableComponents)
                {
                    ObjectEditControl _dataform = new ObjectEditControl();
                    _dataform.Object     = _component;
                    _dataform.ShowHeader = true;
                    __layoutEdition.Items.Add(_dataform);
                }
                __layoutEdition.Visibility = Visibility.Visible;

                foreach (GraphShape _shape in __graph.Shapes)
                {
                    if (_shape != CurrentShape)
                    {
                        Base _claimedComponent = CurrentShape.TypeInfo.GetClaimedComponentBy(_shape.TypeInfo);
                        _shape.EditComponent(_claimedComponent);
                    }
                }
            }
        }
コード例 #2
0
ファイル: GraphShape.cs プロジェクト: CFLShine/CFL
        private void initContent()
        {
            Content = __layout;
            __layout.Orientation = System.Windows.Controls.Orientation.Horizontal;
            __layout.Items.Add(__label);

            __objectEditControl = new ObjectEditControl();
            __layout.Items.Add(__objectEditControl);

            __label.IsHitTestVisible  = false;
            __layout.IsHitTestVisible = false;
        }