├── AUTHORS
├── Makefile
├── README
├── application
├── Makefile
└── testexit.cs
├── begininvoke
├── Makefile
└── swf-begininvoke.cs
├── borders
├── Makefile
├── border3dstyle.cs
└── borders.cs
├── button
├── AssemblyInfo.cs
├── Makefile
├── swf-buttons.cmbx
├── swf-buttons.cs
└── swf-buttons.prjx
├── checkbox
├── AssemblyInfo.cs
├── Makefile
├── swf-checkboxes.cmbx
├── swf-checkboxes.cs
└── swf-checkboxes.prjx
├── checkedlistbox
├── Makefile
├── swf-checkedlistbox-checked.cs
└── swf-checkedlistboxes.cs
├── clipboard
├── Makefile
├── clipboard.cs
└── test.bmp
├── colordialog
├── Makefile
└── swf-colordialog.cs
├── combobox
├── AssemblyInfo.cs
├── Makefile
├── ownerdraw
│ ├── Makefile
│ └── swf-combobox-ownerdraw.cs
├── swf-combobox-single.cs
├── swf-combobox-single2.cs
├── swf-comboboxes.cmbx
├── swf-comboboxes.cs
└── swf-comboboxes.prjx
├── contextmenu
├── Makefile
├── contextmenu.cs
├── swf-basicmenu.cs
└── swf-popups.cs
├── control-anchors
├── Makefile
└── swf-anchors.cs
├── control-docking
├── Makefile
└── swf-dock.cs
├── controlpaint
├── DrawFocusRectangle.cs
└── Makefile
├── converters
├── Makefile
└── converters.cs
├── cursor
├── Makefile
├── mycursor.cur
└── swf-cursor.cs
├── databinding
├── AssemblyInfo.cs
├── Makefile
├── swf-databinding-listbox.cs
├── swf-databinding.cmbx
├── swf-databinding.cs
└── swf-databinding.prjx
├── datagrid
├── Makefile
├── arraylist.cs
├── buttonface.bmp
├── buttonfacepressed.bmp
├── classes
│ ├── DataGridBoolColumnTests.cs
│ ├── DataGridCellTests.cs
│ ├── DataGridTableStylesTests.cs
│ ├── DataGridTests.cs
│ ├── GridColumnStylesCollectionTests.cs
│ ├── GridTableStylesCollectionTests.cs
│ └── Makefile
├── fullbuttonface.bmp
├── fullbuttonfacepressed.bmp
├── gridbuttons.cs
├── kb318581.cs
├── programes.xml
├── programes.xsd
├── related.cs
├── swf-datagrid-editinfo.cs
├── swf-datagrid-realsample.cs
├── swf-datagrid-relations.cs
├── swf-datagrid-styles.cs
├── swf-datagrid-tablenav.cs
├── swf-datagrid-testproperties.cs
└── swf-datagrid.cs
├── datagridview
├── AdvancedBorderStyleSample.cs
├── AdvancedBorderStyleSample2.cs
├── BindingDataTableTest.cs
├── BindingDataTableTest2.cs
├── BindingTest.cs
├── CellStyleSample.cs
├── Makefile
├── SimpleTest.cs
├── SimpleTest2.cs
└── Test.cs
├── datetimepicker
├── Makefile
└── swf-datetimepicker.cs
├── dll
├── Makefile
├── app.cs
└── dll.cs
├── dockpadding
├── Makefile
└── dockpadding.cs
├── endian
├── Makefile
├── bmp1.bmp
├── endian.cs
├── test.bmp
├── test.gif
├── test.jpg
├── test.png
├── test.tif
├── test1.bmp
├── test16.bmp
└── test256.bmp
├── errorprovider
├── Makefile
└── errorprovider.cs
├── events
├── Makefile
└── events.cs
├── exception
├── Makefile
└── exception.cs
├── filedialog
├── Makefile
└── swf-filedialog.cs
├── folderdialog
├── Makefile
└── swf-folderdialog.cs
├── fontdialog
├── Makefile
└── swf-fontdialog.cs
├── forms
├── CustomControl.cs
├── FormsHello.cs
├── FormsMdi.cs
├── FormsTest.cs
├── FormsTest.dotgnu.ico
├── FormsTest.small_folder.ico
├── FormsTest.small_text.ico
├── FormsTest.test 15bpp.bmp
├── FormsTest.test 16bpp.bmp
├── FormsTest.test 1bpp.bmp
├── FormsTest.test 4bpp.bmp
├── FormsTest.test 8bpp.bmp
├── FormsTest.test.bmp
├── FormsTest.test.ico
├── ImageViewer.cs
├── LICENSE
├── Makefile
├── README
├── make-csc.bat
├── radiobuttons.cs
├── test.ico
└── text.cs
├── formstest
├── FormsTest.cs
├── Makefile
├── test.bmp
└── test.png
├── groupbox
├── AssemblyInfo.cs
├── Makefile
├── swf-groupboxes.cmbx
├── swf-groupboxes.cs
├── swf-groupboxes.pdb
└── swf-groupboxes.prjx
├── hello
├── Makefile
└── swf-hello.cs
├── help
├── Makefile
├── swf-help.chm
└── swf-help.cs
├── helpprovider
├── Makefile
├── README
└── helpprovider.cs
├── horizontalscrollbar
├── AssemblyInfo.cs
├── Makefile
├── swf-horizontalscrollbar.cmbx
├── swf-horizontalscrollbar.cs
├── swf-horizontalscrollbar.prjx
└── swf-scrollbars-resize.cs
├── icon
├── Makefile
├── swf-icon.cs
└── test.ico
├── idle
├── Makefile
└── swf-idle.cs
├── imagelist
├── Makefile
├── a.png
├── b.png
└── swf-imagelist.cs
├── img
├── Makefile
├── PropertyItem.png
├── ani.gif
├── animated.gif
├── combined-animated.gif
├── image.tif
├── img.cs
├── multipage.tif
├── photo.jpg
└── test.bmp
├── invalidate
├── Makefile
└── swf-invalidate.cs
├── label
├── AssemblyInfo.cs
├── Makefile
├── a.png
├── b.png
├── swf-label-images.cs
├── swf-label.cmbx
├── swf-label.cs
└── swf-label.prjx
├── linklabel
├── AssemblyInfo.cs
├── Makefile
├── swf-linklabels.cmbx
├── swf-linklabels.cs
├── swf-linklabels.prjx
└── swf-textalign.cs
├── listbox
├── AssemblyInfo.cs
├── Makefile
├── ownerdraw
│ ├── Makefile
│ └── swf-listbox-ownerdraw.cs
├── swf-listbox-multicolumn.cs
├── swf-listbox-selections.cs
├── swf-listboxes.cmbx
├── swf-listboxes.cs
└── swf-listboxes.prjx
├── listview
├── ListViewTorturer
│ ├── ListViewTorturer.sln
│ ├── ListViewTorturer.suo
│ └── ListViewTorturer
│ │ ├── AddItemsForm.Designer.cs
│ │ ├── AddItemsForm.cs
│ │ ├── AddItemsForm.resx
│ │ ├── AddItemsTester.cs
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── IListViewTester.cs
│ │ ├── ListViewDescriptor.cs
│ │ ├── ListViewTorturer.csproj
│ │ ├── OnEndTestEventArgs.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── ResultForm.Designer.cs
│ │ ├── ResultForm.cs
│ │ ├── ResultForm.resx
│ │ ├── SelectionChangeTester.cs
│ │ ├── TestForm.Designer.cs
│ │ ├── TestForm.cs
│ │ ├── TestForm.resx
│ │ ├── bin
│ │ └── Debug
│ │ │ └── ListViewTorturer.vshost.exe
│ │ └── obj
│ │ ├── ListViewTorturer.csproj.FileList.txt
│ │ └── Release
│ │ ├── ListViewTorturer.Form1.resources
│ │ ├── ListViewTorturer.Properties.Resources.resources
│ │ ├── ListViewTorturer.ResultForm.resources
│ │ ├── ListViewTorturer.TestForm.resources
│ │ └── ListViewTorturer.csproj.GenerateResource.Cache
├── Makefile
├── groups.cs
├── listview-items-icons
│ ├── 32x32
│ │ ├── Thumbs.db
│ │ ├── abiword_48.png
│ │ ├── bmp.png
│ │ ├── disks.png
│ │ └── evolution.png
│ ├── 64x64
│ │ ├── Thumbs.db
│ │ ├── abiword_48.png
│ │ ├── bmp.png
│ │ ├── disks.png
│ │ └── evolution.png
│ └── readme.txt
├── lvtest.cs
├── noicon.cs
├── swf-listview-items.cs
├── swf-listview.cs
└── virtualmode.cs
├── ls-styles
├── Makefile
└── ls-styles.cs
├── mainloop
├── Makefile
└── swf-mainloop.cs
├── mainmenu
├── Makefile
├── swf-mainmenu-nomdi.cs
├── swf-mainmenu.cmbx
├── swf-mainmenu.cs
├── swf-mainmenu.prjx
├── swf-menumerge.cs
└── swf-menus.cs
├── maskedtextbox
├── Makefile
└── swf-maskedtextbox.cs
├── mdi
├── Makefile
├── swf-mdi-formstest.cs
└── swf-mdi.cs
├── messagebox
├── Makefile
└── swf-messagebox.cs
├── modal
├── Makefile
└── modal.cs
├── monthcalendar
├── Makefile
└── swf-monthcalendar.cs
├── notifyicon
├── Makefile
├── notify.ico
├── swf-balloon.cs
└── swf-notifyicon.cs
├── panel
├── Makefile
└── swf-panels.cs
├── picturebox
├── Makefile
├── roxy.jpg
└── swf-picturebox.cs
├── printing
├── Makefile
├── swf-printdialog.cs
└── swf-printing.cs
├── progressbar
├── AssemblyInfo.cs
├── Makefile
├── swf-progressbars.cmbx
├── swf-progressbars.cs
└── swf-progressbars.prjx
├── propertygrid
├── Makefile
├── swf-propertygrid-array.cs
└── swf-propertygrid.cs
├── radiobutton
├── AssemblyInfo.cs
├── Makefile
├── swf-radiobuttons.cmbx
├── swf-radiobuttons.cs
└── swf-radiobuttons.prjx
├── recreate
└── test.cs
├── renderertest20
├── Makefile
├── RendererTest.cs
└── accessories-character-map.png
├── rente
├── Makefile
├── README
└── swf-rente.cs
├── resources
├── Makefile
├── resources.bmp
├── resources.cs
├── resources.ico
└── resources.resx
├── rotate
├── 24bit.png
├── 8bit.png
├── Makefile
└── test.cs
├── rotate1bit4bit
├── 1bit.png
├── 4bit.png
├── Makefile
└── test.cs
├── rules.make
├── scrollable
├── Makefile
└── swf-scrollable.cs
├── scrolling
├── Makefile
└── swf-scrolling.cs
├── scrollrect
├── Makefile
└── xplatscroll.cs
├── setpos
├── Makefile
└── swf-setpos.cs
├── simple-binding
├── Makefile
└── swf-simple-binding.cs
├── splitcontainer20
├── Makefile
└── SplitContainerDemo.cs
├── splitter
├── Makefile
└── swf-splitter.cs
├── statusbar
├── Makefile
└── swf-statusbar.cs
├── sysinfo
├── Makefile
└── swf-sysinfo.cs
├── tabcontrol
├── Makefile
├── swf-tabcontrol.cs
└── swf-tabcontrol2.cs
├── taborder
├── Makefile
└── swf-taborder.cs
├── textbox
├── AssemblyInfo.cs
├── Makefile
├── swf-textboxes.cmbx
├── swf-textboxes.cs
└── swf-textboxes.prjx
├── timers
├── Makefile
└── swf-timers.cs
├── toolbar
├── Makefile
├── image1.bmp
├── image2.bmp
├── image3.bmp
├── image4.bmp
├── layout-toolbar.cs
└── swf-toolbar.cs
├── toolstrip20
├── Makefile
├── ToolStripDemo.cs
└── images
│ ├── document-new.png
│ ├── document-open.png
│ ├── document-save.png
│ ├── edit-copy.png
│ ├── edit-cut.png
│ ├── edit-paste.png
│ └── image-x-generic.png
├── tooltip
├── Makefile
└── swf-tooltip.cs
├── toolwindows
├── Makefile
└── swf-toolwindows.cs
├── trackbar
├── Makefile
└── swf-trackbars.cs
├── transparency
├── Makefile
└── swf-transparency.cs
├── treeview
├── Makefile
├── abstract.png
├── class.png
├── enum.png
├── event.png
├── field.png
├── interface.png
├── method.png
├── prop-read-write.png
└── swf-treeview.cs
├── updown
├── Makefile
└── swf-updown.cs
├── various
├── Makefile
└── swf-various.cs
├── verticalscrollbar
├── AssemblyInfo.cs
├── Makefile
├── swf-scrollbar-events.cs
├── swf-verticalscrollbar.cmbx
├── swf-verticalscrollbar.cs
└── swf-verticalscrollbar.prjx
├── visualstyles20
├── Makefile
└── VisualStyleTest.cs
├── webbrowser
├── UsingWebBrowser
│ ├── EULA.rtf
│ ├── UsingWebBrowser-port
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resources
│ │ ├── Form1.resx
│ │ ├── Makefile
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── DataSources
│ │ │ │ └── Sales.datasource
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── README.htm
│ │ ├── Sales.cs
│ │ ├── Sales.xml
│ │ ├── Sales.xsd
│ │ ├── Sales.xsx
│ │ ├── SalesOrderForm.html
│ │ ├── SalesOrderForm2.html
│ │ ├── UsingWebBrowser.csproj
│ │ └── UsingWebBrowser.csproj.user
│ └── UsingWebBrowser
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── DataSources
│ │ │ └── Sales.datasource
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ │ ├── README.htm
│ │ ├── Sales.cs
│ │ ├── Sales.xml
│ │ ├── Sales.xsd
│ │ ├── Sales.xsx
│ │ ├── SalesOrderForm.html
│ │ ├── SalesOrderForm2.html
│ │ ├── UsingWebBrowser.csproj
│ │ └── UsingWebBrowser.csproj.user
├── standalone
│ ├── ChangeLog
│ ├── DomInspector.cs
│ ├── EventMonitor.cs
│ ├── Main.cs
│ ├── Makefile
│ ├── Page.cs
│ ├── bin
│ │ └── test.html
│ └── standalone.mdp
└── tests
│ ├── ChangeLog
│ ├── controls.cs
│ ├── main.cs
│ ├── monitor.cs
│ ├── test.html
│ └── tests.mdp
├── wordpad
├── Makefile
├── close.png
├── find-bar.cs
├── highlight-all.png
├── next.png
├── phrase-not-found.png
├── previous.png
├── support.cs
├── wordpad.cs
├── wordpad.csproj
└── wordpad.csproj.user
└── zorder
├── Makefile
└── swf-zorder.cs
/AUTHORS:
--------------------------------------------------------------------------------
1 | Timothy Parez
2 | Lindsay Boury
3 | David W. Bettis
4 | Lawrence E. Smithmier
5 | Jordi Mas
6 | Jackson Harper
7 | Peter Bartok
8 | Jonathan Chambers
9 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | SUBDIRS = \
2 | begininvoke button checkbox checkedlistbox colordialog combobox \
3 | contextmenu control-anchors control-docking controlpaint cursor \
4 | databinding datetimepicker dll endian groupbox horizontalscrollbar \
5 | idle imagelist label linklabel listbox listview mainloop mainmenu \
6 | messagebox monthcalendar notifyicon panel picturebox printing progressbar \
7 | propertygrid radiobutton rente scrollrect splitter statusbar \
8 | sysinfo tabcontrol taborder textbox toolbar tooltip trackbar \
9 | transparency treeview various verticalscrollbar webbrowser zorder \
10 | maskedtextbox
11 |
12 | all:
13 | for i in $(SUBDIRS); do (cd $$i; make); done
14 |
15 | clean:
16 | for i in $(SUBDIRS); do (cd $$i;rm *.exe -f); done
17 |
18 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Here are some samples of Winforms code.
2 |
3 | Some of the sources were originally listed in the
4 | Mono Wiki, the URL is:
5 |
6 | http://nullenvoid.com/mono/wiki/index.php/WineSamples
7 |
--------------------------------------------------------------------------------
/application/Makefile:
--------------------------------------------------------------------------------
1 | all: testexit.exe
2 |
3 | testexit.exe: testexit.cs
4 | mcs -debug -pkg:dotnet testexit.cs
5 |
6 | clean:
7 | rm -f *.exe *.mdb
8 |
--------------------------------------------------------------------------------
/begininvoke/Makefile:
--------------------------------------------------------------------------------
1 | all: net_1_1
2 |
3 | net_1_1: swf-begininvoke.cs swf-cas-begininvoke.cs
4 | mcs -debug swf-begininvoke.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs -debug swf-cas-begininvoke.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | net_2_0: swf-begininvoke.cs swf-cas-begininvoke.cs
8 | gmcs -debug swf-begininvoke.cs /out:swf-begininvoke2.exe /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | gmcs -debug /out:swf-cas-begininvoke2.exe swf-cas-begininvoke.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-*begininvoke.exe* -r -f
13 |
--------------------------------------------------------------------------------
/begininvoke/swf-begininvoke.cs:
--------------------------------------------------------------------------------
1 | //
2 | // swf-begininvoke.cs
3 | //
4 | // Author(s):
5 | // Jackson Harper (jackson@ximian.com)
6 | //
7 | // Copyright (c) 2004 Novell, Inc (http://www.novell.com)
8 | //
9 |
10 | using System;
11 | using System.Drawing;
12 | using System.Threading;
13 | using System.Windows.Forms;
14 |
15 | namespace System.Windows.Forms {
16 |
17 | public class BeginInvokeDemo : Form {
18 |
19 | private Label label;
20 |
21 | public BeginInvokeDemo ()
22 | {
23 | #if NET_2_0
24 | CheckForIllegalCrossThreadCalls = true;
25 | #endif
26 |
27 | label = new Label ();
28 | label.Dock = DockStyle.Fill;
29 | label.TextAlign = ContentAlignment.MiddleCenter;
30 | label.Text = DateTime.Now.ToLongTimeString ();
31 | Controls.Add (label);
32 | }
33 |
34 | private delegate void updater ();
35 |
36 | private void UpdateLabel ()
37 | {
38 | // BeginInvoke may not be called on a window that doesn't
39 | // yet have a handle
40 | while (!label.IsHandleCreated) {
41 | Thread.Sleep(250);
42 | }
43 |
44 |
45 | while (true) {
46 | #if NET_2_0
47 | Console.WriteLine("Handle:{0:X}", this.Handle.ToInt23());
48 | #endif
49 | lock (this) {
50 | label.BeginInvoke (new updater (DateUpdater));
51 | }
52 | Thread.Sleep (500);
53 | }
54 | }
55 |
56 | private void DateUpdater ()
57 | {
58 | label.Text = DateTime.Now.ToLongTimeString ();
59 | label.Refresh ();
60 | }
61 |
62 | public static void Main ()
63 | {
64 | BeginInvokeDemo demo = new BeginInvokeDemo ();
65 |
66 | demo.CreateHandle();
67 | ThreadStart thread_start = new ThreadStart (demo.UpdateLabel);
68 | Thread worker = new Thread (thread_start);
69 | worker.IsBackground = true;
70 | worker.Start();
71 |
72 | Application.Run (demo);
73 | }
74 | }
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/borders/Makefile:
--------------------------------------------------------------------------------
1 | all: borders.exe border3dstyle.exe
2 |
3 | borders.exe: borders.cs
4 | mcs borders.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | border3dstyle.exe: border3dstyle.cs
7 | mcs border3dstyle.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm borders.exe border3dstyle.exe -r -f
11 |
--------------------------------------------------------------------------------
/button/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/button/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-buttons.cs
4 | mcs swf-buttons.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-buttons.cs
7 | csc swf-buttons.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-buttons.exe -r -f
--------------------------------------------------------------------------------
/button/swf-buttons.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/button/swf-buttons.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/checkbox/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/checkbox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-checkboxes.cs
4 | mcs swf-checkboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-checkboxes.cs
7 | csc swf-checkboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-checkboxes.exe -r -f
11 |
--------------------------------------------------------------------------------
/checkbox/swf-checkboxes.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/checkbox/swf-checkboxes.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/checkedlistbox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-checkedlistboxes.cs swf-checkedlistbox-checked.cs
4 | mcs swf-checkedlistboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-checkedlistbox-checked.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-checkedlistboxes.cs swf-checkedlistbox-checked.cs
8 | csc swf-checkedlistboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-checkedlistbox-checked.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-checkedlistboxes.exe -r -f
13 | rm swf-checkedlistbox-checked.exe -r -f
14 |
15 |
16 |
--------------------------------------------------------------------------------
/checkedlistbox/swf-checkedlistbox-checked.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/checkedlistbox/swf-checkedlistbox-checked.cs
--------------------------------------------------------------------------------
/clipboard/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: clipboard.cs
4 | mcs -debug clipboard.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm clipboard.exe -r -f
8 |
--------------------------------------------------------------------------------
/clipboard/clipboard.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/clipboard/clipboard.cs
--------------------------------------------------------------------------------
/clipboard/test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/clipboard/test.bmp
--------------------------------------------------------------------------------
/colordialog/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-colordialog.cs
4 | mcs swf-colordialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-colordialog.cs
7 | csc swf-colordialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-colordialog.exe -r -f
11 |
--------------------------------------------------------------------------------
/colordialog/swf-colordialog.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Testapp by Alexander Olk
3 | //
4 |
5 | using System;
6 | using System.Drawing;
7 | using System.Windows.Forms;
8 |
9 | namespace testwin
10 | {
11 | public class MainForm : Form
12 | {
13 | private Button button;
14 | private ColorDialog colorDialog;
15 | public MainForm()
16 | {
17 | colorDialog = new ColorDialog();
18 | button = new Button();
19 | SuspendLayout();
20 | button.Location = new System.Drawing.Point(40, 32);
21 | button.Text = "ColorDialog";
22 | button.Click += new System.EventHandler(OnClick);
23 | AutoScaleBaseSize = new Size(5, 13);
24 | ClientSize = new System.Drawing.Size(292, 266);
25 | Controls.Add(button);
26 | Text = "ColorDialogTest";
27 | ResumeLayout(false);
28 | }
29 |
30 | [STAThread]
31 | public static void Main(string[] args)
32 | {
33 | Application.Run(new MainForm());
34 | }
35 |
36 | void OnClick(object sender, System.EventArgs e)
37 | {
38 | if (DialogResult.OK == colorDialog.ShowDialog())
39 | Console.WriteLine(colorDialog.Color);
40 | }
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/combobox/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/combobox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-comboboxes.cs swf-combobox-single.cs
4 | mcs swf-comboboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-combobox-single.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | gmcs swf-combobox-single2.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 |
8 | dotnet: swf-buttons.cs swf-combobox-single.cs
9 | csc swf-comboboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 | csc swf-combobox-single.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
11 | csc swf-combobox-single2.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
12 |
13 | clean:
14 | rm swf-comboboxes.exe -r -f
15 | rm swf-combobox-single.exe -r -f
16 | rm swf-combobox-single2.exe -r -f
17 |
--------------------------------------------------------------------------------
/combobox/ownerdraw/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-combobox-ownerdraw.cs
4 | mcs swf-combobox-ownerdraw.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-combobox-ownerdraw.cs
7 | csc swf-combobox-ownerdraw.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-combobox-ownerdraw.exe -r -f
11 |
12 |
--------------------------------------------------------------------------------
/combobox/swf-combobox-single.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/combobox/swf-combobox-single.cs
--------------------------------------------------------------------------------
/combobox/swf-combobox-single2.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/combobox/swf-combobox-single2.cs
--------------------------------------------------------------------------------
/combobox/swf-comboboxes.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/combobox/swf-comboboxes.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/contextmenu/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-basicmenu.cs swf-popups.cs contextmenu.cs
4 | mcs swf-basicmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-popups.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | gmcs contextmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 |
8 | dotnet: swf-basicmenu.cs swf-popups.cs contextmenu.cs
9 | csc swf-basicmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 | csc swf-popups.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
11 | csc contextmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
12 |
13 | clean:
14 | rm swf-contextmenu.exe -r -f
15 | rm swf-popups.cs -r -f
16 | rm contextmenu.cs -r -f
17 |
18 |
--------------------------------------------------------------------------------
/contextmenu/contextmenu.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | namespace winforms {
6 |
7 | public class form : Form {
8 |
9 | public static void Main () {
10 | Application.Run (new form ());
11 | }
12 |
13 | public form () {
14 |
15 | TreeView tree = new TreeView ();
16 | ContextMenu popupmenu = new ContextMenu ( new MenuItem [] {
17 | new MenuItem ("Menu 1"),
18 | new MenuItem ("Menu 2"),
19 | new MenuItem ("Menu 3")
20 | });
21 |
22 | TreeNode t;
23 | t = tree.Nodes.Add ("Node 1");
24 | t.ContextMenu = popupmenu;
25 | t = tree.Nodes.Add ("Node 2");
26 | t.ContextMenu = popupmenu;
27 | t = tree.Nodes.Add ("Node 3");
28 | t.ContextMenu = popupmenu;
29 |
30 | tree.Dock = DockStyle.Fill;
31 | this.Controls.Add (tree);
32 |
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/control-anchors/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-anchors.cs
4 | mcs swf-anchors.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-anchors.cs
7 | csc swf-anchors.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-anchors.exe -r -f
11 |
--------------------------------------------------------------------------------
/control-docking/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-dock.cs
4 | mcs swf-dock.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-dock.cs
7 | csc swf-dock.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-dock.exe -r -f
11 |
--------------------------------------------------------------------------------
/controlpaint/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: DrawFocusRectangle.cs
4 | mcs DrawFocusRectangle.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: DrawFocusRectangle.cs
7 | csc DrawFocusRectangle.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm DrawFocusRectangle.exe -r -f
11 |
--------------------------------------------------------------------------------
/converters/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: converters.cs
4 | mcs converters.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: converters.cs
7 | csc converters.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm converters.exe -r -f
11 |
--------------------------------------------------------------------------------
/cursor/Makefile:
--------------------------------------------------------------------------------
1 | all: swf-cursor.exe
2 |
3 | swf-cursor.exe: swf-cursor.cs
4 | mcs swf-cursor.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-cursor.exe -r -f
8 |
--------------------------------------------------------------------------------
/cursor/mycursor.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/cursor/mycursor.cur
--------------------------------------------------------------------------------
/databinding/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/databinding/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-databinding.cs swf-databinding-listbox.cs
4 | mcs swf-databinding.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
5 | mcs swf-databinding-listbox.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
6 |
7 | dotnet: swf-databinding.cs swf-databinding-listbox.cs
8 | csc swf-databinding.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
9 | csc swf-databinding-listbox.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
10 |
11 | clean:
12 | rm swf-databinding.exe -r -f
13 | rm swf-databinding-listbox.exe -r -f
14 |
15 |
--------------------------------------------------------------------------------
/databinding/swf-databinding.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/datagrid/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-datagrid.exe related.exe arraylist.exe kb318581.exe gridbuttons.exe
4 |
5 | SWF_DATAGRID_EXE_SRCS = swf-datagrid.cs swf-datagrid-realsample.cs swf-datagrid-testproperties.cs swf-datagrid-tablenav.cs swf-datagrid-styles.cs swf-datagrid-editinfo.cs swf-datagrid-relations.cs
6 |
7 | swf-datagrid.exe: $(SWF_DATAGRID_EXE_SRCS)
8 | mcs /debug swf-datagrid.cs $(SWF_DATAGRID_EXE_SRCS) /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
9 |
10 | gridbuttons.exe:
11 | mcs gridbuttons.cs -resource:buttonface.bmp,DataGridButton.buttonface.bmp -resource:buttonfacepressed.bmp,DataGridButton.buttonfacepressed.bmp -resource:fullbuttonface.bmp,DataGridButton.fullbuttonface.bmp -resource:fullbuttonfacepressed.bmp,DataGridButton.fullbuttonfacepressed.bmp -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:System.Data.dll
12 |
13 | %.exe: %.cs
14 | mcs /debug $< /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
15 |
16 | dotnet: swf-datagrid.cs
17 |
18 | clean:
19 | rm -f *.exe *.mdb
20 |
--------------------------------------------------------------------------------
/datagrid/buttonface.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/datagrid/buttonface.bmp
--------------------------------------------------------------------------------
/datagrid/buttonfacepressed.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/datagrid/buttonfacepressed.bmp
--------------------------------------------------------------------------------
/datagrid/classes/DataGridCellTests.cs:
--------------------------------------------------------------------------------
1 | // Permission is hereby granted, free of charge, to any person obtaining
2 | // a copy of this software and associated documentation files (the
3 | // "Software"), to deal in the Software without restriction, including
4 | // without limitation the rights to use, copy, modify, merge, publish,
5 | // distribute, sublicense, and/or sell copies of the Software, and to
6 | // permit persons to whom the Software is furnished to do so, subject to
7 | // the following conditions:
8 | //
9 | // The above copyright notice and this permission notice shall be
10 | // included in all copies or substantial portions of the Software.
11 | //
12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 | //
20 | // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
21 | //
22 | // Author:
23 | // Jordi Mas i Hernandez
24 | //
25 | //
26 |
27 | using System;
28 | using System.Drawing;
29 | using System.Windows.Forms;
30 |
31 | namespace DatagridTests
32 | {
33 | class DataGridCellTests
34 | {
35 | public DataGridCellTests ()
36 | {
37 | DataGridCell dg = new DataGridCell ();
38 | Console.WriteLine ("DataGridCell default --- ");
39 | Console.WriteLine ("Column {0}", dg.RowNumber);
40 | Console.WriteLine ("Row {0}", dg.ColumnNumber);
41 |
42 | dg.RowNumber = 10;
43 | dg.ColumnNumber = 5;
44 |
45 | Console.WriteLine ("ToString {0}", dg.ToString ());
46 | Console.WriteLine ("GetHashCode {0}", dg.GetHashCode ());
47 | }
48 |
49 | public static void Main (string[] args)
50 | {
51 | new DataGridCellTests ();
52 | }
53 |
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/datagrid/classes/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: DataGridTableStylesTests.cs DataGridBoolColumnTests.cs GridColumnStylesCollectionTests.cs GridTableStylesCollectionTests.cs DataGridCellTests.cs
4 | mcs DataGridTableStylesTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs DataGridBoolColumnTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | mcs GridColumnStylesCollectionTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 | mcs GridTableStylesCollectionTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 | mcs DataGridTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | mcs DataGridCellTests.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm DataGridBoolColumnTests.exe -r -f
13 | rm DataGridTableStylesTests.exe -r -f
14 | rm DataGridTests.exe -r -f
15 | rm GridColumnStylesCollectionTests.exe -r -f
16 | rm GridTableStylesCollectionTests.exe -r -f
17 | rm DataGridCellTests.exe -r -f
18 |
--------------------------------------------------------------------------------
/datagrid/fullbuttonface.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/datagrid/fullbuttonface.bmp
--------------------------------------------------------------------------------
/datagrid/fullbuttonfacepressed.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/datagrid/fullbuttonfacepressed.bmp
--------------------------------------------------------------------------------
/datagridview/BindingDataTableTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 | using System.Collections;
5 | using System.Data;
6 |
7 | public class Form1 : Form {
8 |
9 | public Form1 () {
10 | //this.AutoSize = true;
11 | DataGridView dgv = new DataGridView();
12 | //dgv.Size = new Size(500,250);
13 | dgv.Location = new Point(10,10);
14 | dgv.EnableHeadersVisualStyles = false;
15 | dgv.AutoSize = true;
16 | this.Controls.Add(dgv);
17 | this.Text = "DataGridView advanced border styles demo";
18 | dgv.DataSource = GetDataTable();
19 | }
20 |
21 | public DataTable GetDataTable () {
22 | DataTable result = new DataTable();
23 | result.Columns.Add(new DataColumn("NAME"));
24 | result.Columns.Add(new DataColumn("NUMBER"));
25 | for (int i = 0; i < 10; i++) {
26 | DataRow row = result.NewRow();
27 | row["NAME"] = "Name " + i.ToString();
28 | row["NUMBER"] = i.ToString();
29 | result.Rows.Add(row);
30 | }
31 | return result;
32 | }
33 |
34 | public static void Main() {
35 | Application.Run(new Form1());
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/datagridview/BindingDataTableTest2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 | using System.Collections;
5 | using System.Data;
6 |
7 | public class Form1 : Form {
8 |
9 | public Form1 () {
10 | //this.AutoSize = true;
11 | DataGridView dgv = new DataGridView();
12 | //dgv.Size = new Size(500,250);
13 | dgv.Location = new Point(10,10);
14 | dgv.EnableHeadersVisualStyles = false;
15 | dgv.AutoSize = true;
16 | this.Controls.Add(dgv);
17 | this.Text = "DataGridView advanced border styles demo";
18 | dgv.DataSource = GetDataTable();
19 | }
20 |
21 | public DataTable GetDataTable () {
22 | DataSet ds = new DataSet();
23 | System.IO.FileStream fs = new System.IO.FileStream("programes.xml", System.IO.FileMode.Open);
24 | System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(fs);
25 | ds.ReadXml(reader);
26 | reader.Close();
27 | return ds.Tables["programes"];
28 | }
29 |
30 | public static void Main() {
31 | Application.Run(new Form1());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/datagridview/BindingTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 | using System.Collections;
5 |
6 | public class DataElement {
7 |
8 | private string name;
9 | private int val;
10 |
11 | public DataElement () {
12 | }
13 |
14 | public string Name {
15 | get { return name; }
16 | set { name = value; }
17 | }
18 |
19 | public int Val {
20 | get { return val; }
21 | set { val = value; }
22 | }
23 |
24 | }
25 |
26 | public class Form1 : Form {
27 |
28 | public Form1 () {
29 | //this.AutoSize = true;
30 | DataGridView dgv = new DataGridView();
31 | //dgv.Size = new Size(500,250);
32 | dgv.Location = new Point(10,10);
33 | dgv.EnableHeadersVisualStyles = false;
34 | dgv.AutoSize = true;
35 | this.Controls.Add(dgv);
36 | this.Text = "DataGridView advanced border styles demo";
37 | dgv.DataSource = GetList();
38 | }
39 |
40 | public IList GetList () {
41 | ArrayList result = new ArrayList();
42 | for (int i = 0; i < 10; i++) {
43 | DataElement element = new DataElement();
44 | element.Name = "Name " + i.ToString();
45 | element.Val = i;
46 | result.Add(element);
47 | }
48 | return result;
49 | }
50 |
51 | public static void Main() {
52 | Application.Run(new Form1());
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/datagridview/Makefile:
--------------------------------------------------------------------------------
1 |
2 | ifeq ($(v2), yes)
3 | COMPILER=/home/pedro/.local/bin/gmcs
4 | REFERENCES=/r:System.Drawing.dll /r:System.Windows.Forms.dll /r:System.Data.dll
5 | else
6 | COMPILER=mcs
7 | REFERENCES=/r:DataGridView.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:System.Data.dll
8 | endif
9 |
10 | OBJECTS=Test.exe SimpleTest.exe AdvancedBorderStyleSample.exe CellStyleSample.exe BindingTest.exe BindingDataTableTest.exe BindingDataTableTest2.exe
11 |
12 | all: $(OBJECTS)
13 |
14 | %.exe: %.cs
15 | $(COMPILER) /debug+ /target:exe /out:$@ $< $(REFERENCES)
16 |
17 | Test.exe: Test.cs
18 | $(COMPILER) /debug+ /target:exe /out:Test.exe $(REFERENCES) Test.cs
19 |
20 | BindingTest.exe: BindingTest.cs
21 | $(COMPILER) /debug+ /target:exe /out:BindingTest.exe $(REFERENCES) BindingTest.cs
22 |
23 | SimpleTest.exe: SimpleTest.cs
24 | $(COMPILER) /debug+ /target:exe /out:SimpleTest.exe $(REFERENCES) SimpleTest.cs
25 |
26 | AdvancedBorderStyleSample.exe: AdvancedBorderStyleSample.cs
27 | $(COMPILER) /debug+ /target:exe /out:AdvancedBorderStyleSample.exe $(REFERENCES) AdvancedBorderStyleSample.cs
28 |
29 | CellStyleSample.exe: CellStyleSample.cs
30 | $(COMPILER) /debug+ /target:exe /out:CellStyleSample.exe $(REFERENCES) CellStyleSample.cs
31 |
32 | clean:
33 | for i in $(OBJECTS); do rm -f $$i $$i.mdb; done
34 |
--------------------------------------------------------------------------------
/datagridview/SimpleTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | public class Form1 : Form
6 | {
7 | public static void Main() {
8 | Application.EnableVisualStyles();
9 | Application.Run(new Form1());
10 | }
11 |
12 | public Form1() {
13 | //this.AutoSize = true;
14 | DataGridView dgv = new DataGridView();
15 | //dgv.Size = new Size(500,250);
16 | dgv.Location = new Point(10,10);
17 | dgv.RowTemplate = new DataGridViewRow();
18 | DataGridViewColumn col = new DataGridViewColumn();
19 | col.CellTemplate = new DataGridViewTextBoxCell();
20 | dgv.Columns.Add(col.Clone() as DataGridViewColumn);
21 | dgv.Columns.Add(col.Clone() as DataGridViewColumn);
22 | dgv.Columns.Add(col.Clone() as DataGridViewColumn);
23 | dgv.RowCount = 4;
24 | dgv.EnableHeadersVisualStyles = false;
25 | dgv.AutoSize = true;
26 | this.Controls.Add(dgv);
27 | this.Text = "DataGridView advanced border styles demo";
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/datetimepicker/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-datetimepicker.cs
4 | mcs swf-datetimepicker.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-panels.cs
7 | csc swf-datetimepicker.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-datetimepicker.exe -r -f
11 |
--------------------------------------------------------------------------------
/datetimepicker/swf-datetimepicker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 | using System.Drawing;
4 |
5 | namespace MyFormProject
6 | {
7 | public class MainForm : System.Windows.Forms.Form
8 | {
9 | // datetimepicker
10 | private System.Windows.Forms.DateTimePicker dtp1;
11 | private System.Windows.Forms.DateTimePicker dtp2;
12 |
13 | private System.Windows.Forms.Label label1;
14 |
15 | public MainForm()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void InitializeComponent()
21 | {
22 | this.label1 = new System.Windows.Forms.Label();
23 |
24 |
25 | this.label1.Location = new System.Drawing.Point(0, 0);
26 | this.label1.Name = "label1";
27 | this.label1.Size = new System.Drawing.Size(128, 23);
28 | this.label1.TabIndex = 0;
29 | this.label1.Text = "DateTimePicker";
30 |
31 | //
32 | // MainForm
33 | //
34 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
35 | this.ClientSize = new System.Drawing.Size(472, 382);
36 |
37 | this.dtp1 = new System.Windows.Forms.DateTimePicker();
38 | this.dtp1.Location = new System.Drawing.Point(10, 50);
39 | this.dtp1.Name = "dtp1";
40 | this.dtp1.TabIndex = 1;
41 |
42 | this.dtp2 = new System.Windows.Forms.DateTimePicker();
43 | this.dtp2.Location = new System.Drawing.Point(10, 150);
44 | this.dtp2.Name = "dtp2";
45 | this.dtp2.DropDownAlign = LeftRightAlignment.Right;
46 | this.dtp2.TabIndex = 2;
47 |
48 | this.Controls.Add(this.dtp1);
49 | this.Controls.Add(this.dtp2);
50 | this.Controls.Add(this.label1);
51 |
52 |
53 | this.Name = "MainForm";
54 | this.Text = "SWF-DateTimePicker";
55 | }
56 |
57 | [STAThread]
58 | static void Main()
59 | {
60 | Application.Run(new MainForm());
61 | MessageBox.Show("hello world");
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/dll/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: dll.cs app.cs
4 | mcs dll.cs /target:library /out:dll.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs app.cs /out:app.exe /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:dll.dll
6 |
7 | clean:
8 | rm dll.dll app.cs -r -f
9 |
--------------------------------------------------------------------------------
/dll/app.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace TestDllMono
4 | {
5 | ///
6 | /// Summary description for Class1.
7 | ///
8 | public class TestDllForm
9 | {
10 | public TestDllForm()
11 | {
12 | TestForm tForm = new TestForm();
13 | tForm.ShowDialog() ;
14 |
15 | // TODO: Add constructor logic here
16 | //
17 | }
18 |
19 | static void Main() {
20 | TestDllForm dll;
21 |
22 | dll = new TestDllForm();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/dockpadding/Makefile:
--------------------------------------------------------------------------------
1 | all: dockpadding.exe
2 |
3 | dockpadding.exe: dockpadding.cs
4 | mcs -debug dockpadding.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm dockpadding.exe -r -f
8 |
--------------------------------------------------------------------------------
/endian/Makefile:
--------------------------------------------------------------------------------
1 | all: endian.exe
2 |
3 | endian.exe: endian.cs
4 | mcs -g endian.cs -r:System.Windows.Forms -r:System.Drawing
5 |
--------------------------------------------------------------------------------
/endian/bmp1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/bmp1.bmp
--------------------------------------------------------------------------------
/endian/test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test.bmp
--------------------------------------------------------------------------------
/endian/test.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test.gif
--------------------------------------------------------------------------------
/endian/test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test.jpg
--------------------------------------------------------------------------------
/endian/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test.png
--------------------------------------------------------------------------------
/endian/test.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test.tif
--------------------------------------------------------------------------------
/endian/test1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test1.bmp
--------------------------------------------------------------------------------
/endian/test16.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test16.bmp
--------------------------------------------------------------------------------
/endian/test256.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/endian/test256.bmp
--------------------------------------------------------------------------------
/errorprovider/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: errorprovider.cs
4 | mcs -g errorprovider.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: errorprovider.cs
7 | csc errorprovider.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm errorprovider.exe -r -f
11 |
--------------------------------------------------------------------------------
/events/Makefile:
--------------------------------------------------------------------------------
1 | all: events.exe
2 |
3 | events.exe: events.cs
4 | mcs -debug events.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
5 |
6 | clean:
7 | rm events.exe -r -f
8 |
--------------------------------------------------------------------------------
/exception/Makefile:
--------------------------------------------------------------------------------
1 | all: exception.exe
2 |
3 | exception.exe: exception.cs
4 | mcs exception.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: exception.cs
7 | csc exception.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm exception.exe -r -f
11 |
--------------------------------------------------------------------------------
/exception/exception.cs:
--------------------------------------------------------------------------------
1 | //
2 |
3 | using System;
4 | using System.Drawing;
5 | using System.Windows.Forms;
6 | using System.Threading;
7 |
8 | namespace testwin
9 | {
10 | public class MainForm : Form
11 | {
12 | private Button button;
13 | private Label label;
14 | public MainForm()
15 | {
16 | button = new Button();
17 | SuspendLayout();
18 | button.Location = new System.Drawing.Point(40, 32);
19 | button.Text = "Push me to cause an exception";
20 | button.Click += new System.EventHandler(OnClick);
21 | button.Size = new Size(100, 28);
22 | AutoScaleBaseSize = new Size(5, 13);
23 | ClientSize = new System.Drawing.Size(292, 266);
24 | Controls.Add(button);
25 | Text = "Exception test";
26 | label = new Label();
27 | ResumeLayout(false);
28 | }
29 |
30 | [STAThread]
31 | public static void Main(string[] args)
32 | {
33 |
34 | Application.Run(new MainForm());
35 | }
36 |
37 | void OnClick(object sender, System.EventArgs e)
38 | {
39 | label.BorderStyle = (BorderStyle)1234;
40 | }
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/filedialog/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-filedialog.cs
4 | mcs swf-filedialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-filedialog.cs
7 | csc swf-filedialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-filedialog.exe -r -f
11 |
--------------------------------------------------------------------------------
/filedialog/swf-filedialog.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Testapp by Alexander Olk
3 | //
4 |
5 | using System;
6 | using System.Drawing;
7 | using System.Windows.Forms;
8 |
9 | namespace testwin
10 | {
11 | public class MainForm : Form
12 | {
13 | private Button button;
14 | public MainForm()
15 | {
16 | button = new Button();
17 | SuspendLayout();
18 | button.Location = new System.Drawing.Point(40, 32);
19 | button.Text = "FileDialog";
20 | button.Click += new System.EventHandler(OnClick);
21 | AutoScaleBaseSize = new Size(5, 13);
22 | ClientSize = new System.Drawing.Size(292, 266);
23 | Controls.Add(button);
24 | Text = "FileDialogTest";
25 | ResumeLayout(false);
26 | }
27 |
28 | [STAThread]
29 | public static void Main(string[] args)
30 | {
31 | Application.Run(new MainForm());
32 | }
33 |
34 | void OnClick(object sender, System.EventArgs e)
35 | {
36 | OpenFileDialog myFileDialog = new OpenFileDialog();
37 | myFileDialog.Filter = "All Files (*.*)|*.*";
38 | myFileDialog.Multiselect = false;
39 | myFileDialog.RestoreDirectory = false;
40 | myFileDialog.ShowDialog();
41 |
42 | if (myFileDialog.FileName.Trim() != string.Empty)
43 | {
44 | this.button.Text = myFileDialog.FileName.Trim();
45 | }
46 |
47 | myFileDialog.Dispose();
48 | myFileDialog = null;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/folderdialog/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-folderdialog.cs
4 | mcs swf-folderdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-folderdialog.cs
7 | csc swf-folderdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-folderdialog.exe -r -f
11 |
--------------------------------------------------------------------------------
/folderdialog/swf-folderdialog.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.IO;
4 | using System.Drawing;
5 | using System.Windows.Forms;
6 |
7 | namespace testwin
8 | {
9 | public class MainForm : Form
10 | {
11 | private Button button;
12 |
13 | public MainForm ()
14 | {
15 | button = new Button();
16 | SuspendLayout ();
17 | button.Location = new System.Drawing.Point (40, 32);
18 | button.Text = "Folder Dialog";
19 | button.Click += new System.EventHandler (OnClick);
20 | AutoScaleBaseSize = new Size (5, 13);
21 | ClientSize = new System.Drawing.Size (292, 266);
22 | Controls.Add (button);
23 | Text = "Folder Dialog Test";
24 | ResumeLayout (false);
25 | }
26 |
27 | public static void Main (string [] args)
28 | {
29 | Application.Run (new MainForm ());
30 | }
31 |
32 | private void OnClick (object sender, System.EventArgs e)
33 | {
34 | FolderBrowserDialog fbd = new FolderBrowserDialog ();
35 |
36 | fbd.SelectedPath = Directory.GetCurrentDirectory ();
37 | fbd.ShowDialog ();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/fontdialog/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-fontdialog.cs
4 | mcs swf-fontdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-fontdialog.cs
7 | csc swf-fontdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-fontdialog.exe -r -f
11 |
--------------------------------------------------------------------------------
/fontdialog/swf-fontdialog.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Testapp by Alexander Olk
3 | //
4 |
5 | using System;
6 | using System.Drawing;
7 | using System.Windows.Forms;
8 |
9 | namespace testwin
10 | {
11 | public class MainForm : Form
12 | {
13 | private Button button;
14 | private FontDialog fontDialog;
15 | public MainForm()
16 | {
17 | fontDialog = new FontDialog();
18 | button = new Button();
19 | SuspendLayout();
20 | button.Location = new System.Drawing.Point(40, 32);
21 | button.Text = "FontDialog";
22 | button.Click += new System.EventHandler(OnClick);
23 | AutoScaleBaseSize = new Size(5, 13);
24 | ClientSize = new System.Drawing.Size(292, 266);
25 | Controls.Add(button);
26 | Text = "FontDialogTest";
27 | ResumeLayout(false);
28 | }
29 |
30 | [STAThread]
31 | public static void Main(string[] args)
32 | {
33 | Application.Run(new MainForm());
34 | }
35 |
36 | void OnClick(object sender, System.EventArgs e)
37 | {
38 | if (DialogResult.OK == fontDialog.ShowDialog()) {
39 | Console.WriteLine(fontDialog.Font);
40 | Console.WriteLine(fontDialog.Color);
41 | }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/forms/FormsTest.dotgnu.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.dotgnu.ico
--------------------------------------------------------------------------------
/forms/FormsTest.small_folder.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.small_folder.ico
--------------------------------------------------------------------------------
/forms/FormsTest.small_text.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.small_text.ico
--------------------------------------------------------------------------------
/forms/FormsTest.test 15bpp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test 15bpp.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test 16bpp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test 16bpp.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test 1bpp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test 1bpp.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test 4bpp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test 4bpp.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test 8bpp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test 8bpp.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test.bmp
--------------------------------------------------------------------------------
/forms/FormsTest.test.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/FormsTest.test.ico
--------------------------------------------------------------------------------
/forms/LICENSE:
--------------------------------------------------------------------------------
1 | The samples in this folder are part of the PNet distribution. All source
2 | files contain the license below, radiobutton.exe additionally
3 | listed "Copyright (C) 2003 Free Software Foundation, Inc."
4 |
5 |
6 | Copyright (C) 2003 Southern Storm Software, Pty Ltd.
7 |
8 | This program is free software, you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 2 of the License, or
11 | (at your option) any later version.
12 |
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY, without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program, if not, write to the Free Software
20 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 |
22 |
--------------------------------------------------------------------------------
/forms/Makefile:
--------------------------------------------------------------------------------
1 | all: FormsTest.exe FormsMdi.exe FormsHello.exe CustomControl.exe ImageViewer.exe radiobuttons.exe text.exe
2 |
3 | FormsTest.exe: FormsTest.cs
4 | mcs FormsTest.cs -debug \
5 | -resource:FormsTest.dotgnu.ico \
6 | -resource:FormsTest.small_folder.ico \
7 | -resource:FormsTest.small_text.ico \
8 | -resource:FormsTest.test.ico \
9 | -resource:FormsTest.test\ 15bpp.bmp \
10 | -resource:FormsTest.test\ 16bpp.bmp \
11 | -resource:FormsTest.test\ 1bpp.bmp \
12 | -resource:FormsTest.test\ 4bpp.bmp \
13 | -resource:FormsTest.test\ 8bpp.bmp \
14 | -resource:FormsTest.test.bmp \
15 | -r:System.Windows.Forms.dll \
16 | -r:System.Drawing.dll
17 |
18 | FormsMdi.exe: FormsMdi.cs
19 | mcs FormsMdi.cs -debug -r:System.Windows.Forms.dll -r:System.Drawing.dll
20 |
21 | FormsHello.exe: FormsHello.cs
22 | mcs FormsHello.cs -debug -r:System.Windows.Forms.dll -r:System.Drawing.dll
23 |
24 | CustomControl.exe: CustomControl.cs
25 | mcs CustomControl.cs -debug -r:System.Windows.Forms.dll -r:System.Drawing.dll
26 |
27 | ImageViewer.exe: ImageViewer.cs
28 | mcs ImageViewer.cs -debug -r:System.Windows.Forms.dll -r:System.Drawing.dll
29 |
30 | radiobuttons.exe: radiobuttons.cs
31 | mcs radiobuttons.cs -debug -r:System.Windows.Forms.dll -r:System.Drawing.dll
32 |
33 | text.exe: text.cs
34 | mcs text.cs -debug -r:System.Windows.Forms.dll
35 |
36 | clean:
37 | rm -f FormsTest.exe
38 | rm -f FormsMdi.exe
39 | rm -f FormsHello.exe
40 | rm -f CustomControl.exe
41 | rm -f ImageViewer.exe
42 | rm -f radiobuttons.exe
43 | rm -f text.exe
44 |
--------------------------------------------------------------------------------
/forms/README:
--------------------------------------------------------------------------------
1 | These sample SWF apps are part of the PNet distribution and are licensed under the GPL.
2 |
--------------------------------------------------------------------------------
/forms/make-csc.bat:
--------------------------------------------------------------------------------
1 | csc FormsTest.cs -resource:FormsTest.dotgnu.ico -resource:FormsTest.small_folder.ico -resource:FormsTest.small_text.ico -resource:FormsTest.test.ico -resource:"FormsTest.test 15bpp.bmp" -resource:"FormsTest.test 16bpp.bmp" -resource:"FormsTest.test 1bpp.bmp" -resource:"FormsTest.test 4bpp.bmp" -resource:"FormsTest.test 8bpp.bmp" -resource:FormsTest.test.bmp -r:System.Windows.Forms.dll -r:System.Drawing.dll
2 | csc FormsMdi.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll
3 | csc FormsHello.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll
4 | csc CustomControl.cs -r:System.Windows.Forms.dll -r:System.Drawing
5 | csc ImageViewer.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll
6 | csc radiobuttons.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll
7 |
--------------------------------------------------------------------------------
/forms/test.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/forms/test.ico
--------------------------------------------------------------------------------
/forms/text.cs:
--------------------------------------------------------------------------------
1 |
2 | using System.Windows.Forms;
3 | using System;
4 |
5 | public class Foo {
6 | static Form f;
7 |
8 | public static void button_clicked (object sender, EventArgs ea) {
9 | if (f.Text == "")
10 | f.Text = "hi there!";
11 | else
12 | f.Text = "";
13 | }
14 |
15 | public static void Main (string[] args) {
16 | f = new Form ();
17 | Button b = new Button ();
18 | b.Text = "Click me to toggle title";
19 | b.Click += new EventHandler (button_clicked);
20 | //f.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
21 | f.Controls.Add (b);
22 | f.ControlBox = false;
23 | f.MaximizeBox = false;
24 | f.MinimizeBox = false;
25 | f.Name = "";
26 | f.Text = "";
27 |
28 | Application.Run (f);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/formstest/Makefile:
--------------------------------------------------------------------------------
1 | all: FormsTest.exe
2 |
3 | FormsTest.exe: FormsTest.cs
4 | mcs FormsTest.cs -r:System.Windows.Forms -r:System.Drawing
5 |
6 | clean:
7 | rm -f FormsTest.exe
8 |
--------------------------------------------------------------------------------
/formstest/test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/formstest/test.bmp
--------------------------------------------------------------------------------
/formstest/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/formstest/test.png
--------------------------------------------------------------------------------
/groupbox/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/groupbox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-groupboxes.cs
4 | mcs swf-groupboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-groupboxes.cs
7 | csc swf-groupboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-groupboxes.exe -r -f
11 |
--------------------------------------------------------------------------------
/groupbox/swf-groupboxes.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/groupbox/swf-groupboxes.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/groupbox/swf-groupboxes.pdb
--------------------------------------------------------------------------------
/groupbox/swf-groupboxes.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/hello/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-hello.cs
4 | mcs swf-hello.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-hello.exe -r -f
8 |
--------------------------------------------------------------------------------
/hello/swf-hello.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Hello, SWF!
3 | //
4 | //
5 |
6 |
7 | // This application will produce a window 250x250 pixels in size
8 | // It will display "My first System.Windows.Forms application(TM)" centered in it
9 |
10 | using System;
11 | using System.Drawing;
12 | using System.Windows.Forms;
13 |
14 | namespace MWFTestApplication {
15 | class MainWindow : System.Windows.Forms.Form {
16 | public MainWindow() {
17 | Label label;
18 |
19 | ClientSize = new System.Drawing.Size (250, 250);
20 |
21 | label = new Label();
22 | label.Text = "My first System.Windows.Forms application(TM)";
23 | label.Dock = DockStyle.Fill;
24 | label.TextAlign = ContentAlignment.MiddleCenter;
25 | this.Controls.Add(label);
26 | Text = "Hello, System.Windows.Forms";
27 |
28 | }
29 |
30 | public static void Main(string[] args) {
31 | Application.Run(new MainWindow());
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/help/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-help.cs
4 | mcs swf-help.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-help.exe -r -f
8 |
--------------------------------------------------------------------------------
/help/swf-help.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/help/swf-help.chm
--------------------------------------------------------------------------------
/helpprovider/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: helpprovider.cs
4 | mcs helpprovider.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: helpprovider.cs
7 | csc helpprovider.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm helpprovider.exe -r -f
11 |
--------------------------------------------------------------------------------
/helpprovider/README:
--------------------------------------------------------------------------------
1 | This sample code came from MSDN, it is the sample code for the HelpProvider class.
2 |
3 | http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformshelpprovidermemberstopic.asp
4 |
5 |
--------------------------------------------------------------------------------
/horizontalscrollbar/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/horizontalscrollbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-horizontalscrollbar.cs swf-scrollbars-resize.cs
4 | mcs swf-horizontalscrollbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-scrollbars-resize.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-horizontalscrollbar.cs swf-scrollbars-resize.cs
8 | csc swf-horizontalscrollbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-scrollbars-resize.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-horizontalscrollbar.exe -r -f
13 | rm swf-scrollbars-resize.exe -r -f
14 |
--------------------------------------------------------------------------------
/horizontalscrollbar/swf-horizontalscrollbar.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/icon/Makefile:
--------------------------------------------------------------------------------
1 | all: swf-icon.exe
2 |
3 | swf-icon.exe: swf-icon.cs
4 | mcs swf-icon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-icon.exe -r -f
8 |
9 |
--------------------------------------------------------------------------------
/icon/swf-icon.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | namespace MyFormProject
6 | {
7 | class MainForm : System.Windows.Forms.Form
8 | {
9 |
10 | public MainForm()
11 | {
12 |
13 | Icon icon;
14 |
15 | icon = new Icon("test.ico");
16 | this.Icon = icon;
17 | }
18 |
19 | [STAThread]
20 | public static void Main(string[] args)
21 | {
22 | Application.Run(new MainForm());
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/icon/test.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/icon/test.ico
--------------------------------------------------------------------------------
/idle/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-idle.cs
4 | mcs swf-idle.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-idle.cs
7 | csc swf-idle.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-idle.exe -r -f
11 |
--------------------------------------------------------------------------------
/idle/swf-idle.cs:
--------------------------------------------------------------------------------
1 | //
2 | // swf-idle.cs
3 | //
4 | // Author(s):
5 | // Jackson Harper (jackson@ximian.com)
6 | //
7 | // Copyright (c) 2004 Novell, Inc (http://www.novell.com)
8 | //
9 |
10 | using System;
11 | using System.Drawing;
12 | using System.Windows.Forms;
13 |
14 | namespace System.Windows.Forms {
15 |
16 | public class IdleDemo : Form {
17 |
18 | private Label label;
19 |
20 | public IdleDemo ()
21 | {
22 | label = new Label ();
23 | label.Dock = DockStyle.Fill;
24 | label.TextAlign = ContentAlignment.MiddleCenter;
25 | Controls.Add (label);
26 | }
27 |
28 | private void IdleHandler (object sender, EventArgs e)
29 | {
30 | label.Text = "Last Idle: " + DateTime.Now.Ticks;
31 | }
32 |
33 | public static void Main ()
34 | {
35 | IdleDemo demo = new IdleDemo ();
36 |
37 | Application.Idle += new EventHandler (demo.IdleHandler);
38 | Application.Run (demo);
39 | }
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/imagelist/Makefile:
--------------------------------------------------------------------------------
1 |
2 | imagelist.exe: swf-imagelist.cs
3 | mcs /r:System.Drawing.dll /r:System.Windows.Forms.dll swf-imagelist.cs
4 |
5 | clean:
6 | rm swf-imagelist.exe
--------------------------------------------------------------------------------
/imagelist/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/imagelist/a.png
--------------------------------------------------------------------------------
/imagelist/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/imagelist/b.png
--------------------------------------------------------------------------------
/imagelist/swf-imagelist.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Test drawing of imagelist. Output in image.bmp
3 | //
4 |
5 |
6 | using System;
7 | using System.Drawing;
8 | using System.Windows.Forms;
9 |
10 |
11 | public class T {
12 |
13 | public static void Main ()
14 | {
15 | Bitmap b = new Bitmap (250, 20);
16 | ImageList il = new ImageList ();
17 |
18 | il.ColorDepth = ColorDepth.Depth32Bit;
19 | il.ImageSize = new Size (15, 15);
20 |
21 | il.Images.Add (Image.FromFile ("a.png"));
22 | il.Images.Add (Image.FromFile ("b.png"));
23 |
24 | Graphics g = Graphics.FromImage (b);
25 | il.Draw (g, 5, 3, 0);
26 | g.DrawString ("aaa", new Font ("arial", 15), new SolidBrush (Color.Red), new Point (20, 5));
27 | il.Draw (g, 50, 3, 1);
28 |
29 | b.Save ("image.bmp");
30 | }
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/img/Makefile:
--------------------------------------------------------------------------------
1 | all: img.exe
2 |
3 | img.exe: img.cs
4 | mcs -debug img.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm img.exe -r -f
8 |
--------------------------------------------------------------------------------
/img/PropertyItem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/PropertyItem.png
--------------------------------------------------------------------------------
/img/ani.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/ani.gif
--------------------------------------------------------------------------------
/img/animated.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/animated.gif
--------------------------------------------------------------------------------
/img/combined-animated.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/combined-animated.gif
--------------------------------------------------------------------------------
/img/image.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/image.tif
--------------------------------------------------------------------------------
/img/multipage.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/multipage.tif
--------------------------------------------------------------------------------
/img/photo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/photo.jpg
--------------------------------------------------------------------------------
/img/test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/img/test.bmp
--------------------------------------------------------------------------------
/invalidate/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-invalidate.cs
4 | mcs swf-invalidate.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-invalidate.cs
7 | csc swf-invalidate.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-invalidate.exe -r -f
--------------------------------------------------------------------------------
/invalidate/swf-invalidate.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Drawing;
4 | using System.Windows.Forms;
5 |
6 |
7 |
8 | public class InvalidateForm : Form {
9 |
10 | private Timer timer;
11 | private int width;
12 | private bool region;
13 |
14 | public InvalidateForm ()
15 | {
16 | timer = new Timer ();
17 | timer.Interval = 500;
18 | timer.Tick += new EventHandler (TimerTick);
19 | timer.Enabled = true;
20 |
21 | BackColor = Color.Blue;
22 |
23 | Paint += new PaintEventHandler (PaintHandler);
24 | Click += new EventHandler (ClickHandler);
25 | }
26 |
27 | private void TimerTick (object sender, EventArgs e)
28 | {
29 | width += 10;
30 | if (width > Width + 11) {
31 | width = 0;
32 | Refresh ();
33 | region = !region;
34 | return;
35 | }
36 |
37 | if (!region) {
38 | Invalidate (new Rectangle (0, 0, width, Height));
39 | } else {
40 | int half = width / 2;
41 | int xmiddle = Width / 2;
42 | int ymiddle = Height / 2;
43 | Rectangle rect = new Rectangle (xmiddle - half, ymiddle - half, width, width);
44 | Invalidate (new Region (rect));
45 | }
46 | }
47 |
48 | private void ClickHandler (object sender, EventArgs e)
49 | {
50 | timer.Enabled = !timer.Enabled;
51 | }
52 |
53 | private void PaintHandler (object sender, PaintEventArgs pe)
54 | {
55 | if (pe.ClipRectangle.Width == Width && pe.ClipRectangle.Height == Height) {
56 | Console.WriteLine ("Clearing Form");
57 | pe.Graphics.FillRectangle (new SolidBrush (BackColor), pe.ClipRectangle);
58 | return;
59 | }
60 |
61 | Console.WriteLine ("Filling: " + pe.ClipRectangle);
62 | pe.Graphics.FillRectangle (new SolidBrush (Color.Red), pe.ClipRectangle);
63 | }
64 |
65 | public static void Main ()
66 | {
67 | Application.Run (new InvalidateForm ());
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/label/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/label/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-label.cs
4 | mcs swf-label.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-label-images.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-label.cs
8 | csc swf-label.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-label-images.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-label.exe -r -f
13 | rm swf-label-images.exe -r -f
14 |
--------------------------------------------------------------------------------
/label/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/label/a.png
--------------------------------------------------------------------------------
/label/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/label/b.png
--------------------------------------------------------------------------------
/label/swf-label.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/label/swf-label.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/linklabel/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/linklabel/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-linklabels.cs
4 | mcs swf-linklabels.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | gmcs swf-textalign.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-linklabels.cs
8 | csc swf-linklabels.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 |
10 | clean:
11 | rm swf-linklabels.exe -r -f
12 | rm swf-textalign.exe -r -f
13 |
--------------------------------------------------------------------------------
/linklabel/swf-linklabels.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/linklabel/swf-linklabels.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/listbox/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/listbox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-listboxes.cs swf-listbox-multicolumn.cs swf-listbox-selections.cs
4 | mcs swf-listboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-listbox-multicolumn.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | mcs swf-listbox-selections.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /codepage:1251
7 |
8 | dotnet: swf-listboxes.cs swf-listbox-multicolumn.cs swf-listbox-selections.cs
9 | csc swf-listboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 | csc swf-listbox-multicolumn.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
11 | csc swf-listbox-selections.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
12 | clean:
13 | rm swf-listboxes.exe -r -f
14 | rm swf-listbox-multicolumn.exe -r -f
15 | rm swf-listbox-selections.exe -r -f
16 |
17 |
18 |
--------------------------------------------------------------------------------
/listbox/ownerdraw/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono:swf-listbox-ownerdraw.cs
4 | mcs swf-listbox-ownerdraw.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-listbox-ownerdraw.cs
7 | swf-listbox-ownerdraw.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 | clean:
9 | rm swf-listbox-ownerdraw.exe -r -f
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/listbox/swf-listbox-selections.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listbox/swf-listbox-selections.cs
--------------------------------------------------------------------------------
/listbox/swf-listboxes.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/listbox/swf-listboxes.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual C# Express 2005
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListViewTorturer", "ListViewTorturer\ListViewTorturer.csproj", "{2935D39C-AA29-46FD-9B04-BA3BFD309440}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2935D39C-AA29-46FD-9B04-BA3BFD309440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {2935D39C-AA29-46FD-9B04-BA3BFD309440}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {2935D39C-AA29-46FD-9B04-BA3BFD309440}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {2935D39C-AA29-46FD-9B04-BA3BFD309440}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer.suo
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/AddItemsForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ListViewTorturer
2 | {
3 | partial class AddItemsForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose (bool disposing)
15 | {
16 | if (disposing && (components != null)) {
17 | components.Dispose ();
18 | }
19 | base.Dispose (disposing);
20 | }
21 |
22 | #region Windows Form Designer generated code
23 |
24 | ///
25 | /// Required method for Designer support - do not modify
26 | /// the contents of this method with the code editor.
27 | ///
28 | private void InitializeComponent ()
29 | {
30 | this.SuspendLayout ();
31 | //
32 | // AddItemsForm
33 | //
34 | this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F);
35 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
36 | this.ClientSize = new System.Drawing.Size (741, 487);
37 | this.Name = "AddItemsForm";
38 | this.Text = "AddItemsForm";
39 | this.ResumeLayout (false);
40 |
41 | }
42 |
43 | #endregion
44 |
45 | }
46 | }
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/AddItemsForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace ListViewTorturer
10 | {
11 | public partial class AddItemsForm : Form
12 | {
13 | ListView lv;
14 |
15 | public AddItemsForm ()
16 | {
17 | InitializeComponent ();
18 |
19 | }
20 |
21 | public ListView ListView {
22 | get {
23 | return lv;
24 | }
25 | set {
26 | this.lv = value;
27 | }
28 | }
29 |
30 | protected override void OnVisibleChanged (EventArgs e)
31 | {
32 | base.OnVisibleChanged (e);
33 | if (!Visible)
34 | return;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/AddItemsTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 |
6 | namespace ListViewTorturer
7 | {
8 | class AddItemsTester : IListViewTester
9 | {
10 | ListView lv;
11 | ListViewDescriptor descriptor;
12 | int items_to_add;
13 |
14 | public AddItemsTester (ListViewDescriptor descriptor)
15 | {
16 | this.descriptor = descriptor;
17 |
18 | lv = new ListView ();
19 | lv.View = descriptor.View;
20 |
21 | items_to_add = descriptor.ItemCount;
22 | }
23 |
24 | public ListViewDescriptor Descriptor
25 | {
26 | get
27 | {
28 | return descriptor;
29 | }
30 | }
31 |
32 | public bool RequireForm
33 | {
34 | get
35 | {
36 | return true;
37 | }
38 | }
39 |
40 | public ListView ListView
41 | {
42 | get
43 | {
44 | return lv;
45 | }
46 | }
47 |
48 | public void StartTest ()
49 | {
50 | lv.EndUpdate (); // Make sure we are not in a BeginUpdate ()
51 |
52 | if (lv.Parent == null)
53 | throw new Exception ("Fuck");
54 |
55 | for (int i = 0; i < items_to_add; i++)
56 | lv.Items.Add ("Item " + i);
57 | }
58 |
59 | public void OnEndTest (EndTestEventArgs args)
60 | {
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/IListViewTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 |
6 | namespace ListViewTorturer
7 | {
8 | public interface IListViewTester
9 | {
10 | ListView ListView { get; }
11 |
12 | bool RequireForm { get; }
13 |
14 | void StartTest ();
15 |
16 | void OnEndTest (EndTestEventArgs args);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/ListViewDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 |
6 | namespace ListViewTorturer
7 | {
8 | public class ListViewDescriptor
9 | {
10 | int item_count;
11 | bool groups;
12 | View view;
13 |
14 | public int ItemCount
15 | {
16 | get
17 | {
18 | return item_count;
19 | }
20 | set
21 | {
22 | item_count = value;
23 | }
24 | }
25 |
26 | public bool Groups
27 | {
28 | get
29 | {
30 | return groups;
31 | }
32 | set
33 | {
34 | groups = value;
35 | }
36 | }
37 |
38 | public View View
39 | {
40 | get
41 | {
42 | return view;
43 | }
44 | set
45 | {
46 | view = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/OnEndTestEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 |
6 | namespace ListViewTorturer
7 | {
8 | public class EndTestEventArgs : EventArgs
9 | {
10 | bool show_default_dialog = true;
11 | TimeSpan interval;
12 |
13 | public EndTestEventArgs (TimeSpan interval)
14 | {
15 | this.interval = interval;
16 | }
17 |
18 | public bool ShowDefaultDialog
19 | {
20 | get
21 | {
22 | return show_default_dialog;
23 | }
24 | set
25 | {
26 | show_default_dialog = value;
27 | }
28 | }
29 |
30 | public TimeSpan Interval
31 | {
32 | get
33 | {
34 | return interval;
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace ListViewTorturer
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main ()
14 | {
15 | Application.EnableVisualStyles ();
16 | Application.SetCompatibleTextRenderingDefault (false);
17 | Application.Run (new Form1 ());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle ("ListViewTorturer")]
9 | [assembly: AssemblyDescription ("")]
10 | [assembly: AssemblyConfiguration ("")]
11 | [assembly: AssemblyCompany ("Gomitas")]
12 | [assembly: AssemblyProduct ("ListViewTorturer")]
13 | [assembly: AssemblyCopyright ("Copyright © Gomitas 2007")]
14 | [assembly: AssemblyTrademark ("")]
15 | [assembly: AssemblyCulture ("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible (false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid ("0f5946bd-ab88-461d-93de-dbb5e3b4f4c4")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | [assembly: AssemblyVersion ("1.0.0.0")]
33 | [assembly: AssemblyFileVersion ("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.50727.42
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ListViewTorturer.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute ()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute ("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized (new Settings ())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/SelectionChangeTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Windows.Forms;
5 |
6 | namespace ListViewTorturer
7 | {
8 | public class SelectionChangeTester : IListViewTester
9 | {
10 | ListViewDescriptor descriptor;
11 | ListView lv;
12 |
13 | public SelectionChangeTester (ListViewDescriptor descriptor)
14 | {
15 | this.descriptor = descriptor;
16 |
17 | lv = new ListView ();
18 | lv.View = descriptor.View;
19 |
20 | lv.BeginUpdate ();
21 | for (int i = 0; i < descriptor.ItemCount; i++)
22 | lv.Items.Add ("Item " + i);
23 | lv.EndUpdate ();
24 | }
25 |
26 | public ListView ListView
27 | {
28 | get
29 | {
30 | return lv;
31 | }
32 | }
33 |
34 | public bool RequireForm
35 | {
36 | get
37 | {
38 | return true;
39 | }
40 | }
41 |
42 | public void StartTest ()
43 | {
44 | lv.SelectedIndices.Clear ();
45 |
46 | //
47 | // First approach: Linear, adding one by one
48 | //
49 | for (int i = 0; i < lv.Items.Count; i++)
50 | lv.SelectedIndices.Add (i);
51 |
52 | //
53 | // Second approach: Linear reverse de-selecting
54 | //
55 | for (int i = 0; i < lv.Items.Count; i++)
56 | lv.SelectedIndices.Remove (i);
57 |
58 | //
59 | // Third approach: Select and then select all items
60 | //
61 | for (int i = 0; i < lv.Items.Count; i++) {
62 | lv.SelectedIndices.Add (i);
63 | lv.SelectedIndices.Remove (i);
64 | }
65 | }
66 |
67 | public void OnEndTest (EndTestEventArgs args)
68 | {
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/TestForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ListViewTorturer
2 | {
3 | partial class TestForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose (bool disposing)
15 | {
16 | if (disposing && (components != null)) {
17 | components.Dispose ();
18 | }
19 | base.Dispose (disposing);
20 | }
21 |
22 | #region Windows Form Designer generated code
23 |
24 | ///
25 | /// Required method for Designer support - do not modify
26 | /// the contents of this method with the code editor.
27 | ///
28 | private void InitializeComponent ()
29 | {
30 | this.SuspendLayout ();
31 | //
32 | // TestForm
33 | //
34 | this.AutoScaleDimensions = new System.Drawing.SizeF (6F, 13F);
35 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
36 | this.ClientSize = new System.Drawing.Size (769, 479);
37 | this.Name = "TestForm";
38 | this.ShowInTaskbar = false;
39 | this.Text = "TestForm";
40 | this.ResumeLayout (false);
41 |
42 | }
43 |
44 | #endregion
45 | }
46 | }
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/TestForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace ListViewTorturer
10 | {
11 | public partial class TestForm : Form
12 | {
13 | IListViewTester tester;
14 |
15 | public TestForm ()
16 | {
17 | InitializeComponent ();
18 | }
19 |
20 | protected virtual void OnEndTest (EndTestEventArgs args)
21 | {
22 | EndTest (this, args);
23 | }
24 |
25 | protected override void OnVisibleChanged (EventArgs e)
26 | {
27 | base.OnVisibleChanged (e);
28 | if (!Visible)
29 | return;
30 |
31 | // We have to call asynch this method
32 | // because it looks like in .Net the form is not
33 | // actually shown until the OnVisibleChanged
34 | // method returns, and we want to get all the operations
35 | // to be shown in screen
36 | StartTestDelegate del = StartTest;
37 | del.BeginInvoke (null, null);
38 | }
39 |
40 | delegate void StartTestDelegate ();
41 |
42 | void StartTest ()
43 | {
44 | // We should add a better profiling facility
45 | // including memory allocations and more
46 | DateTime dt1 = DateTime.Now;
47 | tester.StartTest ();
48 | TimeSpan interval = DateTime.Now - dt1;
49 |
50 | EndTestEventArgs args = new EndTestEventArgs (interval);
51 |
52 | DialogResult = DialogResult.OK; // Close this form - This is a little nasty
53 |
54 | OnEndTest (args);
55 | tester.OnEndTest (args);
56 | }
57 |
58 | public IListViewTester Tester {
59 | get {
60 | return tester;
61 | }
62 | set {
63 | this.tester = value;
64 |
65 | Controls.Clear ();
66 |
67 | tester.ListView.Dock = DockStyle.Fill;
68 | Controls.Add (tester.ListView);
69 | }
70 | }
71 |
72 | public EndTestEventHandler EndTest;
73 | }
74 |
75 | public delegate void EndTestEventHandler (object o, EndTestEventArgs args);
76 | }
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/bin/Debug/ListViewTorturer.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/bin/Debug/ListViewTorturer.vshost.exe
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/ListViewTorturer.csproj.FileList.txt:
--------------------------------------------------------------------------------
1 | bin\Release\ListViewTorturer.exe
2 | bin\Release\ListViewTorturer.pdb
3 | obj\Release\ResolveAssemblyReference.cache
4 | obj\Release\ListViewTorturer.Form1.resources
5 | obj\Release\ListViewTorturer.Properties.Resources.resources
6 | obj\Release\ListViewTorturer.csproj.GenerateResource.Cache
7 | obj\Release\ListViewTorturer.exe
8 | obj\Release\ListViewTorturer.pdb
9 | obj\Release\ListViewTorturer.TestForm.resources
10 | obj\Release\ListViewTorturer.ResultForm.resources
11 |
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.Form1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.Form1.resources
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.Properties.Resources.resources
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.ResultForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.ResultForm.resources
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.TestForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.TestForm.resources
--------------------------------------------------------------------------------
/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/ListViewTorturer/ListViewTorturer/obj/Release/ListViewTorturer.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/listview/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-listview.cs swf-listview-items.cs
4 | #mcs swf-listview.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | gmcs swf-listview-items.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | gmcs noicon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 | gmcs lvtest.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 | gmcs groups.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | gmcs virtualmode.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | dotnet: swf-listview.cs swf-listview-items.cs
12 | csc swf-listview.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
13 | csc swf-listview-items.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
14 | csc noicon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
15 | csc groups.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
16 |
17 | clean:
18 | rm swf-listview.exe -r -f
19 | rm swf-listview-items.exe -r -f
20 |
--------------------------------------------------------------------------------
/listview/listview-items-icons/32x32/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/32x32/Thumbs.db
--------------------------------------------------------------------------------
/listview/listview-items-icons/32x32/abiword_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/32x32/abiword_48.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/32x32/bmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/32x32/bmp.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/32x32/disks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/32x32/disks.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/32x32/evolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/32x32/evolution.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/64x64/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/64x64/Thumbs.db
--------------------------------------------------------------------------------
/listview/listview-items-icons/64x64/abiword_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/64x64/abiword_48.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/64x64/bmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/64x64/bmp.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/64x64/disks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/64x64/disks.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/64x64/evolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/listview/listview-items-icons/64x64/evolution.png
--------------------------------------------------------------------------------
/listview/listview-items-icons/readme.txt:
--------------------------------------------------------------------------------
1 |
2 | Icons from the GANT project
3 | http://mattahan.deviantart.com/
4 |
5 |
--------------------------------------------------------------------------------
/ls-styles/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: ls-styles.cs
4 | mcs ls-styles.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: ls-styles.cs
7 | csc ls-styles.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm ls-styles.exe -r -f
--------------------------------------------------------------------------------
/mainloop/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-mainloop.cs
4 | mcs swf-mainloop.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-mainloop.cs
7 | csc swf-mainloop.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-mainloop.exe -r -f
11 |
--------------------------------------------------------------------------------
/mainmenu/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-mainmenu.cs swf-menumerge.cs
4 | mcs swf-mainmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-mainmenu-nomdi.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 | mcs swf-menumerge.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 | mcs swf-menus.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | dotnet: swf-mainmenu.cs swf-menumerge.cs
10 | csc swf-mainmenu.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
11 | csc swf-mainmenu-nomdi.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
12 | csc swf-menumerge.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
13 | csc swf-menus.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
14 |
15 |
16 | clean:
17 | rm swf-mainmenu.exe -r -f
18 | rm swf-mainmenu-nomi.exe -r -f
19 | rm swf-menumerge.exe -r -f
20 | rm swf-menus.exe -r -f
21 |
22 |
--------------------------------------------------------------------------------
/mainmenu/swf-mainmenu.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/mainmenu/swf-mainmenu.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/mainmenu/swf-menus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | class mainmenus
6 | {
7 | private static MainMenu CreateMenu (string prefix)
8 | {
9 | MainMenu mnu = new MainMenu ();
10 | mnu.MenuItems.Add (prefix + "First");
11 | mnu.MenuItems.Add (prefix + "Second");
12 | mnu.MenuItems.Add (prefix + "Third");
13 | mnu.MenuItems [0].MenuItems.Add (prefix + "First-bis");
14 | mnu.MenuItems [1].MenuItems.Add (prefix + "Second-bis");
15 | mnu.MenuItems [2].MenuItems.Add (prefix + "Third-bis");
16 | return mnu;
17 | }
18 |
19 | public static void Main ()
20 | {
21 | int x = 25;
22 |
23 | foreach (FormBorderStyle style in Enum.GetValues (typeof(FormBorderStyle))) {
24 | Form f1 = new Form();
25 | f1.FormBorderStyle = style;
26 | f1.Location = new Point (x, 25);
27 | f1.Size = new Size (200, 200);
28 | f1.StartPosition = FormStartPosition.Manual;
29 | f1.Menu = CreateMenu ("");
30 | f1.Text = style.ToString ();
31 |
32 | f1.Show ();
33 |
34 | x += f1.Width + 25;
35 | }
36 |
37 | Form mdi = new Form ();
38 | Form child = new Form ();
39 | mdi.IsMdiContainer = true;
40 | mdi.StartPosition = FormStartPosition.Manual;
41 | mdi.Location = new Point (25, 250);
42 | mdi.Size = new Size (600, 400);
43 | mdi.Menu = CreateMenu ("Main ");
44 | child.MdiParent = mdi;
45 | child.StartPosition = FormStartPosition.Manual;
46 | child.Location = new Point (25, 25);
47 | child.Size = new Size (200, 200);
48 | child.Menu = CreateMenu ("Child ");
49 | child.Show ();
50 | Application.Run (mdi);
51 | }
52 | }
--------------------------------------------------------------------------------
/maskedtextbox/Makefile:
--------------------------------------------------------------------------------
1 | all: swf-maskedtextbox.exe
2 |
3 | swf-maskedtextbox.exe: swf-maskedtextbox.cs
4 | gmcs swf-maskedtextbox.cs /r:System.Windows.Forms.dll,System.Drawing.dll,System.Data.dll
5 |
6 | clean:
7 | rm swf-maskedtextbox.exe -r -f
8 |
--------------------------------------------------------------------------------
/mdi/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-mdi.cs
4 | mcs -g swf-mdi.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-treeview.cs
7 | csc swf-mdi.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-mdi.exe -r -f
11 |
--------------------------------------------------------------------------------
/mdi/swf-mdi.cs:
--------------------------------------------------------------------------------
1 | //
2 | // swf-mdi.cs
3 | //
4 | // Author(s):
5 | // Jackson Harper (jackson@ximian.com)
6 | //
7 | // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
8 | //
9 |
10 | using System;
11 | using System.Drawing;
12 | using System.Windows.Forms;
13 |
14 | public class MainForm : Form {
15 |
16 | private Form form_one;
17 | private Form form_two;
18 | private Form form_three;
19 |
20 | public MainForm()
21 | {
22 | IsMdiContainer = true;
23 | Text = "I am the toplevel window";
24 |
25 | foreach (FormBorderStyle bs in Enum.GetValues (typeof (FormBorderStyle))) {
26 | Form form = new Form ();
27 | form.MdiParent = this;
28 | form.Name = bs.ToString ();
29 | form.Text = bs.ToString ();
30 | form.FormBorderStyle = bs;
31 |
32 | form.Top = 75;
33 | form.Left =75;
34 | form.Width = 200;
35 | form.Height = 100;
36 | form.BackColor = Color.Red;
37 | form.Show ();
38 | }
39 | }
40 |
41 | public static void Main (string [] args)
42 | {
43 | Application.Run (new MainForm ());
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/messagebox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-messagebox.cs
4 | mcs swf-messagebox.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-messagebox.exe -r -f
8 |
--------------------------------------------------------------------------------
/modal/Makefile:
--------------------------------------------------------------------------------
1 | all: modal.exe
2 |
3 | modal.exe: modal.cs
4 | mcs modal.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm modal.exe -r -f
8 |
--------------------------------------------------------------------------------
/monthcalendar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-monthcalendar.cs
4 | mcs swf-monthcalendar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-panels.cs
7 | csc swf-monthcalendar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-monthcalendar.exe -r -f
11 |
--------------------------------------------------------------------------------
/notifyicon/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-notifyicon.cs
4 | mcs swf-notifyicon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | gmcs swf-balloon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-notifyicon.cs
8 | csc swf-notifyicon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-balloon.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-notifyicon.exe -r -f
13 | rm swf-balloon.exe -r -f
14 |
--------------------------------------------------------------------------------
/notifyicon/notify.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/notifyicon/notify.ico
--------------------------------------------------------------------------------
/panel/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-panels.cs
4 | mcs swf-panels.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-panels.cs
7 | csc swf-panels.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-panels.exe -r -f
11 |
--------------------------------------------------------------------------------
/picturebox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-picturebox.cs
4 | mcs swf-picturebox.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-picturebox.cs
7 | csc swf-picturebox.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-picturebox.exe -r -f
11 |
--------------------------------------------------------------------------------
/picturebox/roxy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/picturebox/roxy.jpg
--------------------------------------------------------------------------------
/picturebox/swf-picturebox.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | using System;
4 | using System.Drawing;
5 | using System.Windows.Forms;
6 |
7 |
8 | namespace System.Windows.Forms {
9 |
10 | public class PictureBoxDemo : Form {
11 |
12 | public PictureBoxDemo ()
13 | {
14 | PictureBox box = null;
15 |
16 | for (int r = 0; r < 3; r++) {
17 | for (int c = 0; c < 3; c++) {
18 | box = new PictureBox ();
19 | box.SizeMode = PictureBoxSizeMode.AutoSize;
20 | box.Image = Image.FromFile ("roxy.jpg");
21 | box.Left = 10 + c * box.Image.Width + (c * 10);
22 | box.Top = 10 + r * box.Image.Height + (r * 10);
23 | Controls.Add (box);
24 | }
25 | }
26 | Width = box.Right + 10;
27 | Height = box.Bottom + 10;
28 | }
29 |
30 | public static void Main ()
31 | {
32 | System.Threading.Thread.CurrentThread.Name = "Main Thread";
33 | Application.Run (new PictureBoxDemo ());
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/printing/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-printing.cs
4 | mcs -debug swf-printing.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs -debug swf-printdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-printing.cs
8 | csc swf-printing.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-printdialog.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-printing.exe -r -f
13 | rm swf-printdialog.exe -r -f
14 | rm -f swf-printing.exe.mdb
15 |
--------------------------------------------------------------------------------
/printing/swf-printdialog.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Small sample that brings the PrintDialog
3 | //
4 | using System;
5 | using System.Drawing;
6 | using System.Drawing.Printing;
7 | using System.Windows.Forms;
8 | using System.Runtime.Serialization;
9 | using System.Runtime.InteropServices;
10 | using System.ComponentModel;
11 |
12 | namespace MyFormProject
13 | {
14 | public class ShowPrintDialog
15 | {
16 | public ShowPrintDialog ()
17 | {
18 | }
19 |
20 | static void Main ()
21 | {
22 | PrintDialog pd = new PrintDialog ();
23 |
24 | pd.AllowSomePages = true;
25 | pd.AllowSelection = true;
26 | //pd.PrinterSettings = new System.Drawing.Printing.PrinterSettings ();
27 | pd.Document = new PrintDocument ();
28 | pd.Document.PrinterSettings.FromPage = 20;
29 | pd.Document.PrinterSettings.ToPage = 30;
30 | pd.Document.PrinterSettings.MaximumPage = 50;
31 | pd.Document.PrinterSettings.Copies = 5;
32 | pd.ShowHelp = true;
33 | pd.ShowNetwork = true;
34 | pd.Document.PrinterSettings.PrintRange = PrintRange.SomePages;
35 | pd.ShowDialog ();
36 |
37 | Console.WriteLine ("Printer {0}", pd.Document.PrinterSettings);
38 | Console.WriteLine ("AllowSomePages {0}", pd.AllowSomePages);
39 | Console.WriteLine ("PrintToFile {0}", pd.Document.PrinterSettings.PrintToFile);
40 | Console.WriteLine ("PrintRange {0}", pd.Document.PrinterSettings.PrintRange);
41 |
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/progressbar/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/progressbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-progressbars.cs
4 | mcs swf-progressbars.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-buttons.cs
7 | csc swf-progressbars.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-progressbars.exe -r -f
11 |
--------------------------------------------------------------------------------
/progressbar/swf-progressbars.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/progressbar/swf-progressbars.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/propertygrid/Makefile:
--------------------------------------------------------------------------------
1 | EXE= swf-propertygrid.exe \
2 | swf-propertygrid-array.exe
3 |
4 | MDB=
5 |
6 | CSC=mcs
7 |
8 | all: $(EXE)
9 |
10 | mono:
11 | make all CSC=mcs
12 |
13 | dotnet:
14 | make all CSC=csc
15 |
16 | clean:
17 | rm -f $(EXE) $(EXE:%.exe=%.exe.mdb)
18 |
19 | %.exe: %.cs
20 | $(CSC) -out:$@ -debug $< /r:System.Windows.Forms.dll /r:System.Drawing.dll
21 |
22 |
--------------------------------------------------------------------------------
/propertygrid/swf-propertygrid.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Drawing;
4 | using System.Windows.Forms;
5 |
6 | namespace MWFTestApplication {
7 | class MainWindow : System.Windows.Forms.Form {
8 | static MainWindow main_window;
9 | static Control active;
10 |
11 | PropertyGrid propertygrid;
12 | TextBox textbox;
13 |
14 | public MainWindow() {
15 | ClientSize = new System.Drawing.Size (520, 520);
16 | Text = "Property Grid Test";
17 |
18 |
19 | textbox = new TextBox();
20 |
21 | textbox.Location = new Point(0, 0);
22 | textbox.Width = this.Width;
23 | textbox.TabIndex = 1;
24 | textbox.Dock = DockStyle.Top;
25 |
26 | propertygrid = new PropertyGrid();
27 | propertygrid.CommandsVisibleIfAvailable = true;
28 | propertygrid.Location = new Point(0, textbox.PreferredHeight + 10);
29 | propertygrid.Dock = DockStyle.Fill;
30 | propertygrid.TabIndex = 2;
31 | propertygrid.Text = "Property Grid";
32 | propertygrid.Dock = DockStyle.Fill;
33 |
34 | this.Controls.Add(propertygrid);
35 | this.Controls.Add (textbox);
36 |
37 | propertygrid.SelectedObject = textbox;
38 |
39 | }
40 |
41 | public static int Main(string[] args) {
42 | main_window = new MainWindow();
43 | active = main_window;
44 |
45 | Application.Run(main_window);
46 | return 0;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/radiobutton/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/radiobutton/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-radiobuttons.cs
4 | mcs swf-radiobuttons.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-radiobuttons.cs
7 | csc swf-radiobuttons.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-radiobuttons.exe -r -f
--------------------------------------------------------------------------------
/radiobutton/swf-radiobuttons.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/radiobutton/swf-radiobuttons.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/renderertest20/Makefile:
--------------------------------------------------------------------------------
1 | all: RendererTest.exe
2 |
3 | RendererTest.exe: RendererTest.cs
4 | gmcs RendererTest.cs -r:System.Windows.Forms -r:System.Drawing
5 |
6 | clean:
7 | rm -f RendererTest.exe
8 |
--------------------------------------------------------------------------------
/renderertest20/accessories-character-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/renderertest20/accessories-character-map.png
--------------------------------------------------------------------------------
/rente/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-rente.cs
4 | mcs swf-rente.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
5 |
6 | dotnet: swf-rente.cs
7 | csc swf-rente.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
8 |
9 | clean:
10 | rm swf-rente.exe -r -f
11 |
--------------------------------------------------------------------------------
/rente/README:
--------------------------------------------------------------------------------
1 | This is a little test-app I wrote for my dad. He's retiring
2 | on July 31st 2007, and wanted a little app on his desktop
3 | showing the days until retirement. I figured I could make
4 | a nice test out of it.
5 |
--------------------------------------------------------------------------------
/resources/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: resources.cs
4 | resgen resources.resx
5 | mcs resources.cs -resource:resources.resources,ResourceTest.ResourceTest.resources /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | clean:
8 | rm resources.exe -r -f
9 |
--------------------------------------------------------------------------------
/resources/resources.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/resources/resources.bmp
--------------------------------------------------------------------------------
/resources/resources.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Drawing;
4 | using System.Windows.Forms;
5 |
6 | namespace ResourceTest {
7 | class ResourceTest : Form {
8 | public static Image img;
9 | public static Image img_res;
10 | public static Icon ico;
11 | public static Icon ico_res;
12 |
13 | protected override void OnPaint (PaintEventArgs e) {
14 | e.Graphics.DrawImage (img, 0, 0);
15 | e.Graphics.DrawIcon (ico, img.Width, 0);
16 | e.Graphics.DrawImage (img_res, 0, img.Height);
17 | e.Graphics.DrawIcon (ico_res, img.Width, img.Height);
18 | }
19 |
20 | public ResourceTest () {
21 | this.Width = img.Width * 4;
22 | this.Height = img.Height * 4;
23 | }
24 |
25 | static void Main () {
26 | System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ResourceTest));
27 | img = Image.FromFile ("resources.bmp");
28 | img_res = ((System.Drawing.Image)(resources.GetObject("resources.bmp")));
29 | ico = new Icon ("resources.ico");
30 | ico_res = ((System.Drawing.Icon)(resources.GetObject("resources.ico")));
31 | Application.Run(new ResourceTest ());
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/resources/resources.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/resources/resources.ico
--------------------------------------------------------------------------------
/rotate/24bit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/rotate/24bit.png
--------------------------------------------------------------------------------
/rotate/8bit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/rotate/8bit.png
--------------------------------------------------------------------------------
/rotate/Makefile:
--------------------------------------------------------------------------------
1 | all: test
2 |
3 | test: clean test.exe
4 | mono test.exe
5 |
6 | test.exe: test.cs
7 | mcs test.cs -r:System.Drawing
8 |
9 | clean:
10 | rm -f test.exe *_Rotate*.png
11 |
12 | .PHONY: all test clean
13 |
--------------------------------------------------------------------------------
/rotate1bit4bit/1bit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/rotate1bit4bit/1bit.png
--------------------------------------------------------------------------------
/rotate1bit4bit/4bit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/rotate1bit4bit/4bit.png
--------------------------------------------------------------------------------
/rotate1bit4bit/Makefile:
--------------------------------------------------------------------------------
1 | all: test
2 |
3 | test: clean test.exe
4 | mono test.exe
5 |
6 | test.exe: test.cs
7 | mcs test.cs -r:System.Drawing
8 |
9 | clean:
10 | rm -f test.exe *_Rotate*.png
11 |
12 | .PHONY: all test clean
13 |
--------------------------------------------------------------------------------
/rotate1bit4bit/test.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Drawing.Imaging;
4 | using System.IO;
5 |
6 | class Test
7 | {
8 | static Bitmap load(string name)
9 | {
10 | using (Stream stream = new FileStream(name, FileMode.Open, FileAccess.Read, FileShare.None))
11 | return (Bitmap)Bitmap.FromStream(stream);
12 | }
13 |
14 | static void Main()
15 | {
16 | foreach (string type_name in Enum.GetNames(typeof(RotateFlipType)))
17 | {
18 | RotateFlipType type = (RotateFlipType)Enum.Parse(typeof(RotateFlipType), type_name);
19 |
20 | if (type_name != type.ToString())
21 | Console.WriteLine("- processing {0} ({1})...", type_name, type);
22 | else
23 | Console.WriteLine("- processing {0}...", type_name);
24 |
25 | Bitmap result = null;
26 |
27 | try
28 | {
29 | result = load("1bit.png");
30 | result.RotateFlip(type);
31 | }
32 | catch (Exception e)
33 | {
34 | Console.WriteLine("EXCEPTION: {0}: {1}", e.GetType().Name, e.Message);
35 | if (result != null) try { result.Dispose(); } catch {}
36 | result = null;
37 | }
38 |
39 | if (result != null)
40 | result.Save("1bit_" + type_name + ".png", ImageFormat.Png);
41 |
42 | try { result.Dispose(); } catch {}
43 |
44 | try
45 | {
46 | result = load("4bit.png");
47 | result.RotateFlip(type);
48 | }
49 | catch (Exception e)
50 | {
51 | Console.WriteLine("EXCEPTION: {0}: {1}", e.GetType().Name, e.Message);
52 | if (result != null) try { result.Dispose(); } catch {}
53 | result = null;
54 | }
55 |
56 | if (result != null)
57 | result.Save("4bit_" + type_name + ".png", ImageFormat.Png);
58 |
59 | try { result.Dispose(); } catch {}
60 | }
61 |
62 | Console.WriteLine("done!");
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/rules.make:
--------------------------------------------------------------------------------
1 |
2 | binprogram = $(prefix)/bin/$(name)
3 | apppath = $(prefix)/lib/$(name)
4 |
5 | install:
6 | -mkdir -p $(apppath)
7 | cp $(appfiles) $(apppath)
8 | mkdir -p $(prefix)/bin
9 | echo "#!/bin/sh" > $(binprogram)
10 | echo "exec mono --debug $(apppath)/$(exeprogram)" >> $(binprogram)
11 | chmod +x $(binprogram)
12 |
--------------------------------------------------------------------------------
/scrollable/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-scrollable.cs
4 | mcs swf-scrollable.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-scrollable.cs
7 | csc swf-scrollable.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-scrollable.exe -r -f
11 |
--------------------------------------------------------------------------------
/scrolling/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-scrolling.cs
4 | mcs swf-scrolling.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-scrolling.cs
7 | csc swf-scrolling.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-scrolling.exe -r -f
--------------------------------------------------------------------------------
/scrolling/swf-scrolling.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Simple test of our scrolling behavoir
3 | //
4 | // Author(s):
5 | // Jackson Harper
6 | //
7 | // Copyright (c) 2005 Novell, Inc.
8 | //
9 |
10 |
11 | using System;
12 | using System.Drawing;
13 | using System.Windows.Forms;
14 |
15 |
16 | public class ScrollingTest : Form {
17 |
18 | private ScrollableControl scrollable;
19 | private int paint_count;
20 | private Button paint_count_button;
21 |
22 | public ScrollingTest ()
23 | {
24 | paint_count_button = new Button ();
25 | paint_count_button.Text = "Print Paint Count (stdout)";
26 | paint_count_button.Dock = DockStyle.Bottom;
27 | paint_count_button.Click += new EventHandler (PrintPaintCount);
28 |
29 | scrollable = new ScrollableControl ();
30 | scrollable.Dock = DockStyle.Fill;
31 | scrollable.BackColor = Color.Red;
32 | scrollable.Paint += new PaintEventHandler (PaintArea);
33 |
34 | Controls.Add (paint_count_button);
35 | Controls.Add (scrollable);
36 | }
37 |
38 | private void PaintArea (object sender, PaintEventArgs pe)
39 | {
40 | pe.Graphics.FillRectangle (new SolidBrush (Color.Blue), pe.ClipRectangle);
41 | paint_count++;
42 | }
43 |
44 | private void PrintPaintCount (object sender, EventArgs e)
45 | {
46 | Console.WriteLine ("Paint Count: {0}", paint_count);
47 | }
48 |
49 | public static void Main ()
50 | {
51 | Application.Run (new ScrollingTest ());
52 | }
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/scrollrect/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: xplatscroll.cs
4 | mcs xplatscroll.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm xplatscroll.exe -r -f
8 |
--------------------------------------------------------------------------------
/setpos/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-setpos.cs
4 | mcs swf-setpos.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-setpos.cs
7 | csc swf-setpos.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-setpos.exe -r -f
--------------------------------------------------------------------------------
/setpos/swf-setpos.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Windows.Forms;
4 |
5 | public class SetPosTest : Form {
6 |
7 | private NumericUpDown left_pos;
8 | private NumericUpDown top_pos;
9 | private Form tool_window;
10 |
11 | public SetPosTest ()
12 | {
13 | left_pos = new NumericUpDown ();
14 | top_pos = new NumericUpDown ();
15 |
16 | tool_window = new Form ();
17 | tool_window.FormBorderStyle = FormBorderStyle.FixedToolWindow;
18 | tool_window.LocationChanged += new EventHandler (ToolWindowLocationChanged);
19 |
20 | Label xlabel = new Label ();
21 | xlabel.Text = "Left:";
22 | Label ylabel = new Label ();
23 | ylabel.Text = "Top:";
24 |
25 | xlabel.Width = 45;
26 | ylabel.Width = 45;
27 |
28 | xlabel.Left = 10;
29 | left_pos.Left = 55;
30 | ylabel.Left = 10;
31 | top_pos.Left = 55;
32 | ylabel.Top = left_pos.Bottom + 25;
33 | top_pos.Top = left_pos.Bottom + 25;
34 |
35 | left_pos.Minimum = top_pos.Minimum = Int32.MinValue;
36 | left_pos.Maximum = top_pos.Maximum = Int32.MaxValue;
37 |
38 | left_pos.ValueChanged += new EventHandler (LeftPosChanged);
39 | top_pos.ValueChanged += new EventHandler (TopPosChanged);
40 |
41 | Controls.Add (xlabel);
42 | Controls.Add (ylabel);
43 | Controls.Add (left_pos);
44 | Controls.Add (top_pos);
45 |
46 | tool_window.Show ();
47 | }
48 |
49 | private void LeftPosChanged (object sender, EventArgs e)
50 | {
51 | tool_window.Left = (int) left_pos.Value;
52 | }
53 |
54 | private void TopPosChanged (object sender, EventArgs e)
55 | {
56 | tool_window.Top = (int) top_pos.Value;
57 | }
58 |
59 | private void ToolWindowLocationChanged (object sender, EventArgs e)
60 | {
61 | // left_pos.Value = tool_window.Left;
62 | // top_pos.Value = tool_window.Top;
63 | }
64 |
65 | public static void Main ()
66 | {
67 | Application.Run (new SetPosTest ());
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/simple-binding/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-simple-binding.cs
4 | mcs swf-simple-binding.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
5 |
6 | dotnet: swf-simple-binding.cs
7 | csc swf-simple-binding.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:System.Data.dll
8 |
9 | clean:
10 | rm swf-simple-binding.exe -r -f
11 |
--------------------------------------------------------------------------------
/splitcontainer20/Makefile:
--------------------------------------------------------------------------------
1 | all: SplitContainerDemo.exe
2 |
3 | SplitContainerDemo.exe: SplitContainerDemo.cs
4 | gmcs SplitContainerDemo.cs -pkg:dotnet
5 |
6 | clean:
7 | rm -f SplitContainerDemo.exe
8 |
--------------------------------------------------------------------------------
/splitter/Makefile:
--------------------------------------------------------------------------------
1 | all: swf-splitter.exe
2 |
3 | swf-splitter.exe: swf-splitter.cs
4 | mcs swf-splitter.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-splitter.exe -r -f
8 |
--------------------------------------------------------------------------------
/statusbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-statusbar.cs
4 | mcs swf-statusbar.cs /r:System.Windows.Forms.dll
5 |
6 | dotnet: swf-statusbar.cs
7 | csc swf-statusbar.cs /r:System.Windows.Forms.dll
8 |
9 | clean:
10 | rm swf-statusbar.exe -r -f
11 |
--------------------------------------------------------------------------------
/sysinfo/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-sysinfo.cs
4 | mcs swf-sysinfo.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-sysinfo.cs
7 | csc swf-sysinfo.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-sysinfo.exe -r -f
11 |
--------------------------------------------------------------------------------
/tabcontrol/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-tabcontrol.exe swf-tabcontrol2.exe
4 | dotnet: dotnet-tabcontrol.exe dotnet-tabcontrol2.exe
5 |
6 | swf-tabcontrol.exe: swf-tabcontrol.cs
7 | mcs swf-tabcontrol.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | swf-tabcontrol2.exe: swf-tabcontrol2.cs
10 | mcs swf-tabcontrol2.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
11 |
12 | dotnet-tabcontrol.exe: swf-tabcontrol.cs
13 | csc swf-tabcontrol.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
14 |
15 | dotnet-tabcontrol2.exe: swf-tabcontrol2.cs
16 | csc swf-tabcontrol.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
17 |
18 |
19 | clean:
20 | rm swf-tabcontrol.exe -r -f
21 | rm swf-tabcontrol2.exe -r -f
22 |
--------------------------------------------------------------------------------
/tabcontrol/swf-tabcontrol.cs:
--------------------------------------------------------------------------------
1 | //
2 | // swf-tabcontrol.cs
3 | //
4 | // Author(s):
5 | // Jackson Harper (jackson@ximian.com)
6 | //
7 | // Copyright (C) Novell, Inc (http://www.novell.com)
8 | //
9 |
10 | using System;
11 | using System.Drawing;
12 | using System.Windows.Forms;
13 |
14 |
15 | namespace System.Windows.Forms {
16 |
17 | public class TabControlDemo : Form {
18 |
19 | public TabControlDemo ()
20 | {
21 | TabControl tab = new TabControl ();
22 | tab.Alignment = TabAlignment.Top;
23 | tab.Dock = DockStyle.Fill;
24 | // tab.Appearance = TabAppearance.FlatButtons;
25 | // tab.Multiline = true;
26 |
27 | tab.Controls.Add (CreateTabPage ("Red", Color.FromArgb (255, 255, 0, 0)));
28 | tab.Controls.Add (CreateTabPage ("Orange", Color.FromArgb (255, 255, 153, 0)));
29 | tab.Controls.Add (CreateTabPage ("Yellow", Color.FromArgb (255, 255, 255, 0)));
30 | tab.Controls.Add (CreateTabPage ("Green", Color.FromArgb (255, 0, 153, 0)));
31 | tab.Controls.Add (CreateTabPage ("Blue", Color.FromArgb (255, 0, 0, 255)));
32 | tab.Controls.Add (CreateTabPage ("Purple", Color.FromArgb (255, 197, 0, 148)));
33 |
34 | tab.Height = 200;
35 | tab.SelectedIndex = 3;
36 | Controls.Add (tab);
37 |
38 | }
39 |
40 | private TabPage CreateTabPage (string label, Color c)
41 | {
42 | TabPage res = new TabPage (label);
43 | res.BackColor = c;
44 | return res;
45 | }
46 |
47 | public static void Main ()
48 | {
49 | Application.Run (new TabControlDemo ());
50 | }
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/taborder/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-taborder.cs
4 | mcs swf-taborder.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-taborder.cs
7 | csc swf-taborder.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-taborder.exe -r -f
11 |
--------------------------------------------------------------------------------
/textbox/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/textbox/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-textboxes.cs
4 | mcs swf-textboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-textboxes.cs
7 | csc swf-textboxes.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-textboxes.exe -r -f
--------------------------------------------------------------------------------
/textbox/swf-textboxes.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/textbox/swf-textboxes.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/timers/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-timers.cs
4 | mcs swf-timers.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-timers.cs
7 | csc swf-timers.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-timers.exe -r -f
11 |
--------------------------------------------------------------------------------
/timers/swf-timers.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Reflection;
4 | using System.Security;
5 | using System.Security.Permissions;
6 | using System.Timers;
7 | using System.Windows.Forms;
8 |
9 | class Program {
10 |
11 | static void ShowStackTrace (object o, ElapsedEventArgs e)
12 | {
13 | Console.WriteLine (counter);
14 | Console.WriteLine ("Threads Equal: {0}", System.Threading.Thread.CurrentThread == startup_thread);
15 | if (counter++ > 5) {
16 | t.AutoReset = false;
17 | t.Enabled = false;
18 | }
19 | }
20 |
21 | static System.Threading.Thread startup_thread;
22 | static System.Timers.Timer t;
23 | static int counter = 0;
24 |
25 | static void Main (string[] args)
26 | {
27 | bool so = (args.Length > 0);
28 | Label label = new Label ();
29 |
30 | Console.WriteLine ("STARTUP THREAD: " + System.Threading.Thread.CurrentThread.GetHashCode ());
31 | startup_thread = System.Threading.Thread.CurrentThread;
32 |
33 | t = new System.Timers.Timer (500);
34 | if (so)
35 | t.SynchronizingObject = label;
36 | t.Elapsed += new ElapsedEventHandler (ShowStackTrace);
37 | t.AutoReset = true;
38 | t.Enabled = true;
39 |
40 | System.Threading.Thread.Sleep (5000);
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/toolbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-toolbar.exe layout-toolbar.exe
4 |
5 | dotnet: swf-toolbar.cs
6 | csc swf-toolbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
7 |
8 | swf-toolbar.exe: swf-toolbar.cs
9 | mcs swf-toolbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | layout-toolbar.exe: layout-toolbar.cs
12 | mcs layout-toolbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
13 |
14 | clean:
15 | rm *.exe -r -f
16 |
--------------------------------------------------------------------------------
/toolbar/image1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolbar/image1.bmp
--------------------------------------------------------------------------------
/toolbar/image2.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolbar/image2.bmp
--------------------------------------------------------------------------------
/toolbar/image3.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolbar/image3.bmp
--------------------------------------------------------------------------------
/toolbar/image4.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolbar/image4.bmp
--------------------------------------------------------------------------------
/toolstrip20/Makefile:
--------------------------------------------------------------------------------
1 | all: ToolStripDemo.exe
2 |
3 | ToolStripDemo.exe: ToolStripDemo.cs
4 | gmcs ToolStripDemo.cs -pkg:dotnet
5 |
6 | clean:
7 | rm -f ToolStripDemo.exe
8 |
--------------------------------------------------------------------------------
/toolstrip20/images/document-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/document-new.png
--------------------------------------------------------------------------------
/toolstrip20/images/document-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/document-open.png
--------------------------------------------------------------------------------
/toolstrip20/images/document-save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/document-save.png
--------------------------------------------------------------------------------
/toolstrip20/images/edit-copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/edit-copy.png
--------------------------------------------------------------------------------
/toolstrip20/images/edit-cut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/edit-cut.png
--------------------------------------------------------------------------------
/toolstrip20/images/edit-paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/edit-paste.png
--------------------------------------------------------------------------------
/toolstrip20/images/image-x-generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/toolstrip20/images/image-x-generic.png
--------------------------------------------------------------------------------
/tooltip/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-tooltip.cs
4 | mcs swf-tooltip.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-tooltip.cs
7 | csc swf-tooltip.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-tooltip.exe -r -f
11 |
--------------------------------------------------------------------------------
/tooltip/swf-tooltip.cs:
--------------------------------------------------------------------------------
1 | //
2 | // This is a bit overboard for a test app, but I'm hoping it
3 | // can be gutted and used as a base for other test apps, trying
4 | // to set a good example :-)
5 | //
6 |
7 |
8 | using System;
9 | using System.ComponentModel;
10 | using System.Drawing;
11 | using System.Windows.Forms;
12 |
13 | namespace MWFTestApplication {
14 | class MainWindow : System.Windows.Forms.Form {
15 | static MainWindow main_window;
16 | static Control active;
17 |
18 | Label label1 = new Label(); // To test non-tabstop items as well
19 | Label label2 = new Label();
20 | ToolTip tt1 = new ToolTip();
21 | ToolTip tt2 = new ToolTip();
22 |
23 | public MainWindow() {
24 | ClientSize = new System.Drawing.Size (520, 200);
25 | Text = "SWF ToolTip Test App";
26 |
27 | label1.Location = new Point(10, 10);
28 | label1.Text = "Hover over me";
29 | Controls.Add(label1);
30 |
31 | label2.Location = new Point(200, 10);
32 | label2.Text = "No, hover over me!";
33 | Controls.Add(label2);
34 |
35 | tt1.AutoPopDelay = 5000;
36 | tt1.InitialDelay = 1000;
37 | tt1.ReshowDelay = 500;
38 | tt1.ShowAlways = true;
39 | tt1.SetToolTip(this.label1, "Mmm, thanks for stopping by.");
40 |
41 | tt2.AutoPopDelay = 5000;
42 | tt2.InitialDelay = 500;
43 | tt2.ReshowDelay = 100;
44 | tt2.ShowAlways = false;
45 | tt2.SetToolTip(this.label2, "Hi There. I'm a ToolTip");
46 | }
47 |
48 | public static int Main(string[] args) {
49 | main_window = new MainWindow();
50 | active = main_window;
51 |
52 | Application.Run(main_window);
53 |
54 | return 0;
55 | }
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/toolwindows/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-toolwindows.cs
4 | mcs swf-toolwindows.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-toolwindows.cs
7 | csc swf-toolwindows.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-toolwindows.exe -r -f
--------------------------------------------------------------------------------
/toolwindows/swf-toolwindows.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Windows.Forms;
4 |
5 |
6 | public class ToolWindowTest : Form {
7 |
8 | private bool sizable = true;
9 | private Button button;
10 |
11 | public ToolWindowTest ()
12 | {
13 | button = new Button ();
14 | button.Text = "Gimme a Sizable Tool Window";
15 |
16 | button.Dock = DockStyle.Fill;
17 | button.Click += new EventHandler (ClickHandler);
18 |
19 | Controls.Add (button);
20 | }
21 |
22 | public void ClickHandler (object sender, EventArgs e)
23 | {
24 | Form form = new Form ();
25 | form.Text = "tool window";
26 | if (sizable) {
27 | form.FormBorderStyle = FormBorderStyle.SizableToolWindow;
28 | form.Text = "Sizable Tool Window";
29 | button.Text = "Gimme a Fixed Tool Window";
30 | } else {
31 | form.FormBorderStyle = FormBorderStyle.FixedToolWindow;
32 | form.Text = "Fixed Tool Window";
33 | button.Text = "Gimme a Sizable Tool Window";
34 | }
35 | sizable = !sizable;
36 |
37 | form.Show ();
38 | }
39 |
40 | public static void Main ()
41 | {
42 | Application.Run (new ToolWindowTest ());
43 | }
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/trackbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-trackbars.cs
4 | mcs swf-trackbars.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-trackbars.cs
7 | csc swf-trackbars.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-trackbars.exe -r -f
11 |
--------------------------------------------------------------------------------
/transparency/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-transparency.cs
4 | mcs -debug swf-transparency.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-transparency.cs
7 | csc swf-transparency.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-transparency.exe -r -f
11 | rm -f swf-transparency.exe.mdb
--------------------------------------------------------------------------------
/treeview/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-treeview.cs
4 | mcs -g swf-treeview.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | dotnet: swf-treeview.cs
7 | csc swf-treeview.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
8 |
9 | clean:
10 | rm swf-treeview.exe -r -f
11 | rm -f swf-treeview.exe.mdb
--------------------------------------------------------------------------------
/treeview/abstract.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/abstract.png
--------------------------------------------------------------------------------
/treeview/class.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/class.png
--------------------------------------------------------------------------------
/treeview/enum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/enum.png
--------------------------------------------------------------------------------
/treeview/event.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/event.png
--------------------------------------------------------------------------------
/treeview/field.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/field.png
--------------------------------------------------------------------------------
/treeview/interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/interface.png
--------------------------------------------------------------------------------
/treeview/method.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/method.png
--------------------------------------------------------------------------------
/treeview/prop-read-write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/treeview/prop-read-write.png
--------------------------------------------------------------------------------
/updown/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-updown.cs
4 | mcs swf-updown.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 |
6 | clean:
7 | rm swf-updown.exe -r -f
8 |
--------------------------------------------------------------------------------
/various/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-various.cs
4 | mcs swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
5 |
6 | dotnet: swf-zorder.cs
7 | csc swf-various.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:Accessibility.dll
8 |
9 | clean:
10 | rm swf-various.exe -r -f
11 |
--------------------------------------------------------------------------------
/verticalscrollbar/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("1.0.*")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/verticalscrollbar/Makefile:
--------------------------------------------------------------------------------
1 | all: mono
2 |
3 | mono: swf-verticalscrollbar.cs swf-scrollbar-events.cs
4 | mcs swf-verticalscrollbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
5 | mcs swf-scrollbar-events.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
6 |
7 | dotnet: swf-verticalscrollbar.cs swf-scrollbar-events.cs
8 | csc swf-verticalscrollbar.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
9 | csc swf-scrollbar-events.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
10 |
11 | clean:
12 | rm swf-verticalscrollbar.exe -r -f
13 | rm swf-scrollbar-events.exe -r -f
14 |
--------------------------------------------------------------------------------
/verticalscrollbar/swf-verticalscrollbar.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/visualstyles20/Makefile:
--------------------------------------------------------------------------------
1 | all: VisualStyleTest.exe
2 |
3 | VisualStyleTest.exe: VisualStyleTest.cs
4 | gmcs VisualStyleTest.cs -r:System.Windows.Forms -r:System.Drawing
5 |
6 | clean:
7 | rm -f VisualStyleTest.exe
8 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Form1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mono/winforms/298f4735ff8835b670c83de1a467217b42731b59/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Form1.resources
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Makefile:
--------------------------------------------------------------------------------
1 |
2 | name = UsingWebBrowser
3 | appfiles = bin/*.dll bin/*.exe bin/*.mdb
4 | exeprogram = UsingWebBrowser.exe
5 |
6 | TARGET=./bin/
7 | MCS=gmcs
8 | RESGEN=resgen
9 | MCSFLAGS=-debug
10 | LIBS=
11 |
12 | USINGWEBBROWSER_EXE=$(TARGET)/UsingWebBrowser.exe
13 | USINGWEBBROWSER_PDB=$(TARGET)/UsingWebBrowser.exe.mdb
14 | USINGWEBBROWSER_SRC=Properties/AssemblyInfo.cs \
15 | Form1.cs \
16 | Form1.Designer.cs \
17 | Program.cs \
18 | Sales.cs
19 |
20 | USINGWEBBROWSER_RESX=Form1.resx
21 | USINGWEBBROWSER_RES=-resource:Form1.resources
22 |
23 | all: \
24 | $(USINGWEBBROWSER_EXE)
25 |
26 | $(USINGWEBBROWSER_EXE): $(USINGWEBBROWSER_SRC)
27 | $(RESGEN) /compile Form1.resx
28 | $(MCS) $(MCSFLAGS) $(LIBS) -r:System.dll -r:System.Data.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll \
29 | -r:System.Xml.dll -target:winexe -out:$(USINGWEBBROWSER_EXE) $(USINGWEBBROWSER_RES) $(USINGWEBBROWSER_SRC)
30 |
31 | # common targets
32 |
33 | all: $(USINGWEBBROWSER_EXE)
34 |
35 | clean:
36 | -rm -f "$(USINGWEBBROWSER_EXE)" 2> /dev/null
37 | -rm -f "$(USINGWEBBROWSER_PDB)" 2> /dev/null
38 |
39 | include ../../../rules.make
40 |
41 | # project names as targets
42 |
43 | UsingWebBrowser: $(USINGWEBBROWSER_EXE)
44 |
45 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 | using System.IO;
5 |
6 | namespace UsingWebBrowser
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// The main entry point for the application.
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 |
18 | try
19 | {
20 | Application.Run(new Form1());
21 | }
22 | catch (ApplicationException ex)
23 | {
24 | MessageBox.Show(ex.Message, "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
25 | }
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UsingWebBrowser")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UsingWebBrowser")]
13 | [assembly: AssemblyCopyright("Copyright 2005")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM componenets. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("cefa19bc-a27c-4354-9b1b-6c27a1f02304")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Properties/DataSources/Sales.datasource:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | UsingWebBrowser.Sales, UsingWebBrowser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:2.0.41222.0
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "UsingWebBrowser.Properties.Settings.get_Default():UsingWebBrowser.Properties.Settings")]
12 |
13 | namespace UsingWebBrowser.Properties
14 | {
15 |
16 |
17 | sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
21 | private static Settings defaultInstance = new Settings();
22 |
23 | public static Settings Default
24 | {
25 | get
26 | {
27 | return defaultInstance;
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/README.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WebBrowser Control Sample Readme
5 |
6 |
7 | Using the WebBrowser Control
8 | The WebBrowser control, new to .NET in version 2.0, provides World Wide Web
9 | browsing functionality similar to a desktop web browsing application.
10 |
11 |
12 | This sample contains three tabs. The first tab demonstrates the use of the WebBrowser
13 | control in a simple browser application.
14 |
15 | The second tab uses the WebBrowser control as a local HTML document viewer.
16 |
17 | The third tab demonstrates the use of the WebBrowser.Document HTMLDocument model, together
18 | with the WebBrowser.ObjectForScripting prorperty, to implement Form-to-Browser two-way
19 | communication. In this scenario, the WebBrowser control is used to load an HTML document template
20 | that is populated with data managed by the Form, as a means of supporting custom printing
21 | of application data.
22 |
23 | This sample requires the following to be installed:
24 |
25 | Visual Studio 2005
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Sales.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Sales.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/Sales.xsx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/webbrowser/UsingWebBrowser/UsingWebBrowser-port/SalesOrderForm.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | SalesPerson:
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Customer:
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Date:
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Total:
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | Items:
36 |
37 | Item ID Item Quantity Unit Price Subtotal
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |  
52 |
53 |
54 |