C# (eg. Mono) is not very popular in Linux these days. I don't know why. I think it is a powerful language with very bright future (especially in embeded or small sized devices), just like Java is.
And here is my small contribution about - an Archlinux package. To be honest, this is my first package I ever uploaded un AUR. Hope it is useful.
Here is how to install it under Archlinux or derivatives:
yaourt -S assemblygen-git
In case you have no yaourt installed, just download the package from here and build it. In this case you also need two more packages made by me:
smokegen-git and smokeqt-git.
And here is my first test program using C# and assemblygen, hope it will become a text editor some day:
using System;
using Qyoto;
namespace TextEd
{
public class MainClass : QMainWindow
{
public QTextEdit editor;
public MainClass(QWidget parent) : base(parent)
{
SetupEditor();
this.MenuBar = new QMenuBar();
this.CentralWidget = editor;
Resize(600, 400);
Show();
}
protected override void OnCloseEvent (QCloseEvent arg1)
{
Console.WriteLine("on close event");
base.OnCloseEvent (arg1);
}
private void SetupEditor()
{
editor = new QTextEdit();
}
public static int Main(String[] args)
{
var a = new QApplication(args);
MainClass w = new MainClass(null);
QApplication.Exec();
Console.WriteLine("exit");
return 0;
}
}
}
No comments:
Post a Comment