Re: [Mono-list] Best way for connecting to a Database

2011-03-28 Thread Francisco M. Marzoa Alonso
L. For a free ADO.Net driver, see > http://npgsql.projects.postgresql.org/ > > -Abe > > On Mon, Mar 28, 2011 at 2:05 PM, Francisco M. Marzoa Alonso < > franci...@marzoa.com> wrote: > >> Hello, >> >> What's the best way to connect to a database? >> >> The method sh

[Mono-list] Best way for connecting to a Database

2011-03-28 Thread Francisco M. Marzoa Alonso
Hello, What's the best way to connect to a database? The method should be portable and run indistinctly on both Windows and Linux. For now I want to use a Mysql database, but in the future this application may use another database servers. Thanks in advance, ___

Re: [Mono-list] Using Windows DLL in Linux

2011-03-22 Thread Francisco M. Marzoa Alonso
El 19/03/11 14:59, Tim H escribió: > The chm file is likely a Compiled HTML Help file for the developer, and > should not ship with your project nor be referenced in your project. > I see. Can I browse this help file from within Monodevelop? I've added a reference to the DLL itself, but it seems

Re: [Mono-list] Using Windows DLL in Linux

2011-03-22 Thread Francisco M. Marzoa Alonso
Hello, MoMA is that I needed, indeed. Here is the output I get: OK - All Methods called exist in Mono OK - No P/Invokes are called. FAIL - Methods called that throw NotImplementedException: 1 FAIL - Methods called marked with [MonoTodo]: 1 Showing it in detail, it's the same method for both fail

Re: [Mono-list] Using Windows DLL in Linux

2011-03-22 Thread Francisco M. Marzoa Alonso
Ok, you're right. I'm just starting with this and I still automatically thinks "Windows App" when I see and .exe file. Thanks a lot, El 22/03/11 11:01, Stifu escribió: > If I'm not mistaken, MoMA is a managed WinForms app, so it works anywhere > Mono runs. >

Re: [Mono-list] Using Windows DLL in Linux

2011-03-22 Thread Francisco M. Marzoa Alonso
ing this assembly does is currently supported by Mono. > > Regards > Matt > > > On 19/03/2011, at 11:10 AM, Francisco M. Marzoa Alonso wrote: > >> Hello, >> >> One customer has sent me a request to create an application that must >> work on an Ubuntu ho

[Mono-list] Using Windows DLL in Linux

2011-03-18 Thread Francisco M. Marzoa Alonso
Hello, One customer has sent me a request to create an application that must work on an Ubuntu host and handle certain device. The manufacturer of the device has published an SDK for C# developers, that once downloaded I found that has two files: - device-sdk-1.0.dll - device-sdk-1.0.chm Do you

Re: [Mono-list] How to use Gdk.FontSelection???

2010-11-23 Thread Francisco M. Marzoa
nge the default selection ("Sand 10"). Neither of you guys has seen this problem before? Should I use a different component for selecting fonts rather than Gtk.FontSelection? Thanks a lot in advance, El 24/11/10 00:01, Francisco M. Marzoa escribió: > Hello, > > I think that

Re: [Mono-list] How to use Gdk.FontSelection???

2010-11-23 Thread Francisco M. Marzoa
t using the FontName property. For example, if there's a font named "Rome Italic" or "Alps Bold" we may have additional problems. So I still wonder if there's no other way to get that data from Gtk.FontSelection... Regards, El 22/11/10 20:52, Francisco M. Marzoa

Re: [Mono-list] How to use Gdk.FontSelection???

2010-11-23 Thread Francisco M. Marzoa
word -not just a char- is optional (like {0,1} for chars). Of course I can solve it another way, using some regular expresions or String class substring related functions, but doing it with just one regular expressions looks more geek, isn't it? ;-) Best regards, El 22/11/10 20:52, Francisc

[Mono-list] How to use Gdk.FontSelection???

2010-11-22 Thread Francisco M. Marzoa
Hello, I'm trying to use an object Gdk.FontSelection -not dialog- on my application. I create it within a frame and it looks fine, the problem is that I do not know how to set/get the selected font, the font size, etc. from code. I've tried something as simple as: Gtk.FontSelection fs = new Gtk.

Re: [Mono-list] Best way to convert Cairo.Color from/to Gdk.Color???

2010-11-22 Thread Francisco M. Marzoa
I meant on Gdk.Color, of course, not in Cairo.Color. El 22/11/10 15:32, Francisco M. Marzoa escribió: > Hello, > > This is very useful for me. Thanks, Jonathan. > > BTW, Does someone knows why Bule, Red and Green properties are ushort > typed but its constructor uses thr

[Mono-list] Gtk# component for buttons like The Gimp toolbox???

2010-11-22 Thread Francisco M. Marzoa
Hello, For those whose does not known The GiMP yet, it's an image mainpulation program and has a toolbox in its main window plenty of icon buttons in the form of a grid. These buttons are fixed in size, so when you resize the window, the number of icons per row is changed to fill the available spa

Re: [Mono-list] Best way to convert Cairo.Color from/to Gdk.Color???

2010-11-22 Thread Francisco M. Marzoa
> c.Green = (ushort)(color.G * ushort.MaxValue); > > return c; > } > > > Jonathan > > On 11/21/2010 6:40 AM, Francisco M. Marzoa wrote: >> Hello, >> >> I'd like to know what's the best way to converting Cairo.Color into >

Re: [Mono-list] An inheritance dilemma

2010-11-22 Thread Francisco M. Marzoa
Thanks a lot for your help, Abe. The previous code was just a simplified version of a more complex one. The fact is that I need each class to have it's own SampleMethod, so it cannot be just removed from B class. And that's the real root of the problem. Obviusly you couldn't know this. Anyway aft

Re: [Mono-list] An inheritance dilemma

2010-11-22 Thread Francisco M. Marzoa
Hello Abe, I'm grateful for your help, but this will not work. Among other things you're getting into an infinite recursion loop calling B.SampleMethod() from B.SampleMethod()... Regards, El 21/11/10 19:49, Abe Gillespie escribió: > Don't call base in SampleMethod -> this skips your override / >

[Mono-list] An inheritance dilemma

2010-11-21 Thread Francisco M. Marzoa
Hello, I'll start by the code, because I think it's the best way of illustrating the problem in this case: using System; namespace Dummy { class MainClass { public static void Main (string[] args) { B b = new B(); b.SampleMethod(); } }

[Mono-list] Beginer's problem with button event

2010-11-21 Thread Francisco M. Marzoa
Hello, I've problems to catch an event with a dinamically created button. Involved code follows: btAccept = new Gtk.Button ( new Gtk.Label ("Accept")); btAccept.Events = Gdk.EventMask.AllEventsMask; btAccept.ButtonPressEvent += new ButtonPressEventHandler (UpdateWidgetProp

[Mono-list] Best way to convert Cairo.Color from/to Gdk.Color???

2010-11-21 Thread Francisco M. Marzoa
Hello, I'd like to know what's the best way to converting Cairo.Color into Gdk.Color and viceversa, mainly for using Gtk.ColorSelection widget. Currently I'm doing something like: Gdk.Color gcl; Cairo.Color ccl; ... gcl = Gdk.Color ( (byte)ccl.R, (byte)ccl.G, (byte),cc.B); Although it seems to

[Mono-list] Search and Replace on Monodevelop

2010-11-18 Thread Francisco M. Marzoa
Hello, Just a little question about Monodevelop for those who use it, that's sure they're many... ;-) How to perform a Search & Replace operation WITHIN a SELECTED text? This is a functionality that I use often with other editors but I didn't found yet on Monodevelop. Thanks a lot, ___

[Mono-list] [SOLVED]Re: Clipping with Cairo

2010-11-17 Thread Francisco M. Marzoa
Hello, Works like a charm. Thank you. :-) Regards, El 17/11/10 16:56, Jonathan Pobst escribió: > Draw your clipping rectangle path, call Clip, then set up and stroke > your line: > > cc = Gdk.CairoHelper.Create (drawingarea1.GdkWindow); > cc.Rectangle (50,50,80,80); > cc.Clip (); > > cc.Color =

[Mono-list] Clipping with Cairo

2010-11-17 Thread Francisco M. Marzoa
Hello again, I want to draw something in a Cairo surface but when Stroking, just paint the things that are within a given rectangle. I think I understand the theory: draw things into the source, then create a rectangle for clipping into the mask, and finally stroke it to the destination. The pro

[Mono-list] [SOLVED] Re: Text on Cairo

2010-11-17 Thread Francisco M. Marzoa
Hello, And finally, the solution is to substract TextExtent.YBearing from left-top.Y and TextExtent.XBearing from left-top.X. I've tested it with different text patterns and seems to work. :-) Thanks a lot, El 17/11/10 15:00, Francisco M. Marzoa escribió: > Hello Ian, > > I

Re: [Mono-list] Text on Cairo

2010-11-17 Thread Francisco M. Marzoa
ctx.MoveTo(x,next_y); > > var extent = ctx.TextExtents(str); > next_y += (extent.Height + 5); // next line will be 5px under this > line > ctx.ShowText(str); > } > > } > > Hope that helps > > Regards > > Ian > > On Tue, 2010-11-16 a

Re: [Mono-list] How can I copy one drawable into another?

2010-11-16 Thread Francisco M. Marzoa
Hello, Hmmm... My Cairo.Context seems to not have a DrawPixbuf function :-/ Regards, El 16/11/10 21:43, Jonathan Pobst escribió: > Once you have it in a PixBuf, just paint it onto your ImageSurface: > > using (Cairo.Context g = new Cairo.Context (mySurface)) { > g.DrawPixbuf (mypixbuf,

[Mono-list] How can I copy one drawable into another?

2010-11-16 Thread Francisco M. Marzoa
Hello, I've a Gtk.Image widget with a given content and I just want to copy that content within a Gtk.DrawingArea, is this possible in an easy manner? Thanks in advance, ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mail

Re: [Mono-list] Calling a constructor from within another's code

2010-11-16 Thread Francisco M. Marzoa
Hi Stifu, Thanks. Then I assume that there's no "official" manner of calling the base constructor within the new class one appart from the ": base (...)", isn't it? Regards, El 16/11/10 19:54, Stifu escribió: > You could always move the base constructor code to a protected method and > call it

[Mono-list] Calling a constructor from within another's code

2010-11-16 Thread Francisco M. Marzoa
Hello, I know you can call a base class constructor using ": base" after the new constructor signature. I.e.: public class A { int i; public A (int _i) { i=_i; } } public class B : A { public B (int a, int b) : base (a+b) // Calls A constructor with _i as _a+_b {

[Mono-list] Text on Cairo

2010-11-16 Thread Francisco M. Marzoa
Hello there, I'm currently fighting with Cairo's text system, and I should to admit that I've a slight headache... The main problem that I've is that, for coherence, I would like to specify a point (as a pair of x,y coords) and the text should be drawn taken that point like the top-left point of

Re: [Mono-list] DrawingArea needs to redraw signal??

2010-11-16 Thread Francisco M. Marzoa
Hello, Currently I'm handling the ExposeEvent -as Miguel de Icaza told me in a prior answer- but I ignored that there're another way to do the same. I assume that overriding OnExpose is not available through Monodevelop interface designer, isn't it? So I should do something like: drawingarea1.OnE

Re: [Mono-list] System.Graphics and GTK# applications

2010-11-15 Thread Francisco M. Marzoa
time to time while I change the window size... Who knows... O_o Anyway having it working is enough for now for me. Thanks a lot everyone, El 14/11/10 14:50, Francisco M. Marzoa escribió: > Hello, > > Thanks for your help, Dimitar. > > This wants to work, but it didn't

Re: [Mono-list] System.Graphics and GTK# applications

2010-11-14 Thread Francisco M. Marzoa
14:50, Francisco M. Marzoa escribió: > Hello, > > Thanks for your help, Dimitar. > > This wants to work, but it didn't fully. It seem that I can draw an > square on a DrawingArea, but it's erased just after drawing it. :-? > > Please, take a look at this code: > >

Re: [Mono-list] System.Graphics and GTK# applications

2010-11-14 Thread Francisco M. Marzoa
Hello, Thanks for your help, Dimitar. This wants to work, but it didn't fully. It seem that I can draw an square on a DrawingArea, but it's erased just after drawing it. :-? Please, take a look at this code: using System; using Gtk; using Gtk.DotNet; using System.Drawing; public partial class

[Mono-list] System.Graphics and GTK# applications

2010-11-13 Thread Francisco M. Marzoa
Hello, I've created a GTK# solution under monodevelop that uses a DrawingArea widget, and I would like to see if I can use System.Graphics to draw within. For using System.Graphics a need a Graphic object, that may be obtained from an Image and other sources with methods like Graphics.FromImage, b

[Mono-list] DrawingArea needs to redraw signal??

2010-11-13 Thread Francisco M. Marzoa
Hello again, In my application I've a DrawingArea. I use that DA's GdkWindow property to create a Cairo.Context. I can draw on the DA but if I, for example, resize the main window, the DA is erased. I assume I must redraw the DA in some events, isn't it? If this is the case, the question is what

[Mono-list] Please, ignore my last message about System.Reflection

2010-11-12 Thread Francisco M. Marzoa
Hello again, Please, ignore my last message. I've just realized that I do not need to add System.Reflection as a reference. Excuse me. Best regads, ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-lis

[Mono-list] Is there a System.Reflection on Linux implementation?

2010-11-12 Thread Francisco M. Marzoa
Hello again, I need to use some System.Reflection things, starting with the Type class, that I use sometimes in Visual Studio, but it seems like I have no System.Reflection on my mono instalation within my Kubuntu 10.04 box. I'm not sure if this is a problem of a missing library or that just Syst