Beispiel #1
0
        public override void Run(Window window)
        {
            var surface = new CircleSurface();

            var list = new CircleGenList(window, surface)
            {
                Homogeneous = true,
                VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
            };

            list.Show();
            ((IRotaryActionWidget)list).Activate();
            list.Move(0, 0);
            list.Resize(360, 360);

            GenItemClass defaultClass = new GenItemClass("default")
            {
                GetTextHandler = (obj, part) =>
                {
                    return(string.Format("{0} - {1}", (string)obj, part));
                }
            };

            for (int i = 0; i < 100; i++)
            {
                list.Append(defaultClass, string.Format("{0} Item", i));
            }
            list.ItemSelected += List_ItemSelected;;
        }
Beispiel #2
0
        public override void Run(Window window)
        {
            var layout = new Layout(window);

            layout.Show();

            layout.Move(0, 0);
            layout.Resize(360, 360);

            var surface = new CircleSurface(layout);

            var list = new CircleGenList(layout, surface)
            {
                Homogeneous = true,
                VerticalScrollBackgroundRadius    = 165,
                VerticalScrollBarRadius           = 165,
                VerticalScrollBackgroundLineWidth = 30,
                VerticalScrollBarLineWidth        = 30,
            };

            list.Show();
            ((IRotaryActionWidget)list).Activate();
            list.Move(0, 0);
            list.Resize(360, 360);
            list.Lower();


            GenItemClass defaultClass = new GenItemClass("default")
            {
                GetTextHandler = (obj, part) =>
                {
                    return(string.Format("{0} - {1}", (string)obj, part));
                }
            };

            for (int i = 0; i < 100; i++)
            {
                list.Append(defaultClass, string.Format("{0} Item", i));
            }
            list.ItemSelected += List_ItemSelected;;
        }