public MainControlUserControl(MainWindow mw)
 {
     InitializeComponent();
     this.mw = mw;
     fuc     = new FrameUserControl(this);
     liveuc  = new LiveUserControl(this);
     liveuc.CanDraw();
 }
Beispiel #2
0
        public MainControlWindow(Window mw, List <Light> mLightList, bool canReturn)
        {
            InitializeComponent();
            fuc    = new FrameUserControl(this);
            liveuc = new LiveUserControl(this);
            liveuc.CanDraw();

            this.mLightList = mLightList;
            this.canReturn  = canReturn;
            Owner           = mw;
        }
        public CatalogUserControl2(NewMainWindow mw)
        {
            InitializeComponent();
            this.mw = mw;
            //FrameUserControl
            fuc = new FrameUserControl(mw);
            userControls.Add(fuc);
            //TextBoxUserControl
            tbuc = new TextBoxUserControl(mw);
            userControls.Add(tbuc);
            //PianoRollUserControl
            pruc = new PianoRollUserControl(mw);
            userControls.Add(pruc);
            //ScriptUserControl
            suc = new ScriptUserControl(mw);
            userControls.Add(suc);
            //CodeUserControl
            cuc = new CodeUserControl(mw);
            userControls.Add(cuc);
            //PageMainUserControl
            puc = new PageMainUserControl(mw);
            userControls.Add(puc);
            //PlayExportUserControl
            peuc = new PlayExportUserControl(mw);
            userControls.Add(peuc);
            //PlayUserControl - 未接入
            //userControls.Add(new PlayUserControl(mw));
            //PlayerUserControl
            pmuc = new PlayerManagementUserControl(mw);
            userControls.Add(pmuc);



            tw = new ToolWindow
            {
                Topmost = true
            };

            ////定义存储缓冲区大小
            //StringBuilder s = new StringBuilder(300);
            ////获取Window 桌面背景图片地址,使用缓冲区
            //SystemParametersInfo(SPI_GETDESKWALLPAPER, 300, s, 0);
            ////缓冲区中字符进行转换
            //String wallpaper_path = s.ToString(); //系统桌面背景图片路径

            //ImageBrush b = new ImageBrush
            //{
            //    ImageSource = new BitmapImage(new Uri(wallpaper_path)),
            //    Stretch = Stretch.Fill
            //};
            //Background = b;
        }
Beispiel #4
0
        /// <summary>
        /// 初始化用户控件
        /// </summary>
        private void InitUserControl()
        {
            //FrameUserControl
            fuc = new FrameUserControl(mw);
            userControls.Add(fuc);
            //TextBoxUserControl
            tbuc = new TextBoxUserControl(mw);
            userControls.Add(tbuc);
            //PianoRollUserControl
            pruc = new PianoRollUserControl(mw);
            userControls.Add(pruc);
            //ScriptUserControl
            suc = new ScriptUserControl(mw);
            userControls.Add(suc);
            //CodeUserControl
            cuc = new CodeUserControl(mw);
            userControls.Add(cuc);
            //PageMainUserControl
            puc = new PageMainUserControl(mw);
            userControls.Add(puc);
            //PlayExportUserControl
            peuc = new PlayExportUserControl(mw);
            userControls.Add(peuc);
            //PlayUserControl
            playuc = new PlayUserControl(mw);
            userControls.Add(playuc);
            //PlayerUserControl
            pmuc = new PlayerManagementUserControl(mw);
            userControls.Add(pmuc);
            //LimitlessLampUserControl
            lluc = new LimitlessLampUserControl(mw);
            userControls.Add(lluc);
            //IdeaUserControl
            iuc = new IdeaUserControl(mw);
            userControls.Add(iuc);

            titleListUserControl.InitData(
                new List <string>()
            {
                (String)Application.Current.Resources["Light"],
                (String)Application.Current.Resources["LightScript"],
                (String)Application.Current.Resources["LimitlessLamp"],
                (String)Application.Current.Resources["Play_"],
            }
                , RefreshFile, 1, bNew_MouseLeftButtonDown);

            popNew.PlacementTarget = titleListUserControl.bRight;
        }
Beispiel #5
0
 /// <summary>
 /// 初始化用户控件
 /// </summary>
 private void InitUserControl()
 {
     //FrameUserControl
     fuc = new FrameUserControl(mw);
     userControls.Add(fuc);
     //TextBoxUserControl
     tbuc = new TextBoxUserControl(mw);
     userControls.Add(tbuc);
     //PianoRollUserControl
     pruc = new PianoRollUserControl(mw);
     userControls.Add(pruc);
     //ScriptUserControl
     suc = new ScriptUserControl(mw);
     userControls.Add(suc);
     //CodeUserControl
     cuc = new CodeUserControl(mw);
     userControls.Add(cuc);
     //PageMainUserControl
     puc = new PageMainUserControl(mw);
     userControls.Add(puc);
     //PlayExportUserControl
     peuc = new PlayExportUserControl(mw);
     userControls.Add(peuc);
     //PlayUserControl
     playuc = new PlayUserControl(mw);
     userControls.Add(playuc);
     //PlayerUserControl
     pmuc = new PlayerManagementUserControl(mw);
     userControls.Add(pmuc);
     //LimitlessLampUserControl
     lluc = new LimitlessLampUserControl(mw);
     userControls.Add(lluc);
     //IdeaUserControl
     iuc = new IdeaUserControl(mw);
     userControls.Add(iuc);
 }