зеркало из
1
0
Форкнуть 0

* sample/CanvasFigure.cs: Added

* sample/sample.cs: Exercises CanvasFigure
        * sample/makefile.am: Reduced code

svn path=/trunk/diacanvas-sharp/; revision=22864
This commit is contained in:
Martin Willemoes Hansen 2004-02-07 22:02:52 +00:00
Родитель 17fff980e1
Коммит 4359a816c6
4 изменённых файлов: 31 добавлений и 6 удалений

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

@ -2,6 +2,9 @@
* autogen.sh: Executes aclocal first, this fixes a lot of warnings and
build errors.
* sample/CanvasFigure.cs: Added
* sample/sample.cs: Exercises CanvasFigure
* sample/makefile.am: Reduced code
2004-02-06 Martin Willemoes Hansen <mwh@sysrq.dk>

21
sample/CanvasFigure.cs Normal file
Просмотреть файл

@ -0,0 +1,21 @@
using System;
using Dia;
public class CanvasFigure : CanvasBox {
static GLib.GType gtype;
static CanvasFigure()
{
gtype = RegisterGType (typeof (CanvasFigure));
}
public CanvasFigure() : base (gtype)
{
ShapeEllipse ellipse = new ShapeEllipse();
ellipse.center = new Point (20, 20);
ellipse.width = 20;
ellipse.height = 20;
ellipse.line_width = 1;
}
}

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

@ -1,5 +1,5 @@
SUBDIRS=pixmaps glade
EXTRA_DIST= sample.cs CanvasTextBox.cs
EXTRA_DIST= *.cs
ASSEMBLIES= -r glib-sharp \
-r gtk-sharp \
@ -20,13 +20,10 @@ RESOURCES= -resource:glade/gui.glade \
SAMPLE= sample.exe
CODE= CanvasTextBox.cs \
sample.cs
all: $(SAMPLE)
$(SAMPLE): $(CODE) ../dia/diacanvas-sharp.dll
mcs $(ASSEMBLIES) $(RESOURCES) $(CODE) -o $(SAMPLE)
$(SAMPLE): *.cs ../dia/diacanvas-sharp.dll
mcs $(ASSEMBLIES) $(RESOURCES) *.cs -o $(SAMPLE)
clean:
rm -f $(SAMPLE)

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

@ -91,6 +91,10 @@ public class Sample {
textbox.Move (50, 150);
canvas.Root.Add (textbox);
CanvasFigure figure = new CanvasFigure();
figure.Move (50, 250);
canvas.Root.Add (figure);
CanvasImage image = new CanvasImage (new Pixbuf (null, "pixmaps/logo.png"));
image.Move (50, 50);
canvas.Root.Add (image);