Beispiel #1
0
        /// <inheritdoc />
        public ServiceListViewItem Show(ServiceListViewItem item, EditWindowServiceCommand command = EditWindowServiceCommand.EditOrCreate)
        {
            //TODO: MVVM
            var dialog = new ServiceEditWindow(item != null ? RegistryManagement.LoadFromRegistry(item.ServiceName) : null)
            {
                OriginalItem = item,
                ReadOnlyMode = command == EditWindowServiceCommand.ViewOnly
            };

            dialog.Show();
            //var result = dialog.ShowDialog();
            //if (result.HasValue && result.Value)
            //{
            //    return new ServiceListViewItem(dialog.GetServiceStartInfo());
            //}

            return(null);
        }
Beispiel #2
0
 public UpdateServiceItemMessage(object sender, ServiceListViewItem oldItem, ServiceListViewItem newItem) : base(sender)
 {
     OldServiceItem = oldItem;
     NewServiceItem = newItem;
 }
 public OpenEditServiceWindowMessage(object sender, ServiceListViewItem item, bool readOnlyMode) : base(sender)
 {
     ServiceItem  = item;
     ReadOnlyMode = readOnlyMode;
 }