public ImportLibraryDialog(NewMainWindow mw, ScriptUserControl suc, String fileName) { InitializeComponent(); this.mw = mw; this.suc = suc; this.fileName = fileName; }
public InputUserControlBridge(ScriptUserControl iuc) { this.iuc = iuc; RefreshColor(); InitPC(); }
public ControlScriptDialog(ScriptUserControl iuc, String command) { InitializeComponent(); this.iuc = iuc; this.command = command; Owner = iuc.mw; }
public ShowMyContentWindowDialog(ScriptUserControl suc) { InitializeComponent(); Owner = suc.mw; this.suc = suc; }
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; }
/// <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; }
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; }
public LightFilePlayChild(LightFilePlayModel lightFilePlayModel, ScriptUserControl suc) : base(suc) { this.lightFilePlayModel = lightFilePlayModel; //构建对话框 tbFileName = GetTexeBox(lightFilePlayModel.FileName); tbFileName.IsEnabled = false; AddTitleAndControl("FileNameColon", tbFileName); GetButton("Replace", ReplaceLight, out Button btnReplace); GetButton("Remove", RemoveLight, out Button btnRemove); AddDockPanel(out DockPanel dp, btnReplace, btnRemove); dp.HorizontalAlignment = HorizontalAlignment.Center; tbBpm = GetTexeBox(lightFilePlayModel.Bpm.ToString()); AddTitleAndControl("BPMColon", tbBpm); CreateDialog(); tbFileName.LostFocus += TbPolyploidy_LostFocus; tbBpm.LostFocus += TbPolyploidy_LostFocus2; }
public ColorOperationChild(ColorOperationModel changeColorOperationModel, ScriptUserControl suc) : base(suc) { this.changeColorOperationModel = changeColorOperationModel; Title = changeColorOperationModel.HintString; ToCreate(); //构建对话框 //lb = new ListBox(); //lb.Padding = new Thickness(-5,0,-5,0); //lb.Background = new SolidColorBrush(Colors.Transparent); //lb.BorderBrush = new SolidColorBrush(Colors.Transparent); //lb.HorizontalContentAlignment = HorizontalAlignment.Stretch; //for (int i = 0; i < changeColorOperationModel.Colors.Count; i++) //{ // Add(i); //} //AddUIElement(lb); // //CreateDialog(); //TODO //AddTitleImage(new List<String>() { "add_white.png", "reduce.png" }, new List<System.Windows.Input.MouseButtonEventHandler>() { IvAdd_MouseLeftButtonDown , IvReduce_MouseLeftButtonDown }); }
/// <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); }
public CollectionDialog(ScriptUserControl iuc) { Owner = iuc.mw; this.iuc = iuc; ToCreateDialog(); }
public ConditionJudgmentOperationChild(ConditionJudgmentOperationModel conditionJudgmentOperationModel, ScriptUserControl suc) : base(suc) { this.conditionJudgmentOperationModel = conditionJudgmentOperationModel; this.suc = suc; //构建对话框 cbOperator = GetComboBox(new List <String>() { "Replace", "Remove" }, CbOperator_SelectionChanged); AddTitleAndControl("OperationColon", cbOperator); AddUIElement(GetTexeBlockNoBorder("If", true)); tbIfTime = GetTexeBox(conditionJudgmentOperationModel.IfTime.ToString()); tbIfTime.Width = 270; AddTitleAndControl("TimeColon", new List <FrameworkElement>() { tbIfTime, ViewBusiness.GetImage("calc.png", 25) }); cbAction = GetComboBox(new List <String>() { "All", "Open", "Close" }, null); cbAction.SelectedIndex = conditionJudgmentOperationModel.IfAction; AddTitleAndControl("ActionColon", cbAction); StringBuilder sbPosition = new StringBuilder(); foreach (var item in conditionJudgmentOperationModel.IfPosition) { sbPosition.Append(item).Append(StaticConstant.mw.projectUserControl.suc.StrInputFormatDelimiter); } tbIfPosition = GetTexeBox(sbPosition.ToString().Length > 0 ? sbPosition.ToString().Substring(0, sbPosition.ToString().Length - 1): ""); tbIfPosition.Width = 270; DrawRangeClass drawRangeClass = new DrawRangeClass(tbIfPosition); ShowRangeClass showRangeClassPosition = new ShowRangeClass(tbIfPosition); AddTitleAndControl("PositionColon", new List <FrameworkElement>() { tbIfPosition, ViewBusiness.GetImage("draw.png", 25, drawRangeClass.DrawRange), ViewBusiness.GetImage("more_white.png", 25, showRangeClassPosition.ShowRangeList) }); StringBuilder sbColor = new StringBuilder(); foreach (var item in conditionJudgmentOperationModel.IfColor) { sbColor.Append(item).Append(StaticConstant.mw.projectUserControl.suc.StrInputFormatDelimiter); } tbIfColor = GetTexeBox(sbColor.ToString().Length > 0 ? sbColor.ToString().Substring(0, sbColor.ToString().Length - 1) : ""); tbIfColor.Width = 270; ShowRangeClass showRangeClassColor = new ShowRangeClass(tbIfColor); AddTitleAndControl("ColorColon", new List <FrameworkElement>() { tbIfColor, ViewBusiness.GetImage("more_white.png", 25, showRangeClassColor.ShowRangeList) }); AddUIElement(GetTexeBlockNoBorder("Then", true)); tbThenTime = GetTexeBox(conditionJudgmentOperationModel.ThenTime.ToString()); AddTitleAndControl("TimeColon", tbThenTime); tbThenPosition = GetTexeBox(conditionJudgmentOperationModel.ThenPosition.ToString()); AddTitleAndControl("PositionColon", tbThenPosition); tbThenColor = GetTexeBox(conditionJudgmentOperationModel.ThenColor.ToString()); AddTitleAndControl("ColorColon", tbThenColor); AddUIElement(ViewBusiness.GetButton("Change", IvChange_Click)); cbOperator.SelectedIndex = (int)conditionJudgmentOperationModel.MyOperator - 40; CreateDialog(); }
public ChangeTimeOperationChild(ChangeTimeOperationModel changeTimeOperationModel, ScriptUserControl suc) : base(suc) { this.changeTimeOperationModel = changeTimeOperationModel; ToCreate(); }
public InterceptTimeOperationChild(InterceptTimeOperationModel interceptTimeOperationModel, ScriptUserControl suc) : base(suc) { this.interceptTimeOperationModel = interceptTimeOperationModel; ToCreate(); }
public CreateFromQuickOperationChild(CreateFromQuickOperationModel createFromQuickOperationModel, ScriptUserControl suc) : base(suc) { this.createFromQuickOperationModel = createFromQuickOperationModel; this.suc = suc; ToCreate(); }
public SetAttributeOperationChild(SetAttributeOperationModel setAttributeOperationModel, ScriptUserControl suc) : base(suc) { this.setAttributeOperationModel = setAttributeOperationModel; //构建对话框 foreach (var item in setAttributeOperationModel.AttributeOperationModels) { ComboBox cb = GetComboBox(new List <string> { "Time", "Position", "Color" }, null); TextBox tb = GetTexeBox(item.Value); tb.Width = 300; if (item.attributeType.Equals(SetAttributeOperationModel.AttributeOperationModel.AttributeType.TIME)) { //时间支持表达式 cb.SelectedIndex = 0; } else if (item.attributeType.Equals(SetAttributeOperationModel.AttributeOperationModel.AttributeType.POSITION)) { cb.SelectedIndex = 1; } else if (item.attributeType.Equals(SetAttributeOperationModel.AttributeOperationModel.AttributeType.COLOR)) { cb.SelectedIndex = 2; } AddUIElement(GetDockPanel(new List <FrameworkElement> { cb, tb, ViewBusiness.GetImage("check_gray.png", 25, IvCheck_MouseLeftButtonDown) })); } AddUIElement(GetDockPanel(new List <FrameworkElement> { ViewBusiness.GetButton("Add", IvAdd_MouseLeftButtonDown), ViewBusiness.GetButton("Delete", IvReduce_MouseLeftButtonDown), ViewBusiness.GetButton("Change", IvChange_Click) })); CreateDialog(); //TODO //AddTitleImage(new List<String>() { "add_white.png", "reduce.png" }, new List<System.Windows.Input.MouseButtonEventHandler>() { IvAdd_MouseLeftButtonDown, IvReduce_MouseLeftButtonDown }); }
public LowerRightSlashFlippingOperationChild(ScriptUserControl suc) : base(suc) { }
public ScriptUserControlBridge(ScriptUserControl view) { this.view = view; }
public ShowRangeListDialog(ScriptUserControl iuc) { InitializeComponent(); this.iuc = iuc; Owner = iuc.mw; }
public HorizontalFlippingOperationChild(ScriptUserControl suc) : base(suc) { }
public AnimationDisappearOperationChild(AnimationDisappearOperationModel animationDisappearOperationModel, ScriptUserControl suc) : base(suc) { this.animationDisappearOperationModel = animationDisappearOperationModel; ToCreate(); }
public void SetScriptUserControl(ScriptUserControl suc) { this.suc = suc; }
public VerticalFlippingOperationChild(ScriptUserControl suc) : base(suc) { }
public RemoveBorderOperationChild(ScriptUserControl suc) : base(suc) { }
public ShapeColorOperationChild(ShapeColorOperationModel shapeColorOperationModel, ScriptUserControl suc) : base(suc) { this.shapeColorOperationModel = shapeColorOperationModel; ComboBox cb = GetComboBox(new List <string>() { "Square", "Vertical", "Horizontal" }, null); cb.IsEnabled = false; AddTitleAndControl("TypeColon", cb); mLaunchpad.SetLaunchpadBackground(new SolidColorBrush(Color.FromRgb(43, 43, 43))); mLaunchpad.Size = 300; textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[0] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[1] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[2] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[3] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[4] + "")); if (shapeColorOperationModel.MyShapeType == ShapeColorOperationModel.ShapeType.SQUARE) { cb.SelectedIndex = 0; } else if (shapeColorOperationModel.MyShapeType == ShapeColorOperationModel.ShapeType.RADIALVERTICAL) { cb.SelectedIndex = 1; textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[5] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[6] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[7] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[8] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[9] + "")); } else if (shapeColorOperationModel.MyShapeType == ShapeColorOperationModel.ShapeType.RADIALVERTICAL) { cb.SelectedIndex = 2; textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[5] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[6] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[7] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[8] + "")); textBoxs.Add(GetTexeBox(shapeColorOperationModel.Colors[9] + "")); } GetTexeBlock(shapeColorOperationModel.TopString); List <FrameworkElement> frameworkElements = new List <FrameworkElement>(); frameworkElements.Add(GetTexeBlock(shapeColorOperationModel.TopString)); frameworkElements.AddRange(textBoxs.ToArray()); frameworkElements.Add(GetTexeBlock(shapeColorOperationModel.BottomString)); AddUIElement(GetDockPanel(mLaunchpad, GetVerticalStackPanel(frameworkElements))). AddUIElement(GetHorizontalStackPanel(new List <FrameworkElement>() { ViewBusiness.GetButton("Preview", Preview), ViewBusiness.GetButton("PasteValue", PasteRangeListContent) })); GetButton("Save", ToSave, out Button btn); AddUIElement(btn); CreateDialog(); }
public ThirdPartyOperationChild(ThirdPartyOperationModel thirdPartyOperationModel, ScriptUserControl suc) : base(suc) { this.thirdPartyOperationModel = thirdPartyOperationModel; //构建对话框 ThirdPartyModelsModel.ThirdPartyModel thirdPartyModel = new ThirdPartyModelsModel.ThirdPartyModel(); for (int i = 0; i < StaticConstant.mw.projectUserControl.suc.thirdPartys.Count; i++) { if (StaticConstant.mw.projectUserControl.suc.thirdPartys[i].name.Equals(thirdPartyOperationModel.ThirdPartyName)) { thirdPartyModel = StaticConstant.mw.projectUserControl.suc.thirdPartys[i]; } } AddTitleAndControl("NameColon", GetTexeBlock(thirdPartyModel.text)); String _viewFilePath = AppDomain.CurrentDomain.BaseDirectory + @"\Operation\View\" + thirdPartyModel.view;//+ ".xml" XDocument doc = XDocument.Load(_viewFilePath); foreach (XElement element in doc.Element("Views").Elements()) { AddTitleAndControl(element.Attribute("hint").Value, false, GetTexeBox(element.Attribute("default").Value)); } CreateDialog(); ///CreateDialog(200, 50 * UICount); //List<String> parameters = thirdPartyOperationModel.Parameters; //int position = 0; //for (int i = 0; i < _UI.Count; i++) //{ // if (_UI[i] is TextBox) // { // Console.WriteLine(parameters[position]); // (_UI[i] as TextBox).Text = parameters[position]; // position++; // } //} //thirdPartyOperationModel.Parameters = parameters; //String viewString = window.thirdPartys[window.iuc.miChildThirdParty.Items.IndexOf(sender)].view; //if (viewString.Equals(String.Empty)) //{ // //不需要View // for (int k = 0; k < window.iuc.lbStep.SelectedItems.Count; k++) // { // StackPanel sp = (StackPanel)window.iuc.lbStep.SelectedItems[k]; // //没有可操作的灯光组 // if (!window.iuc.lightScriptDictionary[window.iuc.GetStepName(sp)].Contains(window.iuc.GetStepName(sp) + "LightGroup")) // { // continue; // } // String command = String.Empty; // command = Environment.NewLine + "\t" + window.iuc.GetStepName(sp) + "LightGroup = Edit." + window.thirdPartys[window.iuc.miChildThirdParty.Items.IndexOf(sender)].name + "(" + window.iuc.GetStepName(sp) + "LightGroup);"; // window.iuc.lightScriptDictionary[window.iuc.GetStepName(sp)] += command; // } // window.iuc.RefreshData(); //} //else //{ // ThirdPartyDialog dialog = new ThirdPartyDialog(window, viewString); // if (window.strMyLanguage.Equals("en-US")) // { // dialog.Title = window.thirdPartys[window.iuc.miChildThirdParty.Items.IndexOf(sender)].entext; // } // else if (window.strMyLanguage.Equals("zh-CN")) // { // dialog.Title = window.thirdPartys[window.iuc.miChildThirdParty.Items.IndexOf(sender)].zhtext; // } // if (dialog.ShowDialog() == true) // { // for (int k = 0; k < window.iuc.lbStep.SelectedItems.Count; k++) // { // StackPanel sp = (StackPanel)window.iuc.lbStep.SelectedItems[k]; // //没有可操作的灯光组 // if (!window.iuc.lightScriptDictionary[window.iuc.GetStepName(sp)].Contains(window.iuc.GetStepName(sp) + "LightGroup")) // { // continue; // } // String command = Environment.NewLine + "\t" + window.iuc.GetStepName(sp) + "LightGroup = Edit." + window.thirdPartys[window.iuc.miChildThirdParty.Items.IndexOf(sender)].name + "(" + window.iuc.GetStepName(sp) + "LightGroup" + dialog.result + ");"; // window.iuc.lightScriptDictionary[window.iuc.GetStepName(sp)] += command; // } // window.iuc.RefreshData(); // } //} //tbStart.Text = interceptTimeOperationModel.Start.ToString(); //tbEnd.Text = interceptTimeOperationModel.End.ToString(); }
public CreateFromStepOperationChild(CreateFromStepOperationModel createFromStepOperationModel, ScriptUserControl suc) : base(suc) { this.createFromStepOperationModel = createFromStepOperationModel; //构建对话框 tbStepName = GetTexeBox(createFromStepOperationModel.StepName.ToString()); AddTitleAndControl("ParentColon", tbStepName); CreateDialog(); tbStepName.LostFocus += TbStart_LostFocus; }
public ScriptStyleUserControl(ScriptUserControl mw) : base() { this.mw = mw; }
public FoldOperationChild(FoldOperationModel foldOperationModel, ScriptUserControl suc) : base(suc) { this.foldOperationModel = foldOperationModel; ToCreate(); }
public ClockwiseOperationChild(ScriptUserControl suc) : base(suc) { }