Ejemplo n.º 1
0
        public void AddDataBubbles(Uri sMedia)
        {
            CustomControls.Bubbles bb = new CustomControls.Bubbles(1);//
            bb.MouseDoubleClick += new MouseButtonEventHandler(bb_MouseDoubleClick);
            bb.Tag = "Data";
            bb.Width = 325;
            bb.Height = 325;
            bb.RenderTransformOrigin = new Point(0.5, 0.5);
            TransformGroup tg = new TransformGroup();
            double dSc = 0.5;
            ScaleTransform st = new ScaleTransform(dSc, dSc);
            bb.Margin = new Thickness(TestGrid.ActualWidth - bb.Width, TestGrid.Height - bb.Height, 0, 0);

                //string ss = @"mms://202.103.25.141/encoder_ad.wmv";
                bb.SetMediaSource(sMedia);

            tg.Children.Add(st);
            bb.RenderTransform = tg;
            TestGrid.Children.Add(bb);
        }
Ejemplo n.º 2
0
        private void InitDataBubbles(int iCount, Grid g)
        {
            while (iCount-- > 0)
            {
                CustomControls.Bubbles bb = new CustomControls.Bubbles(1);//
                bb.MouseDoubleClick+=new MouseButtonEventHandler(bb_MouseDoubleClick);
                bb.Tag = "Data";
                bb.Width = 325;
                bb.Height = 325;
                bb.RenderTransformOrigin = new Point(0.5, 0.5);
                TransformGroup tg = new TransformGroup();
                double dSc = 0.5;
                ScaleTransform st = new ScaleTransform(dSc, dSc);
                bb.Margin = new Thickness(g.ActualWidth-bb.Width,g.Height-bb.Height,0,0);
                if (iCount == 1)
                {
                    string ss = @"mms://202.103.25.141/encoder_ad.wmv";
                    bb.SetMediaSource(ss);
                }
                tg.Children.Add(st);
                bb.RenderTransform = tg;
                g.Children.Add(bb);

            }
        }