예제 #1
0
 //-----------------------------------------------------------------------------------------------------------------------------------------------------
 public WebApplicationComponent(IWebAppEndpoint endpoint, Auto<ILogger> logger, IComponentContext componentContext)
 {
     _app = endpoint.Contract;
     _address = endpoint.Address;
     _logger = logger.Instance;
     _container = (ILifetimeScope)componentContext;
 }
예제 #2
0
        public TaskBarIconViewModel(IDependencyResolver resolver,
                                    IUiApplication uiApplication,
                                    IDispatcher dispatcher,
                                    IEnvironmentParameters environmentParameters,
                                    WallpaperClientVersionService wallpaperClientVersionService)
        {
            _regKeyAutostart = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            _orchestrator    = new WallpaperOrchestrator(resolver);
            _state           = new NoConnection(_orchestrator, this);

            _uiApplication                 = uiApplication;
            _environmentParameters         = environmentParameters;
            _wallpaperClientVersionService = wallpaperClientVersionService;
            ExitCommand            = new RelayCommand(x => OnExit());
            LoginCommand           = new AsyncRelayCommand(() => _state.OnLogin());
            ChangeAutostartCommand = new RelayCommand(x => OnChangeAutostart());
            ResetViewCommand       = new RelayCommand(x => OnResetView());
            ExecuteUpdateCommand   = new AsyncRelayCommand(() => OnExecuteUpdateCommand(), x => _updateHandle != null && _updateHandle.HasNewVersion);

            dispatcher.Dispatch(() =>
            {
                _state.OnLogin();
            });
        }
예제 #3
0
 protected string GetConfiguredAddress(IUiApplication contract)
 {
     return "http://localhost:" + Interlocked.Increment(ref _s_lastUsedPortNumber) + "/";
 }