public AliasStateViewModel(IAliasStateProvider provider, string serverName, Growler growler)
        {
            _provider = provider;
            _growler = growler;
            ServerName = serverName;
            _stateIcons = new StateIcons();

            OnAliasStateChanged(string.Empty);
        }
예제 #2
0
        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();
        }