Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 51.10 KB | None | 0 0
  1. namespace IntegraDoctor.forms.rotinas
  2. {
  3.     partial class FormEditarImagens
  4.     {
  5.         /// <summary>
  6.         /// Required designer variable.
  7.         /// </summary>
  8.         private System.ComponentModel.IContainer components = null;
  9.  
  10.         /// <summary>
  11.         /// Clean up any resources being used.
  12.         /// </summary>
  13.         /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  14.         protected override void Dispose(bool disposing)
  15.         {
  16.             if (disposing && (components != null))
  17.             {
  18.                 components.Dispose();
  19.             }
  20.             base.Dispose(disposing);
  21.         }
  22.  
  23.         #region Windows Form Designer generated code
  24.  
  25.         /// <summary>
  26.         /// Required method for Designer support - do not modify
  27.         /// the contents of this method with the code editor.
  28.         /// </summary>
  29.         private void InitializeComponent()
  30.         {
  31.             this.components = new System.ComponentModel.Container();
  32.             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormEditarImagens));
  33.             this.panel1 = new System.Windows.Forms.Panel();
  34.             this.panel2 = new System.Windows.Forms.Panel();
  35.             this.panelMiniaturas = new System.Windows.Forms.Panel();
  36.             this.panel4 = new System.Windows.Forms.Panel();
  37.             this.panel3 = new System.Windows.Forms.Panel();
  38.             this.textBoxNome = new System.Windows.Forms.TextBox();
  39.             this.labelData = new System.Windows.Forms.Label();
  40.             this.labelCodigoImagem = new System.Windows.Forms.Label();
  41.             this.panelOptionsTool = new System.Windows.Forms.Panel();
  42.             this.flowLayoutPanelOptions = new System.Windows.Forms.FlowLayoutPanel();
  43.             this.label1 = new System.Windows.Forms.Label();
  44.             this.numericUpDownTamanho = new System.Windows.Forms.NumericUpDown();
  45.             this.groupBoxCliente = new System.Windows.Forms.GroupBox();
  46.             this.icampoClienteNome = new System.Windows.Forms.TextBox();
  47.             this.buttonEditarCliente = new System.Windows.Forms.Button();
  48.             this.buttonInfoCliente = new System.Windows.Forms.Button();
  49.             this.icampoCliente = new System.Windows.Forms.TextBox();
  50.             this.panelTools = new System.Windows.Forms.Panel();
  51.             this.panelColor = new System.Windows.Forms.Panel();
  52.             this.buttonColorWhite = new System.Windows.Forms.Button();
  53.             this.buttonColorBlack = new System.Windows.Forms.Button();
  54.             this.buttonColorGreen = new System.Windows.Forms.Button();
  55.             this.buttonColorYellow = new System.Windows.Forms.Button();
  56.             this.buttonColorRed = new System.Windows.Forms.Button();
  57.             this.buttonColorBlue = new System.Windows.Forms.Button();
  58.             this.panelZoom = new System.Windows.Forms.Panel();
  59.             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
  60.             this.pictureBoxView = new System.Windows.Forms.PictureBox();
  61.             this.buttonTool5 = new System.Windows.Forms.Button();
  62.             this.buttonTool4 = new System.Windows.Forms.Button();
  63.             this.buttonTool3 = new System.Windows.Forms.Button();
  64.             this.buttonTool2 = new System.Windows.Forms.Button();
  65.             this.buttonTool1 = new System.Windows.Forms.Button();
  66.             this.buttonTool0 = new System.Windows.Forms.Button();
  67.             this.buttonZoomOut = new System.Windows.Forms.Button();
  68.             this.buttonZoomIn = new System.Windows.Forms.Button();
  69.             this.button1 = new System.Windows.Forms.Button();
  70.             this.buttonConsultaCliente = new System.Windows.Forms.Button();
  71.             this.panel1.SuspendLayout();
  72.             this.panel2.SuspendLayout();
  73.             this.panel3.SuspendLayout();
  74.             this.panelOptionsTool.SuspendLayout();
  75.             this.flowLayoutPanelOptions.SuspendLayout();
  76.             ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTamanho)).BeginInit();
  77.             this.groupBoxCliente.SuspendLayout();
  78.             this.panelTools.SuspendLayout();
  79.             this.panelZoom.SuspendLayout();
  80.             ((System.ComponentModel.ISupportInitialize)(this.pictureBoxView)).BeginInit();
  81.             this.SuspendLayout();
  82.             //
  83.             // panel1
  84.             //
  85.             this.panel1.Controls.Add(this.panel2);
  86.             this.panel1.Controls.Add(this.panel3);
  87.             this.panel1.Controls.Add(this.groupBoxCliente);
  88.             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  89.             this.panel1.Location = new System.Drawing.Point(0, 0);
  90.             this.panel1.Name = "panel1";
  91.             this.panel1.Size = new System.Drawing.Size(675, 157);
  92.             this.panel1.TabIndex = 0;
  93.             //
  94.             // panel2
  95.             //
  96.             this.panel2.Controls.Add(this.panelMiniaturas);
  97.             this.panel2.Controls.Add(this.panel4);
  98.             this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
  99.             this.panel2.Location = new System.Drawing.Point(0, 42);
  100.             this.panel2.Name = "panel2";
  101.             this.panel2.Size = new System.Drawing.Size(675, 81);
  102.             this.panel2.TabIndex = 12;
  103.             //
  104.             // panelMiniaturas
  105.             //
  106.             this.panelMiniaturas.AutoScroll = true;
  107.             this.panelMiniaturas.BackColor = System.Drawing.SystemColors.ControlLight;
  108.             this.panelMiniaturas.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  109.             this.panelMiniaturas.Dock = System.Windows.Forms.DockStyle.Fill;
  110.             this.panelMiniaturas.Location = new System.Drawing.Point(0, 0);
  111.             this.panelMiniaturas.Name = "panelMiniaturas";
  112.             this.panelMiniaturas.Size = new System.Drawing.Size(640, 81);
  113.             this.panelMiniaturas.TabIndex = 2;
  114.             //
  115.             // panel4
  116.             //
  117.             this.panel4.Dock = System.Windows.Forms.DockStyle.Right;
  118.             this.panel4.Location = new System.Drawing.Point(640, 0);
  119.             this.panel4.Name = "panel4";
  120.             this.panel4.Size = new System.Drawing.Size(35, 81);
  121.             this.panel4.TabIndex = 0;
  122.             //
  123.             // panel3
  124.             //
  125.             this.panel3.Controls.Add(this.textBoxNome);
  126.             this.panel3.Controls.Add(this.labelData);
  127.             this.panel3.Controls.Add(this.labelCodigoImagem);
  128.             this.panel3.Controls.Add(this.panelOptionsTool);
  129.             this.panel3.Controls.Add(this.button1);
  130.             this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
  131.             this.panel3.Location = new System.Drawing.Point(0, 123);
  132.             this.panel3.Name = "panel3";
  133.             this.panel3.Padding = new System.Windows.Forms.Padding(3, 0, 0, 0);
  134.             this.panel3.Size = new System.Drawing.Size(675, 34);
  135.             this.panel3.TabIndex = 11;
  136.             //
  137.             // textBoxNome
  138.             //
  139.             this.textBoxNome.Dock = System.Windows.Forms.DockStyle.Fill;
  140.             this.textBoxNome.Location = new System.Drawing.Point(178, 0);
  141.             this.textBoxNome.MaxLength = 100;
  142.             this.textBoxNome.Multiline = true;
  143.             this.textBoxNome.Name = "textBoxNome";
  144.             this.textBoxNome.Size = new System.Drawing.Size(370, 34);
  145.             this.textBoxNome.TabIndex = 19;
  146.             //
  147.             // labelData
  148.             //
  149.             this.labelData.Dock = System.Windows.Forms.DockStyle.Left;
  150.             this.labelData.Location = new System.Drawing.Point(79, 0);
  151.             this.labelData.Name = "labelData";
  152.             this.labelData.Size = new System.Drawing.Size(99, 34);
  153.             this.labelData.TabIndex = 20;
  154.             this.labelData.Tag = "l";
  155.             this.labelData.Text = "label1";
  156.             this.labelData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  157.             //
  158.             // labelCodigoImagem
  159.             //
  160.             this.labelCodigoImagem.Dock = System.Windows.Forms.DockStyle.Left;
  161.             this.labelCodigoImagem.Location = new System.Drawing.Point(37, 0);
  162.             this.labelCodigoImagem.Name = "labelCodigoImagem";
  163.             this.labelCodigoImagem.Size = new System.Drawing.Size(42, 34);
  164.             this.labelCodigoImagem.TabIndex = 18;
  165.             this.labelCodigoImagem.Tag = "l";
  166.             this.labelCodigoImagem.Text = "label1";
  167.             this.labelCodigoImagem.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  168.             //
  169.             // panelOptionsTool
  170.             //
  171.             this.panelOptionsTool.Controls.Add(this.flowLayoutPanelOptions);
  172.             this.panelOptionsTool.Dock = System.Windows.Forms.DockStyle.Right;
  173.             this.panelOptionsTool.Location = new System.Drawing.Point(548, 0);
  174.             this.panelOptionsTool.Name = "panelOptionsTool";
  175.             this.panelOptionsTool.Size = new System.Drawing.Size(127, 34);
  176.             this.panelOptionsTool.TabIndex = 16;
  177.             //
  178.             // flowLayoutPanelOptions
  179.             //
  180.             this.flowLayoutPanelOptions.Controls.Add(this.label1);
  181.             this.flowLayoutPanelOptions.Controls.Add(this.numericUpDownTamanho);
  182.             this.flowLayoutPanelOptions.Dock = System.Windows.Forms.DockStyle.Fill;
  183.             this.flowLayoutPanelOptions.Location = new System.Drawing.Point(0, 0);
  184.             this.flowLayoutPanelOptions.Name = "flowLayoutPanelOptions";
  185.             this.flowLayoutPanelOptions.Size = new System.Drawing.Size(127, 34);
  186.             this.flowLayoutPanelOptions.TabIndex = 0;
  187.             //
  188.             // label1
  189.             //
  190.             this.label1.Location = new System.Drawing.Point(3, 0);
  191.             this.label1.Name = "label1";
  192.             this.label1.Size = new System.Drawing.Size(43, 34);
  193.             this.label1.TabIndex = 1;
  194.             this.label1.Text = "Tam.:";
  195.             this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  196.             //
  197.             // numericUpDownTamanho
  198.             //
  199.             this.numericUpDownTamanho.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  200.             this.numericUpDownTamanho.Location = new System.Drawing.Point(52, 3);
  201.             this.numericUpDownTamanho.Minimum = new decimal(new int[] {
  202.             5,
  203.             0,
  204.             0,
  205.             0});
  206.             this.numericUpDownTamanho.Name = "numericUpDownTamanho";
  207.             this.numericUpDownTamanho.Size = new System.Drawing.Size(54, 26);
  208.             this.numericUpDownTamanho.TabIndex = 2;
  209.             this.numericUpDownTamanho.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  210.             this.toolTip1.SetToolTip(this.numericUpDownTamanho, "Tamanho do Pincel / Espessura das Linhas");
  211.             this.numericUpDownTamanho.Value = new decimal(new int[] {
  212.             6,
  213.             0,
  214.             0,
  215.             0});
  216.             //
  217.             // groupBoxCliente
  218.             //
  219.             this.groupBoxCliente.BackColor = System.Drawing.SystemColors.ControlLight;
  220.             this.groupBoxCliente.Controls.Add(this.icampoClienteNome);
  221.             this.groupBoxCliente.Controls.Add(this.buttonEditarCliente);
  222.             this.groupBoxCliente.Controls.Add(this.buttonInfoCliente);
  223.             this.groupBoxCliente.Controls.Add(this.buttonConsultaCliente);
  224.             this.groupBoxCliente.Controls.Add(this.icampoCliente);
  225.             this.groupBoxCliente.Dock = System.Windows.Forms.DockStyle.Top;
  226.             this.groupBoxCliente.Location = new System.Drawing.Point(0, 0);
  227.             this.groupBoxCliente.Name = "groupBoxCliente";
  228.             this.groupBoxCliente.Padding = new System.Windows.Forms.Padding(3, 3, 3, 5);
  229.             this.groupBoxCliente.Size = new System.Drawing.Size(675, 42);
  230.             this.groupBoxCliente.TabIndex = 9;
  231.             this.groupBoxCliente.TabStop = false;
  232.             this.groupBoxCliente.Text = "Cliente";
  233.             //
  234.             // icampoClienteNome
  235.             //
  236.             this.icampoClienteNome.Dock = System.Windows.Forms.DockStyle.Fill;
  237.             this.icampoClienteNome.Location = new System.Drawing.Point(106, 16);
  238.             this.icampoClienteNome.Name = "icampoClienteNome";
  239.             this.icampoClienteNome.Size = new System.Drawing.Size(548, 20);
  240.             this.icampoClienteNome.TabIndex = 2;
  241.             this.icampoClienteNome.Tag = "r";
  242.             //
  243.             // buttonEditarCliente
  244.             //
  245.             this.buttonEditarCliente.Dock = System.Windows.Forms.DockStyle.Left;
  246.             this.buttonEditarCliente.Location = new System.Drawing.Point(79, 16);
  247.             this.buttonEditarCliente.Name = "buttonEditarCliente";
  248.             this.buttonEditarCliente.Size = new System.Drawing.Size(27, 21);
  249.             this.buttonEditarCliente.TabIndex = 5;
  250.             this.buttonEditarCliente.TabStop = false;
  251.             this.buttonEditarCliente.Text = "...";
  252.             this.buttonEditarCliente.UseVisualStyleBackColor = true;
  253.             this.buttonEditarCliente.Click += new System.EventHandler(this.buttonEditarCliente_Click);
  254.             //
  255.             // buttonInfoCliente
  256.             //
  257.             this.buttonInfoCliente.Dock = System.Windows.Forms.DockStyle.Right;
  258.             this.buttonInfoCliente.Location = new System.Drawing.Point(654, 16);
  259.             this.buttonInfoCliente.Name = "buttonInfoCliente";
  260.             this.buttonInfoCliente.Size = new System.Drawing.Size(18, 21);
  261.             this.buttonInfoCliente.TabIndex = 3;
  262.             this.buttonInfoCliente.TabStop = false;
  263.             this.buttonInfoCliente.Text = "?";
  264.             this.buttonInfoCliente.UseVisualStyleBackColor = true;
  265.             this.buttonInfoCliente.Click += new System.EventHandler(this.buttonInfoCliente_Click);
  266.             //
  267.             // icampoCliente
  268.             //
  269.             this.icampoCliente.Dock = System.Windows.Forms.DockStyle.Left;
  270.             this.icampoCliente.Location = new System.Drawing.Point(3, 16);
  271.             this.icampoCliente.Margin = new System.Windows.Forms.Padding(3, 3, 6, 3);
  272.             this.icampoCliente.Name = "icampoCliente";
  273.             this.icampoCliente.Size = new System.Drawing.Size(49, 20);
  274.             this.icampoCliente.TabIndex = 0;
  275.             this.icampoCliente.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
  276.             this.icampoCliente.KeyDown += new System.Windows.Forms.KeyEventHandler(this.icampoCliente_KeyDown);
  277.             this.icampoCliente.Leave += new System.EventHandler(this.icampoCliente_Leave);
  278.             //
  279.             // panelTools
  280.             //
  281.             this.panelTools.BackColor = System.Drawing.SystemColors.ControlLight;
  282.             this.panelTools.Controls.Add(this.buttonTool5);
  283.             this.panelTools.Controls.Add(this.buttonTool4);
  284.             this.panelTools.Controls.Add(this.buttonTool3);
  285.             this.panelTools.Controls.Add(this.buttonTool2);
  286.             this.panelTools.Controls.Add(this.panelColor);
  287.             this.panelTools.Controls.Add(this.buttonColorWhite);
  288.             this.panelTools.Controls.Add(this.buttonColorBlack);
  289.             this.panelTools.Controls.Add(this.buttonColorGreen);
  290.             this.panelTools.Controls.Add(this.buttonColorYellow);
  291.             this.panelTools.Controls.Add(this.buttonColorRed);
  292.             this.panelTools.Controls.Add(this.buttonColorBlue);
  293.             this.panelTools.Controls.Add(this.buttonTool1);
  294.             this.panelTools.Controls.Add(this.buttonTool0);
  295.             this.panelTools.Controls.Add(this.buttonZoomOut);
  296.             this.panelTools.Controls.Add(this.buttonZoomIn);
  297.             this.panelTools.Dock = System.Windows.Forms.DockStyle.Left;
  298.             this.panelTools.Location = new System.Drawing.Point(0, 157);
  299.             this.panelTools.Name = "panelTools";
  300.             this.panelTools.Size = new System.Drawing.Size(76, 367);
  301.             this.panelTools.TabIndex = 1;
  302.             //
  303.             // panelColor
  304.             //
  305.             this.panelColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  306.             this.panelColor.BackColor = System.Drawing.Color.Black;
  307.             this.panelColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  308.             this.panelColor.Location = new System.Drawing.Point(18, 200);
  309.             this.panelColor.Name = "panelColor";
  310.             this.panelColor.Size = new System.Drawing.Size(40, 40);
  311.             this.panelColor.TabIndex = 13;
  312.             //
  313.             // buttonColorWhite
  314.             //
  315.             this.buttonColorWhite.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  316.             this.buttonColorWhite.BackColor = System.Drawing.Color.White;
  317.             this.buttonColorWhite.Location = new System.Drawing.Point(39, 248);
  318.             this.buttonColorWhite.Name = "buttonColorWhite";
  319.             this.buttonColorWhite.Size = new System.Drawing.Size(34, 34);
  320.             this.buttonColorWhite.TabIndex = 12;
  321.             this.buttonColorWhite.UseVisualStyleBackColor = false;
  322.             this.buttonColorWhite.Click += new System.EventHandler(this.buttonColor_Click);
  323.             //
  324.             // buttonColorBlack
  325.             //
  326.             this.buttonColorBlack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  327.             this.buttonColorBlack.BackColor = System.Drawing.Color.Black;
  328.             this.buttonColorBlack.Location = new System.Drawing.Point(3, 248);
  329.             this.buttonColorBlack.Name = "buttonColorBlack";
  330.             this.buttonColorBlack.Size = new System.Drawing.Size(34, 34);
  331.             this.buttonColorBlack.TabIndex = 10;
  332.             this.buttonColorBlack.UseVisualStyleBackColor = false;
  333.             this.buttonColorBlack.Click += new System.EventHandler(this.buttonColor_Click);
  334.             //
  335.             // buttonColorGreen
  336.             //
  337.             this.buttonColorGreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  338.             this.buttonColorGreen.BackColor = System.Drawing.Color.Green;
  339.             this.buttonColorGreen.Location = new System.Drawing.Point(39, 284);
  340.             this.buttonColorGreen.Name = "buttonColorGreen";
  341.             this.buttonColorGreen.Size = new System.Drawing.Size(34, 34);
  342.             this.buttonColorGreen.TabIndex = 9;
  343.             this.buttonColorGreen.UseVisualStyleBackColor = false;
  344.             this.buttonColorGreen.Click += new System.EventHandler(this.buttonColor_Click);
  345.             //
  346.             // buttonColorYellow
  347.             //
  348.             this.buttonColorYellow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  349.             this.buttonColorYellow.BackColor = System.Drawing.Color.Yellow;
  350.             this.buttonColorYellow.Location = new System.Drawing.Point(39, 320);
  351.             this.buttonColorYellow.Name = "buttonColorYellow";
  352.             this.buttonColorYellow.Size = new System.Drawing.Size(34, 34);
  353.             this.buttonColorYellow.TabIndex = 8;
  354.             this.buttonColorYellow.UseVisualStyleBackColor = false;
  355.             this.buttonColorYellow.Click += new System.EventHandler(this.buttonColor_Click);
  356.             //
  357.             // buttonColorRed
  358.             //
  359.             this.buttonColorRed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  360.             this.buttonColorRed.BackColor = System.Drawing.Color.Red;
  361.             this.buttonColorRed.Location = new System.Drawing.Point(3, 284);
  362.             this.buttonColorRed.Name = "buttonColorRed";
  363.             this.buttonColorRed.Size = new System.Drawing.Size(34, 34);
  364.             this.buttonColorRed.TabIndex = 7;
  365.             this.buttonColorRed.UseVisualStyleBackColor = false;
  366.             this.buttonColorRed.Click += new System.EventHandler(this.buttonColor_Click);
  367.             //
  368.             // buttonColorBlue
  369.             //
  370.             this.buttonColorBlue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
  371.             this.buttonColorBlue.BackColor = System.Drawing.Color.Blue;
  372.             this.buttonColorBlue.Location = new System.Drawing.Point(3, 320);
  373.             this.buttonColorBlue.Name = "buttonColorBlue";
  374.             this.buttonColorBlue.Size = new System.Drawing.Size(34, 34);
  375.             this.buttonColorBlue.TabIndex = 6;
  376.             this.buttonColorBlue.UseVisualStyleBackColor = false;
  377.             this.buttonColorBlue.Click += new System.EventHandler(this.buttonColor_Click);
  378.             //
  379.             // panelZoom
  380.             //
  381.             this.panelZoom.AutoScroll = true;
  382.             this.panelZoom.BackColor = System.Drawing.SystemColors.ButtonShadow;
  383.             this.panelZoom.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  384.             this.panelZoom.Controls.Add(this.pictureBoxView);
  385.             this.panelZoom.Dock = System.Windows.Forms.DockStyle.Fill;
  386.             this.panelZoom.Location = new System.Drawing.Point(76, 157);
  387.             this.panelZoom.Name = "panelZoom";
  388.             this.panelZoom.Size = new System.Drawing.Size(599, 367);
  389.             this.panelZoom.TabIndex = 2;
  390.             //
  391.             // pictureBoxView
  392.             //
  393.             this.pictureBoxView.BackColor = System.Drawing.Color.White;
  394.             this.pictureBoxView.Location = new System.Drawing.Point(1, 1);
  395.             this.pictureBoxView.Name = "pictureBoxView";
  396.             this.pictureBoxView.Size = new System.Drawing.Size(583, 351);
  397.             this.pictureBoxView.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
  398.             this.pictureBoxView.TabIndex = 0;
  399.             this.pictureBoxView.TabStop = false;
  400.             this.pictureBoxView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoxView_MouseDown);
  401.             this.pictureBoxView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBoxView_MouseMove);
  402.             this.pictureBoxView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBoxView_MouseUp);
  403.             //
  404.             // buttonTool5
  405.             //
  406.             this.buttonTool5.Image = global::IntegraDoctor.Properties.Resources.Arrow_Circle_icon;
  407.             this.buttonTool5.Location = new System.Drawing.Point(39, 111);
  408.             this.buttonTool5.Name = "buttonTool5";
  409.             this.buttonTool5.Size = new System.Drawing.Size(34, 34);
  410.             this.buttonTool5.TabIndex = 18;
  411.             this.buttonTool5.Tag = "5";
  412.             this.toolTip1.SetToolTip(this.buttonTool5, "Círculo");
  413.             this.buttonTool5.UseVisualStyleBackColor = true;
  414.             this.buttonTool5.Click += new System.EventHandler(this.buttonTool_Click);
  415.             //
  416.             // buttonTool4
  417.             //
  418.             this.buttonTool4.Image = global::IntegraDoctor.Properties.Resources.Rectangle;
  419.             this.buttonTool4.Location = new System.Drawing.Point(3, 111);
  420.             this.buttonTool4.Name = "buttonTool4";
  421.             this.buttonTool4.Size = new System.Drawing.Size(34, 34);
  422.             this.buttonTool4.TabIndex = 17;
  423.             this.buttonTool4.Tag = "4";
  424.             this.toolTip1.SetToolTip(this.buttonTool4, "Retângulo");
  425.             this.buttonTool4.UseVisualStyleBackColor = true;
  426.             this.buttonTool4.Click += new System.EventHandler(this.buttonTool_Click);
  427.             //
  428.             // buttonTool3
  429.             //
  430.             this.buttonTool3.Image = global::IntegraDoctor.Properties.Resources.Arrow;
  431.             this.buttonTool3.Location = new System.Drawing.Point(39, 76);
  432.             this.buttonTool3.Name = "buttonTool3";
  433.             this.buttonTool3.Size = new System.Drawing.Size(34, 34);
  434.             this.buttonTool3.TabIndex = 16;
  435.             this.buttonTool3.Tag = "3";
  436.             this.toolTip1.SetToolTip(this.buttonTool3, "Seta");
  437.             this.buttonTool3.UseVisualStyleBackColor = true;
  438.             this.buttonTool3.Click += new System.EventHandler(this.buttonTool_Click);
  439.             //
  440.             // buttonTool2
  441.             //
  442.             this.buttonTool2.Image = global::IntegraDoctor.Properties.Resources.Eraser_icon;
  443.             this.buttonTool2.Location = new System.Drawing.Point(3, 76);
  444.             this.buttonTool2.Name = "buttonTool2";
  445.             this.buttonTool2.Size = new System.Drawing.Size(34, 34);
  446.             this.buttonTool2.TabIndex = 15;
  447.             this.buttonTool2.Tag = "2";
  448.             this.toolTip1.SetToolTip(this.buttonTool2, "Borracha (Apenas na ultima ferramenta Utilizada)");
  449.             this.buttonTool2.UseVisualStyleBackColor = true;
  450.             this.buttonTool2.Click += new System.EventHandler(this.buttonTool_Click);
  451.             //
  452.             // buttonTool1
  453.             //
  454.             this.buttonTool1.Image = global::IntegraDoctor.Properties.Resources.brush_icon;
  455.             this.buttonTool1.Location = new System.Drawing.Point(39, 41);
  456.             this.buttonTool1.Name = "buttonTool1";
  457.             this.buttonTool1.Size = new System.Drawing.Size(34, 34);
  458.             this.buttonTool1.TabIndex = 5;
  459.             this.buttonTool1.Tag = "1";
  460.             this.toolTip1.SetToolTip(this.buttonTool1, "Pincel");
  461.             this.buttonTool1.UseVisualStyleBackColor = true;
  462.             this.buttonTool1.Click += new System.EventHandler(this.buttonTool_Click);
  463.             //
  464.             // buttonTool0
  465.             //
  466.             this.buttonTool0.BackColor = System.Drawing.SystemColors.ButtonShadow;
  467.             this.buttonTool0.Image = global::IntegraDoctor.Properties.Resources.cursor_icon;
  468.             this.buttonTool0.Location = new System.Drawing.Point(3, 41);
  469.             this.buttonTool0.Name = "buttonTool0";
  470.             this.buttonTool0.Size = new System.Drawing.Size(34, 34);
  471.             this.buttonTool0.TabIndex = 4;
  472.             this.buttonTool0.Tag = "0";
  473.             this.toolTip1.SetToolTip(this.buttonTool0, "Nenhuma Ferramenta");
  474.             this.buttonTool0.UseVisualStyleBackColor = false;
  475.             this.buttonTool0.Click += new System.EventHandler(this.buttonTool_Click);
  476.             //
  477.             // buttonZoomOut
  478.             //
  479.             this.buttonZoomOut.Image = global::IntegraDoctor.Properties.Resources.Rem_24;
  480.             this.buttonZoomOut.Location = new System.Drawing.Point(39, 6);
  481.             this.buttonZoomOut.Name = "buttonZoomOut";
  482.             this.buttonZoomOut.Size = new System.Drawing.Size(34, 34);
  483.             this.buttonZoomOut.TabIndex = 3;
  484.             this.toolTip1.SetToolTip(this.buttonZoomOut, "Reduz o Tamanho da Imagem");
  485.             this.buttonZoomOut.UseVisualStyleBackColor = true;
  486.             this.buttonZoomOut.Click += new System.EventHandler(this.buttonZoomOut_Click);
  487.             //
  488.             // buttonZoomIn
  489.             //
  490.             this.buttonZoomIn.Image = global::IntegraDoctor.Properties.Resources.Add_24;
  491.             this.buttonZoomIn.Location = new System.Drawing.Point(3, 6);
  492.             this.buttonZoomIn.Name = "buttonZoomIn";
  493.             this.buttonZoomIn.Size = new System.Drawing.Size(34, 34);
  494.             this.buttonZoomIn.TabIndex = 2;
  495.             this.toolTip1.SetToolTip(this.buttonZoomIn, "Aumenta o Tamanho da Imagem");
  496.             this.buttonZoomIn.UseVisualStyleBackColor = true;
  497.             this.buttonZoomIn.Click += new System.EventHandler(this.buttonZoomIn_Click);
  498.             //
  499.             // button1
  500.             //
  501.             this.button1.Dock = System.Windows.Forms.DockStyle.Left;
  502.             this.button1.Image = global::IntegraDoctor.Properties.Resources.Save ;
  503.             this.button1.Location = new System.Drawing.Point(3, 0);
  504.             this.button1.Name = "button1";
  505.             this.button1.Size = new System.Drawing.Size(34, 34);
  506.             this.button1.TabIndex = 12;
  507.             this.toolTip1.SetToolTip(this.button1, "Salvar Mudanças Na Imagem");
  508.             this.button1.UseVisualStyleBackColor = true;
  509.             this.button1.Click += new System.EventHandler(this.buttonSalvar_Click);
  510.             //
  511.             // buttonConsultaCliente
  512.             //
  513.             this.buttonConsultaCliente.Dock = System.Windows.Forms.DockStyle.Left;
  514.             this.buttonConsultaCliente.Image = ((System.Drawing.Image)(resources.GetObject("buttonConsultaCliente.Image")));
  515.             this.buttonConsultaCliente.Location = new System.Drawing.Point(52, 16);
  516.             this.buttonConsultaCliente.Name = "buttonConsultaCliente";
  517.             this.buttonConsultaCliente.Size = new System.Drawing.Size(27, 21);
  518.             this.buttonConsultaCliente.TabIndex = 1;
  519.             this.buttonConsultaCliente.TabStop = false;
  520.             this.buttonConsultaCliente.UseVisualStyleBackColor = true;
  521.             this.buttonConsultaCliente.Click += new System.EventHandler(this.buttonConsultaCliente_Click);
  522.             //
  523.             // FormEditarImagens
  524.             //
  525.             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  526.             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  527.             this.ClientSize = new System.Drawing.Size(675, 524);
  528.             this.Controls.Add(this.panelZoom);
  529.             this.Controls.Add(this.panelTools);
  530.             this.Controls.Add(this.panel1);
  531.             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  532.             this.KeyPreview = true;
  533.             this.Name = "FormEditarImagens";
  534.             this.Text = "Editar Imagens";
  535.             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
  536.             this.Load += new System.EventHandler(this.FormEditarImagens_Load);
  537.             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FormEditarImagens_KeyDown);
  538.             this.panel1.ResumeLayout(false);
  539.             this.panel2.ResumeLayout(false);
  540.             this.panel3.ResumeLayout(false);
  541.             this.panel3.PerformLayout();
  542.             this.panelOptionsTool.ResumeLayout(false);
  543.             this.flowLayoutPanelOptions.ResumeLayout(false);
  544.             ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTamanho)).EndInit();
  545.             this.groupBoxCliente.ResumeLayout(false);
  546.             this.groupBoxCliente.PerformLayout();
  547.             this.panelTools.ResumeLayout(false);
  548.             this.panelZoom.ResumeLayout(false);
  549.             this.panelZoom.PerformLayout();
  550.             ((System.ComponentModel.ISupportInitialize)(this.pictureBoxView)).EndInit();
  551.             this.ResumeLayout(false);
  552.  
  553.         }
  554.  
  555.         #endregion
  556.  
  557.         private System.Windows.Forms.Panel panel1;
  558.         private System.Windows.Forms.Panel panelTools;
  559.         private System.Windows.Forms.Panel panelZoom;
  560.         private System.Windows.Forms.GroupBox groupBoxCliente;
  561.         private System.Windows.Forms.TextBox icampoClienteNome;
  562.         private System.Windows.Forms.Button buttonEditarCliente;
  563.         private System.Windows.Forms.Button buttonInfoCliente;
  564.         private System.Windows.Forms.Button buttonConsultaCliente;
  565.         private System.Windows.Forms.TextBox icampoCliente;
  566.         private System.Windows.Forms.PictureBox pictureBoxView;
  567.         private System.Windows.Forms.Button buttonZoomOut;
  568.         private System.Windows.Forms.Button buttonZoomIn;
  569.         private System.Windows.Forms.Button buttonTool0;
  570.         private System.Windows.Forms.Button buttonTool1;
  571.         private System.Windows.Forms.Button buttonColorWhite;
  572.         private System.Windows.Forms.Button buttonColorBlack;
  573.         private System.Windows.Forms.Button buttonColorGreen;
  574.         private System.Windows.Forms.Button buttonColorYellow;
  575.         private System.Windows.Forms.Button buttonColorRed;
  576.         private System.Windows.Forms.Button buttonColorBlue;
  577.         private System.Windows.Forms.Panel panelColor;
  578.         private System.Windows.Forms.Button buttonTool5;
  579.         private System.Windows.Forms.Button buttonTool4;
  580.         private System.Windows.Forms.Button buttonTool3;
  581.         private System.Windows.Forms.Button buttonTool2;
  582.         private System.Windows.Forms.ToolTip toolTip1;
  583.         private System.Windows.Forms.Panel panel3;
  584.         private System.Windows.Forms.Button button1;
  585.         private System.Windows.Forms.Panel panelOptionsTool;
  586.         private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelOptions;
  587.         private System.Windows.Forms.Label labelCodigoImagem;
  588.         private System.Windows.Forms.Label label1;
  589.         private System.Windows.Forms.NumericUpDown numericUpDownTamanho;
  590.         private System.Windows.Forms.TextBox textBoxNome;
  591.         private System.Windows.Forms.Label labelData;
  592.         private System.Windows.Forms.Panel panel2;
  593.         private System.Windows.Forms.Panel panelMiniaturas;
  594.         private System.Windows.Forms.Panel panel4;
  595.     }
  596. }
  597.  
  598.  
  599. using System;
  600. using System.Collections.Generic;
  601. using System.ComponentModel;
  602. using System.Data;
  603. using System.Drawing;
  604. using System.Text;
  605. using System.Windows.Forms;
  606.  
  607. namespace IntegraDoctor.forms.rotinas
  608. {
  609.     public partial class FormEditarImagens : Form
  610.     {
  611.  
  612.         PictureBox pic1, pic2, pic3;
  613.         int camada;
  614.         private Point mouseDownPosition = Point.Empty;
  615.         public string Usuario { get; set; }
  616.         public string Empresa { get; set; }
  617.         public string Cliente { get; set; }
  618.  
  619.         public FormEditarImagens()
  620.         {
  621.             InitializeComponent();
  622.             Funcoes.ColorirObjetos(this);
  623.             Funcoes.TrocaTabPorEnter(this);
  624.         }
  625.  
  626.         int tool;
  627.         private void CarregarCliente(string cod)
  628.         {
  629.             IntegraClieFornec obj = new IntegraClieFornec();
  630.             obj.loadImages = true;
  631.             obj.Select(cod);
  632.             if (obj.Codigo != null)
  633.             {
  634.                 if (!obj.PFisica)
  635.                 {
  636.                     icampoCliente.Focus();
  637.                 }
  638.                 else
  639.                 {
  640.                     icampoCliente.Text = obj.Codigo;
  641.                     icampoClienteNome.Text = obj.Nome;
  642.                     CarregarImagens(obj.DtImagens);
  643.                 }
  644.             }
  645.             else
  646.             {
  647.                 icampoCliente.Focus();
  648.             }
  649.         }
  650.         private List<string[]> imgInfo;
  651.         private void CarregarImagens(DataTable dt)
  652.         {
  653.             panelMiniaturas.Controls.Clear();
  654.  
  655.             int i = 0;
  656.             List<PictureBox> pics;
  657.  
  658.             if (dt != null)
  659.             {
  660.                 pics = new List<PictureBox>(dt.Rows.Count);
  661.                 imgInfo = new List<string[]>(dt.Rows.Count);
  662.                 foreach (DataRow r in dt.Rows)
  663.                 {
  664.                     Image img;
  665.                     byte[] MyData = new byte[0];
  666.                     MyData = r["imagem_bytes"].ToString().Length != 0 ? (byte[])r["imagem_bytes"] : MyData;
  667.                     img = MyData.Length == 0 ? null : Funcoes.ByteToImage(MyData);
  668.                     PictureBox pic = new PictureBox();
  669.                     pic.Name = r["imagem_codigo"].ToString();
  670.                     pic.Image = img;
  671.                     pic.Tag = i.ToString();
  672.                     i++;
  673.                     pic.BackColor = SystemColors.Control;
  674.                     pic.Parent = panelMiniaturas;
  675.                     pic.Size = new Size(75, 70);
  676.                     pic.SizeMode = PictureBoxSizeMode.Zoom;
  677.                     pic.Click += new System.EventHandler(this.pictureBoxMiniatura_Click);
  678.                     pics.Add(pic);
  679.                     string[] s = new string[2];
  680.                     s[0] = r["imagem_nome"].ToString();
  681.                     s[1] = DateTime.Parse(r["imagem_data"].ToString()).ToShortDateString();
  682.                     imgInfo.Add(s);
  683.                 }
  684.                 i = 10;
  685.                 foreach (PictureBox pic in pics)
  686.                 {
  687.                     pic.Left = i;
  688.                     pic.Top = 2;
  689.                     pic.Show();
  690.                     i = pic.Right + 10;
  691.                 }
  692.  
  693.                 pics.Clear();
  694.             }
  695.         }
  696.         private void pictureBoxMiniatura_Click(object sender, EventArgs e)
  697.         {
  698.             labelCodigoImagem.Text = ((PictureBox)sender).Name;
  699.             pictureBoxView.Image = ((PictureBox)sender).Image;
  700.             string tag = ((PictureBox)sender).Tag == null ? "" : ((PictureBox)sender).Tag.ToString();
  701.             NewPictureBox();
  702.             if (!String.IsNullOrEmpty(tag))
  703.             {
  704.                 textBoxNome.Text = imgInfo[int.Parse(tag)][0].ToString();
  705.                 labelData.Text = imgInfo[int.Parse(tag)][1].ToString();
  706.             }
  707.             else
  708.             {
  709.                 textBoxNome.Text = "Erro ao carregar Info";
  710.                 labelData.Text = "";
  711.             }
  712.  
  713.         }
  714.  
  715.         private Bitmap BmpTransparente()
  716.         {
  717.             Bitmap bmp = new Bitmap(pictureBoxView.Image,pictureBoxView.Width, pictureBoxView.Height);
  718.             Graphics g = Graphics.FromImage(bmp);
  719.             g.Clear(Color.Transparent);
  720.             return bmp;
  721.         }
  722.  
  723.         private void NewPictureBox()
  724.         {
  725.             if (pic1 != null)
  726.                 if (pictureBoxView.Controls.Contains(pic1))
  727.                     pictureBoxView.Controls.Remove(pic1);
  728.  
  729.             if (pic2 != null)
  730.                 if (pictureBoxView.Controls.Contains(pic2))
  731.                     pictureBoxView.Controls.Remove(pic2);
  732.  
  733.             if (pic3 != null)
  734.                 if (pictureBoxView.Controls.Contains(pic3))
  735.                     pictureBoxView.Controls.Remove(pic3);
  736.  
  737.  
  738.             pic1 = NewPic();
  739.             //pic2 = NewPic();
  740.             //pic3 = NewPic();
  741.            
  742.             pic1.Show();
  743.             camada = 1;
  744.         }
  745.  
  746.         private PictureBox NewPic()
  747.         {
  748.             PictureBox r = new PictureBox();
  749.             r.BackColor = Color.Transparent;
  750.             r.Height = pictureBoxView.Height;
  751.             r.Width = pictureBoxView.Width;
  752.             r.Parent = pictureBoxView;
  753.             r.Location = new Point(0,0);
  754.             r.Image = BmpTransparente();
  755.             r.MouseDown += new MouseEventHandler(pictureBoxView_MouseDown);
  756.             r.MouseMove += new MouseEventHandler(pictureBoxView_MouseMove);
  757.             r.MouseUp += new MouseEventHandler(pictureBoxView_MouseUp);
  758.             return r;
  759.         }
  760.  
  761.  
  762.         private void ZoomInOut(bool zoom)
  763.         {
  764.             if (pictureBoxView.Image == null)
  765.                 return;
  766.             //Zoom ratio by which the images will be zoomed by default
  767.             int zoomRatio = 10;
  768.             //Set the zoomed width and height
  769.             int widthZoom = pictureBoxView.Width * zoomRatio / 100;
  770.             int heightZoom = pictureBoxView.Height * zoomRatio / 100;
  771.  
  772.  
  773.             //zoom = true --> zoom in
  774.             //zoom = false --> zoom out
  775.             if (!zoom)
  776.             {
  777.                 widthZoom *= -1;
  778.                 heightZoom *= -1;
  779.             }
  780.             //Add the width and height to the picture box dimensions
  781.  
  782.             //pictureBoxView.Width += widthZoom;
  783.             //pictureBoxView.Height += heightZoom;
  784.  
  785.             Size newSize = new Size((int)(pictureBoxView.Width + widthZoom), (int)(pictureBoxView.Height + heightZoom));
  786.             {
  787.                 Bitmap bmp = new Bitmap(pictureBoxView.Image, newSize);
  788.                 pictureBoxView.Image = bmp;
  789.             }
  790.             {
  791.                 Bitmap bmp = new Bitmap(pic1.Image, newSize);
  792.                 pic1.Image = bmp;
  793.             }
  794.            
  795.  
  796.  
  797.             //pictureBoxView.Scale(new SizeF(pictureBoxView.Width + widthZoom, pictureBoxView.Height + heightZoom));
  798.  
  799.         }
  800.         private void buttonZoomIn_Click(object sender, EventArgs e)
  801.         {
  802.             ZoomInOut(true);
  803.         }
  804.         private void buttonZoomOut_Click(object sender, EventArgs e)
  805.         {
  806.             ZoomInOut(false);
  807.         }
  808.  
  809.         int iX;
  810.         int iY;
  811.         int vX;
  812.         int vY;
  813.         decimal tam;
  814.         private void pictureBoxView_MouseMove(object sender, MouseEventArgs e)
  815.         {
  816.             if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 0)
  817.             {
  818.                 int dY = (iY - e.Y) > 0 ? vY + (iY - e.Y) : vY - ((iY - e.Y) * -1);
  819.                 int dX = (iX - e.X) > 0 ? vX + (iX - e.X) : vX - ((iX - e.X) * -1);
  820.                 panelZoom.VerticalScroll.Value = (dY < panelZoom.VerticalScroll.Minimum ? panelZoom.VerticalScroll.Minimum : (dY > panelZoom.VerticalScroll.Maximum ? panelZoom.VerticalScroll.Maximum : dY));
  821.                 panelZoom.HorizontalScroll.Value = (dX < panelZoom.HorizontalScroll.Minimum ? panelZoom.HorizontalScroll.Minimum : (dX > panelZoom.HorizontalScroll.Maximum ? panelZoom.HorizontalScroll.Maximum : dX));
  822.                 pictureBoxView.Refresh();
  823.  
  824.             }
  825.             else if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 1)
  826.                 Brush(e);
  827.             else if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 2)
  828.                 Borracha(e);
  829.             else if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 3)
  830.                 Seta(e);
  831.             else if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 4)
  832.                 Retangulo(e);
  833.             else if (e.Button == System.Windows.Forms.MouseButtons.Left && tool == 5)
  834.                 Circulo(e);
  835.  
  836.         }
  837.         private void pictureBoxView_MouseDown(object sender, MouseEventArgs e)
  838.         {
  839.                
  840.             iX = e.X;
  841.             iY = e.Y;
  842.             vX = panelZoom.HorizontalScroll.Value;
  843.             vY = panelZoom.VerticalScroll.Value;
  844.             mouseDownPosition = e.Location;
  845.  
  846.             tam = numericUpDownTamanho.Value;
  847.             if (tool!=2)
  848.                 UpdateImage();
  849.  
  850.             if (tool == 1)
  851.                 Brush(e);
  852.             else if (tool == 2)
  853.                 Borracha(e);
  854.          
  855.         }
  856.         private void Brush(MouseEventArgs e)
  857.         {
  858.             int t = int.Parse(tam.ToString());
  859.             var g = Graphics.FromImage(camada == 1 ? pic1.Image : (camada == 2 ? pic2.Image : pic3.Image));
  860.             //g.Clear(Color.Transparent);
  861.             g.FillEllipse(new SolidBrush(panelColor.BackColor), e.X - (t/2), e.Y - (t/2),t ,t );
  862.             RefreshPictureBox();
  863.             g.Dispose();
  864.            
  865.         }
  866.         private void Borracha(MouseEventArgs e)
  867.         {
  868.             int t = int.Parse(tam.ToString());
  869.             var g = Graphics.FromImage(camada == 1 ? pic1.Image : (camada == 2 ? pic2.Image : pic3.Image));
  870.             //g.Clear(Color.Transparent);
  871.             g.FillEllipse(new SolidBrush(Color.Magenta), e.X - (t / 2), e.Y - (t / 2), t, t);
  872.             Bitmap b = (camada == 1 ? (Bitmap)pic1.Image : (camada == 2 ? (Bitmap)pic2.Image : (Bitmap)pic3.Image));
  873.             b.MakeTransparent(Color.Magenta);
  874.             if (camada == 1)
  875.                 pic1.Image = b;
  876.             else if (camada == 2)
  877.                 pic2.Image = b;
  878.             else
  879.                 pic3.Image = b;
  880.          
  881.             g.Dispose();
  882.         }
  883.         private void Seta(MouseEventArgs e)
  884.         {
  885.             var g = Graphics.FromImage(camada == 1 ? pic1.Image : (camada == 2 ? pic2.Image : pic3.Image));
  886.             g.Clear(Color.Transparent);
  887.             SolidBrush br = new SolidBrush(panelColor.BackColor);
  888.             Pen p = new Pen(br);
  889.             p.Width =  (float)tam;
  890.             p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
  891.             g.DrawLine(p, mouseDownPosition, e.Location);
  892.             RefreshPictureBox();
  893.             g.Dispose();
  894.             p.Dispose();
  895.             br.Dispose();
  896.         }
  897.         private void Circulo(MouseEventArgs e)
  898.         {
  899.             var g = Graphics.FromImage(camada == 1 ? pic1.Image : (camada == 2 ? pic2.Image : pic3.Image));
  900.  
  901.             g.Clear(Color.Transparent);
  902.             SolidBrush br = new SolidBrush(panelColor.BackColor);
  903.             Pen p = new Pen(br);
  904.             p.Width = (float)tam;
  905.  
  906.             int W = e.Location.X - mouseDownPosition.X;
  907.             int H = e.Location.Y - mouseDownPosition.Y;
  908.             if (W > 0 && H > 0)
  909.                 g.DrawEllipse(p, mouseDownPosition.X, mouseDownPosition.Y, W, H);
  910.             else if (W > 0 && H < 0)
  911.             {
  912.                 H *= -1;
  913.                 g.DrawEllipse(p, mouseDownPosition.X, e.Location.Y, W, H);
  914.             }
  915.             else if (W < 0 && H > 0)
  916.             {
  917.                 W *= -1;
  918.                 g.DrawEllipse(p, e.Location.X, mouseDownPosition.Y, W, H);
  919.             }
  920.             else
  921.             {
  922.                 W *= -1;
  923.                 H *= -1;
  924.                 g.DrawEllipse(p, e.Location.X, e.Location.Y, W, H);
  925.             }
  926.  
  927.  
  928.             RefreshPictureBox();
  929.             g.Dispose();
  930.             p.Dispose();
  931.             br.Dispose();
  932.         }
  933.         private void Retangulo(MouseEventArgs e)
  934.         {
  935.             var g = Graphics.FromImage(camada == 1 ? pic1.Image : (camada == 2 ? pic2.Image : pic3.Image));
  936.             g.Clear(Color.Transparent);
  937.             SolidBrush br = new SolidBrush(panelColor.BackColor);
  938.             Pen p = new Pen(br);
  939.             p.Width = (float)tam;
  940.             int W = e.Location.X - mouseDownPosition.X;
  941.             int H = e.Location.Y - mouseDownPosition.Y;
  942.             if (W > 0 && H > 0)
  943.                 g.DrawRectangle(p, mouseDownPosition.X, mouseDownPosition.Y, W, H);
  944.             else if (W > 0 && H < 0)
  945.             {
  946.                 H *= -1;
  947.                 g.DrawRectangle(p, mouseDownPosition.X, e.Location.Y, W, H);
  948.             }
  949.             else if (W < 0 && H > 0)
  950.             {
  951.                 W *= -1;
  952.                 g.DrawRectangle(p, e.Location.X, mouseDownPosition.Y, W, H);
  953.             }
  954.             else
  955.             {
  956.                 W *= -1;
  957.                 H *= -1;
  958.                 g.DrawRectangle(p, e.Location.X, e.Location.Y, W, H);
  959.             }
  960.  
  961.             RefreshPictureBox();
  962.             g.Dispose();
  963.             p.Dispose();
  964.             br.Dispose();
  965.         }
  966.         private void Undo()
  967.         {
  968.             pic1.Image = BmpTransparente();
  969.         }
  970.         private void RefreshPictureBox()
  971.         {
  972.             if (camada == 1)
  973.                 pic1.Refresh();
  974.             else if (camada == 2)
  975.                 pic2.Refresh();
  976.             else
  977.                 pic3.Refresh();
  978.         }
  979.         private void UpdateImage()
  980.         {
  981.             Bitmap bmp = new Bitmap(pictureBoxView.Image);
  982.             pictureBoxView.Image = bmp;
  983.             var g = Graphics.FromImage(pictureBoxView.Image);
  984.             g.DrawImage(pic1.Image, 0,0);
  985.             g.Dispose();
  986.             pictureBoxView.Refresh();
  987.         }
  988.         private void buttonColor_Click(object sender, EventArgs e)
  989.         {
  990.             panelColor.BackColor = ((Button)sender).BackColor;
  991.         }
  992.         private void LimparCliente()
  993.         {
  994.             Funcoes.ClearControl(groupBoxCliente.Controls);
  995.            
  996.         }
  997.         private void ConsultaCliente()
  998.         {
  999.             sIntegra.IntegraConsulta form = new sIntegra.IntegraConsulta();
  1000.             form.objConsulta = new IntegraClieFornec();
  1001.             form.Padrao = false;
  1002.             form.Where = " where cliefornec_pfisico='t' ";
  1003.             form.ShowDialog();
  1004.             if (form.objConsulta.Codigo != null)
  1005.             {
  1006.                 CarregarCliente(form.objConsulta.Codigo);
  1007.             }
  1008.         }
  1009.         private void icampoCliente_Leave(object sender, EventArgs e)
  1010.         {
  1011.             if (icampoCliente.Text.Length != 0)
  1012.                 CarregarCliente(icampoCliente.Text);
  1013.             else LimparCliente();
  1014.         }
  1015.         private void buttonInfoCliente_Click(object sender, EventArgs e)
  1016.         {
  1017.             toolTip1.Show(IntegraClieFornec.InfoClieFornec(icampoCliente.Text), icampoCliente, 0, icampoCliente.Height, 3000);
  1018.         }
  1019.         private void buttonConsultaCliente_Click(object sender, EventArgs e)
  1020.         {
  1021.             ConsultaCliente();
  1022.         }
  1023.         private void icampoCliente_KeyDown(object sender, KeyEventArgs e)
  1024.         {
  1025.             if (e.KeyData == Keys.F2 && buttonConsultaCliente.Enabled)
  1026.             {
  1027.                 ConsultaCliente();
  1028.             }
  1029.         }
  1030.         private void buttonEditarCliente_Click(object sender, EventArgs e)
  1031.         {
  1032.             forms.CadClieFornec form = new forms.CadClieFornec();
  1033.             form.StartPosition = FormStartPosition.CenterParent;
  1034.             form.Usuario = this.Usuario;
  1035.             form.Empresa = this.Empresa;
  1036.             form.iObjeto = new IntegraClieFornec();
  1037.             form.Editar = true;
  1038.  
  1039.             if (icampoCliente.Text.Length != 0)
  1040.                 form.iObjeto.Codigo = icampoCliente.Text;
  1041.             form.ShowDialog();
  1042.             if (form.Retorno != null)
  1043.                 CarregarCliente(form.Retorno);
  1044.  
  1045.         }
  1046.         private void buttonTool_Click(object sender, EventArgs e)
  1047.         {
  1048.             tool = int.Parse(((Button)sender).Tag.ToString());
  1049.  
  1050.             foreach (Control c in panelTools.Controls)
  1051.             {
  1052.                 if (c is Button)
  1053.                 {
  1054.                     if (c.Name.Contains("buttonTool"))
  1055.                     {
  1056.                         c.BackColor = SystemColors.Control;
  1057.                     }
  1058.                 }
  1059.             }
  1060.  
  1061.             ((Button)sender).BackColor = SystemColors.ButtonShadow;
  1062.  
  1063.             ChangeTool();
  1064.         }
  1065.         private void ChangeTool()
  1066.         {
  1067.             if (tool == 0)
  1068.                 panelOptionsTool.Visible = false;
  1069.             else
  1070.                 panelOptionsTool.Visible = true;
  1071.         }
  1072.         private void FormEditarImagens_Load(object sender, EventArgs e)
  1073.         {
  1074.             pictureBoxView.Size = new Size(0, 0);
  1075.             if (!String.IsNullOrEmpty(Cliente))
  1076.             {
  1077.                 CarregarCliente(Cliente);
  1078.                 buttonConsultaCliente.Enabled = icampoCliente.Enabled = false;
  1079.             }
  1080.  
  1081.         }
  1082.         private void pictureBoxView_MouseUp(object sender, MouseEventArgs e)
  1083.         {
  1084.  
  1085.         }
  1086.         private void FormEditarImagens_KeyDown(object sender, KeyEventArgs e)
  1087.         {
  1088.             if (e.Control)
  1089.                 if (e.KeyData == Keys.Z || e.KeyValue == 90)
  1090.                     Undo();
  1091.         }
  1092.  
  1093.         private void buttonSalvar_Click(object sender, EventArgs e)
  1094.         {
  1095.             try
  1096.             {
  1097.                 UpdateImage();
  1098.                 IntegraImagens obj = new IntegraImagens();
  1099.  
  1100.                 if (!String.IsNullOrEmpty(labelCodigoImagem.Text))
  1101.                 {
  1102.                     obj.Select(labelCodigoImagem.Text);
  1103.                     obj.BImagem = Funcoes.ImageToByte(pictureBoxView.Image);
  1104.                     obj.Nome = textBoxNome.Text;
  1105.                     obj.Update();
  1106.                 }
  1107.                
  1108.  
  1109.                
  1110.                 CarregarCliente(icampoCliente.Text);
  1111.             }
  1112.             catch (Exception ex)
  1113.             {
  1114.                 MessageBox.Show(ex.Message);
  1115.             }
  1116.         }
  1117.     }
  1118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement