[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/samples FormsHello.cs,NONE,1.1 dummy
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/samples FormsHello.cs,NONE,1.1 dummy.cs,NONE,1.1 XHello.cs,1.4,1.5 ilrun.sh.in,1.3,1.4 samples.build,1.5,1.6 |
Date: |
Wed, 11 Jun 2003 03:07:21 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/samples
In directory subversions:/tmp/cvs-serv17639/samples
Modified Files:
XHello.cs ilrun.sh.in samples.build
Added Files:
FormsHello.cs dummy.cs
Log Message:
Initial check-in of a "System.Windows.Forms" implementation (only "Control"
works right now); changes to Xsharp and System.Drawing to support Forms;
new "FormsHello" sample.
--- NEW FILE ---
/*
* FormsHello.cs - Sample program for Forms.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* This program is free software, you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY, without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program, if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
public class FormsHello
{
private static void Paint(Object sender, PaintEventArgs e)
{
Graphics graphics = e.Graphics;
Form form = (sender as Form);
Pen pen = new Pen(Color.Black, 1.0f);
graphics.DrawLine(pen, 0, 0, form.Width, form.Height);
pen.Dispose();
pen = new Pen(Color.Red, 2.0f);
graphics.DrawRectangle(pen, 10, 10, form.Width - 20,
form.Height - 20);
pen.Dispose();
Brush brush = new SolidBrush(Color.Yellow);
graphics.FillPie(brush, 20, 20, 60, 60, 30.0f, 70.0f);
brush.Dispose();
Font font = new Font("Arial", 12);
brush = new SolidBrush(Color.Blue);
graphics.DrawString("Hello", font, brush, 30, 100);
brush.Dispose();
font.Dispose();
brush = new HatchBrush
(HatchStyle.BackwardDiagonal, Color.Black, Color.White);
graphics.FillEllipse(brush, 200, 40, 100, 100);
brush.Dispose();
}
public static void Main(String[] args)
{
Form form = new Form();
form.Width = 400;
form.Height = 250;
form.Text = "Forms Hello";
form.Paint += new PaintEventHandler(Paint);
Application.Run(form);
}
}
--- NEW FILE ---
/* dummy main for compiling samples in profiles with insufficient features */
#if !CONFIG_REFLECTION
public class Dummy
{
public static void Main(String[] args)
{
Console.WriteLine
("This program won't work in the current pnetlib
configuration.");
Console.WriteLine
("Recompile pnetlib with the correct profile
settings.");
}
}
#endif
Index: XHello.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/XHello.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** XHello.cs 7 Jun 2003 05:40:07 -0000 1.4
--- XHello.cs 11 Jun 2003 07:07:19 -0000 1.5
***************
*** 19,24 ****
*/
- #if CONFIG_REFLECTION
-
using System;
using Xsharp;
--- 19,22 ----
***************
*** 56,69 ****
}; // class XHello
-
- #else
-
- public class XHello
- {
-
- // Stubbed out on platforms without Xsharp.
- public static void Main(String[] args) {}
-
- }; // class XHello
-
- #endif
--- 54,55 ----
Index: ilrun.sh.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/ilrun.sh.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ilrun.sh.in 6 Jun 2003 10:46:45 -0000 1.3
--- ilrun.sh.in 11 Jun 2003 07:07:19 -0000 1.4
***************
*** 22,25 ****
ILRUN="@ILRUN@"
! # Run the engine, with the assembly paths set correct.
! exec "$ILRUN" -L../runtime -L../I18N -L../DotGNU.SSL -L../System
-L../System.Xml -L../Xsharp $*
--- 22,25 ----
ILRUN="@ILRUN@"
! # Run the engine, with the assembly paths set correctly.
! exec "$ILRUN" -L../runtime -L../I18N -L../DotGNU.SSL -L../System
-L../System.Xml -L../Xsharp -L../Xsharp/.libs -L../System.Drawing
-L../System.Drawing.Xsharp -L../System.Windows.Forms -L../JScript -L../Basic
-L../compat -L../System.Net.IrDA $*
Index: samples.build
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/samples.build,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** samples.build 31 May 2003 10:50:56 -0000 1.5
--- samples.build 11 Jun 2003 07:07:19 -0000 1.6
***************
*** 184,188 ****
<sources>
! <file name="XHello.cs"/>
</sources>
--- 184,189 ----
<sources>
! <includes if="${CONFIG_REFLECTION}"
name="XHello.cs"/>
! <file name="dummy.cs"/>
</sources>
***************
*** 200,203 ****
--- 201,232 ----
</compile>
+ <!-- Build the FormsHello.exe program -->
+ <compile output="FormsHello.exe"
+ target="exe"
+ unsafe="true"
+ nostdlib="true"
+ optimize="true"
+ debug="true">
+
+ <sources>
+ <includes if="${CONFIG_REFLECTION}"
name="FormsHello.cs"/>
+ <file name="dummy.cs"/>
+ </sources>
+
+ <references>
+ <includes if="${CONFIG_REFLECTION}"
name="../System.Windows.Forms/System.Windows.Forms.dll"/>
+ <includes if="${CONFIG_REFLECTION}"
name="../System.Drawing/System.Drawing.dll"/>
+ <includes if="${CONFIG_REFLECTION}"
name="../System/System.dll"/>
+ <includes if="${CONFIG_REFLECTION}"
name="../DotGNU.SSL/DotGNU.SSL.dll"/>
+ <file name="../runtime/mscorlib.dll"/>
+ </references>
+
+ <arg compiler="cscc" value="-Wno-empty-input"/>
+ <arg compiler="csc" value="/nowarn:626"/>
+ <arg compiler="csc" value="/nowarn:649"/>
+ <arg compiler="csc" value="/nowarn:168"/>
+ <arg compiler="csc" value="/nowarn:67"/>
+ <arg compiler="csc" value="/nowarn:169"/>
+ </compile>
</target>
</project>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/samples FormsHello.cs,NONE,1.1 dummy.cs,NONE,1.1 XHello.cs,1.4,1.5 ilrun.sh.in,1.3,1.4 samples.build,1.5,1.6,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms .cvsignore,NONE,1.1 AccessibleEvents.cs,NONE,1.1 AccessibleObject.cs,NONE,1.1 AccessibleRole.cs,NONE,1.1 AnchorStyles.cs,NONE,1.1 Application.cs,NONE,1.1 ApplicationContext.cs,NONE,1.1 BindingContext.cs,NONE,1.1 BorderStyle.cs,NONE,1.1 BoundsSpecified.cs,NONE,1.1 Button.cs,NONE,1.1 ButtonBase.cs,NONE,1.1 CheckBox.cs,NONE,1.1 CheckState.cs,NONE,1.1 ColumnClickEventArgs.cs,NONE,1.1 ColumnClickEventHandler.cs,NONE,1.1 ColumnHeaderStyle.cs,NONE,1.1 ComboBoxStyle.cs,NONE,1.1 ContextMenu.cs,NONE,1.1 Control.cs,NONE,1.1 ControlBindingsCollection.cs,NONE,1.1 ControlEventArgs.cs,NONE,1.1 ControlEventHandler.cs,NONE,1.1 ControlStyles.cs,NONE,1.1 ConvertEventArgs.cs,NONE,1.1 ConvertEventHandler.cs,NONE,1.1 CreateParams.cs,NONE,1.1 Cursor.cs,NONE,1.1 DialogResult.cs,NONE,1.1 DockStyle.cs,NONE,1.1 DragAction.cs,NONE,1.1 DragDropEffects.cs,NONE,1.1 DragEventArgs.cs,NONE,1.1 DragEventHandler.cs,NONE,1.1 EventId.cs,NONE,1.1 Form.cs,NONE,1.1 FormBorderStyle.cs,NONE,1.1 FormWindowState.cs,NONE,1.1 Forms.build,NONE,1.1 GiveFeedbackEventArgs.cs,NONE,1.1 GiveFeedbackEventHandler.cs,NONE,1.1 HelpEventArgs.cs,NONE,1.1 HelpEventHandler.cs,NONE,1.1 HorizontalAlignment.cs,NONE,1.1 IContainerControl.cs,NONE,1.1 IDataObject.cs,NONE,1.1 IMessageFilter.cs,NONE,1.1 IWin32Window.cs,NONE,1.1 ImeMode.cs,NONE,1.1 InputLanguage.cs,NONE,1.1 InvalidateEventArgs.cs,NONE,1.1 InvalidateEventHandler.cs,NONE,1.1 ItemActivation.cs,NONE,1.1 ItemChangedEventArgs.cs,NONE,1.1 ItemChangedEventHandler.cs,NONE,1.1 ItemCheckEventArgs.cs,NONE,1.1 ItemCheckEventHandler.cs,NONE,1.1 KeyEventArgs.cs,NONE,1.1 KeyEventHandler.cs,NONE,1.1 KeyPressEventArgs.cs,NONE,1.1 KeyPressEventHandler.cs,NONE,1.1 Keys.cs,NONE,1.1 Label.cs,NONE,1.1 LayoutEventArgs.cs,NONE,1.1 LayoutEventHandler.cs,NONE,1.1 LeftRightAlignment.cs,NONE,1.1 Makefile.am,NONE,1.1 Message.cs,NONE,1.1 MessageBoxButtons.cs,NONE,1.1 MessageBoxDefaultButton.cs,NONE,1.1 MessageBoxIcon.cs,NONE,1.1 MouseButtons.cs,NONE,1.1 MouseEventArgs.cs,NONE,1.1 MouseEventHandler.cs,NONE,1.1 Orientation.cs,NONE,1.1 PaintEventArgs.cs,NONE,1.1 PaintEventHandler.cs,NONE,1.1 PictureBoxSizeMode.cs,NONE,1.1QueryAccessibilityHelpArgs.cs,NONE,1.1 QueryAccessibilityHelpEventHandler.cs,NONE,1.1 QueryContinueDragEventArgs.cs,NONE,1.1 QueryContinueDragEventHandler.cs,NONE,1.1 RightToLeft.cs,NONE,1.1 S.cs,NONE,1.1 ScrollBars.cs,NONE,1.1 TODOAttribute.cs,NONE,1.1 ThreadExceptionEventArgs.cs,NONE,1.1 ThreadExceptionEventHandler.cs,NONE,1.1 ToolBarButton.cs,NONE,1.1 ToolBarButtonClickEventArgs.cs,NONE,1.1 ToolBarButtonClickEventHandler.cs,NONE,1.1 ToolBarButtonStyle.cs,NONE,1.1 TreeNode.cs,NONE,1.1 TreeViewAction.cs,NONE,1.1 TreeViewCancelEventArgs.cs,NONE,1.1 TreeViewCancelEventHandler.cs,NONE,1.1 TreeViewEventArgs.cs,NONE,1.1 TreeViewEventHandler.cs,NONE,1.1 UICues.cs,NONE,1.1 UICuesEventArgs.cs,NONE,1.1 UICuesEventHandler.cs,NONE,1.1 View.cs,NONE,1.1Win32Constants.cs,NONE,1.1
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms BoundsSpecified.cs,1.1,1.2 Control.cs,1.1,1.2 Form.cs,1.1,1.2
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms .cvsignore,NONE,1.1 AccessibleEvents.cs,NONE,1.1 AccessibleObject.cs,NONE,1.1 AccessibleRole.cs,NONE,1.1 AnchorStyles.cs,NONE,1.1 Application.cs,NONE,1.1 ApplicationContext.cs,NONE,1.1 BindingContext.cs,NONE,1.1 BorderStyle.cs,NONE,1.1 BoundsSpecified.cs,NONE,1.1 Button.cs,NONE,1.1 ButtonBase.cs,NONE,1.1 CheckBox.cs,NONE,1.1 CheckState.cs,NONE,1.1 ColumnClickEventArgs.cs,NONE,1.1 ColumnClickEventHandler.cs,NONE,1.1 ColumnHeaderStyle.cs,NONE,1.1 ComboBoxStyle.cs,NONE,1.1 ContextMenu.cs,NONE,1.1 Control.cs,NONE,1.1 ControlBindingsCollection.cs,NONE,1.1 ControlEventArgs.cs,NONE,1.1 ControlEventHandler.cs,NONE,1.1 ControlStyles.cs,NONE,1.1 ConvertEventArgs.cs,NONE,1.1 ConvertEventHandler.cs,NONE,1.1 CreateParams.cs,NONE,1.1 Cursor.cs,NONE,1.1 DialogResult.cs,NONE,1.1 DockStyle.cs,NONE,1.1 DragAction.cs,NONE,1.1 DragDropEffects.cs,NONE,1.1 DragEventArgs.cs,NONE,1.1 DragEventHandler.cs,NONE,1.1 EventId.cs,NONE,1.1 Form.cs,NONE,1.1 FormBorderStyle.cs,NONE,1.1 FormWindowState.cs,NONE,1.1 Forms.build,NONE,1.1 GiveFeedbackEventArgs.cs,NONE,1.1 GiveFeedbackEventHandler.cs,NONE,1.1 HelpEventArgs.cs,NONE,1.1 HelpEventHandler.cs,NONE,1.1 HorizontalAlignment.cs,NONE,1.1 IContainerControl.cs,NONE,1.1 IDataObject.cs,NONE,1.1 IMessageFilter.cs,NONE,1.1 IWin32Window.cs,NONE,1.1 ImeMode.cs,NONE,1.1 InputLanguage.cs,NONE,1.1 InvalidateEventArgs.cs,NONE,1.1 InvalidateEventHandler.cs,NONE,1.1 ItemActivation.cs,NONE,1.1 ItemChangedEventArgs.cs,NONE,1.1 ItemChangedEventHandler.cs,NONE,1.1 ItemCheckEventArgs.cs,NONE,1.1 ItemCheckEventHandler.cs,NONE,1.1 KeyEventArgs.cs,NONE,1.1 KeyEventHandler.cs,NONE,1.1 KeyPressEventArgs.cs,NONE,1.1 KeyPressEventHandler.cs,NONE,1.1 Keys.cs,NONE,1.1 Label.cs,NONE,1.1 LayoutEventArgs.cs,NONE,1.1 LayoutEventHandler.cs,NONE,1.1 LeftRightAlignment.cs,NONE,1.1 Makefile.am,NONE,1.1 Message.cs,NONE,1.1 MessageBoxButtons.cs,NONE,1.1 MessageBoxDefaultButton.cs,NONE,1.1 MessageBoxIcon.cs,NONE,1.1 MouseButtons.cs,NONE,1.1 MouseEventArgs.cs,NONE,1.1 MouseEventHandler.cs,NONE,1.1 Orientation.cs,NONE,1.1 PaintEventArgs.cs,NONE,1.1 PaintEventHandler.cs,NONE,1.1 PictureBoxSizeMode.cs,NONE,1.1QueryAccessibilityHelpArgs.cs,NONE,1.1 QueryAccessibilityHelpEventHandler.cs,NONE,1.1 QueryContinueDragEventArgs.cs,NONE,1.1 QueryContinueDragEventHandler.cs,NONE,1.1 RightToLeft.cs,NONE,1.1 S.cs,NONE,1.1 ScrollBars.cs,NONE,1.1 TODOAttribute.cs,NONE,1.1 ThreadExceptionEventArgs.cs,NONE,1.1 ThreadExceptionEventHandler.cs,NONE,1.1 ToolBarButton.cs,NONE,1.1 ToolBarButtonClickEventArgs.cs,NONE,1.1 ToolBarButtonClickEventHandler.cs,NONE,1.1 ToolBarButtonStyle.cs,NONE,1.1 TreeNode.cs,NONE,1.1 TreeViewAction.cs,NONE,1.1 TreeViewCancelEventArgs.cs,NONE,1.1 TreeViewCancelEventHandler.cs,NONE,1.1 TreeViewEventArgs.cs,NONE,1.1 TreeViewEventHandler.cs,NONE,1.1 UICues.cs,NONE,1.1 UICuesEventArgs.cs,NONE,1.1 UICuesEventHandler.cs,NONE,1.1 View.cs,NONE,1.1Win32Constants.cs,NONE,1.1
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms BoundsSpecified.cs,1.1,1.2 Control.cs,1.1,1.2 Form.cs,1.1,1.2
- Index(es):