Exemplo n.º 1
0
 private void Command_IconChanged(object sender, EventArgs e)
 {
     this.DisposeImage();
     if (this.Command.Icon != null)
     {
         this.Image = IconLibrary.ToSmallBitmap(this.Command.Icon);
     }
 }
Exemplo n.º 2
0
 public TridentsWizardPage()
 {
     this.InitializeComponent();
     base.ContentPanel.SuspendLayout();
     this.infoLabel.Text        = "";
     this.statusLabel.Text      = "";
     this.elapsedTimeLabel.Text = "";
     this.copyNoteLabel.Text    = Strings.CompletionNote;
     base.ContentPanel.ResumeLayout();
     this.infoIcon.Image = IconLibrary.ToSmallBitmap(Icons.Information);
     this.workUnitsPanel.TaskStateChanged += this.workUnitsPanel_TaskStateChanged;
     this.updateTimer          = new Timer();
     this.updateTimer.Interval = 1000;
     this.updateTimer.Tick    += this.updateTimer_Tick;
 }
Exemplo n.º 3
0
        internal FilterItem(FilterNode node, IList <FilterablePropertyDescription> propertiesToFilter)
        {
            this.BeginInit();
            this.InitializeComponent();
            this.valueTypeEditors         = new Dictionary <FilterablePropertyValueEditor, Control>();
            this.deleteButton.Image       = IconLibrary.ToSmallBitmap(Icons.Remove);
            this.deleteButton.ToolTipText = Strings.RemoveExpression;
            List <FilterablePropertyDescription> list = new List <FilterablePropertyDescription>(propertiesToFilter.Count);

            for (int i = 0; i < propertiesToFilter.Count; i++)
            {
                list.Add(propertiesToFilter[i].SurfaceFilterablePropertyDescription ?? propertiesToFilter[i]);
            }
            list.Sort();
            this.FilterNode  = node;
            this.surfaceNode = new FilterNode();
            this.SyncFilterNodeToSurfaceNode();
            this.FilterNode.FilterablePropertyDescriptionChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.FilterNode.OperatorChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.FilterNode.ValueChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncFilterNodeToSurfaceNode();
            };
            this.surfaceNode.FilterablePropertyDescriptionChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.surfaceNode.OperatorChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.surfaceNode.ValueChanged += delegate(object param0, EventArgs param1)
            {
                this.SyncSurfaceNodeToFilterNode();
            };
            this.propertyBindingSource.DataSource = new BindingList <FilterablePropertyDescription>(list);
            this.BindingSource.DataSource         = this.surfaceNode;
            this.surfaceNode.OperatorChanged     += this.surfaceNode_OperatorChanged;
            this.EndInit();
        }
Exemplo n.º 4
0
        protected ResultPane(ResultsLoaderProfile profile, DataTableLoader loader)
        {
            base.SuspendLayout();
            this.warningCaption            = new AutoHeightLabel();
            this.warningCaption.BackColor  = SystemColors.Info;
            this.warningCaption.ForeColor  = SystemColors.InfoText;
            this.warningCaption.Image      = IconLibrary.ToSmallBitmap(Icons.Warning);
            this.warningCaption.Dock       = DockStyle.Top;
            this.warningCaption.Name       = "warningCaption";
            this.warningCaption.ImageAlign = ContentAlignment.MiddleLeft;
            this.warningCaption.TextAlign  = ContentAlignment.MiddleLeft;
            this.warningCaption.Padding    = new Padding(20, 2, 2, 2);
            this.warningCaption.Visible    = false;
            base.Controls.Add(this.warningCaption);
            base.Name = "ResultPane";
            base.ResumeLayout(false);
            Command command = Command.CreateSeparator();

            command.Visible = false;
            this.dependentResultPanesCommandsSeparator         = Command.CreateSeparator();
            this.dependentResultPanesCommandsSeparator.Visible = false;
            this.deleteSelectionCommandsSeparator                 = Command.CreateSeparator();
            this.deleteSelectionCommandsSeparator.Visible         = false;
            this.showSelectionPropertiesCommandsSeparator         = Command.CreateSeparator();
            this.showSelectionPropertiesCommandsSeparator.Visible = false;
            Command command2 = Command.CreateSeparator();

            command2.Visible                  = false;
            this.helpCommandSeparator         = Command.CreateSeparator();
            this.helpCommandSeparator.Visible = false;
            this.warningCaption.MouseEnter   += delegate(object param0, EventArgs param1)
            {
                this.warningCaption.ForeColor = SystemColors.HighlightText;
                this.warningCaption.BackColor = SystemColors.Highlight;
            };
            this.warningCaption.MouseLeave += delegate(object param0, EventArgs param1)
            {
                this.warningCaption.ForeColor = SystemColors.InfoText;
                this.warningCaption.BackColor = SystemColors.Info;
            };
            this.warningCaption.Click += this.warningCaption_Click;
            this.DependentResultPanes.ListChanging              += this.DependentResultPanes_ListChanging;
            this.DependentResultPanes.ListChanged               += this.DependentResultPanes_ListChanged;
            this.CustomSelectionCommands.CommandAdded           += new CommandEventHandler(this.CustomSelectionCommands_CommandAdded);
            this.CustomSelectionCommands.CommandRemoved         += new CommandEventHandler(this.CustomSelectionCommands_CommandRemoved);
            this.DependentResultPaneCommands.CommandAdded       += new CommandEventHandler(this.DependentResultPaneCommands_CommandAdded);
            this.DependentResultPaneCommands.CommandRemoved     += new CommandEventHandler(this.DependentResultPaneCommands_CommandRemoved);
            this.DeleteSelectionCommands.CommandAdded           += new CommandEventHandler(this.DeleteSelectionCommands_CommandAdded);
            this.DeleteSelectionCommands.CommandRemoved         += new CommandEventHandler(this.DeleteSelectionCommands_CommandRemoved);
            this.ShowSelectionPropertiesCommands.CommandAdded   += new CommandEventHandler(this.ShowSelectionPropertiesCommands_CommandAdded);
            this.ShowSelectionPropertiesCommands.CommandRemoved += new CommandEventHandler(this.ShowSelectionPropertiesCommands_CommandRemoved);
            base.SelectionCommands.AddRange(new Command[]
            {
                this.dependentResultPanesCommandsSeparator,
                this.deleteSelectionCommandsSeparator,
                this.showSelectionPropertiesCommandsSeparator
            });
            base.ResultPaneCommands.CommandAdded   += new CommandEventHandler(this.ResultPaneCommands_CommandAdded);
            base.ResultPaneCommands.CommandRemoved += new CommandEventHandler(this.ResultPaneCommands_CommandRemoved);
            base.ExportListCommands.CommandAdded   += new CommandEventHandler(this.ExportListCommands_CommandAdded);
            base.ExportListCommands.CommandRemoved += new CommandEventHandler(this.ExportListCommands_CommandRemoved);
            this.viewCommand                      = new Command();
            this.viewCommand.Text                 = Strings.ViewCommands;
            this.viewCommand.Visible              = false;
            this.viewCommand.Name                 = "resultPaneViewCommand";
            this.viewCommand.Icon                 = Icons.View;
            base.ViewModeCommands.CommandAdded   += new CommandEventHandler(this.ViewModeCommands_CommandAdded);
            base.ViewModeCommands.CommandRemoved += new CommandEventHandler(this.ViewModeCommands_CommandRemoved);
            this.WhitespaceCommands.AddRange(new Command[]
            {
                command,
                this.viewCommand,
                command2,
                base.RefreshCommand
            });
            this.ResultsLoaderProfile  = profile;
            this.RefreshableDataSource = loader;
            this.SetupCommandsProfile();
            this.SyncCommands(this.CommandsProfile.ResultPaneCommands, base.ResultPaneCommands);
            this.SyncCommands(this.CommandsProfile.CustomSelectionCommands, this.CustomSelectionCommands);
            this.SyncCommands(this.CommandsProfile.DeleteSelectionCommands, this.DeleteSelectionCommands);
            this.SubscribedRefreshCategories.Add(ResultPane.ConfigurationDomainControllerRefreshCategory);
        }