- Initial check-in. Patch by Alexander Olk

svn path=/trunk/winforms/; revision=39904
This commit is contained in:
Peter Dennis Bartok 2005-02-01 03:57:59 +00:00
Родитель 092f322117
Коммит e6a6359fca
2 изменённых файлов: 53 добавлений и 0 удалений

10
colordialog/Makefile Normal file
Просмотреть файл

@ -0,0 +1,10 @@
all: mono
mono: swf-colordialog.cs
mcs swf-colordialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
dotnet: swf-colordialog.cs
csc swf-colordialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
clean:
rm swf-colordialog.exe -r -f

Просмотреть файл

@ -0,0 +1,43 @@
//
// Testapp by Alexander Olk
//
using System;
using System.Drawing;
using System.Windows.Forms;
namespace testwin
{
public class MainForm : Form
{
private Button button;
private ColorDialog colorDialog;
public MainForm()
{
colorDialog = new ColorDialog();
button = new Button();
SuspendLayout();
button.Location = new System.Drawing.Point(40, 32);
button.Text = "ColorDialog";
button.Click += new System.EventHandler(OnClick);
AutoScaleBaseSize = new Size(5, 13);
ClientSize = new System.Drawing.Size(292, 266);
Controls.Add(button);
Text = "ColorDialogTest";
ResumeLayout(false);
}
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
void OnClick(object sender, System.EventArgs e)
{
if (DialogResult.OK == colorDialog.ShowDialog())
Console.WriteLine(colorDialog.Color);
}
}
}