Ejemplo n.º 1
0
        public AliasStateViewModel(IAliasStateProvider provider, string serverName, Growler growler)
        {
            _provider = provider;
            _growler = growler;
            ServerName = serverName;
            _stateIcons = new StateIcons();

            OnAliasStateChanged(string.Empty);
        }
Ejemplo n.º 2
0
        public void Register()
        {
            var name = "SQL Aliaser";

            var icons = new StateIcons();

            _application = new Application(name) {
                                                     Icon = new BinaryData(GetIconBytes(icons.NotAliased))
                                                 };

            Resource aliasedIcon = new BinaryData(GetIconBytes(icons.Aliased));
            Resource notAliasedIcon = new BinaryData(GetIconBytes(icons.NotAliased));

            _aliasedNotification = new NotificationType("Aliased", "Aliased", aliasedIcon, true);
            _notAliasedNotification = new NotificationType("NotAliased", "Not Aliased", notAliasedIcon, true);
            _closedNotification = new NotificationType("Closed", "Shut Down");
            _connector.Register(_application, new[] { _aliasedNotification, _notAliasedNotification, _closedNotification });
        }