Example #1
0
 private void SetReadonlyStatusLabelText()
 {
     if (MappingsManager.IsRestartRequired())
     {
         StatusLabelRestartLogoff.Text    = "Restart to complete the mappings";
         StatusLabelRestartLogoff.Visible = true;
     }
     else
     {
         StatusLabelRestartLogoff.Text    = string.Empty;
         StatusLabelRestartLogoff.Visible = false;
     }
 }
Example #2
0
        void SetMappingsMenuButtonStates()
        {
            // Mappings - view all, user, boot.
            if (operatingSystemCapability.SupportsUserMappings)
            {
                switch (MappingsManager.Filter)
                {
                case MappingFilter.All:
                    clearAllToolStripMenuItem.Text = "C&lear All Mappings";
                    break;

                case MappingFilter.Boot:
                    clearAllToolStripMenuItem.Text = "C&lear All Boot Mappings";
                    break;

                case MappingFilter.User:
                    clearAllToolStripMenuItem.Text = "C&lear All User Mappings";
                    break;
                }
            }
            else
            {
                clearAllToolStripMenuItem.Text = "C&lear All Mappings";
            }
            // Disable "Clear Mappings" and "Revert To Saved Mappings" if user can't write mappings at all
            // and the latter if there haven't been any changes

            clearAllToolStripMenuItem.Enabled = !AppController.UserCannotWriteMappings;

            revertToSavedToolStripMenuItem.Enabled = (
                AppController.UserCannotWriteMappings == false &&
                (MappingsManager.IsRestartRequired() || MappingsManager.IsLogOnRequired()));

            onlyShowBootMappingsToolStripMenuItem.Text = "Boot Mappings" +
                                                         (AppController.UserCanWriteBootMappings || operatingSystemCapability.ImplementsUAC ? String.Empty : " (Read Only)");

            // Mappings - check current view
            showAllMappingsToolStripMenuItem.Checked      = (MappingsManager.Filter == MappingFilter.All);
            onlyShowBootMappingsToolStripMenuItem.Checked = (MappingsManager.Filter == MappingFilter.Boot);
            onlyShowUserMappingsToolStripMenuItem.Checked = (MappingsManager.Filter == MappingFilter.User);

            // Whether to allow the option of viewing user mappings (ie not on W2K)

            chooseMappingsToolStripMenuItem.Visible = (operatingSystemCapability.SupportsUserMappings);

            selectFromCaptureToolStripMenuItem.Enabled = !AppController.UserCannotWriteMappings;
        }
Example #3
0
        void SetReadonlyStatusLabelText()
        {
            if (MappingsManager.IsRestartRequired())
            {
                StatusLabelRestartLogoff.Text    = "Restart to complete the mappings";
                StatusLabelRestartLogoff.Visible = true;
            }
            else if (MappingsManager.IsLogOnRequired())
            {
                StatusLabelRestartLogoff.Text    = "Log on again to complete the mappings";
                StatusLabelRestartLogoff.Visible = true;
            }
            else
            {
                StatusLabelRestartLogoff.Text    = String.Empty;
                StatusLabelRestartLogoff.Visible = false;
            }

            StatusLabelReadOnly.Visible = (AppController.UserCannotWriteMappings && !operatingSystemCapability.ImplementsUAC);
        }