コード例 #1
0
        /// <summary>
        /// This is the tool click handler for the Applications>Licensing ribbon group
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void licensing_ToolClick(object sender, ToolClickEventArgs e)
        {
            ApplicationsWorkItemController controller = workItem.Controller as ApplicationsWorkItemController;

            switch (e.Tool.SharedProps.Caption)
            {
            case ToolNames.SetIgnored:
                controller.SetIgnored();
                break;

            case ToolNames.SetIncluded:
                controller.SetIncluded();
                break;

            case ToolNames.NewLicense:
                controller.NewLicense();
                break;

            case ToolNames.EditLicense:
                controller.EditLicense();
                break;

            case ToolNames.DeleteLicense:
                controller.DeleteLicense();
                break;

            default:
                break;
            }
        }
コード例 #2
0
        private void setIncludedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Create a list of the selected applications
            List <InstalledApplication>    listApplications = GetSelectedApplications();
            ApplicationsWorkItemController wiController     = WorkItem.Controller as ApplicationsWorkItemController;

            if (wiController != null)
            {
                wiController.SetIncluded(listApplications);
            }

            WorkItem.ExplorerView.RefreshView();
        }