This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svn path=/trunk/winforms/; revision=40676
- Loading branch information
Peter Dennis Bartok
committed
Feb 15, 2005
1 parent
4e42133
commit 590c267
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
all: mono | ||
|
||
mono: swf-fontdialog.cs | ||
mcs swf-fontdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll | ||
|
||
dotnet: swf-fontdialog.cs | ||
csc swf-fontdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll | ||
|
||
clean: | ||
rm swf-fontdialog.exe -r -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Testapp by Alexander Olk | ||
// | ||
|
||
using System; | ||
using System.Drawing; | ||
using System.Windows.Forms; | ||
|
||
namespace testwin | ||
{ | ||
public class MainForm : Form | ||
{ | ||
private Button button; | ||
private FontDialog fontDialog; | ||
public MainForm() | ||
{ | ||
fontDialog = new FontDialog(); | ||
button = new Button(); | ||
SuspendLayout(); | ||
button.Location = new System.Drawing.Point(40, 32); | ||
button.Text = "FontDialog"; | ||
button.Click += new System.EventHandler(OnClick); | ||
AutoScaleBaseSize = new Size(5, 13); | ||
ClientSize = new System.Drawing.Size(292, 266); | ||
Controls.Add(button); | ||
Text = "FontDialogTest"; | ||
ResumeLayout(false); | ||
} | ||
|
||
[STAThread] | ||
public static void Main(string[] args) | ||
{ | ||
Application.Run(new MainForm()); | ||
} | ||
|
||
void OnClick(object sender, System.EventArgs e) | ||
{ | ||
if (DialogResult.OK == fontDialog.ShowDialog()) { | ||
Console.WriteLine(fontDialog.Font); | ||
Console.WriteLine(fontDialog.Color); | ||
} | ||
} | ||
} | ||
} |