예제 #1
0
    private float ParseHorizontalPositionFromStringForPanel(string positionString, CanvasPanel panel)
    {
        float hpos = 0;

        switch (positionString)
        {
        case "offleft":
            hpos = -(panel.GetSize().x / unitSize.x);
            break;

        case "left":
            hpos = 0;
            break;

        case "center":
            hpos = (grid.x - (panel.GetSize().x / unitSize.x)) * .5f;
            break;

        case "right":
            hpos = grid.x - (panel.GetSize().x / unitSize.x);
            break;

        case "offright":
            hpos = grid.x;
            break;
        }
        return(hpos);
    }
예제 #2
0
        public static void BuildDumpingUpdatePanel(GameObject canvas)
        {
            float currentElementPosY = 150f;
            int   PanelWidth         = 500;

            int OptionSize      = 25;
            int fontSize        = (int)(OptionSize * 0.85f);
            int headingSize     = 50;
            int headingFontSize = (int)(OptionSize * 0.85f);


            DumpingUpdatePanel = new CanvasPanel(
                canvas,
                new Vector2(0, currentElementPosY),
                Vector2.zero,
                new Rect(0, 0, PanelWidth, 60)
                );

            DumpingUpdatePanel.AddText(
                "SpriteDumpText",
                "Dumping Sprites \n 0%",
                new Vector2(0, currentElementPosY),
                new Vector2(PanelWidth, headingSize),
                GUIController.Instance.trajanNormal,
                headingFontSize,
                FontStyle.Bold,
                TextAnchor.MiddleCenter
                );

            DumpingUpdatePanel.SetActive(false, true);
        }
예제 #3
0
    private float ParseVerticalPositionFromStringForPanel(string positionString, CanvasPanel panel)
    {
        float vpos = 0;

        switch (positionString)
        {
        case "offtop":
            vpos = grid.y;
            break;

        case "top":
            vpos = grid.y - (panel.GetSize().y / unitSize.y);
            break;

        case "center":
            vpos = (grid.y - (panel.GetSize().y / unitSize.y)) * .5f;
            break;

        case "bottom":
            vpos = 0;
            break;

        case "offbottom":
            vpos = -(panel.GetSize().y / unitSize.y);
            break;
        }
        return(vpos);
    }
예제 #4
0
 private void CreateNewCanvas()
 {
     Canvas    = new Bitmap(CanvasPanel.ClientSize.Width, CanvasPanel.ClientSize.Height);
     CanvasGfx = Graphics.FromImage(Canvas);
     CanvasGfx.Clear(Color.White);
     CanvasPanel.Invalidate();
 }
예제 #5
0
        public static FrameworkElement ToElement(double width, double height,
                                                 IEnumerable <PriceTagItem> items,
                                                 Dictionary <string, string> dataMap)
        {
            var panel = new StaticCanvasPanel();

            foreach (var src in items)
            {
                var dstText = new TextBlock {
                    Text            = dataMap.GetValueOrDefault(src.Name, src.Text),
                    FontSize        = src.FontSize,
                    TextAlignment   = src.TextAlignment,
                    TextWrapping    = src.Wrap ? TextWrapping.Wrap : TextWrapping.NoWrap,
                    FontWeight      = src.Bold ? FontWeights.Bold : FontWeights.Normal,
                    FontStyle       = src.Italic ? FontStyles.Italic : FontStyles.Normal,
                    TextDecorations = src.Underline ? TextDecorations.Underline : null,
                    Margin          = new Thickness(src.LeftMargin, src.TopMargin, src.RightMargin, src.BottomMargin),
                    Height          = src.IsAutoHeight ? double.NaN : CmToPx(src.Height ?? double.NaN),
                    Width           = src.IsAutoWidth ? double.NaN : CmToPx(src.Width ?? double.NaN),
                };
                var dst = new Border {
                    BorderThickness = new Thickness(src.LeftBorder ? src.BorderThickness : 0,
                                                    src.TopBorder ? src.BorderThickness : 0,
                                                    src.RightBorder ? src.BorderThickness : 0,
                                                    src.BottomBorder ? src.BorderThickness : 0),
                    BorderBrush = Brushes.Black,
                    Child       = dstText,
                };
                CanvasPanel.SetIsNewLine(dst, src.IsNewLine);
                panel.Children.Add(dst);
            }
            panel.Width  = CmToPx(width);
            panel.Height = CmToPx(height);
            return(panel);
        }
예제 #6
0
    public void SetPanelSize(CanvasPanel panel, Vector2 gridSize)
    {
        Vector2 canvasSize = new Vector2();

        canvasSize.x = gridSize.x / grid.x;
        canvasSize.y = gridSize.y / grid.y;
        panel.SetSize(canvasSize);
    }
예제 #7
0
    /// <summary>
    /// Constructor. Sets up the sound and canvas/panel. Loads button prefab and then loads the buttons.
    /// </summary>
    /// <param name="MenuSounds">Reference to the MenuSounds object</param>
    public BuildMainMenu(MenuSounds MenuSounds)
    {
        menuSounds = MenuSounds;
        menuSounds.StartMenuSounds();
        canvasPanel = new CanvasPanel();

        buttonPrefab = Resources.Load <GameObject>(strButtonPrefab);
        MainMenuLoad();
    }
예제 #8
0
    // accepts coordinates where 0,0 is upper left corner
    public void SetPanelLayout(CanvasPanel panel, Rect gridLayout)
    {
        Rect canvasLayout = new Rect();

        canvasLayout.x      = gridLayout.xMin / grid.x;
        canvasLayout.y      = (grid.y - gridLayout.yMin - gridLayout.height) / grid.y;
        canvasLayout.width  = gridLayout.width / grid.x;
        canvasLayout.height = gridLayout.height / grid.y;
        panel.SetLayout(canvasLayout);
    }
예제 #9
0
 private void CanvasPanel_Paint(object sender, PaintEventArgs e)
 {
     _pen.Width = 2;
     _length    = int.Parse(lengthtxt.Text);
     _graphics  = CanvasPanel.CreateGraphics();
     for (int i = 0; i < int.Parse(linestxt.Text); i++)
     {
         Draw();
     }
 }
예제 #10
0
        private void PutBlock(EventArgs e)
        {
            MouseEventArgs me   = (MouseEventArgs)e;
            int            x    = me.X;
            int            y    = me.Y;
            Rectangle      rect = new Rectangle(x, y, BrushWidth, BrushHeight);

            CanvasGfx.FillRectangle(MainColor, rect);
            CanvasPanel.Invalidate(rect);
        }
예제 #11
0
        private void Drawbtn_Click(object sender, EventArgs e)
        {
            _length    = int.Parse(lengthtxt.Text);
            _increment = int.Parse(incrementtxt.Text);
            _angle     = int.Parse(angletxt.Text);

            // Getting the center position of the Canvas
            _startX = CanvasPanel.Width / 2;
            _startY = CanvasPanel.Height / 2;

            CanvasPanel.Refresh();
        }
예제 #12
0
        public static void BuildMenu(GameObject canvas)
        {
            float currentElementPosY = 100f;
            int   PanelWidth         = 500;

            int OptionSize      = 25;
            int fontSize        = (int)(OptionSize * 0.85f);
            int headingSize     = 50;
            int headingFontSize = (int)(OptionSize * 0.85f);


            Panel = new CanvasPanel(
                canvas,
                new Vector2(0, currentElementPosY),
                Vector2.zero,
                new Rect(0, 0, PanelWidth, 60)
                );

            Panel.AddText(
                "Change Skin Text",
                "Looking for Custom Knight? \n Check the Mods Menu under Options",
                new Vector2(0, currentElementPosY),
                new Vector2(PanelWidth, headingSize),
                GUIController.Instance.trajanNormal,
                headingFontSize,
                FontStyle.Bold,
                TextAnchor.MiddleCenter
                );
            currentElementPosY += headingSize;

            GC.Collect();


            Panel.AddButton(
                "help button",
                new Vector2(0, currentElementPosY),
                Vector2.zero,
                hidePanel,
                new Rect(0, currentElementPosY, PanelWidth, OptionSize),
                GUIController.Instance.trajanNormal,
                "Okay",
                fontSize
                );
            currentElementPosY += OptionSize;

            Panel.SetActive(false, true);

            Vector2 newPanelSize = new Vector2(PanelWidth, currentElementPosY);

            On.HeroController.Pause   += OnPause;
            On.HeroController.UnPause += OnUnpause;
            UnityEngine.SceneManagement.SceneManager.activeSceneChanged += OnSceneChange;
        }
예제 #13
0
    public BuildOptionsMenu(MenuSounds MenuSounds, CanvasPanel ParentMenu)
    {
        eventTrigger = null;
        parentMenu   = ParentMenu;
        menuSounds   = MenuSounds;
        menuSounds.StartMenuSounds();
        canvasPanel = new CanvasPanel();

        sliderPrefab = Resources.Load <GameObject>(strSliderPrefab);
        buttonPrefab = Resources.Load <GameObject>(strButtonPrefab);

        OptionsMenuLoad();
    }
예제 #14
0
    public BuildSaveLoadMenu(MenuSounds MenuSounds, CanvasPanel ParentMenu)
    {
        eventTrigger = null;
        parentMenu   = ParentMenu;
        menuSounds   = MenuSounds;
        menuSounds.StartMenuSounds();
        canvasPanel = new CanvasPanel();

        buttonPrefab   = Resources.Load <GameObject>(strButtonPrefab);
        saveLoadPrefab = Resources.Load <GameObject>(strSaveLoadPrefab);


        LoadSaveLoadMenu();
    }
예제 #15
0
        private void AddnewCanvasPanel()
        {
            CanvasPanel box = new CanvasPanel
            {
                Text = stGroupBoxTitle + (groupBoxes.Count + 1)
            };

            box.RemoveCanvas += RemoveCanvas;
            tableLayoutPanel1.RowCount++;
            tableLayoutPanel1.Controls.Add(box);
            box.attachCanvasEntity();
            groupBoxes.Add(box);
            OrderEntity.Instance.AddCanvasEntity(box.GetCanvasEntity());
        }
예제 #16
0
 public Form1()
 {
     InitializeComponent();
     g = CanvasPanel.CreateGraphics();
     g.SmoothingMode                  = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
     pen                              = new Pen(Color.Black, 5);
     pen.StartCap                     = pen.EndCap = System.Drawing.Drawing2D.LineCap.Round;
     state                            = State.DRAW;
     Curves                           = new BindingList <CurveAbstract>();
     curvesList.DataSource            = Curves;
     curvesList.DisplayMember         = "Name";
     pointsListBox.SelectionMode      = SelectionMode.MultiSimple;
     curveTypeSelectionBox.DataSource = System.Enum.GetValues(typeof(CurveType));
     curveTypeSelectionBox.SetSelected(0, true);
 }
예제 #17
0
        private void CanvasPanel_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (IsMultiSelecting)
            {
                var geometry       = new RectangleGeometry(new Rect(SelectionSquareTopLeft, e.GetPosition(CanvasPanel)));
                var visualInRegion = CanvasPanel.GetVisuals(geometry);

                MessageBox.Show($"选中数量:{visualInRegion.Count}");
                IsMultiSelecting = false;
                CanvasPanel.RemoveVisual(SelectionSquare);
                CanvasPanel.ReleaseMouseCapture();
            }
            else
            {
                IsDragging = false;
            }
        }
예제 #18
0
        void Render()
        {
            Graphics g = null;
            Graphics Canvas;
            BufferedGraphicsContext rc;

            rc = BufferedGraphicsManager.Current;
            BufferedGraphics rg = null;

            g      = CanvasPanel.CreateGraphics();
            rg     = rc.Allocate(g, CanvasPanel.DisplayRectangle);
            Canvas = rg.Graphics;
            Canvas.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighSpeed;
            Canvas.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
            Canvas.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
            Canvas.PixelOffsetMode    = System.Drawing.Drawing2D.PixelOffsetMode.HighSpeed;
            Canvas.TextRenderingHint  = System.Drawing.Text.TextRenderingHint.SingleBitPerPixel;

            /////////////////
            /////////////////Drawing code here
            /////////////////

            Canvas.Clear(Color.Black);

            for (int i = 0; i < 128; i++)
            {
                Canvas.DrawLine(new Pen(Color.FromArgb(50, 50, 50)), i * 3, 0, i * 3, 128 * 3);
                Canvas.DrawLine(new Pen(Color.FromArgb(50, 50, 50)), 0, i * 3, 128 * 3, i * 3);
            }


            if (rg != null)
            {
                rg.Render(g);
            }

            if (rg != null)
            {
                //rg.Dispose();
            }
            if (g != null)
            {
                g.Dispose();
            }
        }
예제 #19
0
        private void VisualCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var pointClicked = e.GetPosition(CanvasPanel);

            if (rbAdd.IsChecked == true)
            {
                var visual = new DrawingVisual();
                DrawSquare(visual, pointClicked, false);
                CanvasPanel.AddVisual(visual);
            }
            else if (rbDelete.IsChecked == true)
            {
                var visual = GetVisual(pointClicked);
                if (visual != null)
                {
                    CanvasPanel.RemoveVisual(visual);
                }
            }
            else if (rbSelected.IsChecked == true)
            {
                var visual = GetVisual(pointClicked);
                if (visual != null)
                {
                    var topLeftCorner = new Point(visual.ContentBounds.TopLeft.X + DrawingPen.Thickness / 2,
                                                  visual.ContentBounds.TopLeft.Y + DrawingPen.Thickness / 2);
                    DrawSquare(visual, topLeftCorner, true); // 重绘为黄色
                    ClickOffet = topLeftCorner - pointClicked;
                    IsDragging = true;
                    if (SelectedVisual != null && SelectedVisual != visual)
                    {
                        ClearSelection(); // 将原来为黄色的重绘为淡蓝
                    }
                    SelectedVisual = visual;
                }
            }
            else if (rbSelectMultiple.IsChecked == true)
            {
                SelectionSquare = new DrawingVisual();
                CanvasPanel.AddVisual(SelectionSquare);
                SelectionSquareTopLeft = pointClicked;
                IsMultiSelecting       = true;
                CanvasPanel.CaptureMouse();
            }
        }
예제 #20
0
    private Vector2 ParsePositionFromStringForPanel(string positionString, CanvasPanel panel)
    {
        Vector2 position = Vector2.zero;

        string [] temp = positionString.Split(' ');
        try {
            float x = float.Parse(temp [0]);
            float y = float.Parse(temp [1]);
            position.x = x;
            position.y = grid.y - y - (panel.GetSize().y / unitSize.y);
        } catch (FormatException) {
            switch (temp [0])
            {
            case "offleft":
            case "left":
            case "center":
            case "right":
            case "offright":
                position.x = ParseHorizontalPositionFromStringForPanel(temp [0], panel);
                break;

            case "offtop":
            case "top":
            case "bottom":
            case "offbottom":
                position.y = ParseVerticalPositionFromStringForPanel(temp [0], panel);
                break;
            }
            if (temp.Length > 1)
            {
                position.y = ParseVerticalPositionFromStringForPanel(temp [1], panel);
            }
            else if (temp.Length == 1)
            {
                if (temp [0] == "center")
                {
                    position.y = ParseVerticalPositionFromStringForPanel(temp [0], panel);
                }
            }
        }
        position.x /= grid.x;
        position.y /= grid.y;
        return(position);
    }
예제 #21
0
        public void Print(int[,] arrayFelder)
        {
            //останавливаем генерцию новых поколений
            Timer.Stop();
            StartStopTite = "Старт";

            CanvasPanel.Background          = Brushes.LightGray;
            CanvasPanel.Height              = height * 17 - 2; // размеры пдоложки клеток. 17 - размер клетки с учетом границб "-2" - убирает полоску пдоложки внизу и справа
            CanvasPanel.Width               = width * 17 - 2;
            CanvasPanel.HorizontalAlignment = HorizontalAlignment.Center;
            CanvasPanel.VerticalAlignment   = VerticalAlignment.Center;
            CanvasPanel.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            CanvasPanel.Arrange(new Rect(0.0, 0.0, CanvasPanel.Width, CanvasPanel.DesiredSize.Height));

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    Rectangle rectangle = new Rectangle();
                    rectangle.Width  = 15; //размеры клетки
                    rectangle.Height = 15;

                    if (arrayFelder[i, j] == 1)
                    {
                        rectangle.Fill = Brushes.DarkSlateGray; //живаая клетка
                    }
                    else
                    {
                        rectangle.Fill = Brushes.DarkGray; //мертвая клетка
                    }
                    CanvasPanel.Children.Add(rectangle);
                    Canvas.SetLeft(rectangle, j * 17);
                    Canvas.SetTop(rectangle, i * 17);
                    rectangle.MouseDown += R_MouseDown;
                    felder[i, j]         = rectangle;
                }
            }
        }
예제 #22
0
 private void InitializeComponent()
 {
     panel1         = new System.Windows.Forms.Panel();
     label3         = new System.Windows.Forms.Label();
     label1         = new System.Windows.Forms.Label();
     textBlock1     = new dotNetLab.Widgets.TextBlock();
     canvasPanel1   = new dotNetLab.Widgets.Container.CanvasPanel();
     textBlock4     = new dotNetLab.Widgets.TextBlock();
     txb_TableName  = new dotNetLab.Widgets.MobileTextBox();
     cmbx_Kind      = new dotNetLab.Widgets.MobileComboBox();
     textBlock3     = new dotNetLab.Widgets.TextBlock();
     textBlock6     = new dotNetLab.Widgets.TextBlock();
     textBlock2     = new dotNetLab.Widgets.TextBlock();
     btn_DataCenter = new dotNetLab.Widgets.MobileButton();
     lbl_Status     = new dotNetLab.Widgets.TextBlock();
     panel1.SuspendLayout();
     canvasPanel1.SuspendLayout();
     SuspendLayout();
     panel1.BackColor = System.Drawing.Color.BlueViolet;
     panel1.Controls.Add(label3);
     panel1.Controls.Add(label1);
     panel1.Dock                     = System.Windows.Forms.DockStyle.Top;
     panel1.Location                 = new System.Drawing.Point(0, 0);
     panel1.Name                     = "panel1";
     panel1.Size                     = new System.Drawing.Size(611, 100);
     panel1.TabIndex                 = 2;
     label3.AutoSize                 = true;
     label3.Font                     = new System.Drawing.Font("MV Boli", 18f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
     label3.ForeColor                = System.Drawing.Color.White;
     label3.Location                 = new System.Drawing.Point(330, 32);
     label3.Name                     = "label3";
     label3.Size                     = new System.Drawing.Size(269, 31);
     label3.TabIndex                 = 5;
     label3.Text                     = "Communication Wizard";
     label1.AutoSize                 = true;
     label1.Font                     = new System.Drawing.Font("等线 Light", 25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     label1.ForeColor                = System.Drawing.Color.White;
     label1.Location                 = new System.Drawing.Point(27, 32);
     label1.Name                     = "label1";
     label1.Size                     = new System.Drawing.Size(151, 36);
     label1.TabIndex                 = 0;
     label1.Text                     = "通讯向导";
     textBlock1.BackColor            = System.Drawing.Color.Transparent;
     textBlock1.BorderColor          = System.Drawing.Color.Empty;
     textBlock1.BorderThickness      = -1;
     textBlock1.DataBindingInfo      = null;
     textBlock1.EnableFlag           = true;
     textBlock1.EnableTextRenderHint = true;
     textBlock1.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     textBlock1.FlagColor            = System.Drawing.Color.DodgerBlue;
     textBlock1.FlagThickness        = 8;
     textBlock1.Font                 = new System.Drawing.Font("微软雅黑", 12f);
     textBlock1.ForeColor            = System.Drawing.Color.DimGray;
     textBlock1.GapBetweenTextFlag   = 10;
     textBlock1.LEDStyle             = false;
     textBlock1.Location             = new System.Drawing.Point(12, 121);
     textBlock1.MainBindableProperty = "新增通讯表";
     textBlock1.Name                 = "textBlock1";
     textBlock1.Radius               = -1;
     textBlock1.Size                 = new System.Drawing.Size(113, 25);
     textBlock1.TabIndex             = 3;
     textBlock1.Text                 = "新增通讯表";
     textBlock1.UIElementBinders     = null;
     textBlock1.UnderLine            = false;
     textBlock1.UnderLineColor       = System.Drawing.Color.DarkGray;
     textBlock1.UnderLineThickness   = 2f;
     textBlock1.Vertical             = false;
     textBlock1.WhereReturn          = 0;
     canvasPanel1.BackColor          = System.Drawing.Color.Transparent;
     canvasPanel1.BorderColor        = System.Drawing.Color.Silver;
     canvasPanel1.BorderThickness    = -1;
     canvasPanel1.Controls.Add(textBlock4);
     canvasPanel1.Controls.Add(txb_TableName);
     canvasPanel1.Controls.Add(cmbx_Kind);
     canvasPanel1.Controls.Add(textBlock3);
     canvasPanel1.Controls.Add(textBlock6);
     canvasPanel1.Controls.Add(textBlock2);
     canvasPanel1.CornerAlignment      = dotNetLab.Widgets.Alignments.All;
     canvasPanel1.DataBindingInfo      = null;
     canvasPanel1.Font                 = new System.Drawing.Font("微软雅黑", 11f);
     canvasPanel1.ImagePos             = new System.Drawing.Point(0, 0);
     canvasPanel1.ImageSize            = new System.Drawing.Size(0, 0);
     canvasPanel1.Location             = new System.Drawing.Point(24, 152);
     canvasPanel1.MainBindableProperty = null;
     canvasPanel1.Name                 = "canvasPanel1";
     canvasPanel1.NormalColor          = System.Drawing.Color.LightSteelBlue;
     canvasPanel1.Radius               = 8;
     canvasPanel1.Size                 = new System.Drawing.Size(565, 253);
     canvasPanel1.Source               = null;
     canvasPanel1.TabIndex             = 4;
     canvasPanel1.Text                 = null;
     canvasPanel1.UIElementBinders     = null;
     textBlock4.BackColor              = System.Drawing.Color.Transparent;
     textBlock4.BorderColor            = System.Drawing.Color.Empty;
     textBlock4.BorderThickness        = -1;
     textBlock4.DataBindingInfo        = null;
     textBlock4.EnableFlag             = false;
     textBlock4.EnableTextRenderHint   = true;
     textBlock4.FlagAlign              = dotNetLab.Widgets.Alignments.Left;
     textBlock4.FlagColor              = System.Drawing.Color.DodgerBlue;
     textBlock4.FlagThickness          = 5;
     textBlock4.Font                    = new System.Drawing.Font("微软雅黑", 12f);
     textBlock4.ForeColor               = System.Drawing.Color.Firebrick;
     textBlock4.GapBetweenTextFlag      = 10;
     textBlock4.LEDStyle                = false;
     textBlock4.Location                = new System.Drawing.Point(0, 146);
     textBlock4.MainBindableProperty    = "向导将在数据中心创建一张用于存储通讯参数的表格,你可以在创建\r\n\r\n后访问数据中心以修改默认值";
     textBlock4.Name                    = "textBlock4";
     textBlock4.Radius                  = -1;
     textBlock4.Size                    = new System.Drawing.Size(552, 83);
     textBlock4.TabIndex                = 3;
     textBlock4.Text                    = "向导将在数据中心创建一张用于存储通讯参数的表格,你可以在创建\r\n\r\n后访问数据中心以修改默认值";
     textBlock4.UIElementBinders        = null;
     textBlock4.UnderLine               = false;
     textBlock4.UnderLineColor          = System.Drawing.Color.DarkGray;
     textBlock4.UnderLineThickness      = 2f;
     textBlock4.Vertical                = false;
     textBlock4.WhereReturn             = 30;
     txb_TableName.ActiveColor          = System.Drawing.Color.White;
     txb_TableName.BackColor            = System.Drawing.Color.Transparent;
     txb_TableName.DataBindingInfo      = null;
     txb_TableName.DoubleValue          = double.NaN;
     txb_TableName.EnableMobileRound    = true;
     txb_TableName.EnableNullValue      = false;
     txb_TableName.FillColor            = System.Drawing.Color.White;
     txb_TableName.FloatValue           = float.NaN;
     txb_TableName.Font                 = new System.Drawing.Font("微软雅黑", 13f);
     txb_TableName.ForeColor            = System.Drawing.Color.Black;
     txb_TableName.GreyPattern          = false;
     txb_TableName.IntValue             = -2147483648;
     txb_TableName.LineThickness        = 2f;
     txb_TableName.Location             = new System.Drawing.Point(112, 100);
     txb_TableName.MainBindableProperty = "";
     txb_TableName.Name                 = "txb_TableName";
     txb_TableName.Radius               = 30;
     txb_TableName.Size                 = new System.Drawing.Size(206, 31);
     txb_TableName.StaticColor          = System.Drawing.Color.White;
     txb_TableName.TabIndex             = 2;
     txb_TableName.TextAlignment        = System.Windows.Forms.HorizontalAlignment.Left;
     txb_TableName.TextBackColor        = System.Drawing.Color.White;
     txb_TableName.TextBoxStyle         = dotNetLab.Widgets.MobileTextBox.TextBoxStyles.Mobile;
     txb_TableName.UIElementBinders     = null;
     txb_TableName.WhitePattern         = true;
     txb_TableName.KeyUp               += new System.Windows.Forms.KeyEventHandler(txb_TableName_KeyUp);
     cmbx_Kind.BackColor                = System.Drawing.Color.White;
     cmbx_Kind.BorderColor              = System.Drawing.Color.Gray;
     cmbx_Kind.DataBindingInfo          = null;
     cmbx_Kind.DisplayItems             = 0;
     cmbx_Kind.EnableAnimation          = false;
     cmbx_Kind.Items                    = new string[2]
     {
         "TCP/IP",
         "串口"
     };
     cmbx_Kind.Location             = new System.Drawing.Point(116, 39);
     cmbx_Kind.MainBindableProperty = "";
     cmbx_Kind.Name                      = "cmbx_Kind";
     cmbx_Kind.SelectedItem              = "TCP/IP";
     cmbx_Kind.Size                      = new System.Drawing.Size(353, 35);
     cmbx_Kind.TabIndex                  = 1;
     cmbx_Kind.UIElementBinders          = null;
     textBlock3.BackColor                = System.Drawing.Color.Transparent;
     textBlock3.BorderColor              = System.Drawing.Color.Empty;
     textBlock3.BorderThickness          = -1;
     textBlock3.DataBindingInfo          = null;
     textBlock3.EnableFlag               = false;
     textBlock3.EnableTextRenderHint     = true;
     textBlock3.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock3.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock3.FlagThickness            = 5;
     textBlock3.Font                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock3.GapBetweenTextFlag       = 10;
     textBlock3.LEDStyle                 = false;
     textBlock3.Location                 = new System.Drawing.Point(54, 102);
     textBlock3.MainBindableProperty     = "表名";
     textBlock3.Name                     = "textBlock3";
     textBlock3.Radius                   = -1;
     textBlock3.Size                     = new System.Drawing.Size(57, 25);
     textBlock3.TabIndex                 = 0;
     textBlock3.Text                     = "表名";
     textBlock3.UIElementBinders         = null;
     textBlock3.UnderLine                = false;
     textBlock3.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock3.UnderLineThickness       = 2f;
     textBlock3.Vertical                 = false;
     textBlock3.WhereReturn              = 0;
     textBlock6.BackColor                = System.Drawing.Color.Transparent;
     textBlock6.BorderColor              = System.Drawing.Color.Empty;
     textBlock6.BorderThickness          = -1;
     textBlock6.DataBindingInfo          = null;
     textBlock6.EnableFlag               = false;
     textBlock6.EnableTextRenderHint     = true;
     textBlock6.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock6.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock6.FlagThickness            = 5;
     textBlock6.Font                     = new System.Drawing.Font("微软雅黑", 10f);
     textBlock6.ForeColor                = System.Drawing.Color.Crimson;
     textBlock6.GapBetweenTextFlag       = 10;
     textBlock6.LEDStyle                 = false;
     textBlock6.Location                 = new System.Drawing.Point(337, 102);
     textBlock6.MainBindableProperty     = "输完表名后请回车以创建表";
     textBlock6.Name                     = "textBlock6";
     textBlock6.Radius                   = -1;
     textBlock6.Size                     = new System.Drawing.Size(183, 25);
     textBlock6.TabIndex                 = 0;
     textBlock6.Text                     = "输完表名后请回车以创建表";
     textBlock6.UIElementBinders         = null;
     textBlock6.UnderLine                = false;
     textBlock6.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock6.UnderLineThickness       = 2f;
     textBlock6.Vertical                 = false;
     textBlock6.WhereReturn              = 0;
     textBlock2.BackColor                = System.Drawing.Color.Transparent;
     textBlock2.BorderColor              = System.Drawing.Color.Empty;
     textBlock2.BorderThickness          = -1;
     textBlock2.DataBindingInfo          = null;
     textBlock2.EnableFlag               = false;
     textBlock2.EnableTextRenderHint     = true;
     textBlock2.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     textBlock2.FlagColor                = System.Drawing.Color.DodgerBlue;
     textBlock2.FlagThickness            = 5;
     textBlock2.Font                     = new System.Drawing.Font("微软雅黑", 12f);
     textBlock2.GapBetweenTextFlag       = 10;
     textBlock2.LEDStyle                 = false;
     textBlock2.Location                 = new System.Drawing.Point(29, 45);
     textBlock2.MainBindableProperty     = "何种类型";
     textBlock2.Name                     = "textBlock2";
     textBlock2.Radius                   = -1;
     textBlock2.Size                     = new System.Drawing.Size(82, 25);
     textBlock2.TabIndex                 = 0;
     textBlock2.Text                     = "何种类型";
     textBlock2.UIElementBinders         = null;
     textBlock2.UnderLine                = false;
     textBlock2.UnderLineColor           = System.Drawing.Color.DarkGray;
     textBlock2.UnderLineThickness       = 2f;
     textBlock2.Vertical                 = false;
     textBlock2.WhereReturn              = 0;
     btn_DataCenter.Anchor               = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
     btn_DataCenter.BackColor            = System.Drawing.Color.Transparent;
     btn_DataCenter.BorderColor          = System.Drawing.Color.Empty;
     btn_DataCenter.BorderThickness      = -1;
     btn_DataCenter.CornerAligment       = dotNetLab.Widgets.Alignments.All;
     btn_DataCenter.DataBindingInfo      = null;
     btn_DataCenter.EnableFlag           = false;
     btn_DataCenter.EnableMobileRound    = false;
     btn_DataCenter.EnableTextRenderHint = false;
     btn_DataCenter.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     btn_DataCenter.FlagColor            = System.Drawing.Color.DodgerBlue;
     btn_DataCenter.FlagThickness        = 5;
     btn_DataCenter.Font                 = new System.Drawing.Font("微软雅黑", 12f);
     btn_DataCenter.ForeColor            = System.Drawing.Color.White;
     btn_DataCenter.GapBetweenTextFlag   = 10;
     btn_DataCenter.GapBetweenTextImage  = 8;
     btn_DataCenter.IConAlignment        = System.Windows.Forms.LeftRightAlignment.Left;
     btn_DataCenter.ImageSize            = new System.Drawing.Size(0, 0);
     btn_DataCenter.LEDStyle             = false;
     btn_DataCenter.Location             = new System.Drawing.Point(462, 411);
     btn_DataCenter.MainBindableProperty = "数据中心";
     btn_DataCenter.Name                 = "btn_DataCenter";
     btn_DataCenter.NeedAnimation        = false;
     btn_DataCenter.NormalColor          = System.Drawing.Color.Gray;
     btn_DataCenter.PressColor           = System.Drawing.Color.DimGray;
     btn_DataCenter.Radius               = 25;
     btn_DataCenter.Size                 = new System.Drawing.Size(127, 46);
     btn_DataCenter.Source               = null;
     btn_DataCenter.TabIndex             = 5;
     btn_DataCenter.Text                 = "数据中心";
     btn_DataCenter.UIElementBinders     = null;
     btn_DataCenter.UnderLine            = false;
     btn_DataCenter.UnderLineColor       = System.Drawing.Color.DarkGray;
     btn_DataCenter.UnderLineThickness   = 2f;
     btn_DataCenter.Vertical             = false;
     btn_DataCenter.WhereReturn          = 0;
     btn_DataCenter.Click               += new System.EventHandler(btn_DataCenter_Click);
     lbl_Status.Anchor                   = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
     lbl_Status.BackColor                = System.Drawing.Color.Transparent;
     lbl_Status.BorderColor              = System.Drawing.Color.Empty;
     lbl_Status.BorderThickness          = -1;
     lbl_Status.DataBindingInfo          = null;
     lbl_Status.EnableFlag               = false;
     lbl_Status.EnableTextRenderHint     = false;
     lbl_Status.FlagAlign                = dotNetLab.Widgets.Alignments.Left;
     lbl_Status.FlagColor                = System.Drawing.Color.DodgerBlue;
     lbl_Status.FlagThickness            = 5;
     lbl_Status.Font                     = new System.Drawing.Font("微软雅黑", 10f);
     lbl_Status.GapBetweenTextFlag       = 10;
     lbl_Status.LEDStyle                 = false;
     lbl_Status.Location                 = new System.Drawing.Point(4, 443);
     lbl_Status.MainBindableProperty     = "就绪";
     lbl_Status.Name                     = "lbl_Status";
     lbl_Status.Radius                   = -1;
     lbl_Status.Size                     = new System.Drawing.Size(79, 23);
     lbl_Status.TabIndex                 = 6;
     lbl_Status.Text                     = "就绪";
     lbl_Status.UIElementBinders         = null;
     lbl_Status.UnderLine                = false;
     lbl_Status.UnderLineColor           = System.Drawing.Color.DarkGray;
     lbl_Status.UnderLineThickness       = 2f;
     lbl_Status.Vertical                 = false;
     lbl_Status.WhereReturn              = 0;
     BackColor       = System.Drawing.Color.White;
     base.ClientSize = new System.Drawing.Size(611, 469);
     base.Controls.Add(lbl_Status);
     base.Controls.Add(btn_DataCenter);
     base.Controls.Add(canvasPanel1);
     base.Controls.Add(textBlock1);
     base.Controls.Add(panel1);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     base.Name            = "CommunicationWizard";
     Text = "通讯向导";
     panel1.ResumeLayout(false);
     panel1.PerformLayout();
     canvasPanel1.ResumeLayout(false);
     ResumeLayout(false);
 }
예제 #23
0
 public BaseMenu()
 {
     eventTrigger = null;
     canvasPanel  = null;
 }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager componentResourceManager = new System.ComponentModel.ComponentResourceManager(typeof(shikii.VisionJob.MainForm));
     mobileListBox1  = new dotNetLab.Widgets.MobileListBox();
     lbl_OutputInfo  = new dotNetLab.Widgets.TextBlock();
     canvasPanel1    = new dotNetLab.Widgets.Container.CanvasPanel();
     colorDecorator1 = new dotNetLab.Widgets.ColorDecorator();
     btn_More        = new dotNetLab.Widgets.Direction();
     label1          = new System.Windows.Forms.Label();
     pictureBox1     = new System.Windows.Forms.PictureBox();
     label2          = new System.Windows.Forms.Label();
     lbl_IncName     = new System.Windows.Forms.Label();
     textBlock6      = new dotNetLab.Widgets.TextBlock();
     lbl_GoodPercent = new dotNetLab.Widgets.TextBlock();
     textBlock4      = new dotNetLab.Widgets.TextBlock();
     lbl_NGNum       = new dotNetLab.Widgets.TextBlock();
     textBlock2      = new dotNetLab.Widgets.TextBlock();
     lbl_TotalNum    = new dotNetLab.Widgets.TextBlock();
     ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
     SuspendLayout();
     tipper.Location                      = new System.Drawing.Point(556, 480);
     mobileListBox1.Anchor                = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
     mobileListBox1.BackColor             = System.Drawing.Color.Transparent;
     mobileListBox1.BorderColor           = System.Drawing.Color.Gray;
     mobileListBox1.BorderThickness       = 1;
     mobileListBox1.CornerAlignment       = dotNetLab.Widgets.Alignments.All;
     mobileListBox1.DataBindingInfo       = null;
     mobileListBox1.Font                  = new System.Drawing.Font("微软雅黑", 11f);
     mobileListBox1.ImagePos              = new System.Drawing.Point(0, 0);
     mobileListBox1.ImageSize             = new System.Drawing.Size(0, 0);
     mobileListBox1.Location              = new System.Drawing.Point(610, 93);
     mobileListBox1.MainBindableProperty  = "mobileListBox1";
     mobileListBox1.Name                  = "mobileListBox1";
     mobileListBox1.NormalColor           = System.Drawing.Color.White;
     mobileListBox1.Radius                = -1;
     mobileListBox1.Size                  = new System.Drawing.Size(228, 406);
     mobileListBox1.Source                = null;
     mobileListBox1.TabIndex              = 2;
     mobileListBox1.Text                  = "mobileListBox1";
     mobileListBox1.UIElementBinders      = null;
     lbl_OutputInfo.Anchor                = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
     lbl_OutputInfo.BackColor             = System.Drawing.Color.Transparent;
     lbl_OutputInfo.BorderColor           = System.Drawing.Color.Empty;
     lbl_OutputInfo.BorderThickness       = -1;
     lbl_OutputInfo.DataBindingInfo       = null;
     lbl_OutputInfo.EnableFlag            = true;
     lbl_OutputInfo.EnableTextRenderHint  = true;
     lbl_OutputInfo.FlagAlign             = dotNetLab.Widgets.Alignments.Left;
     lbl_OutputInfo.FlagColor             = System.Drawing.Color.Crimson;
     lbl_OutputInfo.FlagThickness         = 10;
     lbl_OutputInfo.Font                  = new System.Drawing.Font("微软雅黑", 12f);
     lbl_OutputInfo.GapBetweenTextFlag    = 0;
     lbl_OutputInfo.LEDStyle              = false;
     lbl_OutputInfo.Location              = new System.Drawing.Point(612, 71);
     lbl_OutputInfo.MainBindableProperty  = "输出信息";
     lbl_OutputInfo.Name                  = "lbl_OutputInfo";
     lbl_OutputInfo.Radius                = -1;
     lbl_OutputInfo.Size                  = new System.Drawing.Size(104, 16);
     lbl_OutputInfo.TabIndex              = 4;
     lbl_OutputInfo.Text                  = "输出信息";
     lbl_OutputInfo.UIElementBinders      = null;
     lbl_OutputInfo.UnderLine             = false;
     lbl_OutputInfo.UnderLineColor        = System.Drawing.Color.DarkGray;
     lbl_OutputInfo.UnderLineThickness    = 2f;
     lbl_OutputInfo.Vertical              = false;
     lbl_OutputInfo.WhereReturn           = 0;
     canvasPanel1.Anchor                  = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
     canvasPanel1.BackColor               = System.Drawing.Color.Transparent;
     canvasPanel1.BorderColor             = System.Drawing.Color.Empty;
     canvasPanel1.BorderThickness         = -1;
     canvasPanel1.CornerAlignment         = dotNetLab.Widgets.Alignments.All;
     canvasPanel1.DataBindingInfo         = null;
     canvasPanel1.Font                    = new System.Drawing.Font("微软雅黑", 11f);
     canvasPanel1.ImagePos                = new System.Drawing.Point(0, 0);
     canvasPanel1.ImageSize               = new System.Drawing.Size(0, 0);
     canvasPanel1.Location                = new System.Drawing.Point(36, 132);
     canvasPanel1.MainBindableProperty    = null;
     canvasPanel1.Name                    = "canvasPanel1";
     canvasPanel1.NormalColor             = System.Drawing.Color.Silver;
     canvasPanel1.Radius                  = 20;
     canvasPanel1.Size                    = new System.Drawing.Size(554, 367);
     canvasPanel1.Source                  = null;
     canvasPanel1.TabIndex                = 5;
     canvasPanel1.Text                    = null;
     canvasPanel1.UIElementBinders        = null;
     colorDecorator1.Anchor               = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
     colorDecorator1.BackColor            = System.Drawing.Color.White;
     colorDecorator1.DataBindingInfo      = null;
     colorDecorator1.Location             = new System.Drawing.Point(6, 505);
     colorDecorator1.MainBindableProperty = "";
     colorDecorator1.Name                 = "colorDecorator1";
     colorDecorator1.Size                 = new System.Drawing.Size(150, 53);
     colorDecorator1.TabIndex             = 6;
     colorDecorator1.UIElementBinders     = null;
     btn_More.Anchor                      = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
     btn_More.ArrowAlignment              = dotNetLab.Widgets.Alignments.Right;
     btn_More.BackColor                   = System.Drawing.Color.Transparent;
     btn_More.BorderColor                 = System.Drawing.Color.Gray;
     btn_More.BorderThickness             = 2f;
     btn_More.CenterImage                 = true;
     btn_More.ClipCircleRegion            = false;
     btn_More.DataBindingInfo             = null;
     btn_More.Effect                      = null;
     btn_More.Fill                 = false;
     btn_More.FillColor            = System.Drawing.Color.Empty;
     btn_More.ImagePostion         = new System.Drawing.Point(0, 0);
     btn_More.ImageSize            = new System.Drawing.SizeF(25f, 25f);
     btn_More.Location             = new System.Drawing.Point(797, 51);
     btn_More.MainBindableProperty = "";
     btn_More.MouseDownColor       = System.Drawing.Color.Gray;
     btn_More.Name                 = "btn_More";
     btn_More.NeedEffect           = false;
     btn_More.Size                 = new System.Drawing.Size(40, 40);
     btn_More.Source               = (System.Drawing.Image)componentResourceManager.GetObject("btn_More.Source");
     btn_More.TabIndex             = 7;
     btn_More.UIElementBinders     = null;
     btn_More.WhichShap            = 6;
     btn_More.WhitePattern         = false;
     btn_More.Click               += new System.EventHandler(btn_More_Click);
     label1.Anchor                 = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
     label1.AutoSize               = true;
     label1.Font                          = new System.Drawing.Font("微软雅黑", 11f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     label1.ForeColor                     = System.Drawing.Color.Teal;
     label1.Location                      = new System.Drawing.Point(179, 530);
     label1.Name                          = "label1";
     label1.Size                          = new System.Drawing.Size(54, 20);
     label1.TabIndex                      = 8;
     label1.Text                          = "联系人";
     pictureBox1.Location                 = new System.Drawing.Point(9, 12);
     pictureBox1.Name                     = "pictureBox1";
     pictureBox1.Size                     = new System.Drawing.Size(52, 47);
     pictureBox1.SizeMode                 = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     pictureBox1.TabIndex                 = 9;
     pictureBox1.TabStop                  = false;
     label2.AutoSize                      = true;
     label2.Font                          = new System.Drawing.Font("微软雅黑", 11f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     label2.ForeColor                     = System.Drawing.Color.Teal;
     label2.Location                      = new System.Drawing.Point(316, 39);
     label2.Name                          = "label2";
     label2.Size                          = new System.Drawing.Size(27, 20);
     label2.TabIndex                      = 8;
     label2.Text                          = "by";
     lbl_IncName.AutoSize                 = true;
     lbl_IncName.Font                     = new System.Drawing.Font("微软雅黑", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     lbl_IncName.ForeColor                = System.Drawing.Color.Crimson;
     lbl_IncName.Location                 = new System.Drawing.Point(349, 39);
     lbl_IncName.Name                     = "lbl_IncName";
     lbl_IncName.Size                     = new System.Drawing.Size(0, 21);
     lbl_IncName.TabIndex                 = 10;
     textBlock6.Anchor                    = System.Windows.Forms.AnchorStyles.Top;
     textBlock6.BackColor                 = System.Drawing.Color.Transparent;
     textBlock6.BorderColor               = System.Drawing.Color.Empty;
     textBlock6.BorderThickness           = -1;
     textBlock6.DataBindingInfo           = null;
     textBlock6.EnableFlag                = false;
     textBlock6.EnableTextRenderHint      = false;
     textBlock6.FlagAlign                 = dotNetLab.Widgets.Alignments.Left;
     textBlock6.FlagColor                 = System.Drawing.Color.DodgerBlue;
     textBlock6.FlagThickness             = 5;
     textBlock6.Font                      = new System.Drawing.Font("微软雅黑", 12f);
     textBlock6.GapBetweenTextFlag        = 10;
     textBlock6.LEDStyle                  = false;
     textBlock6.Location                  = new System.Drawing.Point(434, 91);
     textBlock6.MainBindableProperty      = "合格率:";
     textBlock6.Name                      = "textBlock6";
     textBlock6.Radius                    = -1;
     textBlock6.Size                      = new System.Drawing.Size(77, 35);
     textBlock6.TabIndex                  = 16;
     textBlock6.Text                      = "合格率:";
     textBlock6.UIElementBinders          = null;
     textBlock6.UnderLine                 = false;
     textBlock6.UnderLineColor            = System.Drawing.Color.DarkGray;
     textBlock6.UnderLineThickness        = 2f;
     textBlock6.Vertical                  = false;
     textBlock6.WhereReturn               = 0;
     lbl_GoodPercent.Anchor               = System.Windows.Forms.AnchorStyles.Top;
     lbl_GoodPercent.BackColor            = System.Drawing.Color.Transparent;
     lbl_GoodPercent.BorderColor          = System.Drawing.Color.Empty;
     lbl_GoodPercent.BorderThickness      = -1;
     lbl_GoodPercent.DataBindingInfo      = null;
     lbl_GoodPercent.EnableFlag           = false;
     lbl_GoodPercent.EnableTextRenderHint = false;
     lbl_GoodPercent.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     lbl_GoodPercent.FlagColor            = System.Drawing.Color.DodgerBlue;
     lbl_GoodPercent.FlagThickness        = 5;
     lbl_GoodPercent.Font                 = new System.Drawing.Font("DS-Digital", 30f);
     lbl_GoodPercent.ForeColor            = System.Drawing.Color.SeaGreen;
     lbl_GoodPercent.GapBetweenTextFlag   = 10;
     lbl_GoodPercent.LEDStyle             = true;
     lbl_GoodPercent.Location             = new System.Drawing.Point(513, 91);
     lbl_GoodPercent.MainBindableProperty = "100.2";
     lbl_GoodPercent.Name                 = "lbl_GoodPercent";
     lbl_GoodPercent.Radius               = -1;
     lbl_GoodPercent.Size                 = new System.Drawing.Size(76, 35);
     lbl_GoodPercent.TabIndex             = 13;
     lbl_GoodPercent.Text                 = "100.2";
     lbl_GoodPercent.UIElementBinders     = null;
     lbl_GoodPercent.UnderLine            = false;
     lbl_GoodPercent.UnderLineColor       = System.Drawing.Color.DarkGray;
     lbl_GoodPercent.UnderLineThickness   = 2f;
     lbl_GoodPercent.Vertical             = false;
     lbl_GoodPercent.WhereReturn          = 0;
     textBlock4.Anchor                    = System.Windows.Forms.AnchorStyles.Top;
     textBlock4.BackColor                 = System.Drawing.Color.Transparent;
     textBlock4.BorderColor               = System.Drawing.Color.Empty;
     textBlock4.BorderThickness           = -1;
     textBlock4.DataBindingInfo           = null;
     textBlock4.EnableFlag                = false;
     textBlock4.EnableTextRenderHint      = false;
     textBlock4.FlagAlign                 = dotNetLab.Widgets.Alignments.Left;
     textBlock4.FlagColor                 = System.Drawing.Color.DodgerBlue;
     textBlock4.FlagThickness             = 5;
     textBlock4.Font                      = new System.Drawing.Font("微软雅黑", 12f);
     textBlock4.GapBetweenTextFlag        = 10;
     textBlock4.LEDStyle                  = false;
     textBlock4.Location                  = new System.Drawing.Point(257, 91);
     textBlock4.MainBindableProperty      = "不合格数:";
     textBlock4.Name                      = "textBlock4";
     textBlock4.Radius                    = -1;
     textBlock4.Size                      = new System.Drawing.Size(77, 35);
     textBlock4.TabIndex                  = 17;
     textBlock4.Text                      = "不合格数:";
     textBlock4.UIElementBinders          = null;
     textBlock4.UnderLine                 = false;
     textBlock4.UnderLineColor            = System.Drawing.Color.DarkGray;
     textBlock4.UnderLineThickness        = 2f;
     textBlock4.Vertical                  = false;
     textBlock4.WhereReturn               = 0;
     lbl_NGNum.Anchor                     = System.Windows.Forms.AnchorStyles.Top;
     lbl_NGNum.BackColor                  = System.Drawing.Color.Transparent;
     lbl_NGNum.BorderColor                = System.Drawing.Color.Empty;
     lbl_NGNum.BorderThickness            = -1;
     lbl_NGNum.DataBindingInfo            = null;
     lbl_NGNum.EnableFlag                 = false;
     lbl_NGNum.EnableTextRenderHint       = false;
     lbl_NGNum.FlagAlign                  = dotNetLab.Widgets.Alignments.Left;
     lbl_NGNum.FlagColor                  = System.Drawing.Color.DodgerBlue;
     lbl_NGNum.FlagThickness              = 5;
     lbl_NGNum.Font                       = new System.Drawing.Font("DS-Digital", 30f);
     lbl_NGNum.ForeColor                  = System.Drawing.Color.Crimson;
     lbl_NGNum.GapBetweenTextFlag         = 10;
     lbl_NGNum.LEDStyle                   = true;
     lbl_NGNum.Location                   = new System.Drawing.Point(336, 91);
     lbl_NGNum.MainBindableProperty       = "9";
     lbl_NGNum.Name                       = "lbl_NGNum";
     lbl_NGNum.Radius                     = -1;
     lbl_NGNum.Size                       = new System.Drawing.Size(92, 35);
     lbl_NGNum.TabIndex                   = 14;
     lbl_NGNum.Text                       = "9";
     lbl_NGNum.UIElementBinders           = null;
     lbl_NGNum.UnderLine                  = false;
     lbl_NGNum.UnderLineColor             = System.Drawing.Color.DarkGray;
     lbl_NGNum.UnderLineThickness         = 2f;
     lbl_NGNum.Vertical                   = false;
     lbl_NGNum.WhereReturn                = 0;
     textBlock2.Anchor                    = System.Windows.Forms.AnchorStyles.Top;
     textBlock2.BackColor                 = System.Drawing.Color.Transparent;
     textBlock2.BorderColor               = System.Drawing.Color.Empty;
     textBlock2.BorderThickness           = -1;
     textBlock2.DataBindingInfo           = null;
     textBlock2.EnableFlag                = false;
     textBlock2.EnableTextRenderHint      = false;
     textBlock2.FlagAlign                 = dotNetLab.Widgets.Alignments.Left;
     textBlock2.FlagColor                 = System.Drawing.Color.DodgerBlue;
     textBlock2.FlagThickness             = 5;
     textBlock2.Font                      = new System.Drawing.Font("微软雅黑", 12f);
     textBlock2.GapBetweenTextFlag        = 10;
     textBlock2.LEDStyle                  = false;
     textBlock2.Location                  = new System.Drawing.Point(36, 91);
     textBlock2.MainBindableProperty      = "已经生产 :";
     textBlock2.Name                      = "textBlock2";
     textBlock2.Radius                    = -1;
     textBlock2.Size                      = new System.Drawing.Size(77, 35);
     textBlock2.TabIndex                  = 18;
     textBlock2.Text                      = "已经生产 :";
     textBlock2.UIElementBinders          = null;
     textBlock2.UnderLine                 = false;
     textBlock2.UnderLineColor            = System.Drawing.Color.DarkGray;
     textBlock2.UnderLineThickness        = 2f;
     textBlock2.Vertical                  = false;
     textBlock2.WhereReturn               = 0;
     lbl_TotalNum.Anchor                  = System.Windows.Forms.AnchorStyles.Top;
     lbl_TotalNum.BackColor               = System.Drawing.Color.Transparent;
     lbl_TotalNum.BorderColor             = System.Drawing.Color.Empty;
     lbl_TotalNum.BorderThickness         = -1;
     lbl_TotalNum.DataBindingInfo         = null;
     lbl_TotalNum.EnableFlag              = false;
     lbl_TotalNum.EnableTextRenderHint    = false;
     lbl_TotalNum.FlagAlign               = dotNetLab.Widgets.Alignments.Left;
     lbl_TotalNum.FlagColor               = System.Drawing.Color.DodgerBlue;
     lbl_TotalNum.FlagThickness           = 5;
     lbl_TotalNum.Font                    = new System.Drawing.Font("DS-Digital", 30f);
     lbl_TotalNum.ForeColor               = System.Drawing.Color.DodgerBlue;
     lbl_TotalNum.GapBetweenTextFlag      = 10;
     lbl_TotalNum.LEDStyle                = true;
     lbl_TotalNum.Location                = new System.Drawing.Point(119, 91);
     lbl_TotalNum.MainBindableProperty    = "0";
     lbl_TotalNum.Name                    = "lbl_TotalNum";
     lbl_TotalNum.Radius                  = -1;
     lbl_TotalNum.Size                    = new System.Drawing.Size(141, 35);
     lbl_TotalNum.TabIndex                = 15;
     lbl_TotalNum.Text                    = "0";
     lbl_TotalNum.UIElementBinders        = null;
     lbl_TotalNum.UnderLine               = false;
     lbl_TotalNum.UnderLineColor          = System.Drawing.Color.DarkGray;
     lbl_TotalNum.UnderLineThickness      = 2f;
     lbl_TotalNum.Vertical                = false;
     lbl_TotalNum.WhereReturn             = 0;
     base.ClientSize                      = new System.Drawing.Size(859, 565);
     base.ClipboardText                   = "";
     base.Controls.Add(textBlock6);
     base.Controls.Add(lbl_GoodPercent);
     base.Controls.Add(textBlock4);
     base.Controls.Add(lbl_NGNum);
     base.Controls.Add(textBlock2);
     base.Controls.Add(lbl_TotalNum);
     base.Controls.Add(lbl_IncName);
     base.Controls.Add(pictureBox1);
     base.Controls.Add(label2);
     base.Controls.Add(label1);
     base.Controls.Add(btn_More);
     base.Controls.Add(colorDecorator1);
     base.Controls.Add(canvasPanel1);
     base.Controls.Add(lbl_OutputInfo);
     base.Controls.Add(mobileListBox1);
     base.FontX      = new System.Drawing.Font("等线 Light", 30f);
     base.KeyPreview = true;
     base.Name       = "MainForm";
     Text            = "LED支架检测";
     base.TitlePos   = new System.Drawing.Point(60, 18);
     base.Controls.SetChildIndex(mobileListBox1, 0);
     base.Controls.SetChildIndex(lbl_OutputInfo, 0);
     base.Controls.SetChildIndex(canvasPanel1, 0);
     base.Controls.SetChildIndex(colorDecorator1, 0);
     base.Controls.SetChildIndex(btn_More, 0);
     base.Controls.SetChildIndex(label1, 0);
     base.Controls.SetChildIndex(label2, 0);
     base.Controls.SetChildIndex(pictureBox1, 0);
     base.Controls.SetChildIndex(lbl_IncName, 0);
     base.Controls.SetChildIndex(lbl_TotalNum, 0);
     base.Controls.SetChildIndex(textBlock2, 0);
     base.Controls.SetChildIndex(lbl_NGNum, 0);
     base.Controls.SetChildIndex(textBlock4, 0);
     base.Controls.SetChildIndex(lbl_GoodPercent, 0);
     base.Controls.SetChildIndex(textBlock6, 0);
     ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
예제 #25
0
파일: Paint.cs 프로젝트: Yashkindjus/ISD.C
 private void ClearButton_Click(object sender, EventArgs e)
 {
     CanvasPanel.Refresh();//clear panel
     CanvasPanel.BackColor       = Color.FromArgb(255, 255, 255);
     CanvasPanel.BackgroundImage = null;
 }
예제 #26
0
    private void HandleStepExecuted(Step step)
    {
        //Debug.Log(step.command+" "+step.target+" "+step.content);
        if (canvas.isActiveAndEnabled)
        {
            Character   character = step.target as Character;
            int         index     = visibleCharacters.IndexOf(character);
            CanvasPanel panel     = null;
            if (index != -1)
            {
                panel = _panels[index];
            }
            if (panel != null)
            {
                Color color;
                int   integer;
                float floatValue;
                switch (step.command)
                {
                case "speak":
                case "narrate":
                case "sing":
                case "think":
                case "setbackgroundimage":
                    if (step.command == "setbackgroundimage")
                    {
                        if (step.content == "none")
                        {
                            panel.ClearImage();
                        }
                        break;
                    }
                    string extension = GetFilenameExtension(step.content);
                    switch (extension)
                    {
                    case "gif":
                    case "png":
                    case "jpg":
                        panel.SetImage(step.content);
                        break;

                    case "mp3":
                    case "ogg":
                    case "wav":
                    case "m4a":
                        break;

                    case "mp4":
                    case "mov":
                        panel.SetVideo(step.content);
                        break;

                    default:
                        panel.SetText(step.content);
                        break;
                    }
                    break;

                case "setgrid":
                    SetGrid(ParseVector2FromString(step.content));
                    break;

                case "setlayout":
                    SetPanelLayout(panel, ParseRectFromString(step.content));
                    break;

                case "setstagecolor":
                    if (ColorUtility.TryParseHtmlString(step.content, out color))
                    {
                        SetStageBackgroundColor(color);
                    }
                    break;

                case "setbackcolor":
                    if (ColorUtility.TryParseHtmlString(step.content, out color))
                    {
                        panel.SetBackgroundColor(color);
                    }
                    break;

                case "setforecolor":
                    if (ColorUtility.TryParseHtmlString(step.content, out color))
                    {
                        panel.SetTextColor(color);
                    }
                    break;

                case "setfont":
                    panel.SetTextFont(step.content);
                    break;

                case "setposition":
                case "moveto":
                    panel.SetPosition(ParsePositionFromStringForPanel(step.content, panel));
                    break;

                case "setsize":
                case "changesize":
                    SetPanelSize(panel, ParseVector2FromString(step.content));
                    break;

                case "setmargin":
                    panel.SetMargins(ParseBordersFromString(step.content));
                    break;

                case "settextalign":
                    panel.SetTextAlign(ParseTextAnchorFromString(step.content));
                    break;

                case "setcaptionmargin":
                case "setpadding":
                    panel.SetTextMargins(ParseBordersFromString(step.content));
                    break;

                case "setcaptionbackgroundcolor":
                case "setcaptionbackcolor":
                    if (ColorUtility.TryParseHtmlString(step.content, out color))
                    {
                        panel.SetTextBackgroundColor(color);
                    }
                    break;

                case "setcaptionpadding":
                    panel.SetTextPadding(ParseBordersFromString(step.content));
                    break;

                case "setfontsize":
                    if (int.TryParse(step.content, out integer))
                    {
                        panel.SetTextSize(integer);
                    }
                    break;

                case "setlineheight":
                    if (float.TryParse(step.content, out floatValue))
                    {
                        panel.SetTextLineSpacing(floatValue);
                    }
                    break;

                case "setletterspacing":
                    if (float.TryParse(step.content, out floatValue))
                    {
                        panel.SetTextCharacterSpacing(floatValue);
                    }
                    break;

                case "settexttransform":
                    panel.SetTextTransform(ParseTextTransformFromString(step.content));
                    break;

                case "setcamera":
                    panel.SetCamera(step.content);
                    break;

                case "pause":
                    panel.Pause();
                    break;

                case "play":
                    panel.Play();
                    break;

                case "setloop":
                    panel.SetLoop(step.content == "true" ? true : false);
                    break;

                case "setlayouttransition":
                    if (float.TryParse(step.content, out floatValue))
                    {
                        panel.SetLayoutTransition(floatValue);
                    }
                    break;

                case "setimagetransition":
                    if (float.TryParse(step.content, out floatValue))
                    {
                        panel.SetImageTransition(floatValue);
                    }
                    break;

                case "setbackgroundsize":
                    if (step.content == "cover")
                    {
                        panel.SetBackgroundSize(BackgroundSize.Cover);
                    }
                    else if (step.content == "contain")
                    {
                        panel.SetBackgroundSize(BackgroundSize.Contain);
                    }
                    break;
                }
            }
        }
    }
 private void InitializeComponent()
 {
     textBlock1   = new dotNetLab.Widgets.TextBlock();
     comboBox1    = new System.Windows.Forms.ComboBox();
     canvasPanel1 = new dotNetLab.Widgets.Container.CanvasPanel();
     SuspendLayout();
     textBlock1.BackColor            = System.Drawing.Color.Transparent;
     textBlock1.BorderColor          = System.Drawing.Color.Empty;
     textBlock1.BorderThickness      = -1;
     textBlock1.DataBindingInfo      = null;
     textBlock1.EnableFlag           = true;
     textBlock1.EnableTextRenderHint = false;
     textBlock1.FlagAlign            = dotNetLab.Widgets.Alignments.Left;
     textBlock1.FlagColor            = System.Drawing.Color.DodgerBlue;
     textBlock1.FlagThickness        = 7;
     textBlock1.Font = new System.Drawing.Font("微软雅黑", 12f);
     textBlock1.GapBetweenTextFlag   = 10;
     textBlock1.LEDStyle             = false;
     textBlock1.Location             = new System.Drawing.Point(57, 80);
     textBlock1.MainBindableProperty = "相机实时取相";
     textBlock1.Name               = "textBlock1";
     textBlock1.Radius             = -1;
     textBlock1.Size               = new System.Drawing.Size(166, 23);
     textBlock1.TabIndex           = 1;
     textBlock1.Text               = "相机实时取相";
     textBlock1.UIElementBinders   = null;
     textBlock1.UnderLine          = false;
     textBlock1.UnderLineColor     = System.Drawing.Color.DarkGray;
     textBlock1.UnderLineThickness = 2f;
     textBlock1.Vertical           = false;
     textBlock1.WhereReturn        = 0;
     comboBox1.Anchor              = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
     comboBox1.BackColor           = System.Drawing.Color.DarkGray;
     comboBox1.FlatStyle           = System.Windows.Forms.FlatStyle.Flat;
     comboBox1.Font                    = new System.Drawing.Font("微软雅黑", 10f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
     comboBox1.ForeColor               = System.Drawing.Color.White;
     comboBox1.FormattingEnabled       = true;
     comboBox1.Location                = new System.Drawing.Point(102, 109);
     comboBox1.Name                    = "comboBox1";
     comboBox1.Size                    = new System.Drawing.Size(357, 27);
     comboBox1.TabIndex                = 2;
     comboBox1.SelectedIndexChanged   += new System.EventHandler(comboBox1_SelectedIndexChanged);
     canvasPanel1.Anchor               = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
     canvasPanel1.BackColor            = System.Drawing.Color.Transparent;
     canvasPanel1.BorderColor          = System.Drawing.Color.Empty;
     canvasPanel1.BorderThickness      = -1;
     canvasPanel1.CornerAlignment      = dotNetLab.Widgets.Alignments.All;
     canvasPanel1.DataBindingInfo      = null;
     canvasPanel1.Font                 = new System.Drawing.Font("微软雅黑", 11f);
     canvasPanel1.ImagePos             = new System.Drawing.Point(0, 0);
     canvasPanel1.ImageSize            = new System.Drawing.Size(0, 0);
     canvasPanel1.Location             = new System.Drawing.Point(60, 142);
     canvasPanel1.MainBindableProperty = "显示区";
     canvasPanel1.Name                 = "canvasPanel1";
     canvasPanel1.NormalColor          = System.Drawing.Color.DarkGray;
     canvasPanel1.Radius               = -1;
     canvasPanel1.Size                 = new System.Drawing.Size(496, 334);
     canvasPanel1.Source               = null;
     canvasPanel1.TabIndex             = 3;
     canvasPanel1.Text                 = "显示区";
     canvasPanel1.UIElementBinders     = null;
     base.ClientSize                   = new System.Drawing.Size(600, 500);
     base.Controls.Add(canvasPanel1);
     base.Controls.Add(comboBox1);
     base.Controls.Add(textBlock1);
     base.Name     = "FifoForm";
     Text          = "取相";
     base.TitlePos = new System.Drawing.Point(70, 15);
     base.Controls.SetChildIndex(textBlock1, 0);
     base.Controls.SetChildIndex(comboBox1, 0);
     base.Controls.SetChildIndex(canvasPanel1, 0);
     ResumeLayout(false);
 }
예제 #28
0
 private void BtnFill_Click(object sender, EventArgs e)
 {
     CanvasGfx.Clear(MainColor.Color);
     CanvasPanel.Invalidate();
 }
예제 #29
0
 public Form1()
 {
     InitializeComponent();
     Canvas = CanvasPanel.CreateGraphics();
 }
예제 #30
0
파일: Paint.cs 프로젝트: Yashkindjus/ISD.C
 public Paint()
 {
     InitializeComponent();
     graficsCreate = CanvasPanel.CreateGraphics();//allow program for painting
 }