protected override void LoadFileContent() { DeviceModel deviceModel = FileBusiness.CreateInstance().LoadDeviceModel(filePath); GeneralOtherViewBusiness.SetLaunchpadStyle(mLaunchpad, deviceModel); if (deviceModel.Equals("Launchpad Pro")) { cbDeviceType.SelectedIndex = 0; } tbBackGround.Text = deviceModel.DeviceBackGroundStr; tbBackGround.Background = deviceModel.DeviceBackGround; tbDeviceSize.Text = deviceModel.DeviceSize.ToString(); if (deviceModel.IsMembrane) { cbMembrane.IsChecked = true; } }
public void InitMyContent(int position) { //获取最新的我的内容 if (position == oldPosition) { return; } GeneralOtherViewBusiness.SetStringsAndClickEventToListBox(miChildMycontent, GetMyContent(position, System.IO.Path.GetFileName(suc.filePath)), null, true, 16); if (oldPosition == -1) { oldPosition = position; //初始化不需要移动 return; } DoubleAnimation animation = new DoubleAnimation { From = oldPosition * (ActualWidth / 3), To = position * (ActualWidth / 3), Duration = TimeSpan.FromSeconds(0.2), }; spBlueLine.BeginAnimation(Canvas.LeftProperty, animation); //if (oldPosition != -1) { // Border bOld = spTitle.Children[oldPosition] as Border; // bOld.Background = new SolidColorBrush(Colors.Transparent); // bOld.BorderThickness = new Thickness(0, 0, 0, 2); //} //Border bNew = spTitle.Children[position] as Border; //bNew.Background = new SolidColorBrush(Color.FromRgb(43,43,43)); //bNew.BorderThickness = new Thickness(2, 2, 2, 0); oldPosition = position; }
/// <summary> /// 初始化数据 /// </summary> public void SetData(NewMainWindow mw) { this.mw = mw; //格式 if (mw.projectUserControl.suc.strInputFormatDelimiter.Equals("Comma")) { rbInputFormatDelimiterComma.IsChecked = true; } else if (mw.projectUserControl.suc.strInputFormatDelimiter.Equals("Space")) { rbInputFormatDelimiterSpace.IsChecked = true; } if (mw.projectUserControl.suc.strInputFormatRange.Equals("Shortbar")) { rbInputFormatRangeShortbar.IsChecked = true; } else if (mw.projectUserControl.suc.strInputFormatRange.Equals("R")) { rbInputFormatRangeR.IsChecked = true; } ////其他画图软件路径 //if (mw.strToolOtherDrawingSoftwarePath.Equals("")) //{ // if (mw.strMyLanguage.Equals("zh-CN")) { // tbToolOtherDrawingSoftwarePath.Text = "未定位"; // } // else if(mw.strMyLanguage.Equals("en-US")) { // tbToolOtherDrawingSoftwarePath.Text = "No Location"; // } //} //else //{ // tbToolOtherDrawingSoftwarePath.Text = mw.strToolOtherDrawingSoftwarePath; //} ////颜色表路径 //if (mw.strColortabPath.Equals("")) //{ // if (mw.strMyLanguage.Equals("zh-CN")) // { // tbColortabPath.Text = "未定位"; // } // else if (mw.strMyLanguage.Equals("en-US")) // { // tbColortabPath.Text = "No Location"; // } //} //else //{ // tbColortabPath.Text = mw.strColortabPath; //} //测试 sOpacity.Value = mw.testConfigModel.Opacity; //版本 //tbNowVersion.Text = mw.versionConfigModel.NowVersion; //平铺 tbPavedColumns.Text = mw.pavedConfigModel.Columns.ToString(); tbPavedMax.Text = mw.pavedConfigModel.Max.ToString(); //帮助 tbHelpExeFilePath.Text = mw.helpConfigModel.ExeFilePath.ToString(); //播放器 //播放器 - 类型 switch (mw.playerType) { case PlayerType.ParagraphLightList: rbParagraphLightList.IsChecked = true; break; case PlayerType.Accurate: rbAccurate.IsChecked = true; break; case PlayerType.ParagraphIntList: rbParagraphIntList.IsChecked = true; break; } //播放器 - 默认 GeneralOtherViewBusiness.SetStringsToListBox(lbMain, FileBusiness.CreateInstance().GetFilesName(AppDomain.CurrentDomain.BaseDirectory + @"\Device", new List <String>() { ".ini" }), mw.playerDefault); }
/// <summary> /// 设置MainWindow全屏 /// </summary> public void SetPercentageOfScreen(double percentage) { GeneralOtherViewBusiness.SetPercentageOfScreen(window, percentage); }
/// <summary> /// 设置MainWindow全屏 /// </summary> public void SetFullScreen() { GeneralOtherViewBusiness.SetFullScreen(window); }