Example #1
0
 private static void addNewItem(TransitionType item)
 {
     if (TransitionType.values == null)
     {
         TransitionType.values = new List<TransitionType>();
     }
     TransitionType.values.Add(item);
 }
Example #2
0
 public AbstractTransition(string name, long unid, bool showAnnotation, double angle, PointF origo, SizeF size, int priority, TransitionType transitionType, int delay, float clockRadius, PointF clockOffset)
     : base(name, unid, showAnnotation, origo, size)
 {
     this.Angle = angle;
     this.priority = priority;
     this.transitionType = transitionType;
     this.delay = delay;
     this.clockRadius = clockRadius;
     this.clockOffset = clockOffset;
 }
Example #3
0
 public static ComboBox getPropertyTransitionTypeComboBox(TransitionType transitionType, EventHandler handler, PropertyTag propertyTag, bool disabled)
 {
     ComboBox control = new ComboBox();
     control.Name = "tbCustomComboBox_" + ControlHelper.CONTROLCOUNT++;
     foreach (TransitionType item in TransitionType.Values)
     {
         control.Items.Add(item);
     }
     control.SelectedItem = transitionType;
     control.DropDownStyle = ComboBoxStyle.DropDownList;
     control.SelectedValueChanged += handler;
     control.Tag = propertyTag;
     control.Enabled = !disabled;
     control.Anchor = ((AnchorStyles)((AnchorStyles.Left | AnchorStyles.Right)));
     return control;
 }
Example #4
0
 private void addCustomPropertyTransitionTypeComboBoxRow(AbstractNetwork network, string labelText, TransitionType transitionType, 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.getPropertyTransitionTypeComboBox(transitionType, new EventHandler(dynamicProperty_ValueChanged), new PropertyTag(networkProperty, network), disabled), 1, this.tmpPropertyPanelRowCount);
     this.tmpPropertyPanelRowCount++;
 }
Example #5
0
 public Transition(string name, long unid, bool showAnnotation, double angle, PointF origo, SizeF size, int priority, TransitionType transitionType, int delay, float clockRadius, PointF clockOffset)
     : base(name, unid, showAnnotation, angle, origo, size, priority, transitionType, delay, clockRadius, clockOffset)
 {
     //
 }
Example #6
0
 public void changeTransitionType(Transition transition, TransitionType transitionType)
 {
     if ((transition != null) && (transitionType != null))
     {
         List<AbstractEdge> edgesToDelete = new List<AbstractEdge>();
         if ( TransitionType.SINK.Equals(transitionType))
         {
             edgesToDelete = this.getAllOutputEdge(transition);
         } else if ( TransitionType.SOURCE.Equals(transitionType)) {
             edgesToDelete = this.getAllInputEdge(transition);
         }
         if (edgesToDelete.Count > 0)
         {
             this.deleteEdges(edgesToDelete);
         }
     }
 }