Created
March 10, 2017 17:31
-
-
Save caiorss/16de470ed00bbd101a956deb136fce6b to your computer and use it in GitHub Desktop.
Monoのサンプルコード
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Gtk; | |
public partial class MainWindow: Gtk.Window | |
{ | |
public MainWindow () : base (Gtk.WindowType.Toplevel) | |
{ | |
Window myWin = new Window ("My first GTK# Application!"); | |
myWin.Resize (200, 200); | |
Label myLabel = new Label (); | |
myLabel.Text = "Hello World!!"; | |
myWin.Add (myLabel); | |
myWin.ShowAll (); | |
//Build (); | |
} | |
protected void OnDeleteEvent (object sender, DeleteEventArgs a) | |
{ | |
Application.Quit (); | |
a.RetVal = true; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Gtk; | |
namespace gtksharptest1 | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
Application.Init (); | |
MainWindow win = new MainWindow (); | |
//win.Show (); | |
Application.Run (); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment