Example #1
0
        public ShellViewModel(
            NoInstancesViewModel noInstances,
            ListInstancesViewModel listInstances,
            AddInstanceCommand addInstance,
            OpenViewModelCommand <License.LicenseViewModel> openLicense,
            IEventAggregator eventAggregator
            )
        {
            this.listInstances = listInstances;
            this.noInstances   = noInstances;
            OpenUrl            = new OpenURLCommand();
            AddInstance        = addInstance;
            OpenLicense        = openLicense;
            DisplayName        = "ServiceControl Config";
            IsModal            = false;

            LoadAppVersion();
            CopyrightInfo = $"{DateTime.Now.Year} © Particular Software";

            RefreshInstancesCmd = Command.Create(() =>
            {
                eventAggregator.PublishOnUIThread(new RefreshInstances());
                // Used to "blink" the refresh button to indicate the refresh actually ran.
                return(Task.Delay(500));
            });
        }
        public NoInstancesViewModel(AddInstanceCommand addInstance)
        {
            DisplayName = "DEPLOYED INSTANCES";

            AddInstance = addInstance;
        }