コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(ISignToolService signToolService)
        {
            _signToolService = signToolService;
            _logBuilder      = new StringBuilder();

            _startServerCommand = new RelayCommand(StartServer, CanStartServer);
            _stopServerCommand  = new RelayCommand(StopServer, CanStopServer);

            MessengerInstance.Register <LogMessage>(
                this,
                message =>
            {
                _logBuilder.AppendLine(message.Message);
                RaisePropertyChanged(() => Log);
            });

            this.BaseAddress = Properties.Settings.Default.BaseAddress;

            string signToolPath;

            if (!_signToolService.TryToFindSignToolPath(out signToolPath))
            {
                Logger.Error(Properties.Resources.SignToolNotInstalled);
            }
        }
コード例 #2
0
 public SignToolController(ISignToolService signToolService)
 {
     _signToolService = signToolService;
 }