Beispiel #1
0
        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);
            });
        }
Beispiel #2
0
 protected virtual void Handle(WidgetCreate message)
 {
 }