public AccountWindow(Window owner, AccountModel model) { Model = model; InitLists(); Owner = owner; InitializeComponent(); }
private void btnAddPhoneLine_Click(object sender, RoutedEventArgs e) { AccountModel model = new AccountModel(); AccountWindow accountWin = new AccountWindow(this, model); bool? ok = accountWin.ShowDialog(); if (ok != null && ok == true) { var line = Model.AddPhoneLine(model.SIPAccount, model.TransportType, model.NatConfig, model.SRTPMode); if (Model.SelectedLine == null) Model.SelectedLine = line; } }