Ejemplo n.º 1
0
 public LadderTabItem(LadderDiagramModel model, ScaleTransform scale)
 {
     Content = _ladderCanvas;
     BindingOperations.SetBinding(this, TabItem.HeaderProperty, new Binding()
     {
         Source = model, Path = new System.Windows.PropertyPath("Name"), Mode = BindingMode.OneWay
     });
     _ladderCanvas.LoadLadderDiagram(model);
     _ladderCanvas.LayoutTransform = scale;
     MinWidth = 100;
 }
Ejemplo n.º 2
0
 public void LoadLadderDiagram(LadderDiagramModel ladmodel)
 {
     LadderContext = ladmodel;
     Children.Clear();
     foreach (var model in ladmodel.GetVerticalLines())
     {
         Children.Add(model);
     }
     foreach (var model in ladmodel.GetElements())
     {
         Children.Add(model);
     }
     Children.Add(_selectRect);
     _selectRect.Visibility = Visibility.Visible;
 }
Ejemplo n.º 3
0
 public void ShowItem(LadderDiagramModel ldmodel)
 {
     ShowItem(ldmodel.Name);
 }