Ejemplo n.º 1
0
 private void addCustomPropertyEdgeTypeComboBoxRow(AbstractNetwork network, string labelText, EdgeType edgeType, NetworkProperty networkProperty, bool disabled)
 {
     this.tlpProperty.RowStyles.Add(new RowStyle(SizeType.Absolute, MDIParent.PROPERTY_ROW_HEIGHT));
     this.tlpProperty.Controls.Add(ControlHelper.getPropertyLabel(labelText), 0, this.tmpPropertyPanelRowCount);
     this.tlpProperty.Controls.Add(ControlHelper.getPropertyEdgeTypeComboBox(edgeType, new EventHandler(dynamicProperty_ValueChanged), new PropertyTag(networkProperty, network), disabled), 1, this.tmpPropertyPanelRowCount);
     this.tmpPropertyPanelRowCount++;
 }
Ejemplo n.º 2
0
 public StateVector(string name, long unid, AbstractNetwork network, PointF origo, float radius)
 {
     this.tokenDistribution = new Dictionary<Int64, List<AbstractToken>>();
     if (network is PetriNetwork)
     {
         List<Position> positions = (network as PetriNetwork).Positions;
         foreach (Position position in positions)
         {
             List<AbstractToken> copiedTokens = new List<AbstractToken>();
             copiedTokens.AddRange(position.Tokens);
             this.tokenDistribution.Add(position.Unid, copiedTokens);
         }
     }
     this.init(name, unid, origo, radius);
 }
Ejemplo n.º 3
0
 public PropertyTag(NetworkProperty property, AbstractNetwork network)
     : this(null, null, property)
 {
     this.network = network;
 }
Ejemplo n.º 4
0
 public static PropertyGroupMoveTool getPropertyGroupMoveTool(float smallStep, float longStep, AbstractNetwork network, PropertyGroupMoveHandler handler, NetworkProperty networkProperty, bool disabled)
 {
     PropertyGroupMoveTool tool = new PropertyGroupMoveTool();
     tool.Name = "pgmtCustomPropertyGroupMoveTool" + ControlHelper.CONTROLCOUNT++;
     tool.Network = network;
     tool.Property = networkProperty;
     tool.valueChanged += handler;
     tool.SmallStep = smallStep;
     tool.LongStep = longStep;
     tool.Anchor = ((AnchorStyles)((AnchorStyles.Left | AnchorStyles.Right)));
     return tool;
 }
Ejemplo n.º 5
0
 private void addCustomPropertyGroupMoveToolRow(string labelText, float smallStep, float longStep, AbstractNetwork network, NetworkProperty networkProperty, bool disabled)
 {
     this.tlpProperty.RowStyles.Add(new RowStyle(SizeType.Absolute, MDIParent.PROPERTY_ROW_HEIGHT_BUTTON));
     this.tlpProperty.Controls.Add(ControlHelper.getPropertyLabel(labelText), 0, this.tmpPropertyPanelRowCount);
     this.tlpProperty.Controls.Add(ControlHelper.getPropertyGroupMoveTool(smallStep, longStep, network, new PropertyGroupMoveHandler(PropertyGroupMoveTool_valueChanged), networkProperty, disabled), 1, this.tmpPropertyPanelRowCount);
     this.tmpPropertyPanelRowCount++;
 }
Ejemplo n.º 6
0
 private void PropertyGroupMoveTool_valueChanged(AbstractNetwork network, NetworkProperty networkProperty, float value)
 {
     if ((this.tlpProperty != null) && (this.tlpProperty.Tag != null))
     {
         if (this.tlpProperty.Tag is NetworkPropertyGroup)
         {
             NetworkPropertyGroup npg = (NetworkPropertyGroup)this.tlpProperty.Tag;
             network.modifySelectedItems(networkProperty, value);
             this.reDrawActivePetriNetwork();
         }
     }
 }