Changeset 474


Ignore:
Timestamp:
11/07/08 08:43:48 (6 years ago)
Author:
lowjoel
Message:

Added links to the Eraser project page and donation pages.

Location:
branches/eraser6/Eraser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/AboutForm.Designer.cs

    r471 r474  
    6969            this.ShowInTaskbar = false; 
    7070            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); 
    7173            this.ResumeLayout(false); 
    7274 
  • branches/eraser6/Eraser/AboutForm.cs

    r473 r474  
    3131using System.Reflection; 
    3232using Eraser.Util; 
     33using System.Diagnostics; 
    3334 
    3435namespace Eraser 
     
    4546        private int ParentOpacity; 
    4647        private int AboutTextScrollTop; 
     48 
     49        private Rectangle WebsiteRect; 
     50        private Rectangle DonateRect; 
    4751 
    4852        private Bitmap DoubleBufferBitmap; 
     
    8185                //Version number 
    8286                Font boldFont = new Font(Font, FontStyle.Bold); 
     87                Font underlineFont = new Font(Font, FontStyle.Underline); 
    8388                Brush textBrush = new SolidBrush(Color.White); 
    8489                PointF eraserPos = new PointF(168, 80); 
     
    97102                PointF websitePos = new PointF(copyrightPos.X, copyrightPos.Y + copyrightSize.Height); 
    98103                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); 
    100107 
    101108                //Open source disclaimer. 
     
    110117                SizeF donationSize = g.MeasureString(donationText, Font); 
    111118                g.DrawString(donationText, Font, textBrush, donationPos); 
     119                DonateRect = new Rectangle((int)donationPos.X, (int)donationPos.Y, 
     120                    (int)donationSize.Width, (int)donationSize.Height); 
    112121            } 
    113122 
     
    115124            AboutBitmapPos = new Point((ClientSize.Width - AboutBitmap.Width) / 2, 
    116125                (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; 
    117130 
    118131            //And calculate the bounds of the About Text. 
     
    149162        private void AboutForm_Click(object sender, EventArgs e) 
    150163        { 
    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; 
    154185        } 
    155186 
  • branches/eraser6/Eraser/AboutForm.resx

    r471 r474  
    132132  </data> 
    133133  <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> 
    137134  <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms"> 
    138135    <value>Manual</value> 
Note: See TracChangeset for help on using the changeset viewer.