public void Run(object o, EventArgs e) { if (web_server == null) { stats = new LiveWebGalleryStats(); RequestHandler gallery = new GalleryRequestHandler(stats); options = gallery as ILiveWebGalleryOptions; web_server = new SimpleWebServer(); web_server.Stats = stats; web_server.RegisterHandler("", gallery); web_server.RegisterHandler("gallery", gallery); web_server.RegisterHandler("ui", new ResourceRequestHandler()); web_server.RegisterHandler("ping", new PingRequestHandler()); web_server.RegisterHandler("photo", new PhotoRequestHandler(stats)); web_server.RegisterHandler("thumb", new ThumbnailRequestHandler(stats)); web_server.RegisterHandler("tag", new TagAddRemoveRequestHandler(options)); } dialog = new LiveWebGalleryDialog(web_server, options, stats); dialog.Response += HandleResponse; dialog.ShowAll(); }
public void Run(object o, EventArgs e) { if (web_server == null) { stats = new LiveWebGalleryStats (); RequestHandler gallery = new GalleryRequestHandler (stats); options = gallery as ILiveWebGalleryOptions; web_server = new SimpleWebServer (); web_server.Stats = stats; web_server.RegisterHandler ("", gallery); web_server.RegisterHandler ("gallery", gallery); web_server.RegisterHandler ("ui", new ResourceRequestHandler ()); web_server.RegisterHandler ("ping", new PingRequestHandler ()); web_server.RegisterHandler ("photo", new PhotoRequestHandler (stats)); web_server.RegisterHandler ("thumb", new ThumbnailRequestHandler (stats)); web_server.RegisterHandler ("tag", new TagAddRemoveRequestHandler (options)); } dialog = new LiveWebGalleryDialog (web_server, options, stats); dialog.Response += HandleResponse; dialog.ShowAll (); }