Changeset 474
- Timestamp:
- 11/7/2008 8:43:48 AM (5 years ago)
- Location:
- branches/eraser6/Eraser
- Files:
-
- 3 edited
-
AboutForm.Designer.cs (modified) (1 diff)
-
AboutForm.cs (modified) (7 diffs)
-
AboutForm.resx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/AboutForm.Designer.cs
r471 r474 69 69 this.ShowInTaskbar = false; 70 70 this.Click += new System.EventHandler(this.AboutForm_Click); 71 this.MouseLeave += new System.EventHandler(this.AboutForm_MouseLeave); 72 this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.AboutForm_MouseMove); 71 73 this.ResumeLayout(false); 72 74 -
branches/eraser6/Eraser/AboutForm.cs
r473 r474 31 31 using System.Reflection; 32 32 using Eraser.Util; 33 using System.Diagnostics; 33 34 34 35 namespace Eraser … … 45 46 private int ParentOpacity; 46 47 private int AboutTextScrollTop; 48 49 private Rectangle WebsiteRect; 50 private Rectangle DonateRect; 47 51 48 52 private Bitmap DoubleBufferBitmap; … … 81 85 //Version number 82 86 Font boldFont = new Font(Font, FontStyle.Bold); 87 Font underlineFont = new Font(Font, FontStyle.Underline); 83 88 Brush textBrush = new SolidBrush(Color.White); 84 89 PointF eraserPos = new PointF(168, 80); … … 97 102 PointF websitePos = new PointF(copyrightPos.X, copyrightPos.Y + copyrightSize.Height); 98 103 SizeF websiteSize = g.MeasureString(websiteText, Font); 99 g.DrawString(websiteText, Font, textBrush, websitePos); 104 g.DrawString(websiteText, underlineFont, textBrush, websitePos); 105 WebsiteRect = new Rectangle((int)websitePos.X, (int)websitePos.Y, 106 (int)websiteSize.Width, (int)websiteSize.Height); 100 107 101 108 //Open source disclaimer. … … 110 117 SizeF donationSize = g.MeasureString(donationText, Font); 111 118 g.DrawString(donationText, Font, textBrush, donationPos); 119 DonateRect = new Rectangle((int)donationPos.X, (int)donationPos.Y, 120 (int)donationSize.Width, (int)donationSize.Height); 112 121 } 113 122 … … 115 124 AboutBitmapPos = new Point((ClientSize.Width - AboutBitmap.Width) / 2, 116 125 (ClientSize.Height - AboutBitmap.Height) / 2); 126 WebsiteRect.X += AboutBitmapPos.X; 127 WebsiteRect.Y += AboutBitmapPos.Y; 128 DonateRect.X += AboutBitmapPos.X; 129 DonateRect.Y += AboutBitmapPos.Y; 117 130 118 131 //And calculate the bounds of the About Text. … … 149 162 private void AboutForm_Click(object sender, EventArgs e) 150 163 { 151 //This is the only component around, so when clicked, dismiss the 152 //dialog. 153 Close(); 164 Point cursorPos = PointToClient(Cursor.Position); 165 if (WebsiteRect.IntersectsWith(new Rectangle(cursorPos, new Size(1, 1)))) 166 Process.Start("http://heidi.ie/eraser/"); 167 else if (DonateRect.IntersectsWith(new Rectangle(cursorPos, new Size(1, 1)))) 168 Process.Start("https://euro.swreg.org/cgi-bin/s.cgi?r=1&s=80181&db_key=1512312&x=0&lang=&lnk="); 169 else 170 //Dismiss the dialog. 171 Close(); 172 } 173 174 private void AboutForm_MouseMove(object sender, MouseEventArgs e) 175 { 176 Cursor.Current = Cursors.Default; 177 if (WebsiteRect.IntersectsWith(new Rectangle(e.Location, new Size(1, 1))) || 178 DonateRect.IntersectsWith(new Rectangle(e.Location, new Size(1, 1)))) 179 Cursor.Current = Cursors.Hand; 180 } 181 182 private void AboutForm_MouseLeave(object sender, EventArgs e) 183 { 184 Cursor.Current = Cursors.Default; 154 185 } 155 186 -
branches/eraser6/Eraser/AboutForm.resx
r471 r474 132 132 </data> 133 133 <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 134 <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">135 <value>NoControl</value>136 </data>137 134 <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms"> 138 135 <value>Manual</value>
Note: See TracChangeset
for help on using the changeset viewer.
