示例#1
0
        private void NewVideoWindow(object sender, RoutedEventArgs e)
        {
            String wName = winName.Text;
            int    width = 320, height = 180, x = 0, y = 0;

            if (!int.TryParse(winWidth.Text, out width) || width <= 0)
            {
                width = 320;
            }
            if (!int.TryParse(winHeight.Text, out height) || height <= 0)
            {
                height = 180;
            }
            if (!int.TryParse(winPosX.Text, out x))
            {
                x = 0;
            }
            if (!int.TryParse(winPosY.Text, out y))
            {
                y = 0;
            }
            VWindowControl tmp = new VWindowControl();

            Controllers.Add(tmp);
            ControlStack.Children.Insert(ControlStack.Children.Count - 1, tmp);
            tmp.master = this;
            tmp.initWinData(wName, width, height, x, y);
        }
示例#2
0
 public void RemoveController(VWindowControl c)
 {
     ControlStack.Children.Remove(c);
     Controllers.Remove(c);
 }