Photino.Net.API, a very nice wrapper around Photino
using System;
using PhotinoNET;
namespace Photino.NET.API.Tests {
internal class Program {
[STAThread]
static void Main(String[] args) {
var appExeDir = AppContext.BaseDirectory;
var window = new PhotinoAPIWindow()
.SetLogVerbosity(true)
.RegisterAPI(new APIs.Counter())
.SetTitle("{title}")
.SetUseOsDefaultSize(false)
.SetWidth(600).SetHeight(400).Center()
.SetDevToolsEnabled(true)
.SetContextMenuEnabled(true)
.SetRemoveTempFile(false)
.LoadFile("{file}");
window.WaitForClose();
}
}
}
Your API's
public class Counter {
private Int32 count = 0;
public JsonResponse CountUp() {
this.count += 1;
return new JsonResponse{ { "count", this.count } };
}
public JsonResponse CountDown() {
if (this.count > 0) {
this.count -= 1;
}
return new JsonResponse{ { "count", this.count } };
}
}
Usage client side
function countUp() {
photino.Counter.CountUp();
}
function countDown() {
photino.Counter.CountDown();
}
Top comments (0)