Example #1
0
        public GotoPagePlayChild(GotoPagePlayModel gotoPagePlayModel, ScriptUserControl suc) : base(suc)
        {
            this.gotoPagePlayModel = gotoPagePlayModel;
            //构建对话框
            tbPageName           = GetTexeBox(gotoPagePlayModel.PageName);
            tbPageName.IsEnabled = false;
            AddTitleAndControl("GotoColon", tbPageName);

            GetButton("Replace", ReplaceLight, out Button btnReplace);
            GetButton("Remove", RemoveLight, out Button btnRemove);

            AddDockPanel(out DockPanel dp, btnReplace, btnRemove);
            dp.HorizontalAlignment = HorizontalAlignment.Center;

            CreateDialog();

            tbPageName.LostFocus += TbPolyploidy_LostFocus;
        }
Example #2
0
        private BaseOperationModel XNameToModel(XElement xEdit)
        {
            BaseOperationModel baseOperationModel = null;

            if (xEdit.Name.ToString().Equals("LightFile"))
            {
                baseOperationModel = new LightFilePlayModel();
            }
            else if (xEdit.Name.ToString().Equals("GotoPage"))
            {
                baseOperationModel = new GotoPagePlayModel();
            }
            else if (xEdit.Name.ToString().Equals("AudioFile"))
            {
                baseOperationModel = new AudioFilePlayModel();
            }
            baseOperationModel.SetXElement(xEdit);
            return(baseOperationModel);
        }