コード例 #1
0
ファイル: ObjectTree.cs プロジェクト: namit3/BlueMind
        public ObjectTree()
        {
            ImageList il = new ImageList();

            il.ColorDepth = ColorDepth.Depth32Bit;
            il.Images.Add(Properties.Resources.document);
            il.Images.Add(Properties.Resources.topic);

            InnerTreeView                 = new MultiSelectTreeView();
            InnerTreeView.ImageList       = il;
            InnerTreeView.Dock            = System.Windows.Forms.DockStyle.Fill;
            InnerTreeView.HideSelection   = false;
            InnerTreeView.MultiSelect     = true;
            InnerTreeView.ShowRootLines   = false;
            InnerTreeView.BorderStyle     = BorderStyle.None;
            InnerTreeView.BackColor       = ContentBackColor;
            InnerTreeView.MouseUp        += new MouseEventHandler(InnerTreeView_MouseUp);
            InnerTreeView.AfterSelect    += new TreeViewEventHandler(InnerTreeView_AfterSelect);
            InnerTreeView.BeforeCollapse += new TreeViewCancelEventHandler(InnerTreeView_BeforeCollapse);

            LabCaption                 = new CaptionBar();
            LabCaption.Dock            = DockStyle.Top;
            LabCaption.Icon            = Properties.Resources.objects;
            LabCaption.Size            = new System.Drawing.Size(208, 16);
            LabCaption.Text            = Lang._("Objects");
            LabCaption.BackgroundStyle = CaptionStyle.BaseLine;
            LabCaption.BaseLineColor   = Color.Silver;
            LabCaption.BackColor       = ContentBackColor;

            Controls.Add(InnerTreeView);
            Controls.Add(LabCaption);
            //ImageList = il;
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: stephenmusangeya/FusionLink
        private void RegisterUI()
        {
            CSMScenario.Register(Resources.ScenarioShowCaptionBarMessage, new ShowFusionLinkScenario());
            CSMScenario.Register(Resources.OpenFusionLinkExcel, new OpenFusionLinkExcelScenario());

            CSMPositionCtxMenu.Register(Resources.CopyCellAsExcelReference, new CopyCellAsRTDFunctionToClipboard());
            CSMPositionCtxMenu.Register(Resources.CopyTableAsExcelReference, new CopyRowAsRTDTableToClipboard());

            CaptionBar = new CaptionBar();
            CaptionBar.OnButtonClicked += OnCaptionBarButtonClicked;
            CaptionBar.DisplayButton    = true;
            CaptionBar.ButtonText       = Resources.StopButtonText;
            CaptionBar.ButtonToolTip    = Resources.StartStopButtonTooltip;
            CaptionBar.Image            = Resources.InfoIcon;
            CaptionBar.Show();

            CaptionBar.Text = Resources.LoadingMessage;
        }
コード例 #3
0
        public ChartHelper(ISelectionHolder selector, Core core, Control targetSite, bool describePeaks)
        {
            this._selector = selector;
            this._core     = core;

            Color c  = core.Options.Colours.MinorGrid;
            Color c2 = core.Options.Colours.MajorGrid;


            // CHART
            this._chart      = new MChart();
            this._chart.Name = "_CHART_IN_" + (targetSite != null ? targetSite.Name : "NOTHING");

            this._chart.Style.Animate           = false;
            this._chart.Style.SelectionColour   = Color.Blue;
            this._chart.Style.HighlightColour   = Color.Black;
            this._chart.Style.HighlightMinWidth = 5;

            this._chart.SelectionChanged += this._chart_SelectionChanged;

            if (targetSite == null)
            {
                return;
            }

            this._chart.Dock = DockStyle.Fill;
            targetSite.Controls.Add(this._chart);

            // CAPTION BAR
            this._captionBar = new CaptionBar(targetSite, selector);

            // MENU BAR
            this._menuBar = new ToolStrip();
            //_menuBar.Font = FontHelper.RegularFont;
            //_menuBar.ImageScalingSize = new Size(24, 24);
            this._menuBar.AutoSize  = true;
            this._menuBar.Padding   = new Padding(0, 0, 0, 0);
            this._menuBar.Dock      = DockStyle.Top;
            this._menuBar.GripStyle = ToolStripGripStyle.Hidden;
            this._menuBar.BackColor = Color.FromKnownColor(KnownColor.Control);
            targetSite.Controls.Add(this._menuBar);
            this._menuBar.SendToBack();

            // PLOT BUTTON
            this._mnuPlot                   = new ToolStripDropDownButton("...");
            this._mnuPlot.Visible           = false;
            this._mnuPlot.AutoSize          = true;
            this._mnuPlot.ShowDropDownArrow = false;
            this._menuBar.Items.Add(this._mnuPlot);

            // USER DETAILS BUTTON
            this._mnuCustomText = new ToolStripDropDownButton(Resources.IconInformation);
            this._mnuCustomText.DropDownItems.Add("Copy", Resources.MnuCopy, this._userDetailsCopyButton_Clicked);
            this._mnuCustomText.DropDownItems.Add("Configure...", null, this._userDetailsButton_Clicked);
            this._mnuCustomText.ShowDropDownArrow = false;
            this._mnuCustomText.Visible           = false;
            this._mnuCustomText.AutoSize          = true;
            this._menuBar.Items.Add(this._mnuCustomText);

            // GENERIC CHART BAR
            this._chart.AddControls(this._menuBar);

            // SELECTION BUTTONS
            this._mnuSelectedIntensity = this.CreateSelectionButton(Resources.IconIntensity);
            this._mnuSelectedReplicate = this.CreateSelectionButton(Resources.IconReplicate);
            this._mnuSelectedTime      = this.CreateSelectionButton(Resources.IconTime);
            this._mnuSelectedGroup     = this.CreateSelectionButton(Resources.MnuWarning);
            this._mnuSelectedPeak      = this.CreateSelectionButton(Resources.IconPeak);
            this._mnuSelectedSeries    = this.CreateSelectionButton(Resources.MnuWarning);

            // PLOT BUTTON ITEMS
            this._mnuPlot.DropDownOpening += this._menuButtonMenu_Opening;

            /**** MENU *****/
            /* select xxxx */ this._btnNavigateToSelected = this._mnuPlot.DropDownItems.Add("Select this", null, this._menu_selectThis);
            /* ----------- */ this._mnuPlot.DropDownItems.Add(new ToolStripSeparator());
            /* popout      */ this._mnuPlot.DropDownItems.Add("Popout", Resources.MnuEnlarge, this.menu_popout_Click);
            /* export      */ this._mnuPlot.DropDownItems.Add("Export...", null, this._menu_exportImage);
            /* display:    */ this._mnuSelectionDisplay = (ToolStripMenuItem)this._mnuPlot.DropDownItems.Add("Selection display", null, null);
            /*   custom    */ this._chkShowCustom       = this.AddCheckButton("Custom text", true);
            /*   peak      */ this._chkShowPeak         = this.AddCheckButton("Peak", describePeaks);
            /*   series    */ this._chkShowSeries       = this.AddCheckButton("Series", true);
            /*   group     */ this._chkShowGroup        = this.AddCheckButton("Group", describePeaks);
            /*   replicate */ this._chkShowReplicate    = this.AddCheckButton("Replicate", !describePeaks);
            /*   time      */ this._chkShowTime         = this.AddCheckButton("Time", !describePeaks);
            /*   intensity */ this._chkShowIntensity    = this.AddCheckButton("Intensity", !describePeaks);

            this._btnNavigateToSelected.Font    = new Font(this._btnNavigateToSelected.Font, FontStyle.Bold);
            this._btnNavigateToSelected.Enabled = this._selector != null;
        }