| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- namespace FlowWorkEditDemo
- {
- class Link: INotifyPropertyChanged
- {
- [Browsable(false)]
- public FlowNode Source { get; private set; }
- [Browsable(false)]
- public PortKinds SourcePort { get; private set; }
- [Browsable(false)]
- public FlowNode Target { get; private set; }
- [Browsable(false)]
- public PortKinds TargetPort { get; private set; }
- private string _text;
- public string Text
- {
- get { return _text; }
- set
- {
- _text = value;
- OnPropertyChanged("Text");
- }
- }
- public Link(FlowNode source, PortKinds sourcePort, FlowNode target, PortKinds targetPort)
- {
- Source = source;
- SourcePort = sourcePort;
- Target = target;
- TargetPort = targetPort;
- }
- #region INotifyPropertyChanged Members
- public event PropertyChangedEventHandler PropertyChanged;
- protected void OnPropertyChanged(string name)
- {
- if (PropertyChanged != null)
- PropertyChanged(this, new PropertyChangedEventArgs(name));
- }
- #endregion
- }
- enum PortKinds
- {
- Top,
- Bottom,
- Left,
- Right
- }
- }
|