예제 #1
0
        void ReleaseDesignerOutlets()
        {
            if (OwnerImageView != null)
            {
                OwnerImageView.Dispose();
                OwnerImageView = null;
            }

            if (CaptionLabel != null)
            {
                CaptionLabel.Dispose();
                CaptionLabel = null;
            }

            if (ContentLabel != null)
            {
                ContentLabel.Dispose();
                ContentLabel = null;
            }

            if (FollowersImageVIew != null)
            {
                FollowersImageVIew.Dispose();
                FollowersImageVIew = null;
            }

            if (FollowersLabel != null)
            {
                FollowersLabel.Dispose();
                FollowersLabel = null;
            }

            if (ForksImageView != null)
            {
                ForksImageView.Dispose();
                ForksImageView = null;
            }

            if (ForksLabel != null)
            {
                ForksLabel.Dispose();
                ForksLabel = null;
            }

            if (UserImageView != null)
            {
                UserImageView.Dispose();
                UserImageView = null;
            }

            if (UserLabel != null)
            {
                UserLabel.Dispose();
                UserLabel = null;
            }
        }
예제 #2
0
        protected override void DoBuildChildren(LayoutPanelBase Layout)
        {
            base.DoBuildChildren(Layout);
            CaptionLabel.Dock = DockStyle.Top;
            CaptionLabel.SuspendLayout();

            if (null != dataSource)
            {
            }
            else
            {
                NewMessage.Show(Loc.Instance.GetString("CreateParent: You have a null datasource"));
                lg.Instance.Line("NoteDataXML_Table->CreateParent", ProblemType.WARNING, Loc.Instance.GetString("You have a null table which should not happen. This usually occurs only during UNIT TESTING because proper create constructor is not used"));
                BuildDefaultColumns();
            }
            lg.Instance.Line("NoteDataXML_Table-CreateParent", ProblemType.MESSAGE, String.Format("Passing {0} columns into new TablePanel", Columns.Length));
            Table = new TablePanel(dataSource, HandleCellBeginEdit, Columns, GoToNote, this.Caption, GetRandomTableResults);
            lg.Instance.Line("NoteDataXML_Table->CreateParent", ProblemType.MESSAGE, String.Format("Before HANDLEDATABINING my name is {0}", this.Caption));
            Table.Parent = ParentNotePanel;
            Table.Dock   = DockStyle.Fill;
            Table.BringToFront();
            Table.ReadOnly = this.ReadOnly;



            ToolStripMenuItem TableCaptionLabel =
                LayoutDetails.BuildMenuPropertyEdit(Loc.Instance.GetString("Table Caption: {0}"), TableCaption, Loc.Instance.GetString("When generating random data this caption will be used to present the results."), HandleNoteLinkNameChange);



            ToolStripMenuItem NextTableLabel =
                LayoutDetails.BuildMenuPropertyEdit(Loc.Instance.GetString("Next Table: {0}"), NextTable, Loc.Instance.GetString("Set a value here and if the random results of this table resolve without finding a 'NextTable' in the table itself, it will proceed with randomization on the table specified here."), HandleNextTableKeyDown);

            useHeadingStyleOption              = new ToolStripButton();
            useHeadingStyleOption.Text         = Loc.Instance.GetString("Use Heading Styled Captions");
            useHeadingStyleOption.CheckOnClick = true;
            useHeadingStyleOption.Checked      = useHeadingStyleForCaption;
            useHeadingStyleOption.Click       += (object sender, EventArgs e) =>
            {
                SetSaveRequired(true);
                useHeadingStyleForCaption = useHeadingStyleOption.Checked;
            };



            properties.DropDownItems.Add(new ToolStripSeparator());
            properties.DropDownItems.Add(TableCaptionLabel);
            properties.DropDownItems.Add(NextTableLabel);
            properties.DropDownItems.Add(useHeadingStyleOption);
            CaptionLabel.ResumeLayout();
        }
        void ReleaseDesignerOutlets()
        {
            if (CaptionLabel != null)
            {
                CaptionLabel.Dispose();
                CaptionLabel = null;
            }

            if (DetailsLabel != null)
            {
                DetailsLabel.Dispose();
                DetailsLabel = null;
            }
        }
예제 #4
0
        public override void LayoutSubviews()
        {
            CaptionLabel.SizeToFit();
            SignaturePromptLabel.SizeToFit();
            btnClear.SizeToFit();
            var bottomOffset = Bounds.Height - Bounds.Height / 10;

            imageView.Frame = new RectangleF(0, 0, Bounds.Width, Bounds.Height);

            CaptionLabel.Frame = new RectangleF((Bounds.Width / 2) - (CaptionLabel.Frame.Width / 2), bottomOffset - CaptionLabel.Frame.Height - 3,
                                                CaptionLabel.Frame.Width, CaptionLabel.Frame.Height);

            signatureLine.Frame = new RectangleF(10, bottomOffset - signatureLine.Frame.Height - 5 - CaptionLabel.Frame.Height, Bounds.Width - 20, 1);

            SignaturePromptLabel.Frame = new RectangleF(10, bottomOffset - SignaturePromptLabel.Frame.Height - signatureLine.Frame.Height - 2 - CaptionLabel.Frame.Height,
                                                        SignaturePromptLabel.Frame.Width, SignaturePromptLabel.Frame.Height);
            btnClear.Frame = new RectangleF(Bounds.Width - 41 - CaptionLabel.Frame.Height, 10, 31, 14);
        }
예제 #5
0
        void ReleaseDesignerOutlets()
        {
            if (CaptionLabel != null)
            {
                CaptionLabel.Dispose();
                CaptionLabel = null;
            }

            if (NoteLabel != null)
            {
                NoteLabel.Dispose();
                NoteLabel = null;
            }

            if (LocationLabel != null)
            {
                LocationLabel.Dispose();
                LocationLabel = null;
            }

            if (MainImageView != null)
            {
                MainImageView.Dispose();
                MainImageView = null;
            }

            if (DateTimeLabel != null)
            {
                DateTimeLabel.Dispose();
                DateTimeLabel = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }
        }
예제 #6
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Syncfusion.Windows.Forms.Tools.TreeNavigator.HeaderCollection headerCollection1 = new Syncfusion.Windows.Forms.Tools.TreeNavigator.HeaderCollection();
            Syncfusion.Windows.Forms.Edit.Implementation.Config.Config    config1           = new Syncfusion.Windows.Forms.Edit.Implementation.Config.Config();
            Syncfusion.Windows.Forms.Edit.Implementation.Config.Config    config2           = new Syncfusion.Windows.Forms.Edit.Implementation.Config.Config();
            Syncfusion.Windows.Forms.Edit.Implementation.Config.Config    config3           = new Syncfusion.Windows.Forms.Edit.Implementation.Config.Config();
            this.sampleName      = new System.Windows.Forms.Label();
            this.tabPanel        = new System.Windows.Forms.FlowLayoutPanel();
            this.treeNavigator   = new Syncfusion.Windows.Forms.Tools.TreeNavigator();
            this.treeMenuItem    = new PMMLWFSampleBrowser.TreeMenuItemAdv();
            this.tabControl1     = new Syncfusion.Windows.Forms.Tools.TabControlAdv();
            this.tabPage1        = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
            this.tabPage2        = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
            this.tabPage3        = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
            this.tabPage4        = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
            this.cSharpCode      = new Syncfusion.Windows.Forms.Edit.EditControl();
            this.rCode           = new Syncfusion.Windows.Forms.Edit.EditControl();
            this.pmmlCode        = new Syncfusion.Windows.Forms.Edit.EditControl();
            this.PredictedResult = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();
            ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit();
            this.tabControl1.SuspendLayout();
            this.tabPage1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.PredictedResult)).BeginInit();
            this.tabPage2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.cSharpCode)).BeginInit();
            this.tabPage3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.rCode)).BeginInit();
            this.tabPage4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pmmlCode)).BeginInit();
            this.SuspendLayout();
            //
            // treeNavigator
            //
            this.treeNavigator.BackColor     = System.Drawing.Color.White;
            this.treeNavigator.Dock          = System.Windows.Forms.DockStyle.Left;
            this.treeNavigator.Font          = new System.Drawing.Font("Segoe UI", 11.5F);
            headerCollection1.Font           = new System.Drawing.Font("Segoe UI", 11.25F);
            this.treeNavigator.Header        = headerCollection1;
            this.treeNavigator.ImeMode       = System.Windows.Forms.ImeMode.On;
            this.treeNavigator.ItemBackColor = System.Drawing.SystemColors.Control;
            this.treeNavigator.Location      = new System.Drawing.Point(0, 0);
            this.treeNavigator.Margin        = new System.Windows.Forms.Padding(0);
            this.treeNavigator.MinimumSize   = new System.Drawing.Size(302, 150);
            this.treeNavigator.Name          = "treeNavigator";
            this.treeNavigator.RightToLeft   = System.Windows.Forms.RightToLeft.No;
            this.treeNavigator.Size          = new System.Drawing.Size(302, 479);
            this.treeNavigator.TabIndex      = 0;
            this.treeNavigator.ShowHeader    = false;
            this.treeNavigator.ItemBackColor = Color.White;
            this.treeNavigator.Resize       += treeNavigator_Resize;
            //
            // tabPanel
            //
            this.tabPanel.Controls.Add(sampleName);
            this.tabPanel.Controls.Add(tabControl1);
            this.tabPanel.Location      = new Point(302, 0);
            this.tabPanel.Dock          = System.Windows.Forms.DockStyle.Fill;
            this.tabPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            //
            // sampleName
            //
            this.sampleName.Anchor    = AnchorStyles.Top | AnchorStyles.Left;
            this.sampleName.Location  = new Point(302, 0);
            this.sampleName.ForeColor = Color.DeepSkyBlue;
            this.sampleName.Margin    = new System.Windows.Forms.Padding(0, 10, 0, 0);
            this.sampleName.Font      = new System.Drawing.Font("Segoe UI", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.sampleName.Size      = new Size(SystemInformation.VirtualScreen.Width - 300, 40);
            //
            // tabControl1
            //
            this.tabControl1.BackColor       = System.Drawing.SystemColors.ButtonHighlight;
            this.tabControl1.BeforeTouchSize = new System.Drawing.Size(640, 479);
            this.tabControl1.BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
            this.tabControl1.Controls.Add(this.tabPage1);
            this.tabControl1.Controls.Add(this.tabPage2);
            this.tabControl1.Controls.Add(this.tabPage3);
            this.tabControl1.Controls.Add(this.tabPage4);
            this.tabControl1.FixedSingleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(157)))), ((int)(((byte)(161)))));
            this.tabControl1.FocusOnTabClick        = false;
            this.tabControl1.Font              = new System.Drawing.Font("Segoe UI", 10.5F);
            this.tabControl1.InactiveTabColor  = System.Drawing.Color.White;
            this.tabControl1.Location          = new System.Drawing.Point(302, 50);
            this.tabControl1.Margin            = new System.Windows.Forms.Padding(0, 0, 0, 3);
            this.tabControl1.Name              = "tabControl1";
            this.tabControl1.Size              = new System.Drawing.Size(SystemInformation.VirtualScreen.Width - 300, SystemInformation.VirtualScreen.Height - 250);
            this.tabControl1.TabIndex          = 6;
            this.tabControl1.TabPanelBackColor = System.Drawing.Color.White;
            this.tabControl1.TabStyle          = typeof(Syncfusion.Windows.Forms.Tools.TabRendererMetro);
            //
            // tabPage1
            //
            this.tabPage1.Controls.Add(this.PredictedResult);
            this.tabPage1.Image           = null;
            this.tabPage1.ImageSize       = new System.Drawing.Size(16, 16);
            this.tabPage1.Location        = new System.Drawing.Point(1, 28);
            this.tabPage1.Margin          = new System.Windows.Forms.Padding(0);
            this.tabPage1.Name            = "tabPage1";
            this.tabPage1.ShowCloseButton = true;
            this.tabPage1.Size            = new System.Drawing.Size(638, 450);
            this.tabPage1.TabIndex        = 1;
            this.tabPage1.Text            = "Predicted Result";
            this.tabPage1.ThemesEnabled   = false;
            //
            // PredictedResult
            //
            this.PredictedResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                                | System.Windows.Forms.AnchorStyles.Right)));
            this.PredictedResult.Dock                 = System.Windows.Forms.DockStyle.Fill;
            this.PredictedResult.FreezeCaption        = false;
            this.PredictedResult.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro;
            this.PredictedResult.GridVisualStyles     = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
            this.PredictedResult.Location             = new System.Drawing.Point(0, 0);
            this.PredictedResult.Name                 = "PredictedResult";
            this.PredictedResult.Size                 = new System.Drawing.Size(638, 450);
            this.PredictedResult.TabIndex             = 13;
            this.PredictedResult.TableModel.ColWidths.ResizeToFitOptimized(GridRangeInfo.Table(), GridResizeToFitOptions.IncludeHeaders);
            this.PredictedResult.TableDescriptor.TableOptions.ColumnHeaderRowHeight = 25;
            this.PredictedResult.TableDescriptor.TableOptions.RecordRowHeight       = 25;
            this.PredictedResult.TopLevelGroupOptions.ShowCaption = false;
            this.PredictedResult.Appearance.AnyCell.TextColor     = Color.Black;
            this.PredictedResult.TopLevelGroupOptions.ShowAddNewRecordAfterDetails  = false;
            this.PredictedResult.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
            this.PredictedResult.TableOptions.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
            this.PredictedResult.TableOptions.GridLineBorder   = new Syncfusion.Windows.Forms.Grid.GridBorder(GridBorderStyle.Solid, Color.FromArgb(173, 185, 209), GridBorderWeight.Thin);
            //
            // tabPage2
            //
            this.tabPage2.AutoScroll = true;
            this.tabPage2.Controls.Add(this.cSharpCode);
            this.tabPage2.Image           = null;
            this.tabPage2.ImageSize       = new System.Drawing.Size(16, 16);
            this.tabPage2.Location        = new System.Drawing.Point(1, 28);
            this.tabPage2.Margin          = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage2.Name            = "tabPage2";
            this.tabPage2.Padding         = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage2.ShowCloseButton = true;
            this.tabPage2.Size            = new System.Drawing.Size(638, 450);
            this.tabPage2.TabIndex        = 1;
            this.tabPage2.Text            = "C#";
            this.tabPage2.ThemesEnabled   = false;
            //
            // cSharpCode
            //
            this.cSharpCode.CodeSnipptSize                          = new System.Drawing.Size(100, 100);
            this.cSharpCode.Configurator                            = config1;
            this.cSharpCode.Dock                                    = System.Windows.Forms.DockStyle.Fill;
            this.cSharpCode.IndicatorMarginBackColor                = System.Drawing.Color.Empty;
            this.cSharpCode.LineNumbersFont                         = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.cSharpCode.Location                                = new System.Drawing.Point(0, 3);
            this.cSharpCode.Margin                                  = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.cSharpCode.Name                                    = "cSharpCode";
            this.cSharpCode.ReadOnly                                = true;
            this.cSharpCode.RenderRightToLeft                       = false;
            this.cSharpCode.SaveOnClose                             = false;
            this.cSharpCode.ScrollPosition                          = new System.Drawing.Point(0, 0);
            this.cSharpCode.ScrollVisualStyle                       = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro;
            this.cSharpCode.Size                                    = new System.Drawing.Size(638, 444);
            this.cSharpCode.StatusBarSettings.CoordsPanel.Width     = 30;
            this.cSharpCode.StatusBarSettings.EncodingPanel.Width   = 30;
            this.cSharpCode.StatusBarSettings.FileNamePanel.Width   = 30;
            this.cSharpCode.StatusBarSettings.InsertPanel.Width     = 20;
            this.cSharpCode.StatusBarSettings.Offcie2007ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Blue;
            this.cSharpCode.StatusBarSettings.Offcie2010ColorScheme = Syncfusion.Windows.Forms.Office2010Theme.Blue;
            this.cSharpCode.StatusBarSettings.StatusPanel.Width     = 20;
            this.cSharpCode.StatusBarSettings.TextPanel.Width       = 30;
            this.cSharpCode.StatusBarSettings.VisualStyle           = Syncfusion.Windows.Forms.Tools.Controls.StatusBar.VisualStyle.Metro;
            this.cSharpCode.TabIndex                                = 1;
            this.cSharpCode.Text                                    = "";
            this.cSharpCode.UseXPStyleBorder                        = true;
            this.cSharpCode.VisualColumn                            = 1;
            //
            // tabPage3
            //
            this.tabPage3.Controls.Add(this.rCode);
            this.tabPage3.Font            = new System.Drawing.Font("Segoe UI", 8.25F);
            this.tabPage3.Image           = null;
            this.tabPage3.ImageSize       = new System.Drawing.Size(16, 16);
            this.tabPage3.Location        = new System.Drawing.Point(1, 28);
            this.tabPage3.Margin          = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage3.Name            = "tabPage3";
            this.tabPage3.Padding         = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage3.ShowCloseButton = true;
            this.tabPage3.Size            = new System.Drawing.Size(638, 450);
            this.tabPage3.TabIndex        = 2;
            this.tabPage3.Text            = "R";
            this.tabPage3.ThemesEnabled   = false;
            //
            // rCode
            //
            this.rCode.CodeSnipptSize                          = new System.Drawing.Size(100, 100);
            this.rCode.Configurator                            = config2;
            this.rCode.Dock                                    = System.Windows.Forms.DockStyle.Fill;
            this.rCode.IndicatorMarginBackColor                = System.Drawing.Color.Empty;
            this.rCode.LineNumbersFont                         = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.rCode.Location                                = new System.Drawing.Point(0, 3);
            this.rCode.Margin                                  = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.rCode.Name                                    = "rCode";
            this.rCode.ReadOnly                                = true;
            this.rCode.RenderRightToLeft                       = false;
            this.rCode.SaveOnClose                             = false;
            this.rCode.ScrollPosition                          = new System.Drawing.Point(0, 0);
            this.rCode.ScrollVisualStyle                       = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro;
            this.rCode.Size                                    = new System.Drawing.Size(638, 444);
            this.rCode.StatusBarSettings.CoordsPanel.Width     = 30;
            this.rCode.StatusBarSettings.EncodingPanel.Width   = 30;
            this.rCode.StatusBarSettings.FileNamePanel.Width   = 30;
            this.rCode.StatusBarSettings.InsertPanel.Width     = 20;
            this.rCode.StatusBarSettings.Offcie2007ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Blue;
            this.rCode.StatusBarSettings.Offcie2010ColorScheme = Syncfusion.Windows.Forms.Office2010Theme.Blue;
            this.rCode.StatusBarSettings.StatusPanel.Width     = 20;
            this.rCode.StatusBarSettings.TextPanel.Width       = 30;
            this.rCode.StatusBarSettings.VisualStyle           = Syncfusion.Windows.Forms.Tools.Controls.StatusBar.VisualStyle.Metro;
            this.rCode.TabIndex                                = 1;
            this.rCode.Text                                    = "edtCode";
            this.rCode.UseXPStyleBorder                        = true;
            this.rCode.VisualColumn                            = 8;
            //
            // tabPage4
            //
            this.tabPage4.Controls.Add(this.pmmlCode);
            this.tabPage4.Image           = null;
            this.tabPage4.ImageSize       = new System.Drawing.Size(16, 16);
            this.tabPage4.Location        = new System.Drawing.Point(1, 28);
            this.tabPage4.Margin          = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage4.Name            = "tabPage4";
            this.tabPage4.Padding         = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.tabPage4.ShowCloseButton = true;
            this.tabPage4.Size            = new System.Drawing.Size(638, 450);
            this.tabPage4.TabIndex        = 2;
            this.tabPage4.Text            = "PMML";
            this.tabPage4.ThemesEnabled   = false;
            //
            // pmmlCode
            //
            this.pmmlCode.CodeSnipptSize                          = new System.Drawing.Size(100, 100);
            this.pmmlCode.Configurator                            = config3;
            this.pmmlCode.Dock                                    = System.Windows.Forms.DockStyle.Fill;
            this.pmmlCode.IndicatorMarginBackColor                = System.Drawing.Color.Empty;
            this.pmmlCode.LineNumbersFont                         = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.pmmlCode.Location                                = new System.Drawing.Point(0, 3);
            this.pmmlCode.Margin                                  = new System.Windows.Forms.Padding(0, 3, 0, 3);
            this.pmmlCode.Name                                    = "pmmlCode";
            this.pmmlCode.ReadOnly                                = true;
            this.pmmlCode.RenderRightToLeft                       = false;
            this.pmmlCode.SaveOnClose                             = false;
            this.pmmlCode.ScrollPosition                          = new System.Drawing.Point(0, 0);
            this.pmmlCode.ScrollVisualStyle                       = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro;
            this.pmmlCode.Size                                    = new System.Drawing.Size(638, 444);
            this.pmmlCode.StatusBarSettings.CoordsPanel.Width     = 30;
            this.pmmlCode.StatusBarSettings.EncodingPanel.Width   = 30;
            this.pmmlCode.StatusBarSettings.FileNamePanel.Width   = 30;
            this.pmmlCode.StatusBarSettings.InsertPanel.Width     = 20;
            this.pmmlCode.StatusBarSettings.Offcie2007ColorScheme = Syncfusion.Windows.Forms.Office2007Theme.Blue;
            this.pmmlCode.StatusBarSettings.Offcie2010ColorScheme = Syncfusion.Windows.Forms.Office2010Theme.Blue;
            this.pmmlCode.StatusBarSettings.StatusPanel.Width     = 20;
            this.pmmlCode.StatusBarSettings.TextPanel.Width       = 30;
            this.pmmlCode.StatusBarSettings.VisualStyle           = Syncfusion.Windows.Forms.Tools.Controls.StatusBar.VisualStyle.Metro;
            this.pmmlCode.TabIndex                                = 1;
            this.pmmlCode.Text                                    = "edtCode";
            this.pmmlCode.UseXPStyleBorder                        = true;
            this.pmmlCode.VisualColumn                            = 8;
            //
            // treeMenuItem
            //
            this.treeMenuItem.IsModel       = false;
            this.treeMenuItem.ItemBackColor = System.Drawing.SystemColors.Control;
            this.treeMenuItem.Location      = new System.Drawing.Point(0, 0);
            this.treeMenuItem.ModelName     = null;
            this.treeMenuItem.Name          = "treeMenuItem";
            this.treeMenuItem.SampleName    = null;
            this.treeMenuItem.SamplePath    = null;
            this.treeMenuItem.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(193)))), ((int)(((byte)(220)))));
            this.treeMenuItem.Size          = new System.Drawing.Size(0, 0);
            this.treeMenuItem.TabIndex      = 0;
            //
            // Form1
            //
            this.AutoScaleMode           = System.Windows.Forms.AutoScaleMode.None;
            this.BackColor               = System.Drawing.Color.WhiteSmoke;
            this.BackgroundImageLayout   = System.Windows.Forms.ImageLayout.Stretch;
            this.BorderColor             = System.Drawing.Color.DodgerBlue;
            this.BorderThickness         = 2;
            this.CaptionAlign            = System.Windows.Forms.HorizontalAlignment.Left;
            this.CaptionBarColor         = System.Drawing.Color.DodgerBlue;
            this.CaptionBarHeight        = 80;
            this.CaptionButtonColor      = System.Drawing.Color.White;
            this.CaptionButtonHoverColor = System.Drawing.Color.White;
            this.CaptionFont             = new System.Drawing.Font("Segoe UI", 25F);
            this.CaptionForeColor        = System.Drawing.Color.White;
            captionImage1           = new CaptionImage();
            captionImage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(144)))), ((int)(((byte)(255)))));
            captionImage1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(144)))), ((int)(((byte)(255)))));
            captionImage1.Location  = new Point(30, 20);
            captionImage1.Name      = "captionImage1";
            captionImage1.Size      = new Size(32, 32);
            try
            {
                captionImage1.Image = Image.FromFile(GetIconFile(@"common\Images\Grid\Icon\sfgrid.ico"));
            }
            catch
            {
            }
            captionImage2           = new CaptionImage();
            captionImage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(144)))), ((int)(((byte)(255)))));
            captionImage2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(144)))), ((int)(((byte)(255)))));
            captionImage2.Location  = new Point(0, 0);
            captionImage2.Name      = "captionImage2";
            captionImage2.Size      = new Size(30, 70);
#if NETCORE
            captionImage2.Image = Image.FromFile("Icon.png");
#else
            captionImage2.Image = Image.FromFile("../../Icon.png");
#endif
            captionLabel1           = new CaptionLabel();
            captionLabel1.Font      = new System.Drawing.Font("Segoe UI", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            captionLabel1.ForeColor = System.Drawing.SystemColors.Window;
            captionLabel1.Location  = new Point(70, 25);
            captionLabel1.Name      = "captionLabel1";
            captionLabel1.Size      = new Size(300, 21);
            captionLabel1.Text      = "Predictive Analytics";
            this.CaptionLabels.Add(captionLabel1);
            this.CaptionImages.Add(captionImage1);
            this.CaptionImages.Add(captionImage2);
            this.Dock       = DockStyle.Fill;
            this.ClientSize = new System.Drawing.Size(942, 479);
            this.Controls.Add(this.tabPanel);
            this.Controls.Add(this.treeNavigator);
            this.Font      = new System.Drawing.Font("Segoe UI", 12.75F);
            this.ForeColor = System.Drawing.Color.Transparent;
            try
            {
                System.Drawing.Icon ico = new System.Drawing.Icon(GetIconFile(@"common\Images\Grid\Icon\sfgrid.ico"));
                this.Icon = ico;
            }
            catch { }
            this.ShowIcon      = true;
            this.KeyPreview    = true;
            this.MetroColor    = System.Drawing.Color.DodgerBlue;
            this.Name          = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
            this.WindowState   = System.Windows.Forms.FormWindowState.Maximized;
            this.Resize       += Form1_Resize;
            ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).EndInit();
            this.tabControl1.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.PredictedResult)).EndInit();
            this.tabPage2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.cSharpCode)).EndInit();
            this.tabPage3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.rCode)).EndInit();
            this.tabPage4.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pmmlCode)).EndInit();
            this.ResumeLayout(false);
        }
        private void InitControls()
        {
            int tableRow    = 0;
            int tableColumn = 0;

            /***
             * FontAlignmentTestWidget test = new FontAlignmentTestWidget ();
             * this.AddChild (test, tableRow++, tableColumn);
             ***/

            m_Label1 = new CaptionLabel("label1");
            //m_Label1.Styles.GetStyle (WidgetStates.Default).BackColorBrush.Color = SolarizedColors.Base2;
            m_Label1.Style.BackColorBrush.Color = Theme.Colors.Base2;
            m_Label1.Dock = Docking.Fill;
            m_Label1.Text = "Check Boxes".ToUpper();
            this.AddChild(m_Label1, tableRow++, tableColumn);

            m_CheckBox1 = new CheckBox("checkbox1", "CheckBox 1");
            this.AddChild(m_CheckBox1, tableRow++, tableColumn);

            m_CheckBox3         = new CheckBox("checkbox3", "CheckBox 3 (disabled)");
            m_CheckBox3.Enabled = false;
            this.AddChild(m_CheckBox3, tableRow++, tableColumn);

            m_ToggleCheckBox         = new ToggleCheckBox("togglecheckbox", "Option 1");
            m_ToggleCheckBox.Checked = true;
            this.AddChild(m_ToggleCheckBox, tableRow++, tableColumn);

            m_Label2 = new CaptionLabel("label2");
            m_Label2.Style.BackColorBrush.Color = Theme.Colors.Base2;
            m_Label2.Dock = Docking.Fill;
            m_Label2.Text = "Radio Buttons".ToUpper();
            this.AddChild(m_Label2, tableRow++, tableColumn);

            m_RadioButton1         = new RadioButton("radiobutton1", "RadioButton 1");
            m_RadioButton1.Checked = true;
            this.AddChild(m_RadioButton1, tableRow++, tableColumn);

            m_RadioButton2 = new RadioButton("radiobutton2", "RadioButton 2");
            this.AddChild(m_RadioButton2, tableRow++, tableColumn);

            m_RadioButton3 = new RadioButton("radiobutton3", "RadioButton 3");
            this.AddChild(m_RadioButton3, tableRow++, tableColumn);

            m_Label3 = new CaptionLabel("label3");
            m_Label3.Style.BackColorBrush.Color = Theme.Colors.Base2;
            m_Label3.Dock = Docking.Fill;
            m_Label3.Text = "Progress Bars".ToUpper();
            this.AddChild(m_Label3, tableRow++, tableColumn);

            m_ProgressBar         = new ProgressBar("ProgressBar1");
            m_ProgressBar.Value   = 0.625f;
            m_ProgressBar.Tooltip = "Click to animate..";
            m_ProgressBar.Click  += delegate {
                ParentWindow.Animator.AddAnimation(m_ProgressBar, "Value", 0, 1, 5);
            };
            m_ProgressBar.AnimationCompleted += delegate {
                m_ProgressBar.Value = 0.625f;
                (ParentWindow as ApplicationWindow).ShowNotification("Progressbar animation completed, state was reset to it's former value.", ColorContexts.Information);
            };
            this.AddChild(m_ProgressBar, tableRow++, tableColumn);


            /*** ***/
            // Circle Sliders in a Sub-Container
            m_CircleSliderSubContainer        = new TableLayoutContainer("m_CircleSliderSubContainer");
            m_CircleSliderSubContainer.Margin = new Padding(0, 0, 0, 16);

            m_CircleSlider1         = new CircleSlider("CircleSlider1", ColorContexts.Information);
            m_CircleSlider1.Value   = 0.75f;
            m_CircleSlider1.Tooltip = "Click to animate..";
            m_CircleSliderSubContainer.AddChild(m_CircleSlider1, 0, 0);
            m_CircleSlider1.Click += delegate {
                ParentWindow.Animator.AddAnimation(m_CircleSlider1, "Value", 0, 1, 5);
            };
            m_CircleSlider1.AnimationCompleted += delegate {
                m_CircleSlider1.Value = 0.75f;
                (ParentWindow as ApplicationWindow).ShowNotification("The animation was successfully completed.", ColorContexts.Success);
            };

            m_CircleSlider2             = new CircleSlider("CircleSlider1", ColorContexts.Information);
            m_CircleSlider2.Value       = 0.333f;
            m_CircleSlider2.CustomColor = Theme.Colors.Magenta;
            m_CircleSlider2.Tooltip     = "Drag up and down\nto change the value.";
            m_CircleSliderSubContainer.AddChild(m_CircleSlider2, 0, 1);

            this.AddChild(m_CircleSliderSubContainer, tableRow++, tableColumn);


            // >>> New Column >>>

            tableRow    = 0;
            tableColumn = 1;

            cmdDefaultButton        = new Button("cmdDefaultButton", "Default Button", ColorContexts.Default);
            cmdDefaultButton.Click += delegate {
                ParentWindow.ShowInfo("You pressed the default button. Great.");
            };
            this.AddChild(cmdDefaultButton, tableRow++, tableColumn);

            cmdShowInfo        = new Button("cmdShowInfo", "Info MessageBox", (char)FontAwesomeIcons.fa_info_circle, ColorContexts.Information);
            cmdShowInfo.Click += delegate {
                ParentWindow.ShowInfo("This is an info.");
            };
            this.AddChild(cmdShowInfo, tableRow++, tableColumn);

            cmdShowWarning        = new Button("cmdShowWarning", "Warning MessageBox", ColorContexts.Warning);
            cmdShowWarning.Click += delegate {
                ParentWindow.ShowWarning("This is a warning.");
            };
            this.AddChild(cmdShowWarning, tableRow++, tableColumn);

            cmdShowError        = new Button("cmdShowError", "Error MessageBox", ColorContexts.Danger);
            cmdShowError.Click += delegate {
                try {
                    throw new Exception("This is a sample error.");
                } catch (Exception ex) {
                    string errMsg = ex.Message + "\n" + Concurrency.GetStackTrace();
                    ParentWindow.ShowError(errMsg);
                }
            };
            this.AddChild(cmdShowError, tableRow++, tableColumn);

            cmdShowQuestion        = new Button("cmdShowQuestion", "Question MessageBox", ColorContexts.Question);
            cmdShowQuestion.Click += delegate {
                ParentWindow.ShowQuestion("This is a question. Are you sure ?");
            };
            this.AddChild(cmdShowQuestion, tableRow++, tableColumn);

            m_TextBox1      = new TextBox("TextBox1");
            m_TextBox1.Text = "Abcd Efg Hijk";
            this.AddChild(m_TextBox1, tableRow++, tableColumn);

            m_ShowPasswordChar                 = new CheckBox("ShowPasswordChar", "Password visible");
            m_ShowPasswordChar.Checked         = true;
            m_ShowPasswordChar.CheckedChanged += (object sender, EventArgs eCheckedChanged) =>
                                                 m_TextBox1.PasswordChar = m_ShowPasswordChar.Checked ? (char)0 : TextBox.DefaultPasswortChar;
            this.AddChild(m_ShowPasswordChar, tableRow++, tableColumn);

            m_NumberTextBox1       = new NumberTextBox("NumberTextBox1");
            m_NumberTextBox1.Value = 123.45m;
            this.AddChild(m_NumberTextBox1, tableRow++, tableColumn);

            m_ButtonTextBox1 = new ButtonTextBox("ButtonTextBox1", (char)FontAwesomeIcons.fa_send);
            m_ButtonTextBox1.Button.Click += delegate {
                (ParentWindow as ApplicationWindow).ShowNotification("Your email has been sent.", ColorContexts.Success);
            };
            this.AddChild(m_ButtonTextBox1, tableRow++, tableColumn);

            m_ComboListBox1 = new ComboListBox("ComboListBox1");
            m_ComboListBox1.Items.Add("Apple", 1);
            m_ComboListBox1.Items.Add("Orange", 2);
            m_ComboListBox1.Items.Add("Banana", 3);
            m_ComboListBox1.Items.Add("Cherry", 4);
            m_ComboListBox1.Items.Add("Pineapple", 5);
            m_ComboListBox1.SelectedIndex = 0;
            this.AddChild(m_ComboListBox1, tableRow++, tableColumn);

            m_ComboBox1 = new ComboBox("ComboBox1");
            m_ComboBox1.Items.Add("Apple", 1);
            m_ComboBox1.Items.Add("Orange", 2);
            m_ComboBox1.Items.Add("Banana", 3);
            m_ComboBox1.Items.Add("Cherry", 4);
            m_ComboBox1.Items.Add("Pineapple", 5);
            m_ComboBox1.SelectedIndex = 0;
            this.AddChild(m_ComboBox1, tableRow++, tableColumn);
        }
예제 #8
0
        void InitialiseComponent()
        {
            //this.components = new Container();
            this.titleLabel   = new CaptionLabel();
            this.captionStrip = new CaptionToolStrip();
            this.captionBtns  = new ToolStripButton[4];

            this.captionStrip.SuspendLayout();
            this.SuspendLayout();

            this.titleLabel.BackColor = Color.Transparent;
            this.titleLabel.Dock      = DockStyle.Fill;
            this.titleLabel.TextAlign = ContentAlignment.MiddleCenter;
            this.titleLabel.Margin    = Padding.Empty;

            this.captionStrip.BackColor   = Color.Transparent;
            this.captionStrip.Dock        = DockStyle.Right;
            this.captionStrip.Font        = new Font("Marlett", 12F);
            this.captionStrip.GripStyle   = ToolStripGripStyle.Hidden;
            this.captionStrip.Padding     = Padding.Empty;
            this.captionStrip.LayoutStyle = ToolStripLayoutStyle.HorizontalStackWithOverflow;
            this.captionStrip.Renderer    = new Renderer();
            this.captionStrip.Margin      = Padding.Empty;
            this.captionStrip.GripMargin  = Padding.Empty;

            for (var i = 0; i < this.captionBtns.Length; i++)
            {
                var btn = this.captionBtns[i] = new ToolStripButton();
                btn.Alignment    = ToolStripItemAlignment.Right;
                btn.DisplayStyle = ToolStripItemDisplayStyle.Text;
                btn.Margin       = Padding.Empty;
                btn.Padding      = new Padding(4, 0, 4, 0);
                btn.Overflow     = ToolStripItemOverflow.Never;
                btn.TextAlign    = ContentAlignment.MiddleCenter;
                btn.Click       += captionBtns_Click;
            }

            this.captionBtns[BTN_MINIMISE].Text        = '0'.ToString();
            this.captionBtns[BTN_MINIMISE].ToolTipText = "Minimise";
            this.captionBtns[BTN_MINIMISE].Tag         = FormWindowState.Minimized;

            this.captionBtns[BTN_MAXIMISE].Text        = '1'.ToString();
            this.captionBtns[BTN_MAXIMISE].ToolTipText = "Maximise";
            this.captionBtns[BTN_MAXIMISE].Tag         = FormWindowState.Maximized;

            this.captionBtns[BTN_RESTORE].Text        = '2'.ToString();
            this.captionBtns[BTN_RESTORE].ToolTipText = "Restore Down";
            this.captionBtns[BTN_RESTORE].Visible     = false;
            this.captionBtns[BTN_RESTORE].Tag         = FormWindowState.Normal;

            this.captionBtns[BTN_CLOSE].BackColor   = Color.Tomato;
            this.captionBtns[BTN_CLOSE].Text        = 'r'.ToString();
            this.captionBtns[BTN_CLOSE].ToolTipText = "Close";

            this.captionStrip.Items.AddRange(this.captionBtns);
            this.Controls.Add(this.titleLabel);
            this.Controls.Add(this.captionStrip);

            this.captionStrip.ResumeLayout(true);
            this.ResumeLayout(true);
        }