Example #1
1
 private static void DrawStringML(this Graphics G, string Text, Font font, Brush brush, float x, ref float y, float mX)
 {
     string[] words = Text.Split(' ');
     float tempX = x;
     float totalSpace = mX - x;
     SizeF measureWord = new SizeF(0, font.GetHeight());
     float tempWordWidth = 0;
     foreach (string word in words)
     {
         //measure word width (based in font size)
         tempWordWidth = G.MeasureString(word + " ", font).Width;
         measureWord.Width += tempWordWidth;
         //check if the word fits in free line space
         //if not then change line
         if (measureWord.Width > totalSpace)
         {
             y += font.GetHeight();
             tempX = x;
             measureWord.Width = tempWordWidth;
         }
         G.DrawString(word + " ", font, brush, tempX, y);
         tempX += tempWordWidth;
     }
     y += font.GetHeight();
 }
        /// <summary>
        /// 主要作業方法
        /// </summary>
        public Image Operation()
        {
            Graphics g = Graphics.FromImage(image);
            _mask_pos_x = (image.Width / 2) + _Xoffset;
            SizeF steSize = new SizeF();
            for (int i = _FontMaxSize; i >= _FontMinSize; i--)
            {
                using (Font testFont = new Font(_FontFamily, i, FontStyle.Bold))
                {
                    steSize = g.MeasureString(_text, testFont);

                    if ((ushort)steSize.Width < (ushort)_Width || i == _FontMinSize)
                    {

                        using (SolidBrush semiTransBrush = new SolidBrush(_fontcolor))
                        {
                            StringFormat StrFormat = new StringFormat();
                            StrFormat.Alignment = StringAlignment.Center;
                            g.DrawString(_text, testFont, semiTransBrush, new PointF(_mask_pos_x, _mask_pos_y), StrFormat);
                            semiTransBrush.Dispose();
                        }
                        testFont.Dispose();
                        break;
                    }
                }
            }

            return image;
        }
Example #3
1
        public override SizeF Measure(Graphics graphics)
		{
			if (this.Image != null)
			{
				SizeF size = new Size(GraphConstants.MinimumItemWidth, GraphConstants.MinimumItemHeight);

				if (this.Width.HasValue)
					size.Width = Math.Max(size.Width, this.Width.Value);
				else
					size.Width = Math.Max(size.Width, this.Image.Width);

				if (this.Height.HasValue)
					size.Height = Math.Max(size.Height, this.Height.Value);
				else
					size.Height = Math.Max(size.Height, this.Image.Height);
				
				return size;
			} else
			{
				var size = new SizeF(GraphConstants.MinimumItemWidth, GraphConstants.MinimumItemHeight);
				if (this.Width.HasValue)
					size.Width = Math.Max(size.Width, this.Width.Value);

				if (this.Height.HasValue)
					size.Height = Math.Max(size.Height, this.Height.Value);
				
				return size;
			}
		}
        public unsafe Point GetNextPoint(Rectangle rectTrack, byte* pIn, Size sizeIn, double[] Qu, double[] PuY0)
        {
            double[] w = new double[256];//方向权值
            for (int i = 0; i < 256; i++)
            {
                w[i] = Math.Sqrt(Qu[i] / PuY0[i]);
            }

            PointF center = new PointF(
                (float)rectTrack.Left + (float)rectTrack.Width / 2,
                (float)rectTrack.Top + (float)rectTrack.Height / 2);
            SizeF H = new SizeF((float)rectTrack.Width / 2, (float)rectTrack.Height / 2);
            double numeratorX = 0, numeratorY = 0;//分子
            double denominatorX = 0, denominatorY = 0;//分母
            for (int y = rectTrack.Top; y < rectTrack.Bottom; y++)
            {
                for (int x = rectTrack.Left; x < rectTrack.Right; x++)
                {
                    int index = DataManager.GetIndex(x, y, sizeIn.Width);
                    byte u = pIn[index];
                    //计算以高斯分布为核函数自变量X的值
                    double X = ((Math.Pow((x - center.X), 2) + Math.Pow((y - center.Y), 2))
                            / (Math.Pow(H.Width, 2) + Math.Pow(H.Height, 2)));
                    //负的高斯分布核函数的值
                    double Gi = -Math.Exp(-Math.Pow(X, 2) / 2) / Math.Sqrt(2 * Math.PI);

                    numeratorX += x * w[u] * Gi;
                    numeratorY += y * w[u] * Gi;
                    denominatorX += w[u] * Gi;
                    denominatorY += w[u] * Gi;
                }
            }
            return new Point((int)(numeratorX / denominatorX), (int)(numeratorY / denominatorY));
        }
Example #5
0
        public SparkleLog(string path)
            : base()
        {
            LocalPath = path;

            Delegate = new SparkleLogDelegate ();

            SetFrame (new RectangleF (0, 0, 480, 640), true);
            Center ();

            // Open slightly off center for each consecutive window
            if (SparkleUI.OpenLogs.Count > 0) {
                RectangleF offset = new RectangleF (Frame.X + (SparkleUI.OpenLogs.Count * 20),
                    Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);

                SetFrame (offset, true);
            }

            StyleMask = (NSWindowStyle.Closable |
                         NSWindowStyle.Miniaturizable |
                         NSWindowStyle.Titled);

            MaxSize     = new SizeF (480, 640);
            MinSize     = new SizeF (480, 640);
            HasShadow   = true;
            BackingType = NSBackingStore.Buffered;

            CreateEventLog ();
            UpdateEventLog ();

            OrderFrontRegardless ();
        }
		public WoodenTheme()
		{
			CellBackgroundColor = UIColor.FromWhiteAlpha(1f, 0.2f);

			TextColor = UIColor.DarkTextColor;
			TextShadowColor = UIColor.FromWhiteAlpha(0.8f, 1.0f);
			TextShadowOffset = new SizeF(0, 1);

			BackgroundUri = new Uri ("file://" + Path.GetFullPath("Images/wood.jpg"));
			SeparatorColor = UIColor.Black;
			
			TextColor = UIColor.FromWhiteAlpha(1f, 0.8f);
			TextShadowColor = UIColor.Brown.ColorWithAlpha(0.8f);
			TextShadowOffset = new SizeF(0, 1);
			
			DetailTextColor = UIColor.FromWhiteAlpha(1f, 0.8f);
			DetailTextShadowColor = UIColor.Brown.ColorWithAlpha(0.8f);
			DetailTextShadowOffset = new SizeF(0, 1);

			BarTintColor = UIColor.Brown;
			BarStyle = UIBarStyle.Default;

			HeaderTextColor = UIColor.FromRGB(92, 69, 0);
			HeaderTextShadowColor = UIColor.FromWhiteAlpha(1f, 0.6f);

			FooterTextColor = UIColor.FromWhiteAlpha(1f, 0.8f);
			FooterTextShadowColor = UIColor.FromWhiteAlpha(0f, 0.2f);
		}
Example #7
0
		private void SetCrossHairLines()
		{
			base.CoordinateSystem = CoordinateSystem.Destination;

			SizeF offset1 = new SizeF(_lineLength + 5F, 0);
			SizeF offset2 = new SizeF(5F, 0);

			PointF anchor = Anchor;

			_line1.Point1 = PointF.Subtract(anchor, offset1);
			_line1.Point2 = PointF.Subtract(anchor, offset2);

			_line2.Point1 = PointF.Add(anchor, offset1);
			_line2.Point2 = PointF.Add(anchor, offset2);

			offset1 = new SizeF(0, _lineLength + 5F);
			offset2 = new SizeF(0, 5F);

			_line3.Point1 = PointF.Subtract(anchor, offset1);
			_line3.Point2 = PointF.Subtract(anchor, offset2);

			_line4.Point1 = PointF.Add(anchor, offset1);
			_line4.Point2 = PointF.Add(anchor, offset2);

			base.ResetCoordinateSystem();
		}
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			
			// set the background color of the view to white
			View.BackgroundColor = UIColor.White;
			
			// instantiate a new image view that takes up the whole screen and add it to 
			// the view hierarchy
			RectangleF imageViewFrame = new RectangleF (0, -NavigationController.NavigationBar.Frame.Height, View.Frame.Width, View.Frame.Height);
			imageView = new UIImageView (imageViewFrame);
			View.AddSubview (imageView);
			
			// create our offscreen bitmap context
			// size
			SizeF bitmapSize = new SizeF (imageView.Frame.Size);
			using (CGBitmapContext context = new CGBitmapContext (IntPtr.Zero,
									      (int)bitmapSize.Width, (int)bitmapSize.Height, 8,
									      (int)(4 * bitmapSize.Width), CGColorSpace.CreateDeviceRGB (),
									      CGImageAlphaInfo.PremultipliedFirst)) {
				
				// draw our coordinates for reference
				DrawCoordinateSpace (context);
				
				// draw our flag
				DrawFlag (context);
				
				// add a label
				DrawCenteredTextAtPoint (context, 384, 700, "Stars and Stripes", 60);
								
				// output the drawing to the view
				imageView.Image = UIImage.FromImage (context.ToImage ());
			}
		}
        public void InitializeChart()
        {
            this.components = new System.ComponentModel.Container();
            ChartArea chartArea1 = new ChartArea();
            Legend legend1 = new Legend() { BackColor = Color.Green, ForeColor = Color.Black, Title = "Salary" };
            Legend legend2 = new Legend() { BackColor = Color.Green, ForeColor = Color.Black, Title = "Salary" };
            barChart = new Chart();

            ((ISupportInitialize)(barChart)).BeginInit();

            SuspendLayout();
            //====Bar Chart
            chartArea1 = new ChartArea();
            chartArea1.Name = "BarChartArea";
            barChart.ChartAreas.Add(chartArea1);
            barChart.Dock = System.Windows.Forms.DockStyle.Fill;
            legend2.Name = "Legend3";
            barChart.Legends.Add(legend2);

            AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            //this.ClientSize = new System.Drawing.Size(284, 262);
            this.Load += new EventHandler(Form3_Load);
            ((ISupportInitialize)(this.barChart)).EndInit();
            this.ResumeLayout(false);
        }
Example #10
0
        public static GraphicsPath CreateRoundedRectangle(SizeF size, PointF location)
        {
            int cornerSize			= (int)GraphConstants.CornerSize * 2;
            int connectorSize		= (int)GraphConstants.ConnectorSize;
            int halfConnectorSize	= (int)Math.Ceiling(connectorSize / 2.0f);

            var height				= size.Height;
            var width				= size.Width;
            var halfWidth			= width / 2.0f;
            var halfHeight			= height / 2.0f;
            var connectorOffset		= (int)Math.Floor((GraphConstants.MinimumItemHeight - GraphConstants.ConnectorSize) / 2.0f);
            var left				= location.X;
            var top					= location.Y;
            var right				= location.X + width;
            var bottom				= location.Y + height;

            var path = new GraphicsPath(FillMode.Winding);
            path.AddArc(left, top, cornerSize, cornerSize, 180, 90);
            path.AddArc(right - cornerSize, top, cornerSize, cornerSize, 270, 90);

            path.AddArc(right - cornerSize, bottom - cornerSize, cornerSize, cornerSize, 0, 90);
            path.AddArc(left, bottom - cornerSize, cornerSize, cornerSize, 90, 90);
            path.CloseFigure();
            return path;
        }
Example #11
0
 /// <summary>
 ///    <para>
 ///       Initializes a new instance of the <see cref='System.Drawing.RectangleF'/>
 ///       class with the specified location
 ///       and size.
 ///    </para>
 /// </summary>
 public RectangleF(PointF location, SizeF size)
 {
     _x = location.X;
     _y = location.Y;
     _width = size.Width;
     _height = size.Height;
 }
Example #12
0
        /// <summary>
        /// Create a texture of the given text in the given font.
        /// </summary>
        /// <param name="text">Text to display.</param>
        /// <param name="font">Font to display the text as.</param>
        /// <param name="size">Provides the size of the texture.</param>
        /// <returns>Int32 Handle to the texture.</returns>
        public static int CreateTextTexture(string text, Font font, out SizeF size)
        {
            int textureId;
            size = GetStringSize(text, font);

            using (Bitmap textBitmap = new Bitmap((int)size.Width, (int)size.Height))
            {
                GL.GenTextures(1, out textureId);
                GL.BindTexture(TextureTarget.Texture2D, textureId);
                BitmapData data =
                    textBitmap.LockBits(new Rectangle(0, 0, textBitmap.Width, textBitmap.Height),
                        ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
                GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0,
                    OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
                GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter,
                    (int)TextureMinFilter.Linear);
                GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter,
                    (int)TextureMagFilter.Linear);
                GL.Finish();
                textBitmap.UnlockBits(data);

                var gfx = System.Drawing.Graphics.FromImage(textBitmap);
                gfx.Clear(Color.Transparent);
                gfx.TextRenderingHint = TextRenderingHint.AntiAlias;
                gfx.DrawString(text, font, new SolidBrush(Color.White), new RectangleF(0, 0, size.Width + 10, size.Height));

                BitmapData data2 = textBitmap.LockBits(new Rectangle(0, 0, textBitmap.Width, textBitmap.Height),
                    ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
                GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, textBitmap.Width, textBitmap.Height, OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data2.Scan0);
                textBitmap.UnlockBits(data2);
                gfx.Dispose();
            }

            return textureId;
        }
Example #13
0
        public SparkleAbout()
            : base()
        {
            SetFrame (new RectangleF (0, 0, 360, 288), true);
            Center ();

            StyleMask   = (NSWindowStyle.Closable | NSWindowStyle.Titled);
            Title       = "About SparkleShare";
            MaxSize     = new SizeF (360, 288);
            MinSize     = new SizeF (360, 288);
            HasShadow   = true;
            BackingType = NSBackingStore.Buffered;

            CreateAbout ();
            MakeKeyAndOrderFront (this);

            SparkleShare.Controller.NewVersionAvailable += delegate (string new_version) {
                InvokeOnMainThread (delegate {
                    UpdatesTextField.StringValue = "A newer version (" + new_version + ") is available!";
                    UpdatesTextField.TextColor   =
                        NSColor.FromCalibratedRgba (0.96f, 0.47f, 0.0f, 1.0f); // Tango Orange #2
                });
            };

            SparkleShare.Controller.VersionUpToDate += delegate {
                InvokeOnMainThread (delegate {
                    UpdatesTextField.StringValue = "You are running the latest version.";
                    UpdatesTextField.TextColor   =
                        NSColor.FromCalibratedRgba (0.31f, 0.60f, 0.02f, 1.0f); // Tango Chameleon #3
                });
            };

            SparkleShare.Controller.CheckForNewVersion ();
        }
Example #14
0
        public override SizeF Measure(Graphics graphics)
		{
			if (!string.IsNullOrWhiteSpace(this.Text))
			{
				if (this.TextSize.IsEmpty)
				{
					var size = new Size(GraphConstants.MinimumItemWidth, GraphConstants.MinimumItemHeight);

					if (this.Input.Enabled != this.Output.Enabled)
					{
						if (this.Input.Enabled)
							this.TextSize = graphics.MeasureString(this.Text, SystemFonts.MenuFont, size, GraphConstants.LeftMeasureTextStringFormat);
						else
							this.TextSize = graphics.MeasureString(this.Text, SystemFonts.MenuFont, size, GraphConstants.RightMeasureTextStringFormat);
					} else
						this.TextSize = graphics.MeasureString(this.Text, SystemFonts.MenuFont, size, GraphConstants.CenterMeasureTextStringFormat);

					this.TextSize.Width  = Math.Max(size.Width, this.TextSize.Width + ColorBoxSize + Spacing);
					this.TextSize.Height = Math.Max(size.Height, this.TextSize.Height);
				}
				return this.TextSize;
			} else
			{
				return new SizeF(GraphConstants.MinimumItemWidth, GraphConstants.TitleHeight + GraphConstants.TopHeight);
			}
		}
Example #15
0
        public static void CursorMove(Point endPt, int speed = 20)
        {
            Point startPt = new Point((Size)Cursor.Position); // starting point

            PointF nextPt = new PointF(0, 0); // stores next point to move
            Size differencePt;

            double magnitude; // magnitude of total path
            SizeF moveSize = new SizeF(); // Stores size of next movement

            if (startPt == endPt) return;

            do
            {
                magnitude = Math.Sqrt(Math.Pow(endPt.X - Cursor.Position.X, 2) + Math.Pow(endPt.Y - Cursor.Position.Y, 2));

                // give the step size a magnitude of 1
                moveSize.Width = (float)((endPt.X - Cursor.Position.X) / magnitude);
                moveSize.Height = (float)((endPt.Y - Cursor.Position.Y) / magnitude);

                nextPt = PointF.Add(new PointF(Cursor.Position.X + nextPt.X.GetDecimal(), Cursor.Position.Y + nextPt.Y.GetDecimal()), moveSize);

                // Get the movement size
                differencePt = Size.Subtract(new Size(Convert.ToInt32(nextPt.X), Convert.ToInt32(nextPt.Y)), (Size)Cursor.Position);

                // Move the cursor to its next step
                Cursor.Position = Point.Add(Cursor.Position, differencePt);

                if (Rand(1, speed) == 1) Wait(10);

                Application.DoEvents();
            } while (!(Cursor.Position.X == endPt.X && Cursor.Position.Y == endPt.Y));
        }
Example #16
0
        public void Ball_TestBounceOnWallHit()
        {
            RectangleF gf = GameManager.gameField;
            SizeF target;

            //Test left wall bounce
            Ball b = new RegularBall(new PointF(gf.Left + 1.0f, gf.Bottom / 2));
            b.moveVector = new SizeF(-1.0f, 1.0f);
            target = new SizeF(b.moveVector.Width * -1, b.moveVector.Height);
            b.Update();
            b.Update();
            b.Update();
            Assert.AreEqual(target, b.moveVector);

            //Test right wall bounce
            b = new RegularBall(new PointF(gf.Right - 1.0f, gf.Bottom / 2));
            b.moveVector = new SizeF(1.0f, 1.0f);
            target = new SizeF(b.moveVector.Width * -1, b.moveVector.Height);
            b.Update();
            b.Update();
            b.Update();
            Assert.AreEqual(target, b.moveVector);

            //Test top wall bounce
            b = new RegularBall(new PointF(gf.Right / 2, gf.Top - 1.0f));
            b.moveVector = new SizeF(1.0f, -1.0f);
            target = new SizeF(b.moveVector.Width, b.moveVector.Height * -1);
            b.Update();
            b.Update();
            b.Update();
            Assert.AreEqual(target, b.moveVector);
        }
Example #17
0
        public void UpdateRow(CategoryEntity category, Single fontSize, SizeF imageViewSize)
        {
            LabelView.Text = category.Name;
            
            if (category.Picture != null && category.Picture != "BsonNull")
            {
                try
                {
                    var webClient = new WebClient();
                    webClient.DownloadDataCompleted += (s, e) =>
                    {
                        var bytes = e.Result; // get the downloaded data
                            ImageView.Image = ImageHandler.BytesToImage(bytes); // convert the data to an actual image
                    };
                    webClient.DownloadDataAsync(new Uri(category.Picture));
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Something went wrong loading image for cell..." + ex.Message);
                }
                
            }
     
            LabelView.Font = UIFont.FromName("HelveticaNeue-Bold", fontSize);

            ImageView.Frame = new RectangleF(0, 0, imageViewSize.Width, imageViewSize.Height);
            // Position category label below image
            LabelView.Frame = new RectangleF(0, (float) ImageView.Frame.Bottom+60, imageViewSize.Width, (float) (ContentView.Frame.Height - ImageView.Frame.Bottom));
        }
Example #18
0
 // Methods
 public GridWindow()
 {
     this.components = null;
     this.size = (SizeF) new Size(10, 10);
     this.color = System.Drawing.Color.Gray;
     this.InitializeComponent();
 }
 /// <summary>
 /// Calculates a rectangle around a screen location that depicts the touchable area which will count a path point as
 /// hit if the user taps it
 /// </summary>
 /// <returns>The validation rect.</returns>
 /// <param name="screenPoint">Screen point.</param>
 /// <param name="validationRectSize">Validation rect size.</param>
 internal static KSPictureLoginValidationRect GetValidationRect(this PointF screenPoint, SizeF validationRectSize)
 {
     float halfWidth = validationRectSize.Width / 2f;
     float halfHeight = validationRectSize.Height / 2f;
     var rect = new KSPictureLoginValidationRect(screenPoint.X - halfWidth, screenPoint.Y - halfHeight, validationRectSize.Width, validationRectSize.Height);
     return rect;
 }
        public void LayoutMultipleDescriptions1()
        {
            // 7 descriptions.
            StringWriter writer = new StringWriter();
            SizeF paperSize = new SizeF(400, 500);
            float boxSize = 10;
            float spacing = 15;
            MockDescription desc1 = new MockDescription("desc1", writer, 8, 17);
            MockDescription desc2 = new MockDescription("desc2", writer, 8, 15);
            MockDescription desc3 = new MockDescription("desc3", writer, 12, 22);
            MockDescription desc4 = new MockDescription("desc4", writer, 12, 24);
            MockDescription desc5 = new MockDescription("desc5", writer, 8, 11);
            MockDescription desc6 = new MockDescription("desc6", writer, 8, 16);
            MockDescription desc7 = new MockDescription("desc7", writer, 8, 8);
            RectanglePositioner positioner = new RectanglePositioner(paperSize, boxSize, spacing);

            positioner.LayoutMultipleDescriptions(new MockDescription[] { desc1, desc2, desc3, desc4, desc5, desc6, desc7 });
            //Assert.AreEqual(1, positioner.PageCount);
            positioner.DrawPage(null, 0);
            Assert.AreEqual(
            @"@ (0,0) description 'desc4'
            @ (0,255) description 'desc3'
            @ (135,0) description 'desc1'
            @ (135,185) description 'desc6'
            @ (135,360) description 'desc5'
            @ (230,0) description 'desc2'
            @ (230,165) description 'desc7'
            ", writer.ToString());
        }
Example #21
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Graphics g = e.Graphics;
            Font font = new Font("Microsoft Sans Serif", 36F,
                           System.Drawing.FontStyle.Bold,
                           System.Drawing.GraphicsUnit.Point,
                           ((byte)(0)));
            SizeF stringSize = new SizeF();
            String str = " ";
            int rowHeight;
            int textWidth;
            int xAdjust = 0;

            stringSize = e.Graphics.MeasureString(str, font, 800);
            rowHeight = (int)stringSize.Height +
                                  (int)stringSize.Height;
            textWidth = ((int)stringSize.Width);

            g.RotateTransform(-20);
            for (int x = 0; x < (this.Width / textWidth) + 2; x++)
            {
                for (int y = 0; y < 2 * (this.Height / rowHeight) + 2; y++)
                {
                    xAdjust = textWidth / 2;
                    g.DrawString(str, font, System.Drawing.Brushes.Red, new Point(x * textWidth - xAdjust, y * rowHeight));
                }
            }
        }
Example #22
0
        public FormPPSubfileChange(string title, string[] editors, Dictionary<string, DockContent> ppChildForms)
        {
            InitializeComponent();
            Text = title.Replace("&", String.Empty);

            startSize = new SizeF(Width, Height);
            this.SaveDesignSizes();

            float listViewFontSize = (float)Gui.Config["ListViewFontSize"];
            if (listViewFontSize > 0)
            {
                listViewEditors.Font = new System.Drawing.Font(listViewEditors.Font.FontFamily, listViewFontSize);
            }
            listViewEditors.AutoResizeColumns();
            foreach (string editorName in editors)
            {
                string name = editorName;
                DockContent content;
                if (ppChildForms.TryGetValue(editorName, out content))
                {
                    EditedContent editor = content as EditedContent;
                    if (editor != null && editor.Changed)
                    {
                        name += "*";
                    }
                }
                listViewEditors.Items.Add(name);
            }
        }
Example #23
0
        public State(SizeF gameArea)
        {
            Area = gameArea;

            //Load in all the tile definitions
            readTileDefinitions(@"gamedata\tileProperties.csv");
        }
Example #24
0
		private static GraphicsPath GenerateCapsule( this Graphics graphics, RectangleF rectangle ) {
			float diameter;
			RectangleF arc;
			GraphicsPath path = new GraphicsPath();

			try {
				if( rectangle.Width > rectangle.Height ) {
					diameter = rectangle.Height;
					SizeF sizeF = new SizeF( diameter, diameter );
					arc = new RectangleF( rectangle.Location, sizeF );
					path.AddArc( arc, 90, 180 );
					arc.X = rectangle.Right - diameter;
					path.AddArc( arc, 270, 180 );
				} else if( rectangle.Width < rectangle.Height ) {
					diameter = rectangle.Width;
					SizeF sizeF = new SizeF( diameter, diameter );
					arc = new RectangleF( rectangle.Location, sizeF );
					path.AddArc( arc, 180, 180 );
					arc.Y = rectangle.Bottom - diameter;
					path.AddArc( arc, 0, 180 );
				} else
					path.AddEllipse( rectangle );
			} catch { path.AddEllipse( rectangle ); } finally { path.CloseFigure(); }
			return path;
		}
		public GraniteTheme()
		{
			CellBackgroundImage = UIImage.FromFile("Images/granite.jpg");
			SeparatorColor = UIColor.Black;
			TextShadowColor = UIColor.LightGray;
			TextShadowOffset = new SizeF(-1, -1);
		}
		// Draws our animation path on the background image, just to show it
		protected void DrawPathAsBackground ()
		{
			// create our offscreen bitmap context
			var bitmapSize = new SizeF (View.Frame.Size);
			using (var context = new CGBitmapContext (
				       IntPtr.Zero,
				       (int)bitmapSize.Width, (int)bitmapSize.Height, 8,
				       (int)(4 * bitmapSize.Width), CGColorSpace.CreateDeviceRGB (),
				       CGImageAlphaInfo.PremultipliedFirst)) {
				
				// convert to View space
				var affineTransform = CGAffineTransform.MakeIdentity ();
				// invert the y axis
				affineTransform.Scale (1f, -1f);
				// move the y axis up
				affineTransform.Translate (0, View.Frame.Height);
				context.ConcatCTM (affineTransform);

				// actually draw the path
				context.AddPath (animationPath);
				context.SetStrokeColor (UIColor.LightGray.CGColor);
				context.SetLineWidth (3f);
				context.StrokePath ();
				
				// set what we've drawn as the backgound image
				backgroundImage.Image = UIImage.FromImage (context.ToImage());
			}
		}
Example #27
0
		public void SetAllocatedSize(SizeF allocatedSize)
		{
			Debug.Assert(allocatedSize.Width >= tipRequiredSize.Width &&
			             allocatedSize.Height >= tipRequiredSize.Height);
			
			tipAllocatedSize = allocatedSize; OnAllocatedSizeChanged();
		}
Example #28
0
        private static UIImage CreateImage(string color)
        {
            try
            {
                var red = color.Substring(0, 2);
                var green = color.Substring(2, 2);
                var blue = color.Substring(4, 2);

                var redB = System.Convert.ToByte(red, 16);
                var greenB = System.Convert.ToByte(green, 16);
                var blueB = System.Convert.ToByte(blue, 16);

                var size = new SizeF(28f, 28f);
                var cgColor = UIColor.FromRGB(redB, greenB, blueB).CGColor;

                UIGraphics.BeginImageContextWithOptions(size, false, 0);
                var ctx = UIGraphics.GetCurrentContext();
                ctx.SetLineWidth(1.0f);
                ctx.SetStrokeColor(cgColor);
                ctx.AddEllipseInRect(new RectangleF(0, 0, size.Width, size.Height));
                ctx.SetFillColor(cgColor);
                ctx.FillPath();

                var image = UIGraphics.GetImageFromCurrentImageContext();
                UIGraphics.EndImageContext();
                return image;
            }
            catch
            {
                return null;
            }
        }
		public override UITableViewCell GetCell (UITableView tv)
		{
			var cell = tv.DequeueReusableCell (CellKey);
			if (cell == null){
				cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey);
				cell.SelectionStyle = UITableViewCellSelectionStyle.None;
			} else
				RemoveTag (cell, 1);

			SizeF captionSize = new SizeF (0, 0);
			if (Caption != null && ShowCaption){
				cell.TextLabel.Text = Caption;
				captionSize = cell.TextLabel.StringSize (Caption, UIFont.FromName (cell.TextLabel.Font.Name, UIFont.LabelFontSize));
				captionSize.Width += 10; // Spacing
			}

			if (slider == null){
				slider = new UISlider (new RectangleF (10f + captionSize.Width, 12f, 280f - captionSize.Width, 7f)){
					BackgroundColor = UIColor.Clear,
					MinValue = this.MinValue,
					MaxValue = this.MaxValue,
					Continuous = true,
					Value = this.Value,
					Tag = 1
				};
				slider.ValueChanged += delegate {
					Value = slider.Value;
				};
			} else {
				slider.Value = Value;
			}
			
			cell.ContentView.AddSubview (slider);
			return cell;
		}
Example #30
0
        public Settings_Page4(Color c, Language lang)
        {
            InitializeComponent();

            themeColor = c;
            LANG = lang;

            SlideOutButtonVisible = false;

            settings4_1_filelocation_button.Click += settings4_1_filelocation_button_Click;
            settings4_4_language.Items.AddRange(new object[] {"简体中文", "English"});
            settings4_4_language.DrawItem += settings4_4_language_DrawItem;
            settings4_4_language.SelectionChangeCommitted += settings4_4_language_SelectionChangeCommitted;

            settings4_1_filelocation_label.Text = LANG.getString("settings4_1_filelocation_label");
            settings4_1_filelocation_button.Text = LANG.getString("settings4_1_filelocation_button");
            settings4_2_deletetempfiles_label.Text = LANG.getString("settings4_2_deletetempfiles_label");
            settings4_4_chkupd_label.Text = LANG.getString("settings4_4_chkupd_label");
            settings4_4_chkupd_button.Text = LANG.getString("settings4_4_chkupd_button");
            settings4_3_reset_button.Text = LANG.getString("settings4_3_reset_button");
            settings4_1_filelocation_dialog.Description = LANG.getString("settings4_1_filelocation_dialog");
            settings4_4_language_label.Text = LANG.getString("settings4_4_language_label");

            // DPI settings
            AutoScaleDimensions = new SizeF(96F, 96F);
            AutoScaleMode = AutoScaleMode.Dpi;

            // Set UI Font according to language
            LANG.setFont(this.Controls);
            Font = new Font(LANG.getFont(), Font.Size, Font.Style);
        }
Example #31
0
        private static void CalculateLabelAroundOnLineString(LineString line, ref BaseLabel label, MapViewport map, System.Drawing.Graphics g, System.Drawing.SizeF textSize)
        {
            var sPoints = line.Coordinates;

            // only get point in enverlop of map
            var colPoint      = new Collection <PointF>();
            var bCheckStarted = false;

            //var testEnvelope = map.Envelope.Grow(map.PixelSize*10);
            for (var j = 0; j < sPoints.Length; j++)
            {
                if (map.Envelope.Contains(sPoints[j]))
                {
                    //points[j] = map.WorldToImage(sPoints[j]);
                    colPoint.Add(map.WorldToImage(sPoints[j]));
                    bCheckStarted = true;
                }
                else if (bCheckStarted)
                {
                    // fix bug curved line out of map in center segment of line
                    break;
                }
            }

            if (colPoint.Count > 1)
            {
                label.TextOnPathLabel = new TextOnPath();
                switch (label.Style.HorizontalAlignment)
                {
                case LabelStyle.HorizontalAlignmentEnum.Left:
                    label.TextOnPathLabel.TextPathAlignTop = TextPathAlign.Left;
                    break;

                case LabelStyle.HorizontalAlignmentEnum.Right:
                    label.TextOnPathLabel.TextPathAlignTop = TextPathAlign.Right;
                    break;

                case LabelStyle.HorizontalAlignmentEnum.Center:
                    label.TextOnPathLabel.TextPathAlignTop = TextPathAlign.Center;
                    break;

                default:
                    label.TextOnPathLabel.TextPathAlignTop = TextPathAlign.Center;
                    break;
                }
                switch (label.Style.VerticalAlignment)
                {
                case LabelStyle.VerticalAlignmentEnum.Bottom:
                    label.TextOnPathLabel.TextPathPathPosition = TextPathPosition.UnderPath;
                    break;

                case LabelStyle.VerticalAlignmentEnum.Top:
                    label.TextOnPathLabel.TextPathPathPosition = TextPathPosition.OverPath;
                    break;

                case LabelStyle.VerticalAlignmentEnum.Middle:
                    label.TextOnPathLabel.TextPathPathPosition = TextPathPosition.CenterPath;
                    break;

                default:
                    label.TextOnPathLabel.TextPathPathPosition = TextPathPosition.CenterPath;
                    break;
                }

                var idxStartPath = 0;
                var numberPoint  = colPoint.Count;
                // start Optimzes Path points

                var step = 100;
                if (colPoint.Count >= step * 2)
                {
                    numberPoint = step * 2;;
                    switch (label.Style.HorizontalAlignment)
                    {
                    case LabelStyle.HorizontalAlignmentEnum.Left:
                        //label.TextOnPathLabel.TextPathAlignTop = SharpMap.Rendering.TextPathAlign.Left;
                        idxStartPath = 0;
                        break;

                    case LabelStyle.HorizontalAlignmentEnum.Right:
                        //label.TextOnPathLabel.TextPathAlignTop = SharpMap.Rendering.TextPathAlign.Right;
                        idxStartPath = colPoint.Count - step;
                        break;

                    case LabelStyle.HorizontalAlignmentEnum.Center:
                        //label.TextOnPathLabel.TextPathAlignTop = SharpMap.Rendering.TextPathAlign.Center;
                        idxStartPath = (int)colPoint.Count / 2 - step;
                        break;

                    default:
                        //label.TextOnPathLabel.TextPathAlignTop = SharpMap.Rendering.TextPathAlign.Center;
                        idxStartPath = (int)colPoint.Count / 2 - step;
                        break;
                    }
                }
                // end optimize path point
                var points = new PointF[numberPoint];
                var count  = 0;
                if (colPoint[0].X <= colPoint[colPoint.Count - 1].X)
                {
                    for (var l = idxStartPath; l < numberPoint + idxStartPath; l++)
                    {
                        points[count] = colPoint[l];
                        count++;
                    }
                }
                else
                {
                    //reverse the path
                    for (var k = numberPoint - 1 + idxStartPath; k >= idxStartPath; k--)
                    {
                        points[count] = colPoint[k];
                        count++;
                    }
                }

                /*
                 * //get text size in page units ie pixels
                 * float textheight = label.Style.Font.Size;
                 * switch (label.Style.Font.Unit)
                 * {
                 *  case GraphicsUnit.Display:
                 *      textheight = textheight * g.DpiY / 75;
                 *      break;
                 *  case GraphicsUnit.Document:
                 *      textheight = textheight * g.DpiY / 300;
                 *      break;
                 *  case GraphicsUnit.Inch:
                 *      textheight = textheight * g.DpiY;
                 *      break;
                 *  case GraphicsUnit.Millimeter:
                 *      textheight = (float)(textheight / 25.4 * g.DpiY);
                 *      break;
                 *  case GraphicsUnit.Pixel:
                 *      //do nothing
                 *      break;
                 *  case GraphicsUnit.Point:
                 *      textheight = textheight * g.DpiY / 72;
                 *      break;
                 * }
                 * var topFont = new Font(label.Style.Font.FontFamily, textheight, label.Style.Font.Style, GraphicsUnit.Pixel);
                 */
                var topFont = label.Style.GetFontForGraphics(g);
                //
                var path = new GraphicsPath();
                path.AddLines(points);

                label.TextOnPathLabel.PathColorTop          = System.Drawing.Color.Transparent;
                label.TextOnPathLabel.Text                  = label.Text;
                label.TextOnPathLabel.LetterSpacePercentage = 90;
                label.TextOnPathLabel.FillColorTop          = new System.Drawing.SolidBrush(label.Style.ForeColor);
                label.TextOnPathLabel.Font                  = topFont;
                label.TextOnPathLabel.PathDataTop           = path.PathData;
                label.TextOnPathLabel.Graphics              = g;
                //label.TextOnPathLabel.ShowPath=true;
                //label.TextOnPathLabel.PathColorTop = System.Drawing.Color.YellowGreen;
                if (label.Style.Halo != null)
                {
                    label.TextOnPathLabel.ColorHalo = label.Style.Halo;
                }
                else
                {
                    label.TextOnPathLabel.ColorHalo = null;// new System.Drawing.Pen(label.Style.ForeColor, (float)0.5);
                }
                path.Dispose();

                // MeasureString to get region
                label.TextOnPathLabel.MeasureString = true;
                label.TextOnPathLabel.DrawTextOnPath();
                label.TextOnPathLabel.MeasureString = false;
                // Get Region label for CollissionDetection here.
                var pathRegion = new GraphicsPath();

                if (label.TextOnPathLabel.RegionList.Count > 0)
                {
                    //int idxCenter = (int)label.TextOnPathLabel.PointsText.Count / 2;
                    //System.Drawing.Drawing2D.Matrix rotationMatrix = g.Transform.Clone();// new Matrix();
                    //rotationMatrix.RotateAt(label.TextOnPathLabel.Angles[idxCenter], label.TextOnPathLabel.PointsText[idxCenter]);
                    //if (label.TextOnPathLabel.PointsTextUp.Count > 0)
                    //{
                    //    for (int up = label.TextOnPathLabel.PointsTextUp.Count - 1; up >= 0; up--)
                    //    {
                    //        label.TextOnPathLabel.PointsText.Add(label.TextOnPathLabel.PointsTextUp[up]);
                    //    }

                    //}
                    pathRegion.AddRectangles(label.TextOnPathLabel.RegionList.ToArray());

                    // get box for detect colission here
                    label.Box = new LabelBox(pathRegion.GetBounds());
                    //g.FillRectangle(System.Drawing.Brushes.YellowGreen, label.Box);
                }
                pathRegion.Dispose();
            }
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(ctFormBatchEditIRTPinRelation));

            this.btnSubmit               = new Button();
            this.btnQuit                 = new Button();
            this.label1                  = new Label();
            this.label2                  = new Label();
            this.label3                  = new Label();
            this.numericUpDown_csy       = new NumericUpDown();
            this.numericUpDown_zjt       = new NumericUpDown();
            this.numericUpDown_updateNum = new NumericUpDown();
            ((ISupportInitialize)this.numericUpDown_csy).BeginInit();
            ((ISupportInitialize)this.numericUpDown_zjt).BeginInit();
            ((ISupportInitialize)this.numericUpDown_updateNum).BeginInit();
            base.SuspendLayout();
            this.btnSubmit.Anchor = AnchorStyles.Bottom;
            this.btnSubmit.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(88, 259);
            this.btnSubmit.Location = location;
            Padding margin = new Padding(2, 2, 2, 2);

            this.btnSubmit.Margin = margin;
            this.btnSubmit.Name   = "btnSubmit";
            System.Drawing.Size size = new System.Drawing.Size(90, 24);
            this.btnSubmit.Size     = size;
            this.btnSubmit.TabIndex = 0;
            this.btnSubmit.Text     = "确定";
            this.btnSubmit.UseVisualStyleBackColor = true;
            this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
            this.btnQuit.Anchor   = AnchorStyles.Bottom;
            this.btnQuit.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location2 = new System.Drawing.Point(213, 259);
            this.btnQuit.Location = location2;
            Padding margin2 = new Padding(2, 2, 2, 2);

            this.btnQuit.Margin = margin2;
            this.btnQuit.Name   = "btnQuit";
            System.Drawing.Size size2 = new System.Drawing.Size(90, 24);
            this.btnQuit.Size     = size2;
            this.btnQuit.TabIndex = 1;
            this.btnQuit.Text     = "取消";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click  += new System.EventHandler(this.btnQuit_Click);
            this.label1.AutoSize = true;
            this.label1.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location3 = new System.Drawing.Point(46, 55);
            this.label1.Location = location3;
            Padding margin3 = new Padding(2, 0, 2, 0);

            this.label1.Margin = margin3;
            this.label1.Name   = "label1";
            System.Drawing.Size size3 = new System.Drawing.Size(151, 15);
            this.label1.Size     = size3;
            this.label1.TabIndex = 27;
            this.label1.Text     = "测试仪针脚号(起始):";
            this.label2.AutoSize = true;
            this.label2.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location4 = new System.Drawing.Point(46, 109);
            this.label2.Location = location4;
            Padding margin4 = new Padding(2, 0, 2, 0);

            this.label2.Margin = margin4;
            this.label2.Name   = "label2";
            System.Drawing.Size size4 = new System.Drawing.Size(151, 15);
            this.label2.Size     = size4;
            this.label2.TabIndex = 27;
            this.label2.Text     = "转接台针脚号(起始):";
            this.label3.AutoSize = true;
            this.label3.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location5 = new System.Drawing.Point(89, 160);
            this.label3.Location = location5;
            Padding margin5 = new Padding(2, 0, 2, 0);

            this.label3.Margin = margin5;
            this.label3.Name   = "label3";
            System.Drawing.Size size5 = new System.Drawing.Size(105, 15);
            this.label3.Size            = size5;
            this.label3.TabIndex        = 27;
            this.label3.Text            = "批量修改数量:";
            this.numericUpDown_csy.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location6 = new System.Drawing.Point(198, 54);
            this.numericUpDown_csy.Location = location6;
            Padding margin6 = new Padding(2, 2, 2, 2);

            this.numericUpDown_csy.Margin = margin6;
            decimal maximum = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_csy.Maximum = maximum;
            decimal minimum = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_csy.Minimum = minimum;
            this.numericUpDown_csy.Name    = "numericUpDown_csy";
            System.Drawing.Size size6 = new System.Drawing.Size(112, 24);
            this.numericUpDown_csy.Size      = size6;
            this.numericUpDown_csy.TabIndex  = 2;
            this.numericUpDown_csy.TextAlign = HorizontalAlignment.Center;
            decimal value = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_csy.Value = value;
            this.numericUpDown_zjt.Font  = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location7 = new System.Drawing.Point(198, 105);
            this.numericUpDown_zjt.Location = location7;
            Padding margin7 = new Padding(2, 2, 2, 2);

            this.numericUpDown_zjt.Margin = margin7;
            decimal maximum2 = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_zjt.Maximum = maximum2;
            decimal minimum2 = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_zjt.Minimum = minimum2;
            this.numericUpDown_zjt.Name    = "numericUpDown_zjt";
            System.Drawing.Size size7 = new System.Drawing.Size(112, 24);
            this.numericUpDown_zjt.Size      = size7;
            this.numericUpDown_zjt.TabIndex  = 3;
            this.numericUpDown_zjt.TextAlign = HorizontalAlignment.Center;
            decimal value2 = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_zjt.Value      = value2;
            this.numericUpDown_updateNum.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location8 = new System.Drawing.Point(198, 156);
            this.numericUpDown_updateNum.Location = location8;
            Padding margin8 = new Padding(2, 2, 2, 2);

            this.numericUpDown_updateNum.Margin = margin8;
            decimal maximum3 = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_updateNum.Maximum = maximum3;
            decimal minimum3 = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_updateNum.Minimum = minimum3;
            this.numericUpDown_updateNum.Name    = "numericUpDown_updateNum";
            System.Drawing.Size size8 = new System.Drawing.Size(112, 24);
            this.numericUpDown_updateNum.Size      = size8;
            this.numericUpDown_updateNum.TabIndex  = 4;
            this.numericUpDown_updateNum.TextAlign = HorizontalAlignment.Center;
            decimal value3 = new decimal(new int[]
            {
                64,
                0,
                0,
                0
            });

            this.numericUpDown_updateNum.Value = value3;
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(400, 332);
            base.ClientSize = clientSize;
            base.Controls.Add(this.numericUpDown_updateNum);
            base.Controls.Add(this.numericUpDown_zjt);
            base.Controls.Add(this.numericUpDown_csy);
            base.Controls.Add(this.label3);
            base.Controls.Add(this.label2);
            base.Controls.Add(this.label1);
            base.Controls.Add(this.btnSubmit);
            base.Controls.Add(this.btnQuit);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            Padding margin9 = new Padding(2, 2, 2, 2);

            base.Margin        = margin9;
            base.MaximizeBox   = false;
            base.MinimizeBox   = false;
            base.Name          = "ctFormBatchEditIRTPinRelation";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "批量修改测试仪和转接台针脚关系";
            base.Load         += new System.EventHandler(this.ctFormBatchEditIRTPinRelation_Load);
            ((ISupportInitialize)this.numericUpDown_csy).EndInit();
            ((ISupportInitialize)this.numericUpDown_zjt).EndInit();
            ((ISupportInitialize)this.numericUpDown_updateNum).EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Example #33
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ResourceManager manager = new ResourceManager(typeof(sp_id_zaglavljeUserControl));

            this.layoutManagerformsp_id_zaglavlje = new TableLayoutPanel();
            this.layoutManagerformsp_id_zaglavlje.SuspendLayout();
            this.layoutManagerformsp_id_zaglavlje.AutoSize     = true;
            this.layoutManagerformsp_id_zaglavlje.Dock         = DockStyle.Fill;
            this.layoutManagerformsp_id_zaglavlje.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            this.layoutManagerformsp_id_zaglavlje.AutoScroll   = false;
            System.Drawing.Point point = new System.Drawing.Point(0, 0);
            this.layoutManagerformsp_id_zaglavlje.Location = point;
            Size size = new System.Drawing.Size(0, 0);

            this.layoutManagerformsp_id_zaglavlje.Size        = size;
            this.layoutManagerformsp_id_zaglavlje.ColumnCount = 2;
            this.layoutManagerformsp_id_zaglavlje.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformsp_id_zaglavlje.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformsp_id_zaglavlje.RowCount = 5;
            this.layoutManagerformsp_id_zaglavlje.RowStyles.Add(new RowStyle());
            this.layoutManagerformsp_id_zaglavlje.RowStyles.Add(new RowStyle());
            this.layoutManagerformsp_id_zaglavlje.RowStyles.Add(new RowStyle());
            this.layoutManagerformsp_id_zaglavlje.RowStyles.Add(new RowStyle());
            this.layoutManagerformsp_id_zaglavlje.RowStyles.Add(new RowStyle());
            this.label1IDOBRACUN     = new UltraLabel();
            this.textIDOBRACUN       = new UltraTextEditor();
            this.label1MJESECISPLATE = new UltraLabel();
            this.textMJESECISPLATE   = new UltraTextEditor();
            this.label1GODINAISPLATE = new UltraLabel();
            this.textGODINAISPLATE   = new UltraTextEditor();
            this.label1VOLONTERI     = new UltraLabel();
            this.textVOLONTERI       = new UltraNumericEditor();
            this.userControlDataGridsp_id_zaglavlje = new sp_id_zaglavljeUserDataGrid();
            this.ultraGridPrintDocument1            = new UltraGridPrintDocument(this.components);
            this.ultraPrintPreviewDialog1           = new UltraPrintPreviewDialog(this.components);
            ((ISupportInitialize)this.textIDOBRACUN).BeginInit();
            ((ISupportInitialize)this.textMJESECISPLATE).BeginInit();
            ((ISupportInitialize)this.textGODINAISPLATE).BeginInit();
            ((ISupportInitialize)this.textVOLONTERI).BeginInit();
            this.SuspendLayout();
            this.label1IDOBRACUN.Name                  = "label1IDOBRACUN";
            this.label1IDOBRACUN.TabIndex              = 1;
            this.label1IDOBRACUN.Tag                   = "labelIDOBRACUN";
            this.label1IDOBRACUN.AutoSize              = true;
            this.label1IDOBRACUN.StyleSetName          = "FieldUltraLabel";
            this.label1IDOBRACUN.Text                  = "IDOBRACUN           :";
            this.label1IDOBRACUN.Appearance.TextVAlign = VAlign.Middle;
            this.label1IDOBRACUN.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1IDOBRACUN.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.label1IDOBRACUN, 0, 0);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.label1IDOBRACUN, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.label1IDOBRACUN, 1);
            Padding padding = new Padding(3, 1, 5, 2);

            this.label1IDOBRACUN.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1IDOBRACUN.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textIDOBRACUN.Location = point;
            this.textIDOBRACUN.Name     = "textIDOBRACUN";
            this.textIDOBRACUN.Tag      = "IDOBRACUN";
            this.textIDOBRACUN.TabIndex = 0;
            size = new System.Drawing.Size(0x71, 0x16);
            this.textIDOBRACUN.Size      = size;
            this.textIDOBRACUN.MaxLength = 11;
            EditorButton button = new EditorButton {
                Key  = "editorButtonOBRACUNIDOBRACUN",
                Tag  = "editorButtonOBRACUNIDOBRACUN",
                Text = "..."
            };

            this.textIDOBRACUN.ButtonsRight.Add(button);
            this.textIDOBRACUN.EditorButtonClick += new EditorButtonEventHandler(this.CallPromptOBRACUNIDOBRACUN);
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.textIDOBRACUN, 1, 0);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.textIDOBRACUN, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.textIDOBRACUN, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textIDOBRACUN.Margin = padding;
            size = new System.Drawing.Size(0x71, 0x16);
            this.textIDOBRACUN.MinimumSize                 = size;
            this.label1MJESECISPLATE.Name                  = "label1MJESECISPLATE";
            this.label1MJESECISPLATE.TabIndex              = 1;
            this.label1MJESECISPLATE.Tag                   = "labelMJESECISPLATE";
            this.label1MJESECISPLATE.AutoSize              = true;
            this.label1MJESECISPLATE.StyleSetName          = "FieldUltraLabel";
            this.label1MJESECISPLATE.Text                  = "MJESECISPLATE           :";
            this.label1MJESECISPLATE.Appearance.TextVAlign = VAlign.Middle;
            this.label1MJESECISPLATE.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1MJESECISPLATE.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.label1MJESECISPLATE, 0, 1);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.label1MJESECISPLATE, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.label1MJESECISPLATE, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1MJESECISPLATE.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1MJESECISPLATE.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textMJESECISPLATE.Location = point;
            this.textMJESECISPLATE.Name     = "textMJESECISPLATE";
            this.textMJESECISPLATE.Tag      = "MJESECISPLATE";
            this.textMJESECISPLATE.TabIndex = 1;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECISPLATE.Size      = size;
            this.textMJESECISPLATE.MaxLength = 2;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.textMJESECISPLATE, 1, 1);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.textMJESECISPLATE, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.textMJESECISPLATE, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textMJESECISPLATE.Margin = padding;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECISPLATE.MinimumSize             = size;
            this.label1GODINAISPLATE.Name                  = "label1GODINAISPLATE";
            this.label1GODINAISPLATE.TabIndex              = 1;
            this.label1GODINAISPLATE.Tag                   = "labelGODINAISPLATE";
            this.label1GODINAISPLATE.AutoSize              = true;
            this.label1GODINAISPLATE.StyleSetName          = "FieldUltraLabel";
            this.label1GODINAISPLATE.Text                  = "GODINAISPLATE           :";
            this.label1GODINAISPLATE.Appearance.TextVAlign = VAlign.Middle;
            this.label1GODINAISPLATE.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1GODINAISPLATE.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.label1GODINAISPLATE, 0, 2);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.label1GODINAISPLATE, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.label1GODINAISPLATE, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1GODINAISPLATE.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1GODINAISPLATE.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textGODINAISPLATE.Location = point;
            this.textGODINAISPLATE.Name     = "textGODINAISPLATE";
            this.textGODINAISPLATE.Tag      = "GODINAISPLATE";
            this.textGODINAISPLATE.TabIndex = 2;
            size = new System.Drawing.Size(0x2c, 0x16);
            this.textGODINAISPLATE.Size      = size;
            this.textGODINAISPLATE.MaxLength = 4;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.textGODINAISPLATE, 1, 2);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.textGODINAISPLATE, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.textGODINAISPLATE, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textGODINAISPLATE.Margin = padding;
            size = new System.Drawing.Size(0x2c, 0x16);
            this.textGODINAISPLATE.MinimumSize         = size;
            this.label1VOLONTERI.Name                  = "label1VOLONTERI";
            this.label1VOLONTERI.TabIndex              = 1;
            this.label1VOLONTERI.Tag                   = "labelVOLONTERI";
            this.label1VOLONTERI.AutoSize              = true;
            this.label1VOLONTERI.StyleSetName          = "FieldUltraLabel";
            this.label1VOLONTERI.Text                  = "VOLONTERI  :";
            this.label1VOLONTERI.Appearance.TextVAlign = VAlign.Middle;
            this.label1VOLONTERI.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1VOLONTERI.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.label1VOLONTERI, 0, 3);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.label1VOLONTERI, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.label1VOLONTERI, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1VOLONTERI.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1VOLONTERI.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textVOLONTERI.Location = point;
            this.textVOLONTERI.Name     = "textVOLONTERI";
            this.textVOLONTERI.Tag      = "VOLONTERI";
            this.textVOLONTERI.TabIndex = 3;
            size = new System.Drawing.Size(0x18, 0x16);
            this.textVOLONTERI.Size        = size;
            this.textVOLONTERI.PromptChar  = ' ';
            this.textVOLONTERI.Enter      += new EventHandler(this.numericEditor_Enter);
            this.textVOLONTERI.NumericType = NumericType.Integer;
            this.textVOLONTERI.MaskInput   = "{LOC}-n";
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.textVOLONTERI, 1, 3);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.textVOLONTERI, 1);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.textVOLONTERI, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textVOLONTERI.Margin = padding;
            size = new System.Drawing.Size(0x18, 0x16);
            this.textVOLONTERI.MinimumSize = size;
            this.layoutManagerformsp_id_zaglavlje.Controls.Add(this.userControlDataGridsp_id_zaglavlje, 0, 4);
            this.layoutManagerformsp_id_zaglavlje.SetColumnSpan(this.userControlDataGridsp_id_zaglavlje, 2);
            this.layoutManagerformsp_id_zaglavlje.SetRowSpan(this.userControlDataGridsp_id_zaglavlje, 1);
            padding = new Padding(5, 10, 5, 10);
            this.userControlDataGridsp_id_zaglavlje.Margin = padding;
            size = new System.Drawing.Size(100, 100);
            this.userControlDataGridsp_id_zaglavlje.MinimumSize = size;
            this.userControlDataGridsp_id_zaglavlje.Dock        = DockStyle.Fill;
            this.Controls.Add(this.layoutManagerformsp_id_zaglavlje);
            this.userControlDataGridsp_id_zaglavlje.Name            = "userControlDataGridsp_id_zaglavlje";
            this.userControlDataGridsp_id_zaglavlje.Dock            = DockStyle.Fill;
            this.userControlDataGridsp_id_zaglavlje.DockPadding.All = 5;
            this.userControlDataGridsp_id_zaglavlje.FillAtStartup   = false;
            this.userControlDataGridsp_id_zaglavlje.TabIndex        = 6;
            point = new System.Drawing.Point(0, 0);
            this.userControlDataGridsp_id_zaglavlje.Location = point;
            size = new System.Drawing.Size(0x285, 350);
            this.userControlDataGridsp_id_zaglavlje.Size = size;
            this.ultraGridPrintDocument1.Grid            = this.userControlDataGridsp_id_zaglavlje.DataGrid;
            SizeF ef = new System.Drawing.SizeF(6f, 13f);

            this.AutoScaleDimensions = ef;
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.DockPadding.All     = 5;
            this.Name  = "sp_id_zaglavljeWorkWith";
            this.Text  = "Work With sp_id_zaglavlje";
            this.Load += new EventHandler(this.sp_id_zaglavljeUserControl_Load);
            this.layoutManagerformsp_id_zaglavlje.ResumeLayout(false);
            this.layoutManagerformsp_id_zaglavlje.PerformLayout();
            ((ISupportInitialize)this.textIDOBRACUN).EndInit();
            ((ISupportInitialize)this.textMJESECISPLATE).EndInit();
            ((ISupportInitialize)this.textGODINAISPLATE).EndInit();
            ((ISupportInitialize)this.textVOLONTERI).EndInit();
            this.ResumeLayout(false);
        }
Example #34
0
 public static SD.Rectangle ToRect(this SD.SizeF size)
 {
     return(new SD.Rectangle(0, 0, (int)size.Width, (int)size.Height));
 }
Example #35
0
 public static float GetSmallestSide(this SD.SizeF size)
 {
     return(System.Math.Min(size.Width, size.Height));
 }
Example #36
0
 public static SD.PointF Add(this SD.PointF p, SD.SizeF s)
 {
     return(new SD.PointF(p.X + s.Width, p.Y + s.Height));
 }
Example #37
0
 public static SD.SizeF ResizeDownToFit(this SD.SizeF size, SD.SizeF max)
 {
     return(GraphicsUtil.ResizeDownToFit(size, max));
 }
Example #38
0
 public static SD.SizeF Floor(this SD.SizeF size)
 {
     return(new SD.SizeF((float)System.Math.Floor(size.Width), (float)System.Math.Floor(size.Height)));
 }
Example #39
0
        /// <summary>
        /// This method paints the text and text shadow for the button.
        /// </summary>
        /// <param name="e">paint arguments use to paint the button</param>
        private void paint_Text(PaintEventArgs e)
        {
            if (e == null)
            {
                return;
            }
            if (e.Graphics == null)
            {
                return;
            }
            System.Drawing.Rectangle rect = GetTextDestinationRect();
            //
            // do offset if button is pushed
            //
            if ((btnState == BtnState.Pushed) && (OffsetPressedContent))
            {
                rect.Offset(1, 1);
            }
            //
            // caculate bounding rectagle for the text
            //
            System.Drawing.SizeF size = txt_Size(e.Graphics, this.Text, this.Font);
            //
            // calculate the starting location to paint the text
            //
            System.Drawing.Point pt = Calculate_LeftEdgeTopEdge(this.TextAlign, rect, (int)size.Width, (int)size.Height);
            //
            // If button state is inactive, paint the inactive text
            //
            if (btnState == BtnState.Inactive)
            {
                e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(System.Drawing.Color.White), pt.X + 1, pt.Y + 1);
                e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(System.Drawing.Color.FromArgb(50, 50, 50)), pt.X, pt.Y);
            }
            //
            // else, paint the text and text shadow
            //
            else
            {
                //
                // paint text shadow
                //
                if (TextDropShadow)
                {
                    System.Drawing.Brush TransparentBrush0 = new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(50, System.Drawing.Color.Black));
                    System.Drawing.Brush TransparentBrush1 = new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(20, System.Drawing.Color.Black));

                    e.Graphics.DrawString(this.Text, this.Font, TransparentBrush0, pt.X, pt.Y + 1);
                    e.Graphics.DrawString(this.Text, this.Font, TransparentBrush0, pt.X + 1, pt.Y);

                    e.Graphics.DrawString(this.Text, this.Font, TransparentBrush1, pt.X + 1, pt.Y + 1);
                    e.Graphics.DrawString(this.Text, this.Font, TransparentBrush1, pt.X, pt.Y + 2);
                    e.Graphics.DrawString(this.Text, this.Font, TransparentBrush1, pt.X + 2, pt.Y);

                    TransparentBrush0.Dispose();
                    TransparentBrush1.Dispose();
                }
                //
                // paint text
                //
                e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(this.ForeColor), pt.X, pt.Y);
            }
        }
Example #40
0
 /// <summary>
 /// Calculates the required size to draw a text string
 /// </summary>
 /// <param name="g">the graphics object</param>
 /// <param name="strText">string to calculate text region</param>
 /// <param name="font">font to use for the string</param>
 /// <returns>returns the size required to draw a text string</returns>
 private System.Drawing.SizeF txt_Size(Graphics g, string strText, Font font)
 {
     System.Drawing.SizeF size = g.MeasureString(strText, font);
     return(size);
 }
Example #41
0
        /// <summary>
        /// Converts the current unit to one that can be used at render time.
        /// </summary>
        /// <param name="boundable">The container element used as the basis for calculations</param>
        /// <returns>The representation of the current unit in a device value (usually pixels).</returns>
        public float ToDeviceValue(ISvgRenderer renderer, UnitRenderingType renderType, SvgElement owner)
        {
            // If it's already been calculated
            if (this._deviceValue.HasValue)
            {
                return(this._deviceValue.Value);
            }

            if (this._value == 0.0f)
            {
                this._deviceValue = 0.0f;
                return(this._deviceValue.Value);
            }

            // http://www.w3.org/TR/CSS21/syndata.html#values
            // http://www.w3.org/TR/SVG11/coords.html#Units

            const float cmInInch = 2.54f;
            int         ppi      = SvgDocument.PointsPerInch;

            var type  = this.Type;
            var value = this.Value;

            float points;

            switch (type)
            {
            case SvgUnitType.Em:
                using (var currFont = GetFont(renderer, owner))
                {
                    if (currFont == null)
                    {
                        points       = (float)(value * 9);
                        _deviceValue = (points / 72.0f) * ppi;
                    }
                    else
                    {
                        _deviceValue = value * (currFont.SizeInPoints / 72.0f) * ppi;
                    }
                }
                break;

            case SvgUnitType.Ex:
                using (var currFont = GetFont(renderer, owner))
                {
                    if (currFont == null)
                    {
                        points       = (float)(value * 9);
                        _deviceValue = (points * 0.5f / 72.0f) * ppi;
                    }
                    else
                    {
                        _deviceValue = value * 0.5f * (currFont.SizeInPoints / 72.0f) * ppi;
                    }
                    break;
                }

            case SvgUnitType.Centimeter:
                _deviceValue = (float)((value / cmInInch) * ppi);
                break;

            case SvgUnitType.Inch:
                _deviceValue = value * ppi;
                break;

            case SvgUnitType.Millimeter:
                _deviceValue = (float)((value / 10) / cmInInch) * ppi;
                break;

            case SvgUnitType.Pica:
                _deviceValue = ((value * 12) / 72) * ppi;
                break;

            case SvgUnitType.Point:
                _deviceValue = (value / 72) * ppi;
                break;

            case SvgUnitType.Pixel:
                _deviceValue = value;
                break;

            case SvgUnitType.User:
                _deviceValue = value;
                break;

            case SvgUnitType.Percentage:
                // Can't calculate if there is no style owner
                var boundable = (renderer == null ? (owner == null ? null : owner.OwnerDocument) : renderer.GetBoundable());
                if (boundable == null)
                {
                    _deviceValue = value;
                    break;
                }

                System.Drawing.SizeF size = boundable.Bounds.Size;

                switch (renderType)
                {
                case UnitRenderingType.Horizontal:
                    _deviceValue = (size.Width / 100) * value;
                    break;

                case UnitRenderingType.HorizontalOffset:
                    _deviceValue = (size.Width / 100) * value + boundable.Location.X;
                    break;

                case UnitRenderingType.Vertical:
                    _deviceValue = (size.Height / 100) * value;
                    break;

                case UnitRenderingType.VerticalOffset:
                    _deviceValue = (size.Height / 100) * value + boundable.Location.Y;
                    break;

                default:
                    _deviceValue = (float)(Math.Sqrt(Math.Pow(size.Width, 2) + Math.Pow(size.Height, 2)) / Math.Sqrt(2) * value / 100.0);
                    break;
                }
                break;

            default:
                _deviceValue = value;
                break;
            }
            return(this._deviceValue.Value);
        }
Example #42
0
        private void InitializeComponent()
        {
            Lab1            = new System.Windows.Forms.Label();
            Lab2            = new System.Windows.Forms.Label();
            Edit1           = new System.Windows.Forms.TextBox();
            Edit2           = new System.Windows.Forms.TextBox();
            btnRec1Select   = new System.Windows.Forms.Button();
            btnRec2Select   = new System.Windows.Forms.Button();
            btnMergeToLeft  = new System.Windows.Forms.Button();
            btnMergeToRight = new System.Windows.Forms.Button();
            SuspendLayout();

            Lab1.AutoSize = true;
            Lab1.Location = new System.Drawing.Point(14, 13);
            Lab1.Name     = "Lab1";
            Lab1.Size     = new System.Drawing.Size(40, 17);
            Lab1.TabIndex = 9;
            Lab1.Text     = "XXX1";

            Lab2.AutoSize = true;
            Lab2.Location = new System.Drawing.Point(482, 13);
            Lab2.Name     = "Lab2";
            Lab2.Size     = new System.Drawing.Size(40, 17);
            Lab2.TabIndex = 11;
            Lab2.Text     = "XXX2";

            Edit1.Location = new System.Drawing.Point(14, 33);
            Edit1.Name     = "Edit1";
            Edit1.ReadOnly = true;
            Edit1.Size     = new System.Drawing.Size(366, 24);
            Edit1.TabIndex = 10;

            Edit2.Location = new System.Drawing.Point(482, 33);
            Edit2.Name     = "Edit2";
            Edit2.ReadOnly = true;
            Edit2.Size     = new System.Drawing.Size(373, 24);
            Edit2.TabIndex = 12;

            btnRec1Select.Location = new System.Drawing.Point(386, 32);
            btnRec1Select.Name     = "btnRec1Select";
            btnRec1Select.Size     = new System.Drawing.Size(81, 25);
            btnRec1Select.TabIndex = 13;
            btnRec1Select.Text     = "btnRec1Select";
            btnRec1Select.Click   += btnRec1Select_Click;

            btnRec2Select.Location = new System.Drawing.Point(861, 32);
            btnRec2Select.Name     = "btnRec2Select";
            btnRec2Select.Size     = new System.Drawing.Size(81, 25);
            btnRec2Select.TabIndex = 14;
            btnRec2Select.Text     = "btnRec2Select";
            btnRec2Select.Click   += btnRec2Select_Click;

            btnMergeToLeft.Enabled  = false;
            btnMergeToLeft.Location = new System.Drawing.Point(386, 371);
            btnMergeToLeft.Name     = "btnMergeToLeft";
            btnMergeToLeft.Size     = new System.Drawing.Size(81, 25);
            btnMergeToLeft.TabIndex = 15;
            btnMergeToLeft.Text     = "<<<";
            btnMergeToLeft.Click   += btnMergeToLeft_Click;

            btnMergeToRight.Enabled  = false;
            btnMergeToRight.Location = new System.Drawing.Point(482, 371);
            btnMergeToRight.Name     = "btnMergeToRight";
            btnMergeToRight.Size     = new System.Drawing.Size(81, 25);
            btnMergeToRight.TabIndex = 16;
            btnMergeToRight.Text     = ">>>";
            btnMergeToRight.Click   += btnMergeToRight_Click;

            AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
            AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Dpi;
            AutoSize            = true;
            Controls.Add(Lab1);
            Controls.Add(Lab2);
            Controls.Add(Edit1);
            Controls.Add(Edit2);
            Controls.Add(btnRec1Select);
            Controls.Add(btnRec2Select);
            Controls.Add(btnMergeToLeft);
            Controls.Add(btnMergeToRight);
            Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            Name = "GKMergeControl";
            Size = new System.Drawing.Size(957, 402);
            ResumeLayout(false);
            PerformLayout();
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(ctFormBatchEditRC));

            this.label1 = new Label();
            this.label2 = new Label();
            this.numericUpDown_start = new NumericUpDown();
            this.numericUpDown_stop  = new NumericUpDown();
            this.label_updateR       = new Label();
            this.numericUpDown_rcv   = new NumericUpDown();
            this.btnQuit             = new Button();
            this.btnSubmit           = new Button();
            this.radioButton_update  = new RadioButton();
            this.radioButton_add     = new RadioButton();
            ((ISupportInitialize)this.numericUpDown_start).BeginInit();
            ((ISupportInitialize)this.numericUpDown_stop).BeginInit();
            ((ISupportInitialize)this.numericUpDown_rcv).BeginInit();
            base.SuspendLayout();
            this.label1.AutoSize = true;
            this.label1.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(79, 101);
            this.label1.Location = location;
            this.label1.Name     = "label1";
            System.Drawing.Size size = new System.Drawing.Size(191, 19);
            this.label1.Size     = size;
            this.label1.TabIndex = 0;
            this.label1.Text     = "测试仪针脚号(起始):";
            this.label2.AutoSize = true;
            this.label2.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location2 = new System.Drawing.Point(79, 160);
            this.label2.Location = location2;
            this.label2.Name     = "label2";
            System.Drawing.Size size2 = new System.Drawing.Size(191, 19);
            this.label2.Size              = size2;
            this.label2.TabIndex          = 0;
            this.label2.Text              = "测试仪针脚号(终止):";
            this.numericUpDown_start.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location3 = new System.Drawing.Point(285, 96);
            this.numericUpDown_start.Location = location3;
            decimal maximum = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_start.Maximum = maximum;
            decimal minimum = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_start.Minimum = minimum;
            this.numericUpDown_start.Name    = "numericUpDown_start";
            System.Drawing.Size size3 = new System.Drawing.Size(180, 28);
            this.numericUpDown_start.Size      = size3;
            this.numericUpDown_start.TabIndex  = 2;
            this.numericUpDown_start.TextAlign = HorizontalAlignment.Center;
            decimal value = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_start.Value = value;
            this.numericUpDown_stop.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location4 = new System.Drawing.Point(285, 155);
            this.numericUpDown_stop.Location = location4;
            decimal maximum2 = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_stop.Maximum = maximum2;
            decimal minimum2 = new decimal(new int[]
            {
                1,
                0,
                0,
                0
            });

            this.numericUpDown_stop.Minimum = minimum2;
            this.numericUpDown_stop.Name    = "numericUpDown_stop";
            System.Drawing.Size size4 = new System.Drawing.Size(180, 28);
            this.numericUpDown_stop.Size      = size4;
            this.numericUpDown_stop.TabIndex  = 3;
            this.numericUpDown_stop.TextAlign = HorizontalAlignment.Center;
            decimal value2 = new decimal(new int[]
            {
                1023,
                0,
                0,
                0
            });

            this.numericUpDown_stop.Value = value2;
            this.label_updateR.AutoSize   = true;
            this.label_updateR.Font       = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location5 = new System.Drawing.Point(136, 219);
            this.label_updateR.Location = location5;
            this.label_updateR.Name     = "label_updateR";
            System.Drawing.Size size5 = new System.Drawing.Size(134, 19);
            this.label_updateR.Size              = size5;
            this.label_updateR.TabIndex          = 0;
            this.label_updateR.Text              = "补偿电阻(Ω):";
            this.numericUpDown_rcv.DecimalPlaces = 3;
            this.numericUpDown_rcv.Font          = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location6 = new System.Drawing.Point(285, 214);
            this.numericUpDown_rcv.Location = location6;
            decimal maximum3 = new decimal(new int[]
            {
                1000,
                0,
                0,
                0
            });

            this.numericUpDown_rcv.Maximum = maximum3;
            this.numericUpDown_rcv.Name    = "numericUpDown_rcv";
            System.Drawing.Size size6 = new System.Drawing.Size(180, 28);
            this.numericUpDown_rcv.Size      = size6;
            this.numericUpDown_rcv.TabIndex  = 4;
            this.numericUpDown_rcv.TextAlign = HorizontalAlignment.Center;
            decimal value3 = new decimal(new int[]
            {
                10,
                0,
                0,
                65536
            });

            this.numericUpDown_rcv.Value = value3;
            this.btnQuit.Anchor          = AnchorStyles.Right;
            this.btnQuit.Font            = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location7 = new System.Drawing.Point(345, 293);
            this.btnQuit.Location = location7;
            this.btnQuit.Name     = "btnQuit";
            System.Drawing.Size size7 = new System.Drawing.Size(120, 30);
            this.btnQuit.Size     = size7;
            this.btnQuit.TabIndex = 1;
            this.btnQuit.Text     = "取消";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click   += new System.EventHandler(this.btnQuit_Click);
            this.btnSubmit.Anchor = AnchorStyles.Right;
            this.btnSubmit.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location8 = new System.Drawing.Point(154, 293);
            this.btnSubmit.Location = location8;
            this.btnSubmit.Name     = "btnSubmit";
            System.Drawing.Size size8 = new System.Drawing.Size(120, 30);
            this.btnSubmit.Size     = size8;
            this.btnSubmit.TabIndex = 0;
            this.btnSubmit.Text     = "确定";
            this.btnSubmit.UseVisualStyleBackColor = true;
            this.btnSubmit.Click            += new System.EventHandler(this.btnSubmit_Click);
            this.radioButton_update.AutoSize = true;
            this.radioButton_update.Checked  = true;
            this.radioButton_update.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location9 = new System.Drawing.Point(154, 34);
            this.radioButton_update.Location = location9;
            this.radioButton_update.Name     = "radioButton_update";
            System.Drawing.Size size9 = new System.Drawing.Size(106, 23);
            this.radioButton_update.Size     = size9;
            this.radioButton_update.TabIndex = 6;
            this.radioButton_update.TabStop  = true;
            this.radioButton_update.Text     = "批量修改";
            this.radioButton_update.UseVisualStyleBackColor = true;
            this.radioButton_add.AutoSize = true;
            this.radioButton_add.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location10 = new System.Drawing.Point(320, 34);
            this.radioButton_add.Location = location10;
            this.radioButton_add.Name     = "radioButton_add";
            System.Drawing.Size size10 = new System.Drawing.Size(106, 23);
            this.radioButton_add.Size     = size10;
            this.radioButton_add.TabIndex = 7;
            this.radioButton_add.Text     = "批量追加";
            this.radioButton_add.UseVisualStyleBackColor = true;
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(624, 385);
            base.ClientSize = clientSize;
            base.Controls.Add(this.radioButton_add);
            base.Controls.Add(this.radioButton_update);
            base.Controls.Add(this.btnQuit);
            base.Controls.Add(this.btnSubmit);
            base.Controls.Add(this.numericUpDown_rcv);
            base.Controls.Add(this.numericUpDown_stop);
            base.Controls.Add(this.numericUpDown_start);
            base.Controls.Add(this.label_updateR);
            base.Controls.Add(this.label2);
            base.Controls.Add(this.label1);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            base.MaximizeBox     = false;
            base.MinimizeBox     = false;
            base.Name            = "ctFormBatchEditRC";
            base.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "批量操作窗口";
            base.Load           += new System.EventHandler(this.ctFormBatchEditRC_Load);
            ((ISupportInitialize)this.numericUpDown_start).EndInit();
            ((ISupportInitialize)this.numericUpDown_stop).EndInit();
            ((ISupportInitialize)this.numericUpDown_rcv).EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Example #44
0
 private void Diseño_Forma()
 {
     pic_Logo   = new System.Windows.Forms.PictureBox();
     components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Caja));
     menuStrip1 = new System.Windows.Forms.MenuStrip();
     archivoToolStripMenuItem       = new System.Windows.Forms.ToolStripMenuItem();
     nuevoToolStripMenuItem         = new System.Windows.Forms.ToolStripMenuItem();
     toolStripSeparator             = new System.Windows.Forms.ToolStripSeparator();
     guardarToolStripMenuItem       = new System.Windows.Forms.ToolStripMenuItem();
     toolStripSeparator2            = new System.Windows.Forms.ToolStripSeparator();
     salirToolStripMenuItem         = new System.Windows.Forms.ToolStripMenuItem();
     movimientoToolStripMenuItem    = new System.Windows.Forms.ToolStripMenuItem();
     retirarToolStripMenuItem       = new System.Windows.Forms.ToolStripMenuItem();
     ingresarToolStripMenuItem      = new System.Windows.Forms.ToolStripMenuItem();
     realizarCorteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     ayudaToolStripMenuItem         = new System.Windows.Forms.ToolStripMenuItem();
     acercadeToolStripMenuItem      = new System.Windows.Forms.ToolStripMenuItem();
     pic_Caja         = new System.Windows.Forms.PictureBox();
     groupBoxdatos    = new System.Windows.Forms.GroupBox();
     dateTime_Fecha   = new System.Windows.Forms.DateTimePicker();
     combo_Concepto   = new System.Windows.Forms.ComboBox();
     lbl_Unidad       = new System.Windows.Forms.Label();
     txt_DineroActual = new System.Windows.Forms.TextBox();
     txt_Movimiento   = new System.Windows.Forms.TextBox();
     txt_DineroCaja   = new System.Windows.Forms.TextBox();
     lbl_Fecha        = new System.Windows.Forms.Label();
     lbl_Concepto     = new System.Windows.Forms.Label();
     lbl_Movimiento   = new System.Windows.Forms.Label();
     lbl_MontoInicial = new System.Windows.Forms.Label();
     errorProvider1   = new System.Windows.Forms.ErrorProvider(components);
     menuStrip1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(pic_Caja)).BeginInit();
     groupBoxdatos.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(errorProvider1)).BeginInit();
     SuspendLayout();
     //
     // menuStrip1
     //
     menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(186)))), ((int)(((byte)(82)))));
     menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         archivoToolStripMenuItem,
         movimientoToolStripMenuItem,
         ayudaToolStripMenuItem
     });
     menuStrip1.Location = new System.Drawing.Point(0, 0);
     menuStrip1.Name     = "menuStrip1";
     menuStrip1.Size     = new System.Drawing.Size(572, 24);
     menuStrip1.TabIndex = 1;
     menuStrip1.Text     = "menuStrip1";
     //
     // archivoToolStripMenuItem
     //
     archivoToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         nuevoToolStripMenuItem,
         toolStripSeparator,
         guardarToolStripMenuItem,
         toolStripSeparator2,
         salirToolStripMenuItem
     });
     archivoToolStripMenuItem.Name = "archivoToolStripMenuItem";
     archivoToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
     archivoToolStripMenuItem.Text = "&Archivo";
     //
     // nuevoToolStripMenuItem
     //
     nuevoToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("nuevoToolStripMenuItem.Image")));
     nuevoToolStripMenuItem.Image = global::Sistema_Shajobe.Properties.Resources.Nuevo;
     nuevoToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
     nuevoToolStripMenuItem.Name         = "nuevoToolStripMenuItem";
     nuevoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
     nuevoToolStripMenuItem.Size         = new System.Drawing.Size(156, 22);
     nuevoToolStripMenuItem.Text         = "&Nuevo";
     nuevoToolStripMenuItem.Click       += new System.EventHandler(nuevoToolStripMenuItem_Click);
     //
     // toolStripSeparator
     //
     toolStripSeparator.Name = "toolStripSeparator";
     toolStripSeparator.Size = new System.Drawing.Size(153, 6);
     //
     // guardarToolStripMenuItem
     //
     guardarToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("guardarToolStripMenuItem.Image")));
     guardarToolStripMenuItem.Image = global::Sistema_Shajobe.Properties.Resources.Guardar;
     guardarToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
     guardarToolStripMenuItem.Name         = "guardarToolStripMenuItem";
     guardarToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
     guardarToolStripMenuItem.Size         = new System.Drawing.Size(156, 22);
     guardarToolStripMenuItem.Text         = "&Guardar";
     guardarToolStripMenuItem.Click       += new System.EventHandler(guardarToolStripMenuItem_Click);
     //
     // toolStripSeparator2
     //
     toolStripSeparator2.Name = "toolStripSeparator2";
     toolStripSeparator2.Size = new System.Drawing.Size(153, 6);
     //
     // salirToolStripMenuItem
     //
     salirToolStripMenuItem.Name   = "salirToolStripMenuItem";
     salirToolStripMenuItem.Size   = new System.Drawing.Size(156, 22);
     salirToolStripMenuItem.Text   = "&Salir";
     salirToolStripMenuItem.Click += new System.EventHandler(salirToolStripMenuItem_Click);
     //
     // movimientoToolStripMenuItem
     //
     movimientoToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         retirarToolStripMenuItem,
         ingresarToolStripMenuItem,
         realizarCorteToolStripMenuItem
     });
     movimientoToolStripMenuItem.Name = "movimientoToolStripMenuItem";
     movimientoToolStripMenuItem.Size = new System.Drawing.Size(84, 20);
     movimientoToolStripMenuItem.Text = "Movimiento";
     //
     // retirarToolStripMenuItem
     //
     retirarToolStripMenuItem.Name   = "retirarToolStripMenuItem";
     retirarToolStripMenuItem.Image  = global::Sistema_Shajobe.Properties.Resources.Retirar;
     retirarToolStripMenuItem.Size   = new System.Drawing.Size(152, 22);
     retirarToolStripMenuItem.Text   = "Retirar";
     retirarToolStripMenuItem.Click += new System.EventHandler(retirarToolStripMenuItem_Click);
     //
     // ingresarToolStripMenuItem
     //
     ingresarToolStripMenuItem.Name   = "ingresarToolStripMenuItem";
     ingresarToolStripMenuItem.Image  = global::Sistema_Shajobe.Properties.Resources.Ingresar;
     ingresarToolStripMenuItem.Size   = new System.Drawing.Size(152, 22);
     ingresarToolStripMenuItem.Text   = "Ingresar";
     ingresarToolStripMenuItem.Click += new System.EventHandler(ingresarToolStripMenuItem_Click);
     //
     // realizarCorteToolStripMenuItem
     //
     realizarCorteToolStripMenuItem.Name   = "realizarCorteToolStripMenuItem";
     realizarCorteToolStripMenuItem.Image  = global::Sistema_Shajobe.Properties.Resources.Calcular;
     realizarCorteToolStripMenuItem.Size   = new System.Drawing.Size(152, 22);
     realizarCorteToolStripMenuItem.Text   = "Realizar corte";
     realizarCorteToolStripMenuItem.Click += new System.EventHandler(CorteCajaToolStripMenuItem_Click);
     //
     // ayudaToolStripMenuItem
     //
     ayudaToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         acercadeToolStripMenuItem
     });
     ayudaToolStripMenuItem.Name = "ayudaToolStripMenuItem";
     ayudaToolStripMenuItem.Size = new System.Drawing.Size(53, 20);
     ayudaToolStripMenuItem.Text = "Ay&uda";
     //
     // acercadeToolStripMenuItem
     //
     acercadeToolStripMenuItem.Name = "acercadeToolStripMenuItem";
     acercadeToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
     acercadeToolStripMenuItem.Text = "&Acerca de...";
     //
     // pic_Caja
     //
     pic_Caja.BackgroundImage       = global::Sistema_Shajobe.Properties.Resources.Caja;
     pic_Caja.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     pic_Caja.Location = new System.Drawing.Point(473, 25);
     pic_Caja.Name     = "pic_Caja";
     pic_Caja.Size     = new System.Drawing.Size(85, 67);
     pic_Caja.TabIndex = 23;
     pic_Caja.TabStop  = false;
     //
     // groupBoxdatos
     //
     groupBoxdatos.Controls.Add(dateTime_Fecha);
     groupBoxdatos.Controls.Add(pic_Logo);
     groupBoxdatos.Controls.Add(combo_Concepto);
     groupBoxdatos.Controls.Add(lbl_Unidad);
     groupBoxdatos.Controls.Add(txt_DineroActual);
     groupBoxdatos.Controls.Add(txt_Movimiento);
     groupBoxdatos.Controls.Add(txt_DineroCaja);
     groupBoxdatos.Controls.Add(lbl_Fecha);
     groupBoxdatos.Controls.Add(lbl_Concepto);
     groupBoxdatos.Controls.Add(lbl_Movimiento);
     groupBoxdatos.Controls.Add(lbl_MontoInicial);
     groupBoxdatos.Location = new System.Drawing.Point(4, 43);
     groupBoxdatos.Name     = "groupBoxdatos";
     groupBoxdatos.Size     = new System.Drawing.Size(555, 186);
     groupBoxdatos.TabIndex = 22;
     groupBoxdatos.TabStop  = false;
     groupBoxdatos.Text     = "Datos de movimientos de caja";
     //
     // dateTime_Fecha
     //
     dateTime_Fecha.Location = new System.Drawing.Point(126, 89);
     dateTime_Fecha.Name     = "dateTime_Fecha";
     dateTime_Fecha.Size     = new System.Drawing.Size(200, 20);
     dateTime_Fecha.TabIndex = 58;
     dateTime_Fecha.Enabled  = false;
     //
     // combo_Concepto
     //
     combo_Concepto.FormattingEnabled = true;
     combo_Concepto.Location          = new System.Drawing.Point(126, 116);
     combo_Concepto.Name     = "combo_Concepto";
     combo_Concepto.Size     = new System.Drawing.Size(156, 21);
     combo_Concepto.TabIndex = 57;
     combo_Concepto.Enabled  = false;
     //
     // lbl_Unidad
     //
     lbl_Unidad.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                               | System.Windows.Forms.AnchorStyles.Left)));
     lbl_Unidad.AutoSize = true;
     lbl_Unidad.Location = new System.Drawing.Point(27, 151);
     lbl_Unidad.Name     = "lbl_Unidad";
     lbl_Unidad.Size     = new System.Drawing.Size(70, 13);
     lbl_Unidad.TabIndex = 55;
     lbl_Unidad.Text     = "Dinero actual";
     //
     // txt_DineroActual
     //
     txt_DineroActual.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)));
     txt_DineroActual.Enabled   = false;
     txt_DineroActual.Location  = new System.Drawing.Point(126, 144);
     txt_DineroActual.MaxLength = 9;
     txt_DineroActual.Name      = "txt_DineroActual";
     txt_DineroActual.Size      = new System.Drawing.Size(127, 20);
     txt_DineroActual.TabIndex  = 53;
     //
     // txt_Movimiento
     //
     txt_Movimiento.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                   | System.Windows.Forms.AnchorStyles.Left)));
     txt_Movimiento.Enabled   = false;
     txt_Movimiento.Location  = new System.Drawing.Point(126, 62);
     txt_Movimiento.MaxLength = 25;
     txt_Movimiento.Name      = "txt_Movimiento";
     txt_Movimiento.Size      = new System.Drawing.Size(127, 20);
     txt_Movimiento.TabIndex  = 46;
     //
     // txt_DineroCaja
     //
     txt_DineroCaja.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                   | System.Windows.Forms.AnchorStyles.Left)));
     txt_DineroCaja.Enabled   = false;
     txt_DineroCaja.Location  = new System.Drawing.Point(126, 35);
     txt_DineroCaja.MaxLength = 8;
     txt_DineroCaja.Name      = "txt_DineroCaja";
     txt_DineroCaja.Size      = new System.Drawing.Size(127, 20);
     txt_DineroCaja.TabIndex  = 37;
     //
     // lbl_Fecha
     //
     lbl_Fecha.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                              | System.Windows.Forms.AnchorStyles.Left)));
     lbl_Fecha.AutoSize = true;
     lbl_Fecha.Location = new System.Drawing.Point(27, 96);
     lbl_Fecha.Name     = "lbl_Fecha";
     lbl_Fecha.Size     = new System.Drawing.Size(37, 13);
     lbl_Fecha.TabIndex = 44;
     lbl_Fecha.Text     = "Fecha";
     //
     // lbl_Concepto
     //
     lbl_Concepto.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)));
     lbl_Concepto.AutoSize = true;
     lbl_Concepto.Location = new System.Drawing.Point(27, 124);
     lbl_Concepto.Name     = "lbl_Concepto";
     lbl_Concepto.Size     = new System.Drawing.Size(53, 13);
     lbl_Concepto.TabIndex = 38;
     lbl_Concepto.Text     = "Concepto";
     //
     // lbl_Movimiento
     //
     lbl_Movimiento.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                   | System.Windows.Forms.AnchorStyles.Left)));
     lbl_Movimiento.AutoSize = true;
     lbl_Movimiento.Location = new System.Drawing.Point(27, 69);
     lbl_Movimiento.Name     = "lbl_Movimiento";
     lbl_Movimiento.Size     = new System.Drawing.Size(61, 13);
     lbl_Movimiento.TabIndex = 36;
     lbl_Movimiento.Text     = "Movimiento";
     //
     // lbl_MontoInicial
     //
     lbl_MontoInicial.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)));
     lbl_MontoInicial.AutoSize = true;
     lbl_MontoInicial.Location = new System.Drawing.Point(27, 42);
     lbl_MontoInicial.Name     = "lbl_MontoInicial";
     lbl_MontoInicial.Size     = new System.Drawing.Size(76, 13);
     lbl_MontoInicial.TabIndex = 35;
     lbl_MontoInicial.Text     = "Dinero en caja";
     //
     // errorProvider1
     //
     errorProvider1.ContainerControl = this;
     //
     // pic_Logo
     //
     pic_Logo.BackgroundImage       = global::Sistema_Shajobe.Properties.Resources.Logo_Shajobe;
     pic_Logo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     pic_Logo.Location = new System.Drawing.Point(380, 80);
     pic_Logo.Name     = "pic_Logo";
     pic_Logo.Size     = new System.Drawing.Size(166, 84);
     pic_Logo.TabIndex = 13;
     pic_Logo.TabStop  = false;
     //
     // Caja
     //
     AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(228)))), ((int)(((byte)(196)))));
     ClientSize          = new System.Drawing.Size(572, 238);
     Controls.Add(pic_Caja);
     Controls.Add(groupBoxdatos);
     Controls.Add(menuStrip1);
     Icon          = global::Sistema_Shajobe.Properties.Resources.Caja_ICO;
     MaximizeBox   = false;
     Name          = "Caja";
     StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     Text          = "Caja";
     Load         += new System.EventHandler(Caja_Load);
     menuStrip1.ResumeLayout(false);
     menuStrip1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(pic_Caja)).EndInit();
     groupBoxdatos.ResumeLayout(false);
     groupBoxdatos.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(errorProvider1)).EndInit();
     AnimateWindow(Handle, 350, AnimateWindowFlags.AW_CENTER);
     AnimateWindow(Handle, 350, AnimateWindowFlags.AW_CENTER | AnimateWindowFlags.AW_SLIDE);
     ResumeLayout(false);
     PerformLayout();
 }
Example #45
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ResourceManager manager = new ResourceManager(typeof(S_PLACA_KONACNI_REKAPOPCINEUserControl));

            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE = new TableLayoutPanel();
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SuspendLayout();
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.AutoSize     = true;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Dock         = DockStyle.Fill;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.AutoScroll   = false;
            System.Drawing.Point point = new System.Drawing.Point(0, 0);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Location = point;
            Size size = new System.Drawing.Size(0, 0);

            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Size        = size;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.ColumnCount = 2;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.RowCount = 2;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.RowStyles.Add(new RowStyle());
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.RowStyles.Add(new RowStyle());
            this.label1IDOBRACUN = new UltraLabel();
            this.textIDOBRACUN   = new UltraTextEditor();
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE = new S_PLACA_KONACNI_REKAPOPCINEUserDataGrid();
            this.ultraGridPrintDocument1  = new UltraGridPrintDocument(this.components);
            this.ultraPrintPreviewDialog1 = new UltraPrintPreviewDialog(this.components);
            ((ISupportInitialize)this.textIDOBRACUN).BeginInit();
            this.SuspendLayout();
            this.label1IDOBRACUN.Name                  = "label1IDOBRACUN";
            this.label1IDOBRACUN.TabIndex              = 1;
            this.label1IDOBRACUN.Tag                   = "labelIDOBRACUN";
            this.label1IDOBRACUN.AutoSize              = true;
            this.label1IDOBRACUN.StyleSetName          = "FieldUltraLabel";
            this.label1IDOBRACUN.Text                  = "IDOBRACUN     :";
            this.label1IDOBRACUN.Appearance.TextVAlign = VAlign.Middle;
            this.label1IDOBRACUN.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1IDOBRACUN.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Controls.Add(this.label1IDOBRACUN, 0, 0);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetColumnSpan(this.label1IDOBRACUN, 1);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetRowSpan(this.label1IDOBRACUN, 1);
            Padding padding = new Padding(3, 1, 5, 2);

            this.label1IDOBRACUN.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1IDOBRACUN.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textIDOBRACUN.Location = point;
            this.textIDOBRACUN.Name     = "textIDOBRACUN";
            this.textIDOBRACUN.Tag      = "IDOBRACUN";
            this.textIDOBRACUN.TabIndex = 0;
            size = new System.Drawing.Size(0x71, 0x16);
            this.textIDOBRACUN.Size      = size;
            this.textIDOBRACUN.MaxLength = 11;
            EditorButton button = new EditorButton {
                Key  = "editorButtonOBRACUNIDOBRACUN",
                Tag  = "editorButtonOBRACUNIDOBRACUN",
                Text = "..."
            };

            this.textIDOBRACUN.ButtonsRight.Add(button);
            this.textIDOBRACUN.EditorButtonClick += new EditorButtonEventHandler(this.CallPromptOBRACUNIDOBRACUN);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Controls.Add(this.textIDOBRACUN, 1, 0);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetColumnSpan(this.textIDOBRACUN, 1);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetRowSpan(this.textIDOBRACUN, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textIDOBRACUN.Margin = padding;
            size = new System.Drawing.Size(0x71, 0x16);
            this.textIDOBRACUN.MinimumSize = size;
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.Controls.Add(this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE, 0, 1);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetColumnSpan(this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE, 2);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.SetRowSpan(this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE, 1);
            padding = new Padding(5, 10, 5, 10);
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Margin = padding;
            size = new System.Drawing.Size(100, 100);
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.MinimumSize = size;
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Dock        = DockStyle.Fill;
            this.Controls.Add(this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE);
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Name            = "userControlDataGridS_PLACA_KONACNI_REKAPOPCINE";
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Dock            = DockStyle.Fill;
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.DockPadding.All = 5;
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.FillAtStartup   = false;
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.TabIndex        = 6;
            point = new System.Drawing.Point(0, 0);
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Location = point;
            size = new System.Drawing.Size(0x285, 350);
            this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.Size = size;
            this.ultraGridPrintDocument1.Grid = this.userControlDataGridS_PLACA_KONACNI_REKAPOPCINE.DataGrid;
            SizeF ef = new System.Drawing.SizeF(6f, 13f);

            this.AutoScaleDimensions = ef;
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.DockPadding.All     = 5;
            this.Name  = "S_PLACA_KONACNI_REKAPOPCINEWorkWith";
            this.Text  = "Work With S_PLACA_KONACNI_REKAPOPCINE";
            this.Load += new EventHandler(this.S_PLACA_KONACNI_REKAPOPCINEUserControl_Load);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.ResumeLayout(false);
            this.layoutManagerformS_PLACA_KONACNI_REKAPOPCINE.PerformLayout();
            ((ISupportInitialize)this.textIDOBRACUN).EndInit();
            this.ResumeLayout(false);
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(ctFormResistanceCompensation));

            this.groupBox1              = new GroupBox();
            this.dataGridView1          = new DataGridView();
            this.Column_pin             = new DataGridViewTextBoxColumn();
            this.Column_rc              = new DataGridViewTextBoxColumn();
            this.btnSubmit              = new Button();
            this.btnQuit                = new Button();
            this.numericUpDown_Template = new NumericUpDown();
            this.btnPLXG                = new Button();
            this.btnImport              = new Button();
            this.openFileDialog1        = new OpenFileDialog();
            this.groupBox1.SuspendLayout();
            ((ISupportInitialize)this.dataGridView1).BeginInit();
            ((ISupportInitialize)this.numericUpDown_Template).BeginInit();
            base.SuspendLayout();
            this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
            this.groupBox1.Controls.Add(this.dataGridView1);
            this.groupBox1.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(22, 10);
            this.groupBox1.Location = location;
            Padding margin = new Padding(2);

            this.groupBox1.Margin = margin;
            this.groupBox1.Name   = "groupBox1";
            Padding padding = new Padding(2);

            this.groupBox1.Padding = padding;
            System.Drawing.Size size = new System.Drawing.Size(613, 531);
            this.groupBox1.Size     = size;
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop  = false;
            this.groupBox1.Text     = "补偿电阻表";
            this.dataGridView1.AllowUserToAddRows       = false;
            this.dataGridView1.AllowUserToDeleteRows    = false;
            this.dataGridView1.AllowUserToResizeColumns = false;
            this.dataGridView1.AllowUserToResizeRows    = false;
            System.Drawing.Color window = System.Drawing.SystemColors.Window;
            this.dataGridView1.BackgroundColor             = window;
            this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumn[] dataGridViewColumns = new DataGridViewColumn[]
            {
                this.Column_pin,
                this.Column_rc
            };
            this.dataGridView1.Columns.AddRange(dataGridViewColumns);
            this.dataGridView1.Dock = DockStyle.Fill;
            System.Drawing.Point location2 = new System.Drawing.Point(2, 19);
            this.dataGridView1.Location = location2;
            Padding margin2 = new Padding(2);

            this.dataGridView1.Margin             = margin2;
            this.dataGridView1.MultiSelect        = false;
            this.dataGridView1.Name               = "dataGridView1";
            this.dataGridView1.ReadOnly           = true;
            this.dataGridView1.RowHeadersVisible  = false;
            this.dataGridView1.RowTemplate.Height = 27;
            this.dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            System.Drawing.Size size2 = new System.Drawing.Size(609, 510);
            this.dataGridView1.Size                  = size2;
            this.dataGridView1.TabIndex              = 15;
            this.dataGridView1.CellMouseDoubleClick += new DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDoubleClick);
            this.dataGridView1.SelectionChanged     += new System.EventHandler(this.dataGridView1_SelectionChanged);
            this.dataGridView1.KeyPress             += new KeyPressEventHandler(this.dataGridView1_KeyPress);
            this.Column_pin.HeaderText               = "测试仪针脚号";
            this.Column_pin.Name      = "Column_pin";
            this.Column_pin.ReadOnly  = true;
            this.Column_pin.Width     = 280;
            this.Column_rc.HeaderText = "补偿电阻值(Ω)";
            this.Column_rc.Name       = "Column_rc";
            this.Column_rc.ReadOnly   = true;
            this.Column_rc.Width      = 300;
            this.btnSubmit.Anchor     = AnchorStyles.Right;
            this.btnSubmit.Font       = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location3 = new System.Drawing.Point(666, 333);
            this.btnSubmit.Location = location3;
            Padding margin3 = new Padding(2);

            this.btnSubmit.Margin = margin3;
            this.btnSubmit.Name   = "btnSubmit";
            System.Drawing.Size size3 = new System.Drawing.Size(100, 24);
            this.btnSubmit.Size     = size3;
            this.btnSubmit.TabIndex = 0;
            this.btnSubmit.Text     = "确定";
            this.btnSubmit.UseVisualStyleBackColor = true;
            this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
            this.btnQuit.Anchor   = AnchorStyles.Right;
            this.btnQuit.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location4 = new System.Drawing.Point(666, 452);
            this.btnQuit.Location = location4;
            Padding margin4 = new Padding(2);

            this.btnQuit.Margin = margin4;
            this.btnQuit.Name   = "btnQuit";
            System.Drawing.Size size4 = new System.Drawing.Size(100, 24);
            this.btnQuit.Size     = size4;
            this.btnQuit.TabIndex = 1;
            this.btnQuit.Text     = "取消";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click += new System.EventHandler(this.btnQuit_Click);
            this.numericUpDown_Template.Anchor        = AnchorStyles.Right;
            this.numericUpDown_Template.DecimalPlaces = 3;
            this.numericUpDown_Template.Font          = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location5 = new System.Drawing.Point(671, 506);
            this.numericUpDown_Template.Location = location5;
            Padding margin5 = new Padding(2);

            this.numericUpDown_Template.Margin = margin5;
            decimal maximum = new decimal(new int[]
            {
                10000000,
                0,
                0,
                0
            });

            this.numericUpDown_Template.Maximum = maximum;
            this.numericUpDown_Template.Name    = "numericUpDown_Template";
            System.Drawing.Size size5 = new System.Drawing.Size(90, 24);
            this.numericUpDown_Template.Size      = size5;
            this.numericUpDown_Template.TabIndex  = 17;
            this.numericUpDown_Template.TextAlign = HorizontalAlignment.Center;
            this.numericUpDown_Template.Visible   = false;
            this.numericUpDown_Template.KeyPress += new KeyPressEventHandler(this.numericUpDown_Template_KeyPress);
            this.btnPLXG.Anchor = AnchorStyles.Right;
            this.btnPLXG.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location6 = new System.Drawing.Point(666, 214);
            this.btnPLXG.Location = location6;
            Padding margin6 = new Padding(2);

            this.btnPLXG.Margin = margin6;
            this.btnPLXG.Name   = "btnPLXG";
            System.Drawing.Size size6 = new System.Drawing.Size(100, 24);
            this.btnPLXG.Size     = size6;
            this.btnPLXG.TabIndex = 2;
            this.btnPLXG.Text     = "批量修改";
            this.btnPLXG.UseVisualStyleBackColor = true;
            this.btnPLXG.Click   += new System.EventHandler(this.btnPLXG_Click);
            this.btnImport.Anchor = AnchorStyles.Right;
            this.btnImport.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location7 = new System.Drawing.Point(666, 95);
            this.btnImport.Location = location7;
            Padding margin7 = new Padding(2);

            this.btnImport.Margin = margin7;
            this.btnImport.Name   = "btnImport";
            System.Drawing.Size size7 = new System.Drawing.Size(100, 24);
            this.btnImport.Size     = size7;
            this.btnImport.TabIndex = 19;
            this.btnImport.Text     = "导入补偿表";
            this.btnImport.UseVisualStyleBackColor = true;
            this.btnImport.Click         += new System.EventHandler(this.btnImport_Click);
            this.openFileDialog1.FileName = "openFileDialog1";
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(794, 571);
            base.ClientSize = clientSize;
            base.Controls.Add(this.btnImport);
            base.Controls.Add(this.numericUpDown_Template);
            base.Controls.Add(this.btnQuit);
            base.Controls.Add(this.btnPLXG);
            base.Controls.Add(this.btnSubmit);
            base.Controls.Add(this.groupBox1);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            Padding margin8 = new Padding(2);

            base.Margin        = margin8;
            base.Name          = "ctFormResistanceCompensation";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "补偿电阻管理";
            base.Load         += new System.EventHandler(this.ctFormResistanceCompensation_Load);
            base.SizeChanged  += new System.EventHandler(this.ctFormResistanceCompensation_SizeChanged);
            this.groupBox1.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridView1).EndInit();
            ((ISupportInitialize)this.numericUpDown_Template).EndInit();
            base.ResumeLayout(false);
        }
Example #47
0
        /// <summary>
        /// 引发 <see cref="E:System.Windows.Forms.Control.Paint" /> 事件。
        /// </summary>
        /// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            var g = e.Graphics;

            g.SetGDIHigh();

            if (m_steps != null && m_steps.Length > 0)
            {
                System.Drawing.SizeF sizeFirst = g.MeasureString(m_steps[0], this.Font);
                int y = (this.Height - m_stepWidth - 10 - (int)sizeFirst.Height) / 2;
                if (y < 0)
                {
                    y = 0;
                }

                int intTxtY = y + m_stepWidth + 10;
                int intLeft = 0;
                if (sizeFirst.Width > m_stepWidth)
                {
                    intLeft = (int)(sizeFirst.Width - m_stepWidth) / 2 + 1;
                }

                int intRight = 0;
                System.Drawing.SizeF sizeEnd = g.MeasureString(m_steps[m_steps.Length - 1], this.Font);
                if (sizeEnd.Width > m_stepWidth)
                {
                    intRight = (int)(sizeEnd.Width - m_stepWidth) / 2 + 1;
                }

                int intSplitWidth = 20;
                if (m_steps.Length > 1)
                {
                    intSplitWidth = (this.Width - m_steps.Length - (m_steps.Length * m_stepWidth) - intRight - intLeft) / (m_steps.Length - 1);
                }

                m_lstCacheRect = new List <Rectangle>();
                for (int i = 0; i < m_steps.Length; i++)
                {
                    #region 画圆,横线
                    Rectangle rectEllipse = new Rectangle(new Point(intLeft + i * (m_stepWidth + intSplitWidth), y), new Size(m_stepWidth, m_stepWidth));
                    m_lstCacheRect.Add(rectEllipse);
                    g.FillEllipse(new SolidBrush(m_stepBackColor), rectEllipse);

                    if (m_stepIndex > i)
                    {
                        g.FillEllipse(new SolidBrush(m_stepForeColor), new Rectangle(new Point(intLeft + i * (m_stepWidth + intSplitWidth) + 2, y + 2), new Size(m_stepWidth - 4, m_stepWidth - 4)));
                    }
                    if (m_stepIndex > i && m_imgCompleted != null)
                    {
                        g.DrawImage(m_imgCompleted, new Rectangle(new Point((intLeft + i * (m_stepWidth + intSplitWidth) + (m_stepWidth - 24) / 2), y + (m_stepWidth - 24) / 2), new Size(24, 24)), 0, 0, m_imgCompleted.Width, m_imgCompleted.Height, GraphicsUnit.Pixel, null);
                    }
                    else
                    {
                        System.Drawing.SizeF _numSize = g.MeasureString((i + 1).ToString(), this.Font);
                        g.DrawString((i + 1).ToString(), Font, new SolidBrush(m_stepFontColor), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + (m_stepWidth - (int)_numSize.Width) / 2 + 1, y + (m_stepWidth - (int)_numSize.Height) / 2 + 1));
                    }
                    #endregion

                    System.Drawing.SizeF sizeTxt = g.MeasureString(m_steps[i], this.Font);
                    g.DrawString(m_steps[i], Font, new SolidBrush(m_stepIndex > i ? m_stepForeColor : m_stepBackColor), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + (m_stepWidth - (int)sizeTxt.Width) / 2 + 1, intTxtY));
                }

                for (int i = 0; i < m_steps.Length; i++)
                {
                    if (m_stepIndex > i)
                    {
                        if (i != m_steps.Length - 1)
                        {
                            if (m_stepIndex == i + 1)
                            {
                                g.DrawLine(new Pen(m_stepForeColor, m_lineWidth), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + m_stepWidth - 3, y + ((m_stepWidth) / 2)), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + m_stepWidth + intSplitWidth / 2, y + ((m_stepWidth) / 2)));
                                g.DrawLine(new Pen(m_stepBackColor, m_lineWidth), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + m_stepWidth + intSplitWidth / 2, y + ((m_stepWidth) / 2)), new Point(intLeft + (i + 1) * (m_stepWidth + intSplitWidth) + 10, y + ((m_stepWidth) / 2)));
                            }
                            else
                            {
                                g.DrawLine(new Pen(m_stepForeColor, m_lineWidth), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + m_stepWidth - 3, y + ((m_stepWidth) / 2)), new Point(intLeft + (i + 1) * (m_stepWidth + intSplitWidth) + 10, y + ((m_stepWidth) / 2)));
                            }
                        }
                    }
                    else
                    {
                        if (i != m_steps.Length - 1)
                        {
                            g.DrawLine(new Pen(m_stepBackColor, m_lineWidth), new Point(intLeft + i * (m_stepWidth + intSplitWidth) + m_stepWidth - 3, y + ((m_stepWidth) / 2)), new Point(intLeft + (i + 1) * (m_stepWidth + intSplitWidth) + 10, y + ((m_stepWidth) / 2)));
                        }
                    }
                }
            }
        }
Example #48
0
    /*public static void generateCaptcha(HttpContext context, int length, randomType type, int width, int height, System.Drawing.Color top_color, System.Drawing.Color bottom_color, System.Drawing.Color text_color)
     * {
     *  System.Drawing.Drawing2D.HatchBrush hatchBrush = null;
     *
     *  string embedded_string = commonFunctions.generateRandom(length, type);
     *
     *  commonVariables.SetSessionVariable("vCode", commonEncryption.encrypting(embedded_string));
     *
     *  char[] char_array = null;
     *
     *  char_array = new char[embedded_string.Length + embedded_string.Length];
     *
     *  for (int int_count = 0; int_count < embedded_string.Length; int_count++)
     *  {
     *      char_array[int_count + int_count] = embedded_string[int_count];
     *      char_array[int_count + int_count + 1] = " "[0];
     *  }
     *
     *  //Captcha String
     *  System.Drawing.FontFamily fontFamily = new System.Drawing.FontFamily("Comic Sans MS");
     *  // -  Generate Random
     *  //int randomsize = 5;
     *  Random random = new Random(DateTime.Now.Millisecond);
     *
     *  // Create a new 32-bit bitmap image.
     *  using (System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb))
     *  {
     *      // Create a graphics object for drawing.
     *      using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap))
     *      {
     *          g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
     *          System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, width, height);
     *
     *          // Fill in the background.
     *          using (hatchBrush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.DiagonalCross, top_color, bottom_color))
     *          {
     *              g.FillRectangle(hatchBrush, rect);
     *
     *              // Set up the text font.
     *              System.Drawing.SizeF size = default(System.Drawing.SizeF);
     *              float fontSize = rect.Height + 25;
     *              System.Drawing.Font font = null;
     *              System.Drawing.StringFormat format = new System.Drawing.StringFormat();
     *              format.Alignment = System.Drawing.StringAlignment.Center;
     *              format.LineAlignment = System.Drawing.StringAlignment.Center;
     *
     *              // Adjust the font size until the text fits within the image.
     *              do
     *              {
     *                  fontSize -= 5;
     *                  font = new System.Drawing.Font(fontFamily, fontSize, System.Drawing.FontStyle.Bold);
     *                  size = g.MeasureString(new string(char_array), font, new System.Drawing.SizeF(width, height), format);
     *              } while (size.Width > rect.Width);
     *
     *              // Create a path using the text and warp it randomly.
     *              System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
     *              path.AddString(new string(char_array), font.FontFamily, Convert.ToInt32(font.Style), font.Size, rect, format);
     *
     *              float v = 6f;
     *              System.Drawing.PointF[] points = {
     *                                                   new System.Drawing.PointF(random.Next(rect.Width) / v, random.Next(rect.Height) / v),
     *                                                   new System.Drawing.PointF(rect.Width - random.Next(rect.Width) / v, random.Next(rect.Height) / v),
     *                                                   new System.Drawing.PointF(random.Next(rect.Width) / v, rect.Height - random.Next(rect.Height) / v),
     *                                                   new System.Drawing.PointF(rect.Width - random.Next(rect.Width) / v, rect.Height - random.Next(rect.Height) / v)
     *                                               };
     *              System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix();
     *              matrix.Translate(0f, 0f);
     *              path.Warp(points, rect, matrix, System.Drawing.Drawing2D.WarpMode.Perspective, 0f);
     *
     *              // Draw the text.
     *              using (hatchBrush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.ForwardDiagonal, text_color, text_color))
     *              {
     *                  g.FillPath(hatchBrush, path);
     *              }
     *
     *              font.Dispose();
     *          }
     *      }
     *
     *      context.Response.ContentType = "image/png";
     *      bitmap.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png);
     *  }
     * }*/
    public static string generateCaptcha(HttpContext context, int length, randomType type, int width, int height, System.Drawing.Color top_color, System.Drawing.Color bottom_color, System.Drawing.Color text_color)
    {
        System.Drawing.Drawing2D.HatchBrush hatchBrush = null;

        string strCode = commonFunctions.generateRandom(length, type);

        commonVariables.SetSessionVariable("vCode", commonEncryption.encrypting(strCode));
        //context.Session["vCode"] = commonEncryption.encrypting(strCode);

        char[] char_array = null;

        char_array = new char[strCode.Length + strCode.Length];

        for (int int_count = 0; int_count < strCode.Length; int_count++)
        {
            char_array[int_count + int_count]     = strCode[int_count];
            char_array[int_count + int_count + 1] = " "[0];
        }

        //Captcha String
        System.Drawing.FontFamily fontFamily = new System.Drawing.FontFamily("Comic Sans MS");
        // -  Generate Random
        //int randomsize = 5;
        Random random = new Random(DateTime.Now.Millisecond);

        // Create a new 32-bit bitmap image.
        using (System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb))
        {
            // Create a graphics object for drawing.
            using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap))
            {
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
                System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, width, height);

                // Fill in the background.
                using (hatchBrush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.DiagonalCross, top_color, bottom_color))
                {
                    g.FillRectangle(hatchBrush, rect);

                    // Set up the text font.
                    System.Drawing.SizeF size          = default(System.Drawing.SizeF);
                    float fontSize                     = rect.Height + 25;
                    System.Drawing.Font         font   = null;
                    System.Drawing.StringFormat format = new System.Drawing.StringFormat();
                    format.Alignment     = System.Drawing.StringAlignment.Center;
                    format.LineAlignment = System.Drawing.StringAlignment.Center;

                    // Adjust the font size until the text fits within the image.
                    do
                    {
                        fontSize -= 5;
                        font      = new System.Drawing.Font(fontFamily, fontSize, System.Drawing.FontStyle.Bold);
                        size      = g.MeasureString(new string(char_array), font, new System.Drawing.SizeF(width, height), format);
                    } while (size.Width > rect.Width);

                    // Create a path using the text and warp it randomly.
                    System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
                    path.AddString(new string(char_array), font.FontFamily, Convert.ToInt32(font.Style), font.Size, rect, format);

                    float v = 6f;
                    System.Drawing.PointF[] points =
                    {
                        new System.Drawing.PointF(random.Next(rect.Width) / v,              random.Next(rect.Height) / v),
                        new System.Drawing.PointF(rect.Width - random.Next(rect.Width) / v, random.Next(rect.Height) / v),
                        new System.Drawing.PointF(random.Next(rect.Width) / v,              rect.Height - random.Next(rect.Height) / v),
                        new System.Drawing.PointF(rect.Width - random.Next(rect.Width) / v, rect.Height - random.Next(rect.Height) / v)
                    };
                    System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix();
                    matrix.Translate(0f, 0f);
                    path.Warp(points, rect, matrix, System.Drawing.Drawing2D.WarpMode.Perspective, 0f);

                    // Draw the text.
                    using (hatchBrush = new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.ForwardDiagonal, text_color, text_color))
                    {
                        g.FillPath(hatchBrush, path);
                    }

                    font.Dispose();
                }
            }

            context.Response.ContentType = "image/png";
            bitmap.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png);
            return(strCode);
        }
    }
        private void ShowImageMask(PaintEventArgs e = null)
        {
            try
            {
                if (this.CurObjPosLst.Count > 0 && e != null && this.pictureBox1 != null && this.pictureBox1.BackgroundImage != null)
                {
                    //1. get the padding between the image and the picturebox border

                    //get dimensions of the image and the picturebox
                    double imgWidth  = this.pictureBox1.BackgroundImage.Width;
                    double imgHeight = this.pictureBox1.BackgroundImage.Height;
                    double boxWidth  = this.pictureBox1.Width;
                    double boxHeight = this.pictureBox1.Height;

                    //these variables store the padding between image border and picturebox border
                    double absX = 0;
                    double absY = 0;

                    //because the sizemode of the picturebox is set to 'zoom', the image is scaled down
                    double scale = 1;

                    //Comparing the aspect ratio of both the control and the image itself.
                    if (imgWidth / imgHeight > boxWidth / boxHeight) //if the image is p.e. 16:9 and the picturebox is 4:3
                    {
                        scale = boxWidth / imgWidth;                 //get scale factor
                        absY  = (boxHeight - scale * imgHeight) / 2; //padding on top and below the image
                    }
                    else //if the image is p.e. 4:3 and the picturebox is widescreen 16:9
                    {
                        scale = boxHeight / imgHeight;             //get scale factor
                        absX  = (boxWidth - scale * imgWidth) / 2; //padding left and right of the image
                    }

                    bool showkey = this.CurObjPosLst.Count > 1;

                    foreach (ObjectPosition op in this.CurObjPosLst)
                    {
                        if (op != null)
                        {
                            //Log("Painting object");
                            //2. inputted position values are for the original image size. As the image is probably smaller in the picturebox, the positions must be adapted.

                            double xmin = (scale * op.Xmin + this.cam.XOffset) + absX;
                            double xmax = (scale * op.Xmax) + absX;
                            double ymin = (scale * op.Ymin + this.cam.YOffset) + absY;
                            double ymax = (scale * op.Ymax) + absY;

                            Color color;
                            if (op.IsStatic)
                            {
                                color = System.Drawing.Color.FromArgb(AppSettings.Settings.RectRelevantColorAlpha, AppSettings.Settings.RectRelevantColor);
                            }
                            else
                            {
                                color = System.Drawing.Color.FromArgb(AppSettings.Settings.RectIrrelevantColorAlpha, AppSettings.Settings.RectIrrelevantColor);
                            }

                            //3. paint rectangle
                            System.Drawing.Rectangle rect = new System.Drawing.Rectangle(xmin.ToInt(), ymin.ToInt(), (xmax - xmin).ToInt(), (ymax - ymin).ToInt());
                            using (Pen pen = new Pen(color, AppSettings.Settings.RectBorderWidth))
                            {
                                e.Graphics.DrawRectangle(pen, rect); //draw rectangle
                            }

                            //object name text below rectangle
                            rect = new System.Drawing.Rectangle((xmin - 1).ToInt(), ymax.ToInt(), boxWidth.ToInt(), boxHeight.ToInt()); //sets bounding box for drawn text

                            Brush brush = new SolidBrush(color);                                                                        //sets background rectangle color
                            //if (AppSettings.Settings.RectDetectionTextBackColor != System.Drawing.Color.Gainsboro)
                            //    brush = new SolidBrush(AppSettings.Settings.RectDetectionTextBackColor);

                            Brush forecolor = Brushes.Black;
                            //if (AppSettings.Settings.RectDetectionTextForeColor != System.Drawing.Color.Gainsboro)
                            //    forecolor = new SolidBrush(AppSettings.Settings.RectDetectionTextForeColor);

                            string display = $"{op.Label}";

                            if (showkey)
                            {
                                display += $" ({op.Key})";
                            }

                            System.Drawing.SizeF size = e.Graphics.MeasureString(display, new Font(AppSettings.Settings.RectDetectionTextFont, AppSettings.Settings.RectDetectionTextSize)); //finds size of text to draw the background rectangle
                            e.Graphics.FillRectangle(brush, (xmin - 1).ToInt(), ymax.ToInt(), size.Width, size.Height);                                                                      //draw grey background rectangle for detection text
                            e.Graphics.DrawString(display, new Font(AppSettings.Settings.RectDetectionTextFont, AppSettings.Settings.RectDetectionTextSize), forecolor, rect);               //draw detection text
                        }
                        else
                        {
                            //Log("op is empty");
                        }
                    }
                }
                else
                {
                    //this.pictureBox1 = null;
                    //this.pictureBox1.BackgroundImage = null;
                }
            }
            catch (Exception ex)
            {
                Log("Error: " + ex.Msg());
            }
        }
Example #50
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            var g = e.Graphics;

            g.SetGDIHigh();

            int intLineSplit = m_drawRect.Height / 4;

            for (int i = 0; i <= 4; i++)
            {
                var pen = new Pen(new SolidBrush(m_gridLineColor), 1);
                // pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
                g.DrawLine(pen, m_drawRect.Left, m_drawRect.Bottom - 1 - i * intLineSplit, m_drawRect.Right, m_drawRect.Bottom - 1 - i * intLineSplit);
            }

            if (m_currentSource == null || m_currentSource.Count <= 0)
            {
                for (int i = 0; i <= 4; i++)
                {
                    string strText = (100 / 4 * i).ToString();
                    System.Drawing.SizeF _numSize = g.MeasureString(strText, this.Font);
                    g.DrawString(strText, Font, new SolidBrush(m_gridLineTextColor), m_drawRect.Left - _numSize.Width - 1, m_drawRect.Bottom - 1 - i * intLineSplit - (_numSize.Height / 2));
                }
                return;
            }
            List <Point> lst1       = new List <Point>();
            double       dblValue   = m_currentSource.Max(p => p.Value);
            int          intValue   = (int)dblValue;
            int          intDivisor = ("1".PadRight(intValue.ToString().Length - 1, '0')).ToInt();

            if (intDivisor < 100)
            {
                intDivisor = 100;
            }
            int intTop = intValue;

            if (intValue % intDivisor != 0)
            {
                intTop = (intValue / intDivisor + 1) * intDivisor;
            }
            if (intTop == 0)
            {
                intTop = 100;
            }

            for (int i = 0; i <= 4; i++)
            {
                string strText = (intTop / 4 * i).ToString();
                System.Drawing.SizeF _numSize = g.MeasureString(strText, this.Font);
                g.DrawString(strText, Font, new SolidBrush(m_gridLineTextColor), m_drawRect.Left - _numSize.Width - 1, m_drawRect.Bottom - 1 - i * intLineSplit - (_numSize.Height / 2));
            }

            int intEndX = 0;
            int intEndY = 0;

            for (int i = 0; i < m_currentSource.Count; i++)
            {
                intEndX = i * m_waveActualWidth + m_drawRect.X;
                intEndY = m_drawRect.Bottom - 1 - (int)(m_currentSource[i].Value / intTop * m_drawRect.Height);
                lst1.Add(new Point(intEndX, intEndY));
                if (!string.IsNullOrEmpty(m_currentSource[i].Key))
                {
                    System.Drawing.SizeF _numSize = g.MeasureString(m_currentSource[i].Key, this.Font);
                    int txtX = intEndX - (int)(_numSize.Width / 2) + 1;
                    g.DrawString(m_currentSource[i].Key, Font, new SolidBrush(m_gridLineTextColor), new PointF(txtX, m_drawRect.Bottom + 5));
                }
            }

            int intFirstY = m_drawRect.Bottom - 1 - (int)(m_currentSource[0].Value / intTop * m_drawRect.Height);


            GraphicsPath path1 = new GraphicsPath();

            path1.AddCurve(lst1.ToArray(), m_lineTension);
            g.DrawPath(new Pen(new SolidBrush(m_lineColor), 1), path1);
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(ctFormConverterInfoView));

            this.btnQuit               = new Button();
            this.btnExport             = new Button();
            this.groupBox2             = new GroupBox();
            this.dataGridView1         = new DataGridView();
            this.folderBrowserDialog1  = new FolderBrowserDialog();
            this.Column_xh             = new DataGridViewTextBoxColumn();
            this.Column_startInterface = new DataGridViewTextBoxColumn();
            this.Column_stopPin        = new DataGridViewTextBoxColumn();
            this.Column_stopInterface  = new DataGridViewTextBoxColumn();
            this.Column_startPin       = new DataGridViewTextBoxColumn();
            this.groupBox2.SuspendLayout();
            ((ISupportInitialize)this.dataGridView1).BeginInit();
            base.SuspendLayout();
            this.btnQuit.Anchor = AnchorStyles.Bottom;
            this.btnQuit.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(452, 517);
            this.btnQuit.Location = location;
            Padding margin = new Padding(2);

            this.btnQuit.Margin = margin;
            this.btnQuit.Name   = "btnQuit";
            System.Drawing.Size size = new System.Drawing.Size(100, 24);
            this.btnQuit.Size     = size;
            this.btnQuit.TabIndex = 0;
            this.btnQuit.Text     = "关闭";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click   += new System.EventHandler(this.btnQuit_Click);
            this.btnExport.Anchor = AnchorStyles.Bottom;
            this.btnExport.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location2 = new System.Drawing.Point(243, 517);
            this.btnExport.Location = location2;
            Padding margin2 = new Padding(2);

            this.btnExport.Margin = margin2;
            this.btnExport.Name   = "btnExport";
            System.Drawing.Size size2 = new System.Drawing.Size(100, 24);
            this.btnExport.Size     = size2;
            this.btnExport.TabIndex = 1;
            this.btnExport.Text     = "导出";
            this.btnExport.UseVisualStyleBackColor = true;
            this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
            this.groupBox2.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
            this.groupBox2.Controls.Add(this.dataGridView1);
            this.groupBox2.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location3 = new System.Drawing.Point(11, 16);
            this.groupBox2.Location = location3;
            Padding margin3 = new Padding(2);

            this.groupBox2.Margin = margin3;
            this.groupBox2.Name   = "groupBox2";
            Padding padding = new Padding(2);

            this.groupBox2.Padding = padding;
            System.Drawing.Size size3 = new System.Drawing.Size(772, 480);
            this.groupBox2.Size     = size3;
            this.groupBox2.TabIndex = 4;
            this.groupBox2.TabStop  = false;
            this.groupBox2.Text     = "转接工装清单";
            this.dataGridView1.AllowUserToAddRows       = false;
            this.dataGridView1.AllowUserToDeleteRows    = false;
            this.dataGridView1.AllowUserToResizeColumns = false;
            this.dataGridView1.AllowUserToResizeRows    = false;
            System.Drawing.Color window = System.Drawing.SystemColors.Window;
            this.dataGridView1.BackgroundColor             = window;
            this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumn[] dataGridViewColumns = new DataGridViewColumn[]
            {
                this.Column_xh,
                this.Column_startInterface,
                this.Column_stopPin,
                this.Column_stopInterface,
                this.Column_startPin
            };
            this.dataGridView1.Columns.AddRange(dataGridViewColumns);
            this.dataGridView1.Dock = DockStyle.Fill;
            System.Drawing.Point location4 = new System.Drawing.Point(2, 19);
            this.dataGridView1.Location = location4;
            Padding margin4 = new Padding(2);

            this.dataGridView1.Margin             = margin4;
            this.dataGridView1.MultiSelect        = false;
            this.dataGridView1.Name               = "dataGridView1";
            this.dataGridView1.ReadOnly           = true;
            this.dataGridView1.RowHeadersVisible  = false;
            this.dataGridView1.RowTemplate.Height = 27;
            this.dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            System.Drawing.Size size4 = new System.Drawing.Size(768, 459);
            this.dataGridView1.Size               = size4;
            this.dataGridView1.TabIndex           = 1;
            this.Column_xh.HeaderText             = "序号";
            this.Column_xh.Name                   = "Column_xh";
            this.Column_xh.ReadOnly               = true;
            this.Column_xh.Width                  = 74;
            this.Column_startInterface.HeaderText = "转接工装代号";
            this.Column_startInterface.Name       = "Column_startInterface";
            this.Column_startInterface.ReadOnly   = true;
            this.Column_startInterface.Width      = 135;
            this.Column_stopPin.HeaderText        = "转接型号";
            this.Column_stopPin.Name              = "Column_stopPin";
            this.Column_stopPin.ReadOnly          = true;
            this.Column_stopPin.Width             = 150;
            this.Column_stopInterface.HeaderText  = "线束接口";
            this.Column_stopInterface.Name        = "Column_stopInterface";
            this.Column_stopInterface.ReadOnly    = true;
            this.Column_stopInterface.Width       = 110;
            this.Column_startPin.HeaderText       = "测试仪针脚范围";
            this.Column_startPin.Name             = "Column_startPin";
            this.Column_startPin.ReadOnly         = true;
            this.Column_startPin.Width            = 140;
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(794, 571);
            base.ClientSize = clientSize;
            base.Controls.Add(this.groupBox2);
            base.Controls.Add(this.btnExport);
            base.Controls.Add(this.btnQuit);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            Padding margin5 = new Padding(2);

            base.Margin        = margin5;
            base.Name          = "ctFormConverterInfoView";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "查看工装";
            base.Load         += new System.EventHandler(this.ctFormConverterInfoView_Load);
            base.SizeChanged  += new System.EventHandler(this.ctFormConverterInfoView_SizeChanged);
            this.groupBox2.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridView1).EndInit();
            base.ResumeLayout(false);
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(ctFormPinPinContrast));

            this.btnShowAll                 = new Button();
            this.btnQuit                    = new Button();
            this.btnShowUnSame              = new Button();
            this.btnShowSame                = new Button();
            this.groupBox1                  = new GroupBox();
            this.dataGridView1              = new DataGridView();
            this.Column_xh                  = new DataGridViewTextBoxColumn();
            this.Column_startInterface      = new DataGridViewTextBoxColumn();
            this.Column_startPin            = new DataGridViewTextBoxColumn();
            this.Column_stopInterface       = new DataGridViewTextBoxColumn();
            this.Column_stopPin             = new DataGridViewTextBoxColumn();
            this.groupBox2                  = new GroupBox();
            this.dataGridView2              = new DataGridView();
            this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn3 = new DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn4 = new DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn5 = new DataGridViewTextBoxColumn();
            this.btnExportPinRelation       = new Button();
            this.folderBrowserDialog1       = new FolderBrowserDialog();
            this.flowLayoutPanel1           = new FlowLayoutPanel();
            this.tableLayoutPanel1          = new TableLayoutPanel();
            this.groupBox1.SuspendLayout();
            ((ISupportInitialize)this.dataGridView1).BeginInit();
            this.groupBox2.SuspendLayout();
            ((ISupportInitialize)this.dataGridView2).BeginInit();
            this.flowLayoutPanel1.SuspendLayout();
            this.tableLayoutPanel1.SuspendLayout();
            base.SuspendLayout();
            this.btnShowAll.Anchor = AnchorStyles.Top;
            this.btnShowAll.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(289, 2);
            this.btnShowAll.Location = location;
            Padding margin = new Padding(15, 2, 2, 2);

            this.btnShowAll.Margin = margin;
            this.btnShowAll.Name   = "btnShowAll";
            System.Drawing.Size size = new System.Drawing.Size(120, 24);
            this.btnShowAll.Size     = size;
            this.btnShowAll.TabIndex = 3;
            this.btnShowAll.Text     = "显示所有";
            this.btnShowAll.UseVisualStyleBackColor = true;
            this.btnShowAll.Click += new System.EventHandler(this.btnShowAll_Click);
            this.btnQuit.Anchor    = AnchorStyles.Top;
            this.btnQuit.Font      = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location2 = new System.Drawing.Point(563, 2);
            this.btnQuit.Location = location2;
            Padding margin2 = new Padding(15, 2, 2, 2);

            this.btnQuit.Margin = margin2;
            this.btnQuit.Name   = "btnQuit";
            System.Drawing.Size size2 = new System.Drawing.Size(120, 24);
            this.btnQuit.Size     = size2;
            this.btnQuit.TabIndex = 0;
            this.btnQuit.Text     = "关闭";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click       += new System.EventHandler(this.btnQuit_Click);
            this.btnShowUnSame.Anchor = AnchorStyles.Top;
            this.btnShowUnSame.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location3 = new System.Drawing.Point(15, 2);
            this.btnShowUnSame.Location = location3;
            Padding margin3 = new Padding(15, 2, 2, 2);

            this.btnShowUnSame.Margin = margin3;
            this.btnShowUnSame.Name   = "btnShowUnSame";
            System.Drawing.Size size3 = new System.Drawing.Size(120, 24);
            this.btnShowUnSame.Size     = size3;
            this.btnShowUnSame.TabIndex = 1;
            this.btnShowUnSame.Text     = "仅显示差异项";
            this.btnShowUnSame.UseVisualStyleBackColor = true;
            this.btnShowUnSame.Click += new System.EventHandler(this.btnShowUnSame_Click);
            this.btnShowSame.Anchor   = AnchorStyles.Top;
            this.btnShowSame.Font     = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location4 = new System.Drawing.Point(152, 2);
            this.btnShowSame.Location = location4;
            Padding margin4 = new Padding(15, 2, 2, 2);

            this.btnShowSame.Margin = margin4;
            this.btnShowSame.Name   = "btnShowSame";
            System.Drawing.Size size4 = new System.Drawing.Size(120, 24);
            this.btnShowSame.Size     = size4;
            this.btnShowSame.TabIndex = 2;
            this.btnShowSame.Text     = "仅显示相同项";
            this.btnShowSame.UseVisualStyleBackColor = true;
            this.btnShowSame.Click += new System.EventHandler(this.btnShowSame_Click);
            this.groupBox1.Controls.Add(this.dataGridView1);
            this.groupBox1.Dock = DockStyle.Fill;
            this.groupBox1.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location5 = new System.Drawing.Point(2, 2);
            this.groupBox1.Location = location5;
            Padding margin5 = new Padding(2);

            this.groupBox1.Margin = margin5;
            this.groupBox1.Name   = "groupBox1";
            Padding padding = new Padding(2);

            this.groupBox1.Padding = padding;
            System.Drawing.Size size5 = new System.Drawing.Size(385, 472);
            this.groupBox1.Size     = size5;
            this.groupBox1.TabIndex = 1;
            this.groupBox1.TabStop  = false;
            this.groupBox1.Text     = "已定义连接关系";
            this.dataGridView1.AllowUserToAddRows       = false;
            this.dataGridView1.AllowUserToDeleteRows    = false;
            this.dataGridView1.AllowUserToResizeColumns = false;
            this.dataGridView1.AllowUserToResizeRows    = false;
            System.Drawing.Color window = System.Drawing.SystemColors.Window;
            this.dataGridView1.BackgroundColor             = window;
            this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumn[] dataGridViewColumns = new DataGridViewColumn[]
            {
                this.Column_xh,
                this.Column_startInterface,
                this.Column_startPin,
                this.Column_stopInterface,
                this.Column_stopPin
            };
            this.dataGridView1.Columns.AddRange(dataGridViewColumns);
            this.dataGridView1.Dock = DockStyle.Fill;
            System.Drawing.Point location6 = new System.Drawing.Point(2, 19);
            this.dataGridView1.Location = location6;
            Padding margin6 = new Padding(2);

            this.dataGridView1.Margin             = margin6;
            this.dataGridView1.MultiSelect        = false;
            this.dataGridView1.Name               = "dataGridView1";
            this.dataGridView1.ReadOnly           = true;
            this.dataGridView1.RowHeadersVisible  = false;
            this.dataGridView1.RowTemplate.Height = 27;
            this.dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            System.Drawing.Size size6 = new System.Drawing.Size(381, 451);
            this.dataGridView1.Size               = size6;
            this.dataGridView1.TabIndex           = 15;
            this.dataGridView1.SizeChanged       += new System.EventHandler(this.dataGridView1_SizeChanged);
            this.Column_xh.HeaderText             = "序号";
            this.Column_xh.Name                   = "Column_xh";
            this.Column_xh.ReadOnly               = true;
            this.Column_xh.Width                  = 70;
            this.Column_startInterface.HeaderText = "起点接口";
            this.Column_startInterface.Name       = "Column_startInterface";
            this.Column_startInterface.ReadOnly   = true;
            this.Column_startInterface.Width      = 90;
            this.Column_startPin.HeaderText       = "起点接点";
            this.Column_startPin.Name             = "Column_startPin";
            this.Column_startPin.ReadOnly         = true;
            this.Column_startPin.Width            = 90;
            this.Column_stopInterface.HeaderText  = "终点接口";
            this.Column_stopInterface.Name        = "Column_stopInterface";
            this.Column_stopInterface.ReadOnly    = true;
            this.Column_stopInterface.Width       = 90;
            this.Column_stopPin.HeaderText        = "终点接点";
            this.Column_stopPin.Name              = "Column_stopPin";
            this.Column_stopPin.ReadOnly          = true;
            this.Column_stopPin.Width             = 90;
            this.groupBox2.Controls.Add(this.dataGridView2);
            this.groupBox2.Dock = DockStyle.Fill;
            this.groupBox2.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location7 = new System.Drawing.Point(391, 2);
            this.groupBox2.Location = location7;
            Padding margin7 = new Padding(2);

            this.groupBox2.Margin = margin7;
            this.groupBox2.Name   = "groupBox2";
            Padding padding2 = new Padding(2);

            this.groupBox2.Padding = padding2;
            System.Drawing.Size size7 = new System.Drawing.Size(386, 472);
            this.groupBox2.Size     = size7;
            this.groupBox2.TabIndex = 1;
            this.groupBox2.TabStop  = false;
            this.groupBox2.Text     = "自学习芯线关系";
            this.dataGridView2.AllowUserToAddRows       = false;
            this.dataGridView2.AllowUserToDeleteRows    = false;
            this.dataGridView2.AllowUserToResizeColumns = false;
            this.dataGridView2.AllowUserToResizeRows    = false;
            System.Drawing.Color window2 = System.Drawing.SystemColors.Window;
            this.dataGridView2.BackgroundColor             = window2;
            this.dataGridView2.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumn[] dataGridViewColumns2 = new DataGridViewColumn[]
            {
                this.dataGridViewTextBoxColumn1,
                this.dataGridViewTextBoxColumn2,
                this.dataGridViewTextBoxColumn3,
                this.dataGridViewTextBoxColumn4,
                this.dataGridViewTextBoxColumn5
            };
            this.dataGridView2.Columns.AddRange(dataGridViewColumns2);
            this.dataGridView2.Dock = DockStyle.Fill;
            System.Drawing.Point location8 = new System.Drawing.Point(2, 19);
            this.dataGridView2.Location = location8;
            Padding margin8 = new Padding(2);

            this.dataGridView2.Margin             = margin8;
            this.dataGridView2.MultiSelect        = false;
            this.dataGridView2.Name               = "dataGridView2";
            this.dataGridView2.ReadOnly           = true;
            this.dataGridView2.RowHeadersVisible  = false;
            this.dataGridView2.RowTemplate.Height = 27;
            this.dataGridView2.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            System.Drawing.Size size8 = new System.Drawing.Size(382, 451);
            this.dataGridView2.Size                    = size8;
            this.dataGridView2.TabIndex                = 16;
            this.dataGridView2.SizeChanged            += new System.EventHandler(this.dataGridView2_SizeChanged);
            this.dataGridViewTextBoxColumn1.HeaderText = "序号";
            this.dataGridViewTextBoxColumn1.Name       = "dataGridViewTextBoxColumn1";
            this.dataGridViewTextBoxColumn1.ReadOnly   = true;
            this.dataGridViewTextBoxColumn1.Width      = 70;
            this.dataGridViewTextBoxColumn2.HeaderText = "起点接口";
            this.dataGridViewTextBoxColumn2.Name       = "dataGridViewTextBoxColumn2";
            this.dataGridViewTextBoxColumn2.ReadOnly   = true;
            this.dataGridViewTextBoxColumn2.Width      = 90;
            this.dataGridViewTextBoxColumn3.HeaderText = "起点接点";
            this.dataGridViewTextBoxColumn3.Name       = "dataGridViewTextBoxColumn3";
            this.dataGridViewTextBoxColumn3.ReadOnly   = true;
            this.dataGridViewTextBoxColumn3.Width      = 90;
            this.dataGridViewTextBoxColumn4.HeaderText = "终点接口";
            this.dataGridViewTextBoxColumn4.Name       = "dataGridViewTextBoxColumn4";
            this.dataGridViewTextBoxColumn4.ReadOnly   = true;
            this.dataGridViewTextBoxColumn4.Width      = 90;
            this.dataGridViewTextBoxColumn5.HeaderText = "终点接点";
            this.dataGridViewTextBoxColumn5.Name       = "dataGridViewTextBoxColumn5";
            this.dataGridViewTextBoxColumn5.ReadOnly   = true;
            this.dataGridViewTextBoxColumn5.Width      = 90;
            this.btnExportPinRelation.Anchor           = AnchorStyles.Top;
            this.btnExportPinRelation.Font             = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location9 = new System.Drawing.Point(426, 2);
            this.btnExportPinRelation.Location = location9;
            Padding margin9 = new Padding(15, 2, 2, 2);

            this.btnExportPinRelation.Margin = margin9;
            this.btnExportPinRelation.Name   = "btnExportPinRelation";
            System.Drawing.Size size9 = new System.Drawing.Size(120, 24);
            this.btnExportPinRelation.Size     = size9;
            this.btnExportPinRelation.TabIndex = 4;
            this.btnExportPinRelation.Text     = "导出学习关系";
            this.btnExportPinRelation.UseVisualStyleBackColor = true;
            this.btnExportPinRelation.Click += new System.EventHandler(this.btnExportPinRelation_Click);
            this.flowLayoutPanel1.Anchor     = AnchorStyles.Bottom;
            this.flowLayoutPanel1.Controls.Add(this.btnShowUnSame);
            this.flowLayoutPanel1.Controls.Add(this.btnShowSame);
            this.flowLayoutPanel1.Controls.Add(this.btnShowAll);
            this.flowLayoutPanel1.Controls.Add(this.btnExportPinRelation);
            this.flowLayoutPanel1.Controls.Add(this.btnQuit);
            System.Drawing.Point location10 = new System.Drawing.Point(41, 514);
            this.flowLayoutPanel1.Location = location10;
            Padding margin10 = new Padding(2);

            this.flowLayoutPanel1.Margin = margin10;
            this.flowLayoutPanel1.Name   = "flowLayoutPanel1";
            System.Drawing.Size size10 = new System.Drawing.Size(712, 30);
            this.flowLayoutPanel1.Size         = size10;
            this.flowLayoutPanel1.TabIndex     = 5;
            this.tableLayoutPanel1.Anchor      = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50f));
            this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
            System.Drawing.Point location11 = new System.Drawing.Point(8, 16);
            this.tableLayoutPanel1.Location = location11;
            Padding margin11 = new Padding(2);

            this.tableLayoutPanel1.Margin   = margin11;
            this.tableLayoutPanel1.Name     = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 1;
            this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 90f));
            System.Drawing.Size size11 = new System.Drawing.Size(779, 476);
            this.tableLayoutPanel1.Size     = size11;
            this.tableLayoutPanel1.TabIndex = 6;
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(794, 571);
            base.ClientSize = clientSize;
            base.Controls.Add(this.tableLayoutPanel1);
            base.Controls.Add(this.flowLayoutPanel1);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            Padding margin12 = new Padding(2);

            base.Margin        = margin12;
            base.Name          = "ctFormPinPinContrast";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "连接关系对比";
            base.Load         += new System.EventHandler(this.ctFormPinPinContrast_Load);
            base.SizeChanged  += new System.EventHandler(this.ctFormPinPinContrast_SizeChanged);
            this.groupBox1.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridView1).EndInit();
            this.groupBox2.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridView2).EndInit();
            this.flowLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.ResumeLayout(false);
            base.ResumeLayout(false);
        }
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(FormOperRecordManage));

            this.groupBox1            = new GroupBox();
            this.dateTimePicker_stop  = new DateTimePicker();
            this.dateTimePicker_start = new DateTimePicker();
            this.textBox_user         = new TextBox();
            this.label3               = new Label();
            this.label2               = new Label();
            this.label1               = new Label();
            this.groupBox_result      = new GroupBox();
            this.dataGridView1        = new DataGridView();
            this.Column1              = new DataGridViewTextBoxColumn();
            this.Column2              = new DataGridViewTextBoxColumn();
            this.Column3              = new DataGridViewTextBoxColumn();
            this.Column4              = new DataGridViewTextBoxColumn();
            this.btnDetailView        = new Button();
            this.btnQuit              = new Button();
            this.btnQuery             = new Button();
            this.btnFuzzyQuery        = new Button();
            this.btnDel               = new Button();
            this.btnExport            = new Button();
            this.folderBrowserDialog1 = new FolderBrowserDialog();
            this.printDocument1       = new System.Drawing.Printing.PrintDocument();
            this.groupBox1.SuspendLayout();
            this.groupBox_result.SuspendLayout();
            ((ISupportInitialize)this.dataGridView1).BeginInit();
            base.SuspendLayout();
            this.groupBox1.Anchor = AnchorStyles.Top;
            this.groupBox1.Controls.Add(this.dateTimePicker_stop);
            this.groupBox1.Controls.Add(this.dateTimePicker_start);
            this.groupBox1.Controls.Add(this.textBox_user);
            this.groupBox1.Controls.Add(this.label3);
            this.groupBox1.Controls.Add(this.label2);
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location = new System.Drawing.Point(14, 17);
            this.groupBox1.Location = location;
            Padding margin = new Padding(2, 2, 2, 2);

            this.groupBox1.Margin = margin;
            this.groupBox1.Name   = "groupBox1";
            Padding padding = new Padding(2, 2, 2, 2);

            this.groupBox1.Padding = padding;
            System.Drawing.Size size = new System.Drawing.Size(768, 70);
            this.groupBox1.Size             = size;
            this.groupBox1.TabIndex         = 0;
            this.groupBox1.TabStop          = false;
            this.groupBox1.Text             = "查询条件";
            this.dateTimePicker_stop.Anchor = AnchorStyles.Top;
            System.Drawing.Point location2 = new System.Drawing.Point(554, 29);
            this.dateTimePicker_stop.Location = location2;
            Padding margin2 = new Padding(2, 2, 2, 2);

            this.dateTimePicker_stop.Margin = margin2;
            this.dateTimePicker_stop.Name   = "dateTimePicker_stop";
            System.Drawing.Size size2 = new System.Drawing.Size(151, 24);
            this.dateTimePicker_stop.Size          = size2;
            this.dateTimePicker_stop.TabIndex      = 3;
            this.dateTimePicker_start.Anchor       = AnchorStyles.Top;
            this.dateTimePicker_start.CustomFormat = "";
            System.Drawing.Point location3 = new System.Drawing.Point(370, 29);
            this.dateTimePicker_start.Location = location3;
            Padding margin3 = new Padding(2, 2, 2, 2);

            this.dateTimePicker_start.Margin = margin3;
            this.dateTimePicker_start.Name   = "dateTimePicker_start";
            System.Drawing.Size size3 = new System.Drawing.Size(151, 24);
            this.dateTimePicker_start.Size     = size3;
            this.dateTimePicker_start.TabIndex = 2;
            this.textBox_user.Anchor           = AnchorStyles.Top;
            System.Drawing.Point location4 = new System.Drawing.Point(128, 29);
            this.textBox_user.Location = location4;
            Padding margin4 = new Padding(2, 2, 2, 2);

            this.textBox_user.Margin    = margin4;
            this.textBox_user.MaxLength = 32;
            this.textBox_user.Name      = "textBox_user";
            System.Drawing.Size size4 = new System.Drawing.Size(151, 24);
            this.textBox_user.Size     = size4;
            this.textBox_user.TabIndex = 1;
            this.label3.Anchor         = AnchorStyles.Top;
            this.label3.AutoSize       = true;
            System.Drawing.Point location5 = new System.Drawing.Point(526, 33);
            this.label3.Location = location5;
            Padding margin5 = new Padding(2, 0, 2, 0);

            this.label3.Margin = margin5;
            this.label3.Name   = "label3";
            System.Drawing.Size size5 = new System.Drawing.Size(22, 15);
            this.label3.Size     = size5;
            this.label3.TabIndex = 0;
            this.label3.Text     = "至";
            this.label2.Anchor   = AnchorStyles.Top;
            this.label2.AutoSize = true;
            System.Drawing.Point location6 = new System.Drawing.Point(321, 33);
            this.label2.Location = location6;
            Padding margin6 = new Padding(2, 0, 2, 0);

            this.label2.Margin = margin6;
            this.label2.Name   = "label2";
            System.Drawing.Size size6 = new System.Drawing.Size(45, 15);
            this.label2.Size     = size6;
            this.label2.TabIndex = 0;
            this.label2.Text     = "日期:";
            this.label1.Anchor   = AnchorStyles.Top;
            this.label1.AutoSize = true;
            System.Drawing.Point location7 = new System.Drawing.Point(65, 33);
            this.label1.Location = location7;
            Padding margin7 = new Padding(2, 0, 2, 0);

            this.label1.Margin = margin7;
            this.label1.Name   = "label1";
            System.Drawing.Size size7 = new System.Drawing.Size(60, 15);
            this.label1.Size            = size7;
            this.label1.TabIndex        = 0;
            this.label1.Text            = "操作者:";
            this.groupBox_result.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
            this.groupBox_result.Controls.Add(this.dataGridView1);
            this.groupBox_result.Font = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location8 = new System.Drawing.Point(14, 138);
            this.groupBox_result.Location = location8;
            Padding margin8 = new Padding(2, 2, 2, 2);

            this.groupBox_result.Margin = margin8;
            this.groupBox_result.Name   = "groupBox_result";
            Padding padding2 = new Padding(2, 2, 2, 2);

            this.groupBox_result.Padding = padding2;
            System.Drawing.Size size8 = new System.Drawing.Size(767, 371);
            this.groupBox_result.Size                   = size8;
            this.groupBox_result.TabIndex               = 0;
            this.groupBox_result.TabStop                = false;
            this.groupBox_result.Text                   = "查询结果";
            this.dataGridView1.AllowUserToAddRows       = false;
            this.dataGridView1.AllowUserToDeleteRows    = false;
            this.dataGridView1.AllowUserToResizeColumns = false;
            this.dataGridView1.AllowUserToResizeRows    = false;
            System.Drawing.Color window = System.Drawing.SystemColors.Window;
            this.dataGridView1.BackgroundColor             = window;
            this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumn[] dataGridViewColumns = new DataGridViewColumn[]
            {
                this.Column1,
                this.Column2,
                this.Column3,
                this.Column4
            };
            this.dataGridView1.Columns.AddRange(dataGridViewColumns);
            this.dataGridView1.Dock = DockStyle.Fill;
            System.Drawing.Point location9 = new System.Drawing.Point(2, 19);
            this.dataGridView1.Location = location9;
            Padding margin9 = new Padding(2, 2, 2, 2);

            this.dataGridView1.Margin             = margin9;
            this.dataGridView1.MultiSelect        = false;
            this.dataGridView1.Name               = "dataGridView1";
            this.dataGridView1.ReadOnly           = true;
            this.dataGridView1.RowHeadersVisible  = false;
            this.dataGridView1.RowTemplate.Height = 27;
            this.dataGridView1.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
            System.Drawing.Size size9 = new System.Drawing.Size(763, 350);
            this.dataGridView1.Size                  = size9;
            this.dataGridView1.TabIndex              = 5;
            this.dataGridView1.CellClick            += new DataGridViewCellEventHandler(this.dataGridView1_CellClick);
            this.dataGridView1.CellMouseDoubleClick += new DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDoubleClick);
            this.Column1.HeaderText                  = "序号";
            this.Column1.Name         = "Column1";
            this.Column1.ReadOnly     = true;
            this.Column1.Width        = 80;
            this.Column2.HeaderText   = "操作者";
            this.Column2.Name         = "Column2";
            this.Column2.ReadOnly     = true;
            this.Column2.Width        = 120;
            this.Column3.HeaderText   = "操作时间";
            this.Column3.Name         = "Column3";
            this.Column3.ReadOnly     = true;
            this.Column3.Width        = 156;
            this.Column4.HeaderText   = "操作内容";
            this.Column4.Name         = "Column4";
            this.Column4.ReadOnly     = true;
            this.Column4.Width        = 240;
            this.btnDetailView.Anchor = AnchorStyles.Bottom;
            this.btnDetailView.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location10 = new System.Drawing.Point(79, 527);
            this.btnDetailView.Location = location10;
            Padding margin10 = new Padding(2, 2, 2, 2);

            this.btnDetailView.Margin = margin10;
            this.btnDetailView.Name   = "btnDetailView";
            System.Drawing.Size size10 = new System.Drawing.Size(32, 24);
            this.btnDetailView.Size     = size10;
            this.btnDetailView.TabIndex = 7;
            this.btnDetailView.Text     = "查看明细";
            this.btnDetailView.UseVisualStyleBackColor = true;
            this.btnDetailView.Visible = false;
            this.btnDetailView.Click  += new System.EventHandler(this.btnDetailView_Click);
            this.btnQuit.Anchor        = AnchorStyles.Bottom;
            this.btnQuit.Font          = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location11 = new System.Drawing.Point(437, 527);
            this.btnQuit.Location = location11;
            Padding margin11 = new Padding(2, 2, 2, 2);

            this.btnQuit.Margin = margin11;
            this.btnQuit.Name   = "btnQuit";
            System.Drawing.Size size11 = new System.Drawing.Size(112, 24);
            this.btnQuit.Size     = size11;
            this.btnQuit.TabIndex = 8;
            this.btnQuit.Text     = "取消";
            this.btnQuit.UseVisualStyleBackColor = true;
            this.btnQuit.Click  += new System.EventHandler(this.btnQuit_Click);
            this.btnQuery.Anchor = AnchorStyles.Top;
            this.btnQuery.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location12 = new System.Drawing.Point(418, 102);
            this.btnQuery.Location = location12;
            Padding margin12 = new Padding(2, 2, 2, 2);

            this.btnQuery.Margin = margin12;
            this.btnQuery.Name   = "btnQuery";
            System.Drawing.Size size12 = new System.Drawing.Size(112, 24);
            this.btnQuery.Size     = size12;
            this.btnQuery.TabIndex = 5;
            this.btnQuery.Text     = "查询";
            this.btnQuery.UseVisualStyleBackColor = true;
            this.btnQuery.Click      += new System.EventHandler(this.btnQuery_Click);
            this.btnFuzzyQuery.Anchor = AnchorStyles.Top;
            this.btnFuzzyQuery.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location13 = new System.Drawing.Point(265, 102);
            this.btnFuzzyQuery.Location = location13;
            Padding margin13 = new Padding(2, 2, 2, 2);

            this.btnFuzzyQuery.Margin = margin13;
            this.btnFuzzyQuery.Name   = "btnFuzzyQuery";
            System.Drawing.Size size13 = new System.Drawing.Size(112, 24);
            this.btnFuzzyQuery.Size     = size13;
            this.btnFuzzyQuery.TabIndex = 4;
            this.btnFuzzyQuery.Text     = "模糊查询";
            this.btnFuzzyQuery.UseVisualStyleBackColor = true;
            this.btnFuzzyQuery.Click += new System.EventHandler(this.btnFuzzyQuery_Click);
            this.btnDel.Anchor        = AnchorStyles.Bottom;
            this.btnDel.Font          = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location14 = new System.Drawing.Point(143, 527);
            this.btnDel.Location = location14;
            Padding margin14 = new Padding(2, 2, 2, 2);

            this.btnDel.Margin = margin14;
            this.btnDel.Name   = "btnDel";
            System.Drawing.Size size14 = new System.Drawing.Size(31, 24);
            this.btnDel.Size     = size14;
            this.btnDel.TabIndex = 6;
            this.btnDel.Text     = "删除记录";
            this.btnDel.UseVisualStyleBackColor = true;
            this.btnDel.Visible   = false;
            this.btnDel.Click    += new System.EventHandler(this.btnDel_Click);
            this.btnExport.Anchor = AnchorStyles.Bottom;
            this.btnExport.Font   = new System.Drawing.Font("宋体", 10.8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
            System.Drawing.Point location15 = new System.Drawing.Point(245, 527);
            this.btnExport.Location = location15;
            Padding margin15 = new Padding(2, 2, 2, 2);

            this.btnExport.Margin = margin15;
            this.btnExport.Name   = "btnExport";
            System.Drawing.Size size15 = new System.Drawing.Size(112, 24);
            this.btnExport.Size     = size15;
            this.btnExport.TabIndex = 6;
            this.btnExport.Text     = "导出报表";
            this.btnExport.UseVisualStyleBackColor = true;
            this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
            System.Drawing.SizeF autoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
            base.AutoScaleDimensions = autoScaleDimensions;
            base.AutoScaleMode       = AutoScaleMode.Font;
            System.Drawing.Size clientSize = new System.Drawing.Size(794, 571);
            base.ClientSize = clientSize;
            base.Controls.Add(this.btnFuzzyQuery);
            base.Controls.Add(this.btnQuery);
            base.Controls.Add(this.btnExport);
            base.Controls.Add(this.btnDel);
            base.Controls.Add(this.btnQuit);
            base.Controls.Add(this.btnDetailView);
            base.Controls.Add(this.groupBox_result);
            base.Controls.Add(this.groupBox1);
            base.FormBorderStyle = FormBorderStyle.FixedDialog;
            base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
            Padding margin16 = new Padding(2, 2, 2, 2);

            base.Margin        = margin16;
            base.Name          = "FormOperRecordManage";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "操作记录管理";
            base.Load         += new System.EventHandler(this.FormOperRecordManage_Load);
            base.SizeChanged  += new System.EventHandler(this.FormOperRecordManage_SizeChanged);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.groupBox_result.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridView1).EndInit();
            base.ResumeLayout(false);
        }
Example #54
0
 /// <summary>
 ///    Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount.
 /// </summary>
 public void Inflate(SizeF size) => Inflate(size.Width, size.Height);
Example #55
0
 /// <summary>
 /// Scales a control's location, size, padding and margin.
 /// </summary>
 /// <param name="factor"></param>
 /// <param name="specified"></param>
 protected override void ScaleControl(System.Drawing.SizeF factor, BoundsSpecified specified)
 {
     base.ScaleControl(factor, specified);
     scaleFactor = factor;
     CheckIfResizeIsNeeded();
 }
Example #56
0
        public override System.Drawing.SizeF GetBackgroundExtent(MeasureHelper measure, System.Drawing.SizeF contentSize)
        {
            contentSize = new SizeF(contentSize.Width + 4, contentSize.Height + 4);

            return(base.GetBackgroundExtent(measure, contentSize));
        }
Example #57
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ResourceManager manager = new ResourceManager(typeof(S_PLACA_RAD1GUserControl));

            this.layoutManagerformS_PLACA_RAD1G = new TableLayoutPanel();
            this.layoutManagerformS_PLACA_RAD1G.SuspendLayout();
            this.layoutManagerformS_PLACA_RAD1G.AutoSize     = true;
            this.layoutManagerformS_PLACA_RAD1G.Dock         = DockStyle.Fill;
            this.layoutManagerformS_PLACA_RAD1G.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            this.layoutManagerformS_PLACA_RAD1G.AutoScroll   = false;
            System.Drawing.Point point = new System.Drawing.Point(0, 0);
            this.layoutManagerformS_PLACA_RAD1G.Location = point;
            Size size = new System.Drawing.Size(0, 0);

            this.layoutManagerformS_PLACA_RAD1G.Size        = size;
            this.layoutManagerformS_PLACA_RAD1G.ColumnCount = 2;
            this.layoutManagerformS_PLACA_RAD1G.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformS_PLACA_RAD1G.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.layoutManagerformS_PLACA_RAD1G.RowCount = 5;
            this.layoutManagerformS_PLACA_RAD1G.RowStyles.Add(new RowStyle());
            this.layoutManagerformS_PLACA_RAD1G.RowStyles.Add(new RowStyle());
            this.layoutManagerformS_PLACA_RAD1G.RowStyles.Add(new RowStyle());
            this.layoutManagerformS_PLACA_RAD1G.RowStyles.Add(new RowStyle());
            this.layoutManagerformS_PLACA_RAD1G.RowStyles.Add(new RowStyle());
            this.label1GODINAISPLATE                 = new UltraLabel();
            this.textGODINAISPLATE                   = new UltraTextEditor();
            this.label1MJESECISPLATE                 = new UltraLabel();
            this.textMJESECISPLATE                   = new UltraTextEditor();
            this.label1DATUMNAKOJIRACUNAMSTAROST     = new UltraLabel();
            this.datePickerDATUMNAKOJIRACUNAMSTAROST = new UltraDateTimeEditor();
            this.label1MJESECODLASKA                 = new UltraLabel();
            this.textMJESECODLASKA                   = new UltraTextEditor();
            this.userControlDataGridS_PLACA_RAD1G    = new S_PLACA_RAD1GUserDataGrid();
            this.ultraGridPrintDocument1             = new UltraGridPrintDocument(this.components);
            this.ultraPrintPreviewDialog1            = new UltraPrintPreviewDialog(this.components);
            ((ISupportInitialize)this.textGODINAISPLATE).BeginInit();
            ((ISupportInitialize)this.textMJESECISPLATE).BeginInit();
            ((ISupportInitialize)this.textMJESECODLASKA).BeginInit();
            this.SuspendLayout();
            this.label1GODINAISPLATE.Name                  = "label1GODINAISPLATE";
            this.label1GODINAISPLATE.TabIndex              = 1;
            this.label1GODINAISPLATE.Tag                   = "labelGODINAISPLATE";
            this.label1GODINAISPLATE.AutoSize              = true;
            this.label1GODINAISPLATE.StyleSetName          = "FieldUltraLabel";
            this.label1GODINAISPLATE.Text                  = "GODINAISPLATE    :";
            this.label1GODINAISPLATE.Appearance.TextVAlign = VAlign.Middle;
            this.label1GODINAISPLATE.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1GODINAISPLATE.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.label1GODINAISPLATE, 0, 0);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.label1GODINAISPLATE, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.label1GODINAISPLATE, 1);
            Padding padding = new Padding(3, 1, 5, 2);

            this.label1GODINAISPLATE.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1GODINAISPLATE.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textGODINAISPLATE.Location = point;
            this.textGODINAISPLATE.Name     = "textGODINAISPLATE";
            this.textGODINAISPLATE.Tag      = "GODINAISPLATE";
            this.textGODINAISPLATE.TabIndex = 0;
            size = new System.Drawing.Size(0x2c, 0x16);
            this.textGODINAISPLATE.Size      = size;
            this.textGODINAISPLATE.MaxLength = 4;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.textGODINAISPLATE, 1, 0);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.textGODINAISPLATE, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.textGODINAISPLATE, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textGODINAISPLATE.Margin = padding;
            size = new System.Drawing.Size(0x2c, 0x16);
            this.textGODINAISPLATE.MinimumSize             = size;
            this.label1MJESECISPLATE.Name                  = "label1MJESECISPLATE";
            this.label1MJESECISPLATE.TabIndex              = 1;
            this.label1MJESECISPLATE.Tag                   = "labelMJESECISPLATE";
            this.label1MJESECISPLATE.AutoSize              = true;
            this.label1MJESECISPLATE.StyleSetName          = "FieldUltraLabel";
            this.label1MJESECISPLATE.Text                  = "MJESECISPLATE    :";
            this.label1MJESECISPLATE.Appearance.TextVAlign = VAlign.Middle;
            this.label1MJESECISPLATE.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1MJESECISPLATE.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.label1MJESECISPLATE, 0, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.label1MJESECISPLATE, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.label1MJESECISPLATE, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1MJESECISPLATE.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1MJESECISPLATE.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textMJESECISPLATE.Location = point;
            this.textMJESECISPLATE.Name     = "textMJESECISPLATE";
            this.textMJESECISPLATE.Tag      = "MJESECISPLATE";
            this.textMJESECISPLATE.TabIndex = 1;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECISPLATE.Size      = size;
            this.textMJESECISPLATE.MaxLength = 2;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.textMJESECISPLATE, 1, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.textMJESECISPLATE, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.textMJESECISPLATE, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textMJESECISPLATE.Margin = padding;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECISPLATE.MinimumSize                         = size;
            this.label1DATUMNAKOJIRACUNAMSTAROST.Name                  = "label1DATUMNAKOJIRACUNAMSTAROST";
            this.label1DATUMNAKOJIRACUNAMSTAROST.TabIndex              = 1;
            this.label1DATUMNAKOJIRACUNAMSTAROST.Tag                   = "labelDATUMNAKOJIRACUNAMSTAROST";
            this.label1DATUMNAKOJIRACUNAMSTAROST.AutoSize              = true;
            this.label1DATUMNAKOJIRACUNAMSTAROST.StyleSetName          = "FieldUltraLabel";
            this.label1DATUMNAKOJIRACUNAMSTAROST.Text                  = "DATUMNAKOJIRACUNAMSTAROST    :";
            this.label1DATUMNAKOJIRACUNAMSTAROST.Appearance.TextVAlign = VAlign.Middle;
            this.label1DATUMNAKOJIRACUNAMSTAROST.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1DATUMNAKOJIRACUNAMSTAROST.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.label1DATUMNAKOJIRACUNAMSTAROST, 0, 2);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.label1DATUMNAKOJIRACUNAMSTAROST, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.label1DATUMNAKOJIRACUNAMSTAROST, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1DATUMNAKOJIRACUNAMSTAROST.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1DATUMNAKOJIRACUNAMSTAROST.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.Location = point;
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.Name     = "datePickerDATUMNAKOJIRACUNAMSTAROST";
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.Tag      = "DATUMNAKOJIRACUNAMSTAROST";
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.TabIndex = 2;
            size = new System.Drawing.Size(100, 0x16);
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.Size = size;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.datePickerDATUMNAKOJIRACUNAMSTAROST, 1, 2);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.datePickerDATUMNAKOJIRACUNAMSTAROST, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.datePickerDATUMNAKOJIRACUNAMSTAROST, 1);
            padding = new Padding(0, 1, 3, 2);
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.Margin = padding;
            size = new System.Drawing.Size(100, 0x16);
            this.datePickerDATUMNAKOJIRACUNAMSTAROST.MinimumSize = size;
            this.label1MJESECODLASKA.Name                  = "label1MJESECODLASKA";
            this.label1MJESECODLASKA.TabIndex              = 1;
            this.label1MJESECODLASKA.Tag                   = "labelMJESECODLASKA";
            this.label1MJESECODLASKA.AutoSize              = true;
            this.label1MJESECODLASKA.StyleSetName          = "FieldUltraLabel";
            this.label1MJESECODLASKA.Text                  = "MJESECODLASKA :";
            this.label1MJESECODLASKA.Appearance.TextVAlign = VAlign.Middle;
            this.label1MJESECODLASKA.Anchor                = AnchorStyles.Left | AnchorStyles.Top;
            this.label1MJESECODLASKA.Appearance.ForeColor  = Color.Black;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.label1MJESECODLASKA, 0, 3);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.label1MJESECODLASKA, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.label1MJESECODLASKA, 1);
            padding = new Padding(3, 1, 5, 2);
            this.label1MJESECODLASKA.Margin = padding;
            size = new System.Drawing.Size(0, 0);
            this.label1MJESECODLASKA.MinimumSize = size;
            point = new System.Drawing.Point(0, 0);
            this.textMJESECODLASKA.Location = point;
            this.textMJESECODLASKA.Name     = "textMJESECODLASKA";
            this.textMJESECODLASKA.Tag      = "MJESECODLASKA";
            this.textMJESECODLASKA.TabIndex = 3;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECODLASKA.Size      = size;
            this.textMJESECODLASKA.MaxLength = 2;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.textMJESECODLASKA, 1, 3);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.textMJESECODLASKA, 1);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.textMJESECODLASKA, 1);
            padding = new Padding(0, 1, 3, 2);
            this.textMJESECODLASKA.Margin = padding;
            size = new System.Drawing.Size(30, 0x16);
            this.textMJESECODLASKA.MinimumSize = size;
            this.layoutManagerformS_PLACA_RAD1G.Controls.Add(this.userControlDataGridS_PLACA_RAD1G, 0, 4);
            this.layoutManagerformS_PLACA_RAD1G.SetColumnSpan(this.userControlDataGridS_PLACA_RAD1G, 2);
            this.layoutManagerformS_PLACA_RAD1G.SetRowSpan(this.userControlDataGridS_PLACA_RAD1G, 1);
            padding = new Padding(5, 10, 5, 10);
            this.userControlDataGridS_PLACA_RAD1G.Margin = padding;
            size = new System.Drawing.Size(100, 100);
            this.userControlDataGridS_PLACA_RAD1G.MinimumSize = size;
            this.userControlDataGridS_PLACA_RAD1G.Dock        = DockStyle.Fill;
            this.Controls.Add(this.layoutManagerformS_PLACA_RAD1G);
            this.userControlDataGridS_PLACA_RAD1G.Name            = "userControlDataGridS_PLACA_RAD1G";
            this.userControlDataGridS_PLACA_RAD1G.Dock            = DockStyle.Fill;
            this.userControlDataGridS_PLACA_RAD1G.DockPadding.All = 5;
            this.userControlDataGridS_PLACA_RAD1G.FillAtStartup   = false;
            this.userControlDataGridS_PLACA_RAD1G.TabIndex        = 6;
            point = new System.Drawing.Point(0, 0);
            this.userControlDataGridS_PLACA_RAD1G.Location = point;
            size = new System.Drawing.Size(0x285, 350);
            this.userControlDataGridS_PLACA_RAD1G.Size = size;
            this.ultraGridPrintDocument1.Grid          = this.userControlDataGridS_PLACA_RAD1G.DataGrid;
            SizeF ef = new System.Drawing.SizeF(6f, 13f);

            this.AutoScaleDimensions = ef;
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.DockPadding.All     = 5;
            this.Name  = "S_PLACA_RAD1GWorkWith";
            this.Text  = "Work With S_PLACA_RAD1G";
            this.Load += new EventHandler(this.S_PLACA_RAD1GUserControl_Load);
            this.layoutManagerformS_PLACA_RAD1G.ResumeLayout(false);
            this.layoutManagerformS_PLACA_RAD1G.PerformLayout();
            ((ISupportInitialize)this.textGODINAISPLATE).EndInit();
            ((ISupportInitialize)this.textMJESECISPLATE).EndInit();
            ((ISupportInitialize)this.textMJESECODLASKA).EndInit();
            this.ResumeLayout(false);
        }
Example #58
0
        /// <summary>
        /// Measure the current content of the VisualElement.
        /// </summary>
        /// <param name="measure"></param>
        /// <param name="maxSize">If empty is not used.</param>
        /// <returns></returns>
        protected override System.Drawing.SizeF OnMeasureContent(MeasureHelper measure, System.Drawing.SizeF maxSize)
        {
            Font font = System.Windows.Forms.Control.DefaultFont;

            if (maxSize != System.Drawing.SizeF.Empty)
            {
                return(measure.Graphics.MeasureString(Value.Rtf, font, maxSize));
            }
            else
            {
                return(measure.Graphics.MeasureString(Value.Rtf, font));
            }
        }
Example #59
0
 //private: array<PointF> GetAllPoints();
 public virtual void OnMoveFocus(CFocus Focus, System.Drawing.SizeF Offset)
 {
 }
Example #60
0
        private void ShowCls(List <Model.bi_t_item_cls> lst, Control par, ref int pageIndex, Graphics g)
        {
            int w          = 80;
            int h          = 60;
            int w_offset   = 0;
            int h_offset   = 0;
            int min_offset = 9999;

            for (int i = 0; i < 20; i++)
            {
                int val = w + i;
                int mod = par.Width % val;
                if (min_offset > mod)
                {
                    min_offset = mod;
                    w_offset   = i;
                }
            }

            min_offset = 9999;
            for (int i = 0; i < 20; i++)
            {
                int val = h + i;
                int mod = par.Height % val;
                if (min_offset > mod)
                {
                    min_offset = mod;
                    h_offset   = i;
                }
            }

            w += w_offset - 1;
            h += h_offset - 1;
            int colNum   = par.Width / w;
            int rowNum   = par.Height / h;
            int pageSize = rowNum * colNum;

            pageSize -= 2;
            //
            int index = pageIndex * pageSize;

            if (index > lst.Count)
            {
                pageIndex--;
                index = pageIndex * pageSize;
            }

            SolidBrush bru  = new SolidBrush(Color.FromArgb(89, 96, 138));
            SolidBrush bru2 = new SolidBrush(Color.FromArgb(89, 96, 138));
            Pen        p    = new Pen(Color.White);

            for (int i = 0; i < rowNum; i++)
            {
                for (int j = 0; j < colNum; j++)
                {
                    if (i == 0 && j == 0)
                    {
                        Rectangle rec = new Rectangle(j * w, i * h, w, h);
                        lblLeft.Location = new Point(rec.Left + 1, rec.Top + 1);
                        lblLeft.Size     = new Size(rec.Width - 1, rec.Height - 1);

                        g.DrawRectangle(p, rec);
                    }
                    else if (i == 0 && j == colNum - 1)
                    {
                        Rectangle rec = new Rectangle(j * w, i * h, w, h);
                        lblRight.Location = new Point(rec.Left + 1, rec.Top + 1);
                        lblRight.Size     = new Size(rec.Width - 1, rec.Height - 1);

                        g.DrawRectangle(p, rec);
                    }
                    else if (index >= lst.Count)
                    {
                        Rectangle rec = new Rectangle(j * w, i * h, w, h);
                        g.FillRectangle(bru2, rec);
                        g.DrawRectangle(p, rec);
                        clickPoint = new Point(-100, -100);
                        index++;
                    }
                    else
                    {
                        Rectangle rec       = new Rectangle(j * w, i * h, w, h);
                        Color     ForeColor = Color.White;
                        if (rec.Contains(cls_clickPoint) == true)
                        {
                            cls_selectIndex = index;
                            g.FillRectangle(Brushes.White, rec);
                            cls_clickPoint = new Point(-100, -100);
                            ForeColor      = Color.Black;
                        }
                        else if (cls_selectIndex == index)
                        {
                            g.FillRectangle(Brushes.White, rec);
                            ForeColor = Color.Black;
                        }
                        else
                        {
                            g.FillRectangle(bru, rec);
                            ForeColor = Color.White;
                        }

                        g.DrawRectangle(p, rec);
                        var          item = lst[index];
                        StringFormat sf   = new StringFormat();
                        sf.Alignment     = StringAlignment.Center;
                        sf.LineAlignment = StringAlignment.Center;
                        string item_clsname = "";
                        if (item.item_clsname == null)
                        {
                            item_clsname = "";
                        }
                        else
                        {
                            int flag = 0;
                            for (int k = 1; k <= item.item_clsname.Length; k++)
                            {
                                item_clsname = item.item_clsname.Substring(0, k);
                                System.Drawing.SizeF s1 = g.MeasureString(item_clsname, new Font("SimSun", 12));
                                if (s1.Width > rec.Width)
                                {
                                    item_clsname = item.item_clsname.Substring(0, k - 1);
                                    flag         = 1;
                                    break;
                                }
                            }

                            if (flag == 0)
                            {
                                item_clsname = item.item_clsname;
                            }
                        }

                        g.DrawString(item_clsname, new Font("SimSun", 12), new SolidBrush(ForeColor), rec, sf);
                        index++;
                    }
                }
            }
        }