예제 #1
0
        public CohortIdentificationConfigurationMenu(RDMPContextMenuStripArgs args, CohortIdentificationConfiguration cic) : base(args, cic)
        {
            _cic = cic;

            Items.Add("View SQL", _activator.CoreIconProvider.GetImage(RDMPConcept.SQL), (s, e) => _activator.Activate <ViewCohortIdentificationConfigurationUI, CohortIdentificationConfiguration>(cic));

            Items.Add(new ToolStripSeparator());

            _executeAndImportCommand = new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(_activator).SetTarget(cic);

            Add(_executeAndImportCommand);

            //associate with project
            Add(new ExecuteCommandAssociateCohortIdentificationConfigurationWithProject(_activator).SetTarget(cic));

            Items.Add(new ToolStripSeparator());

            _executeCommandClone = new ExecuteCommandCloneCohortIdentificationConfiguration(_activator).SetTarget(cic);
            Add(_executeCommandClone);

            Add(new ExecuteCommandFreezeCohortIdentificationConfiguration(_activator, cic, !cic.Frozen));

            Items.Add(new ToolStripSeparator());

            Add(new ExecuteCommandCreateNewCohortIdentificationConfiguration(_activator));

            Add(new ExecuteCommandSetQueryCachingDatabase(_activator, cic));
            Add(new ExecuteCommandCreateNewQueryCacheDatabase(_activator, cic));
        }
예제 #2
0
        public CohortIdentificationConfigurationMenu(RDMPContextMenuStripArgs args, CohortIdentificationConfiguration cic): base(args, cic)
        {
            _cic = cic;

            Items.Add("View SQL", _activator.CoreIconProvider.GetImage(RDMPConcept.SQL), (s, e) => _activator.Activate<ViewCohortIdentificationConfigurationUI, CohortIdentificationConfiguration>(cic));
                
            Items.Add(new ToolStripSeparator());

            _executeAndImportCommand = new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(_activator).SetTarget(cic);
            
            Add(_executeAndImportCommand);
            
            //associate with project
            Add(new ExecuteCommandAssociateCohortIdentificationConfigurationWithProject(_activator).SetTarget(cic));
            
            Items.Add(new ToolStripSeparator());

            _executeCommandClone = new ExecuteCommandCloneCohortIdentificationConfiguration(_activator).SetTarget(cic);
            Add(_executeCommandClone);

            Add(new ExecuteCommandFreezeCohortIdentificationConfiguration(_activator, cic, !cic.Frozen));
            
            Items.Add(new ToolStripSeparator());

            Add(new ExecuteCommandCreateNewCohortIdentificationConfiguration(_activator));

            if(_activator.CoreChildProvider is DataExportChildProvider dx)
                AddGoTo(()=>dx.AllProjectAssociatedCics.Where(a=>a.CohortIdentificationConfiguration_ID == cic.ID).Select(a=>a.Project).Distinct(),"Project(s)");
            
        }
예제 #3
0
파일: HomeUI.cs 프로젝트: rkm/RDMP
        private void AddCommand <T>(IAtomicCommandWithTarget command, IEnumerable <T> selection, Func <T, string> propertySelector, TableLayoutPanel tableLayoutPanel)
        {
            var control = _uiFactory.CreateLinkLabelWithSelection(command, selection, propertySelector);

            SetBackgroundColor(tableLayoutPanel, control);

            tableLayoutPanel.Controls.Add(control, 0, tableLayoutPanel.Controls.Count);

            //extend the size to match
            var panel = (Panel)tableLayoutPanel.Parent;

            panel.Width = Math.Max(panel.Width, control.Width + 10);
        }
예제 #4
0
        public AtomicCommandWithTargetUI(IIconProvider iconProvider, IAtomicCommandWithTarget command, IEnumerable <T> selection, Func <T, string> propertySelector)
        {
            _command = command;
            InitializeComponent();

            _selection = selection.ToArray();

            pbCommandIcon.Image       = command.GetImage(iconProvider);
            helpIcon1.BackgroundImage = iconProvider.GetImage(RDMPConcept.Help);

            string name = command.GetCommandName();

            lblName.Text = name;

            helpIcon1.SetHelpText(_command.GetCommandName(), _command.GetCommandHelp());

            selectIMapsDirectlyToDatabaseTableComboBox1.SetUp(_selection.Cast <IMapsDirectlyToDatabaseTable>().ToArray());
            selectIMapsDirectlyToDatabaseTableComboBox1.SelectedItemChanged += suggestComboBox1_SelectedIndexChanged;
            lblGo.Enabled = false;

            Enabled = _selection.Any();
        }
예제 #5
0
 public AtomicCommandWithTargetUI <T> CreateLinkLabelWithSelection <T>(IAtomicCommandWithTarget command, IEnumerable <T> selection, Func <T, string> propertySelector)
 {
     return(new AtomicCommandWithTargetUI <T>(_iconProvider, command, selection, propertySelector));
 }