public void SetDataModel(IAnkiDeckOptionsViewModel data) { viewModel = data as DeckSimpleOptionsViewModel; if (viewModel == null) { throw new Exception("Wrong datatype. Expected datatype: DeckSimpleOptionsViewModel"); } }
public void SetDataModel(IAnkiDeckOptionsViewModel data) { viewModel = data as DeckLapseOptionsViewModel; if (viewModel == null) { throw new Exception("Wrong datatype. Expected datatype: DeckLapseOptionsViewModel"); } delaysTextBox.Text = viewModel.Options.Delays; viewModel.Options.PropertyChanged += Options_PropertyChanged; }
public void SetDataModel(IAnkiDeckOptionsViewModel data) { viewModel = data as DeckNewOptionsViewModel; if (viewModel == null) { throw new Exception("Wrong datatype. Expected datatype: DeckNewOptionsViewModel"); } //Can't use data binding for this TextBox, see numberic text box for reason delaysTextBox.Text = viewModel.Options.Delays; viewModel.Options.PropertyChanged += OptionsPropertyChangedHandler; }