Exemplo n.º 1
0
        /// <inheritdoc/>
        public void Run(IConsole console)
        {
            if (console is null)
            {
                throw new ArgumentNullException(nameof(console));
            }

            console.WriteLine(_resolver.GetVersion());
        }
 /// <summary>
 /// Initializes a new instance of the MainViewModel class.
 /// </summary>
 public MainViewModel(IVersionResolver versionResolver, IWindowService windowService, ViewModelBaseExt liveDataViewModel,
                      ViewModelBaseExt applicationSettingsViewModel, LoggingViewModel loggingViewModel)
 {
     Title = $"Car diagnostic Application {versionResolver.GetVersion()}";
     LogManager.GetCurrentClassLogger().Warn($"~Starting up {Title}");
     _windowService               = windowService;
     _liveDataViewModel           = liveDataViewModel;
     _applcationSettingsViewModel = applicationSettingsViewModel;
     _loggingViewModel            = loggingViewModel;
     _loggingViewModel.Log(new LogInfoItem("Welcome.", LogInfoSeverity.Info));
 }
Exemplo n.º 3
0
        private async Task <VersionManifest> loadManif(MCVersion v)
        {
            VersionManifestDefinition def = await resolver.GetVersion(v);

            if (def.JarFrom != null)
            {
                await getManifestFor(GetRemoteVersion(def.JarFrom));
            }
            if (def.InheritsFrom != null)
            {
                await getManifestFor(GetRemoteVersion(def.InheritsFrom));
            }
            return(new VersionManifest(def, this));
        }
Exemplo n.º 4
0
        public int Run()
        {
            var version = _resolver.GetVersion();
            var product = _resolver.GetProductVersion();

            _console.WriteLine();
            _console.WriteLine(@"             +##   #;;'");
            _console.WriteLine(@"             #;;#  .+;;;;+,");
            _console.WriteLine(@"             '+;;#;,+';;;;;'#.");
            _console.WriteLine(@"             ++'''';;;;;;;;;;# ;#;");
            _console.WriteLine(@"            ##';;;;++'+#;;;;;'.   `#:");
            _console.WriteLine(@"         ;#   '+'';;;;;;;;;'#`       #.");
            _console.WriteLine(@"      `#,        .'++;;;;;':..........#");
            _console.WriteLine(@"    '+      `.........';;;;':.........#");
            _console.WriteLine(@"   #..................+;;;;;':........#");
            _console.WriteLine(@"   #..................#';;;;;'+''''''.#");
            _console.WriteLine(@"   #.......,:;''''''''##';;;;;'+'''''#,");
            _console.WriteLine(@"   #''''''''''''''''''###';;;;;;+''''#");
            _console.WriteLine(@"   #''''''''''''''''''####';;;;;;#'''#");
            _console.WriteLine(@"   #''''''''''''''''''#####';;;;;;#''#");
            _console.WriteLine(@"   #''''''''''''''''''######';;;;;;#'#");
            _console.WriteLine(@"   #''''''''''''''''''#######';;;;;;##");
            _console.WriteLine(@"   #''''''''''''''''''########';;;;;;#");
            _console.WriteLine(@"   #''''''''''''++####+;#######';;;;;;#");
            _console.WriteLine(@"   #+####':,`             ,#####';;;;;;'");
            _console.WriteLine(@"                              +##'''''+.");

            _console.ForegroundColor = System.ConsoleColor.Yellow;
            _console.WriteLine(@"   ___      _          ___       _ _     _ ");
            _console.WriteLine(@"  / __\__ _| | _____  / __\_   _(_) | __| |");
            _console.WriteLine(@" / /  / _` | |/ / _ \/__\// | | | | |/ _` |");
            _console.WriteLine(@"/ /___ (_| |   <  __/ \/  \ |_| | | | (_| |");
            _console.WriteLine(@"\____/\__,_|_|\_\___\_____/\__,_|_|_|\__,_|");
            _console.ResetColor();

            _console.WriteLine();
            _console.WriteLine(@"Version: {0}", version);
            _console.WriteLine(@"Details: {0}", string.Join("\n         ", product.Split('/')));
            _console.WriteLine();

            return(0);
        }
Exemplo n.º 5
0
 public int Run()
 {
     _console.WriteLine(_resolver.GetVersion());
     return(0);
 }