Exemple #1
0
        private PointPickerWidget CreatePointPicker(string caption, object o, MemberInfo member, object[] attributes)
        {
            PointPickerWidget widget = new PointPickerWidget();

            widget.Label        = caption;
            widget.DefaultPoint = (Gdk.Point)GetValue(member, o);

            widget.PointPicked += delegate(object sender, EventArgs e) {
                SetValue(member, o, widget.Point);
            };

            return(widget);
        }
        private PointPickerWidget CreatePointPicker(string caption, object o, MemberInfo member, object[] attributes)
        {
            var widget = new PointPickerWidget {
                Label = caption
            };

            if (GetValue(member, o) is Gdk.Point p)
            {
                widget.DefaultPoint = p;
            }

            widget.PointPicked += delegate(object?sender, EventArgs e) {
                SetValue(member, o, widget.Point);
            };

            return(widget);
        }
Exemple #3
0
        private PointPickerWidget CreatePointPicker(string caption, object o, MemberInfo member, object[] attributes)
        {
            PointPickerWidget widget = new PointPickerWidget ();

            widget.Label = caption;
            widget.DefaultPoint = (Gdk.Point)GetValue (member, o);

            widget.PointPicked += delegate (object sender, EventArgs e) {
                SetValue (member, o, widget.Point);
            };

            return widget;
        }