public AddBridgeViewModel(IAddBridgeView view, ChildBridge child) : this(view) { this.WindowTitle = "编辑桥梁"; this.BridgeId = child.Id; this.BridgeName = child.Name; this.BridgePile = child.PileId; this.BridgeType = this.BridgeTypeCollection.First((p) => p.Id.Equals(child.TypeId)); }
public ChildBridge GetEditedChildBridge(ChildBridge child) { AddBridgeWindow abw = new AddBridgeWindow(child); abw.Owner = Window.GetWindow(this); if (abw.ShowDialog().Value) { return(abw.NewChildBridge); } return(null); }
public AddBridgeWindow(ChildBridge child) { InitializeComponent(); this.m_PopupMsg = new PopupMessage(); this.DataContext = new AddBridgeViewModel(this, child); }