Beispiel #1
0
        public RenderD2Scene()
        {
            ButtonText bt1 = new ButtonText(40, 20);
            ButtonText bt2 = new ButtonText(20, 20);
            ButtonText bt3 = new ButtonText(20, 20);

            Portal p1 = new Portal(new LayoutVertical());

            p1.Add(bt1);
            p1.Add(bt2);
            p1.Add(bt3);

            ButtonText bt4 = new ButtonText(45, 30);
            ButtonText bt5 = new ButtonText(25, 30);
            ButtonText bt6 = new ButtonText(35, 30);

            Portal p2 = new Portal(new LayoutHortizontal());

            p2.Add(bt4);
            p2.Add(bt5);
            p2.Add(bt6);

            Portal p3 = new Portal(new LayoutVertical());

            p3.Add(p1);
            p3.Add(p2);

            p1.Calculate();

            entity = p1;
            //entity = new Sprite();
        }
        private static void Main()
        {
            Portal me = new Portal(new MyOpenBook("Judith"));
            me.Add("Hello World");
            me.Add("Today I worked 18 hours.");

            Portal tom = new Portal(new MyOpenBook("Tom"));
            tom.Poke("Judith-1");
            tom.MessageFriend("Judith-1", "Poor You");
            tom.Add("Hey, I'm on OpenBook - it's cool");
        }
Beispiel #3
0
        private static void Main()
        {
            Portal me = new Portal(new MyOpenBook("Judith"));

            me.Add("Hello World");
            me.Add("Today I worked 18 hours.");

            Portal tom = new Portal(new MyOpenBook("Tom"));

            tom.Poke("Judith-1");
            tom.MessageFriend("Judith-1", "Poor You");
            tom.Add("Hey, I'm on OpenBook - it's cool");
        }
Beispiel #4
0
    static void Main()
    {
        Portal me = new Portal(new MyOpenBook("Judith"));

        me.Add("Hello world");
        me.Add("Today I worked 18 hours");

        Portal tom = new Portal(new MyOpenBook("Tom"));

        tom.Poke("Judith-1");
        tom.SuperPoke("Judith-1", "hugged");
        tom.Add("Judith-1", "Poor you");
        tom.Add("Hey, I'm on OpenBook - it was so easy!");
        //Added Console.Readkey to stop Console Window from closing.
        Console.ReadKey();
    }
        protected override void OnInitialized()
        {
            var item = new PortalItem
            {
                Id          = _id,
                Fragment    = ChildContent,
                CssPosition = Fixed ? "fixed" : "absolute"
            };

            Portal.Add(item);
        }
Beispiel #6
0
 public static void SuperPoke(this Portal me, string who, string what)
 {
     me.Add(who, what + " you");
 }