protected override void Handle(WidgetCreate args) { App.QueueOnMainThread(() => { var parent = Widgets[args.ParentId]; if (parent == null) { throw new Exception($"Non-existent parent widget {args.ParentId} for {args.Id}"); } var widget = widgetFactory.Create(args.Type, args.Id, parent); widget.Init(args.Position, args.Args); Widgets.Add(widget); }); }
protected virtual void Handle(WidgetCreate message) { }