Beispiel #1
0
 protected virtual void OnElementSelection(object sender, ElementSelectionEventArgs e)
 {
     if (ElementSelection != null)
     {
         ElementSelection(sender, e);
     }
 }
Beispiel #2
0
 protected virtual void OnElementSelection(ElementSelectionEventArgs e)
 {
     if (ElementSelection != null)
     {
         ElementSelection(this, e);
     }
 }
Beispiel #3
0
        private void DesignerElementSelection(object sender, ElementSelectionEventArgs e)
        {
            if (e.Elements.Count == 0)
            {
                _propertiesWindow.PropertyGrid.SelectedObject = null;
                _propertiesWindow.PropertyGrid.Refresh();
                _outputWindow.Block = null;
                _outputWindow.Refresh();
                return;
            }

            foreach (var element in e.Elements)
            {
                if (!(element is DiagramBlock))
                {
                    continue;
                }
                var diagramBlock = (DiagramBlock)element;
                var block        = (BlockBase)diagramBlock.State;
                _propertiesWindow.PropertyGrid.SelectedObject = block;
                _propertiesWindow.PropertyGrid.Refresh();
                _outputWindow.Block = block;
                _outputWindow.Refresh();
                break;
            }
        }
Beispiel #4
0
 void designer1_ElementSelection(object sender, ElementSelectionEventArgs e)
 {
     pgSelectedElement.SelectedObjects = e.Elements.Cast <Dalssoft.DiagramNet.BaseElement>().Where(es => es.Tag != null).Select(es => es.Tag).ToArray();
 }
Beispiel #5
0
 private void DocumentElementSelection(object sender, ElementSelectionEventArgs e)
 {
     OnElementSelection(e);
 }
Beispiel #6
0
 private void OnElementSelection(ElementSelectionEventArgs e)
 {
     ElementSelection?.Invoke(this, e);
 }
Beispiel #7
0
 protected virtual void OnElementSelection(object sender, ElementSelectionEventArgs e)
 {
     ElementSelection?.Invoke(sender, e);
 }
Beispiel #8
0
        private void designer1_ElementSelection(object sender, ElementSelectionEventArgs e)
        {
            if (e.Elements.Count > 0)
            {
                if (e.Elements[0].GetType() == typeof(MFRectangleNode))
                {
                    MFRectangleNode  RectNode = (MFRectangleNode)e.Elements[0];
                    ComponentWrapper comp     = (ComponentWrapper)RectNode.Tag;

                    switch (comp.ComponentType)
                    {
                    case ComponentTypeWrapper.Library:
                        LibraryWrapper lib = PK.Wrapper.FindLibrary(comp.Guid);
                        if (lib != null)
                        {
                            this.OnSelectionChangeEvent(lib);
                        }
                        break;

                    case ComponentTypeWrapper.Feature:
                        FeatureWrapper feat = PK.Wrapper.FindFeature(comp.Guid);
                        if (feat != null)
                        {
                            this.OnSelectionChangeEvent(feat);
                        }
                        break;

                    case ComponentTypeWrapper.MFAssembly:
                        break;

                    case ComponentTypeWrapper.MFSolution:
                        break;

                    case ComponentTypeWrapper.Processor:
                        break;

                    case ComponentTypeWrapper.OperatingSystem:
                        break;

                    case ComponentTypeWrapper.BuildTool:
                        break;

                    case ComponentTypeWrapper.ISA:
                        break;

                    case ComponentTypeWrapper.BuildParameter:
                        break;

                    case ComponentTypeWrapper.LibraryCategory:
                        LibraryCategoryWrapper libcat = PK.Wrapper.FindLibraryCategory(comp.Guid);
                        if (libcat != null)
                        {
                            this.OnSelectionChangeEvent(libcat);
                        }
                        break;

                    case ComponentTypeWrapper.Unknown:
                        break;

                    default:
                        break;
                    }
                }
            }
        }