public AliasStateViewModel(IAliasStateProvider provider, string serverName, Growler growler) { _provider = provider; _growler = growler; ServerName = serverName; _stateIcons = new StateIcons(); OnAliasStateChanged(string.Empty); }
public AliasConfigForm() { InitializeComponent(); _stateProvider = new AliasStateProvider(serverToAliasTextBox.Text); _growler = new Growler(); _growler.Register(); _model = _viewModel = new AliasStateViewModel(_stateProvider, Settings.Default.ServerToAlias, _growler); _viewModel.PropertyChanged += AliasStateChanged; stateBindingSource.DataSource = _viewModel; SetUIStateFromProvider(); }