Exemplo n.º 1
0
            public ZaochO(string url, double x, double y)
            {
                Link = url;
                X    = x; Y = y;
                string stUrl = "ms-appx:///Assets/idiot.gif";

                this.st = new StudentO(stUrl, x - 100, y);
            }
Exemplo n.º 2
0
        private void OnPageCanvas_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            string tp = "ms-appx:///Assets/";
            var    x  = e.GetCurrentPoint(onPageCanvas).Position.X;
            var    y  = e.GetCurrentPoint(onPageCanvas).Position.Y;

            var a = (sender as Canvas);

            double imH, imW;

            ManO mn; SchoolO sc; StudentO st; ZaochO zc;

            switch (typeOutput)
            {
            case "man":
                tp += "man.png";
                imH = 120; imW = 120;
                mn  = new ManO(tp, x, y);
                mn.Print(ref a, imH, imW);
                break;

            case "school":
                tp += "school.jpg";
                sc  = new SchoolO(tp, x, y);
                sc.Print(ref a, 120, 120);
                break;

            case "student":
                tp += "idiot.gif";
                imH = 120; imW = 1.77 * imH;
                st  = new StudentO(tp, x, y);
                st.Print(ref a, imH, imW);
                break;

            case "zaoch":
                tp += "zaoch.gif";
                zc  = new ZaochO(tp, x, y);
                imH = 120; imW = 1.33 * imH;
                zc.Print(ref a, imH, imW);
                break;

            default:
                tp += "test.png";
                mn  = new ManO(tp, x, y);
                mn.Print(ref a, 50, 50);
                break;
            }
        }