Ejemplo n.º 1
0
 private void OnInstancePropertiesStatus(object sender, CommandStatusEventArgs e)
 {
     if (SelectedItem is PartialMonitoringObject)
     {
         e.CommandStatus.Enabled = true;
     }
 }
        protected override void UpdateViewPropertiesCommandStatus(object sender, CommandStatusEventArgs args)
        {
            Dbg.Log($"Entering {MethodBase.GetCurrentMethod().Name}");

            args.CommandStatus.Enabled = true;
            args.CommandStatus.Visible = true;
        }
Ejemplo n.º 3
0
        private void OnInstancePropertiesStatus(object sender, CommandStatusEventArgs e)
        {
            Dbg.Log($"Entering {MethodBase.GetCurrentMethod().Name}");

            if (SelectedItem is PartialMonitoringObject)
            {
                e.CommandStatus.Enabled = true;
            }
        }
 private void OnEditTestStatus(object sender, CommandStatusEventArgs e)
 {
     if (Grid.SelectedRows != null && Grid.SelectedRows.Count == 1)
     {
         e.CommandStatus.Enabled = true;
     }
     else
     {
         e.CommandStatus.Enabled = false;
     }
 }
 private void OnDeleteDestinationStatus(object sender, CommandStatusEventArgs e)
 {
     if (Grid.SelectedRows != null && Grid.SelectedRows.Count >= 1)
     {
         e.CommandStatus.Enabled = true;
     }
     else
     {
         e.CommandStatus.Enabled = false;
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Can the Properties command be used on this object?
 /// </summary>
 /// <param name="sender">sending DataGrid</param>
 /// <param name="args">Command Status Arguments</param>
 protected override void UpdatePropertiesCommandStatus(object sender, CommandStatusEventArgs args)
 {
     args.CommandStatus.Visible = true;
     args.CommandStatus.Enabled = Grid.SelectedRows.Count == 1;
     if (args.CommandStatus.Enabled)
     {
         GridDataItem tag = (GridDataItem)Grid.SelectedRows[0].Cells[0].Tag;
         if (tag == null || tag.IsHeader)
         {
             args.CommandStatus.Enabled = false;
         }
     }
 }
        private void OnMaintenanceModeStartStatus(object sender, CommandStatusEventArgs e)
        {
            e.CommandStatus.Enabled = false;
            ConsoleUserSettings service = (ConsoleUserSettings)GetService(typeof(ConsoleUserSettings));

            if (!ManagementGroupSession.IsUserOperator || service != null && Grid.SelectedRows.Count > service.MaxItemsForMaintenanceMode)
            {
                e.CommandStatus.Visible = false;
            }
            else
            {
                e.CommandStatus.Visible = true;
                e.CommandStatus.Enabled = GridSelectedItems?.All(si => !si.InMaintenanceMode) ?? false;
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Determines if we should allow the Delete button or Grey it out.
        /// </summary>
        /// <param name="sender">Sending DataGrid Row</param>
        /// <param name="e">Command Arguments</param>
        private void OnStatusDelete(object sender, CommandStatusEventArgs e)
        {
            if (GetGridSelection().Count == 1)
            {
                // If there is only one item selected, we need to make sure that it is installed before we attempt to delete it.
                GitHubPackDetail selectedPack = GridSelectedItem as GitHubPackDetail;
                if (selectedPack.InstalledManagementPack == null)
                {
                    e.CommandStatus.Enabled = false;
                }
                else
                {
                    e.CommandStatus.Enabled = true;
                }

                return;
            }

            e.CommandStatus.Enabled = false;
        }
Ejemplo n.º 9
0
 protected override void UpdateViewPropertiesCommandStatus(object sender, CommandStatusEventArgs args)
 {
     args.CommandStatus.Enabled = true;
     args.CommandStatus.Visible = true;
 }
Ejemplo n.º 10
0
 private void UpdatePersonalizeCommandStatus(object sender, CommandStatusEventArgs e)
 {
     e.CommandStatus.Enabled = true;
 }
Ejemplo n.º 11
0
 private void OnPersonalizationStatus(object sender, CommandStatusEventArgs e)
 {
     e.CommandStatus.Enabled = true;
 }
Ejemplo n.º 12
0
 private void OnViewPropertiesStatus(object sender, CommandStatusEventArgs e)
 {
     UpdateViewPropertiesCommandStatus(sender, e);
 }
        private void UpdatePersonalizeCommandStatus(object sender, CommandStatusEventArgs e)
        {
            Dbg.Log($"Entering {MethodBase.GetCurrentMethod().Name}");

            e.CommandStatus.Enabled = true;
        }
        private void OnViewPropertiesStatus(object sender, CommandStatusEventArgs e)
        {
            Dbg.Log($"Entering {MethodBase.GetCurrentMethod().Name}");

            UpdateViewPropertiesCommandStatus(sender, e);
        }