public Form(string text) { f_Handle = StflApi.stfl_create(text); // initialize ncurses StflApi.stfl_run(f_Handle, -3); //StflApi.raw(); NcursesApi.nocbreak(); }
static void Main() { //IntPtr handle = StflApi.stfl_create("<MainWindow.stfl>"); IntPtr handle = StflApi.stfl_create("vbox[vbox_1]"); StflApi.stfl_modify(handle, "vbox_1", "append", "textview[tv_0]"); StflApi.stfl_modify(handle, "vbox_1", "append", "textview[tv_2]"); StflApi.stfl_modify(handle, "vbox_1", "append", "textview[tv_3]"); StflApi.stfl_run(handle, 0); }
public Form(Assembly assembly, string resourceName) { if (assembly == null) { assembly = Assembly.GetCallingAssembly(); } using (Stream stream = assembly.GetManifestResourceStream(resourceName)) using (StreamReader reader = new StreamReader(stream)) { if (stream == null) { throw new ArgumentException(resourceName + " could not be found in assembly", "resourceName"); } string text = reader.ReadToEnd(); if (String.IsNullOrEmpty(text)) { throw new ArgumentException(resourceName + " in assembly is missing or empty.", "resourceName"); } f_Handle = StflApi.stfl_create(text); } }