[Mono-bugs] [Bug 75324][Wis] New - Refresh not working

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jun 20 11:40:02 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by davide.morelli at parser.it.

http://bugzilla.ximian.com/show_bug.cgi?id=75324

--- shadow/75324	2005-06-20 11:40:02.000000000 -0400
+++ shadow/75324.tmp.16560	2005-06-20 11:40:02.000000000 -0400
@@ -0,0 +1,207 @@
+Bug#: 75324
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Mac OS X 10.3
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: davide.morelli at parser.it               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Refresh not working
+
+Refresh() doesn't work
+
+
+try this code:
+
+
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+namespace TestSWF1
+{
+	/// <summary>
+	/// Descrizione di riepilogo per Form1.
+	/// </summary>
+	public class Form1 : System.Windows.Forms.Form
+	{
+		private System.Windows.Forms.Panel area_diesgno;
+		private System.Windows.Forms.Button button1;
+		GraphicsPath gp = new GraphicsPath();
+		/// <summary>
+		/// Variabile di progettazione necessaria.
+		/// </summary>
+		private System.ComponentModel.Container components = null;
+
+		public Form1()
+		{
+			//
+			// Necessario per il supporto di Progettazione 
+Windows Form
+			//
+			InitializeComponent();
+
+			//
+			// TODO: aggiungere il codice del costruttore 
+dopo la chiamata a InitializeComponent
+			//
+		}
+
+		/// <summary>
+		/// Pulire le risorse in uso.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Codice generato da Progettazione Windows Form
+		/// <summary>
+		/// Metodo necessario per il supporto della finestra di 
+progettazione. Non modificare
+		/// il contenuto del metodo con l'editor di codice.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			this.area_diesgno = new System.Windows.Forms.Panel
+();
+			this.button1 = new System.Windows.Forms.Button();
+			this.SuspendLayout();
+			// 
+			// area_diesgno
+			// 
+			this.area_diesgno.BackColor = 
+System.Drawing.Color.White;
+			this.area_diesgno.BorderStyle = 
+System.Windows.Forms.BorderStyle.FixedSingle;
+			this.area_diesgno.Location = new 
+System.Drawing.Point(24, 48);
+			this.area_diesgno.Name = "area_diesgno";
+			this.area_diesgno.Size = new System.Drawing.Size
+(360, 272);
+			this.area_diesgno.TabIndex = 0;
+			this.area_diesgno.Paint += new 
+System.Windows.Forms.PaintEventHandler(this.area_diesgno_Paint);
+			this.area_diesgno.MouseMove += new 
+System.Windows.Forms.MouseEventHandler(this.area_diesgno_MouseMove);
+			// 
+			// button1
+			// 
+			this.button1.Location = new System.Drawing.Point
+(312, 16);
+			this.button1.Name = "button1";
+			this.button1.TabIndex = 1;
+			this.button1.Text = "button1";
+			// 
+			// Form1
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size
+(5, 13);
+			this.ClientSize = new System.Drawing.Size(416, 
+350);
+			this.Controls.Add(this.button1);
+			this.Controls.Add(this.area_diesgno);
+			this.Name = "Form1";
+			this.Text = "Form1";
+			this.MouseMove += new 
+System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		/// <summary>
+		/// Il punto di ingresso principale dell'applicazione.
+		/// </summary>
+		[STAThread]
+		static void Main() 
+		{
+			Application.Run(new Form1());
+		}
+
+		private Matrix matrice = new Matrix();
+		private void area_diesgno_Paint(object sender, 
+System.Windows.Forms.PaintEventArgs e)
+		{
+			try
+			{
+				//e.Graphics.Clear(Color.White);
+				e.Graphics.DrawLine(new Pen(Color.Black), 
+0,0,100,100);
+				GraphicsPath gp = new GraphicsPath();
+				//gp.AddLine(400,0,200,200);
+				PointF []punti = new PointF[3];
+				punti[0] = new PointF(0,0);
+				punti[1] = new PointF(100,150);
+				punti[2] = new PointF(200,200);
+				//			punti[3] = new 
+PointF(200,0);
+				//			punti[4] = new 
+PointF(100,100);
+				gp.AddCurve(punti);
+				gp.Transform(matrice);
+				e.Graphics.DrawPath(new Pen(Color.Blue), 
+gp);
+			} 
+			catch (Exception ex)
+			{
+				MessageBox.Show(ex.ToString());
+			}
+		}
+
+		private void Form1_MouseMove(object sender, 
+System.Windows.Forms.MouseEventArgs e)
+		{
+
+		}
+
+		private void area_diesgno_MouseMove(object sender, 
+System.Windows.Forms.MouseEventArgs e)
+		{
+			//MessageBox.Show("mousemove");
+			matrice = new Matrix();
+			matrice.Translate(e.X, e.Y);
+			//this.Refresh();
+			Refresh();
+
+		}
+	}
+}
+
+
+
+Actual Results:
+the form is not refreshed
+
+Expected Results:
+the curve should follow the cursor
+
+How often does this happen? 
+always
+
+
+
+How often does this happen? 
+Always
+
+Additional Information:
+OSX


More information about the mono-bugs mailing list