当前位置: 首页>>代码示例>>C#>>正文


C# Slide.SaveSlideLevelChanges方法代码示例

本文整理汇总了C#中Slide.SaveSlideLevelChanges方法的典型用法代码示例。如果您正苦于以下问题:C# Slide.SaveSlideLevelChanges方法的具体用法?C# Slide.SaveSlideLevelChanges怎么用?C# Slide.SaveSlideLevelChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Slide的用法示例。


在下文中一共展示了Slide.SaveSlideLevelChanges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SlidePropertiesForm

        public SlidePropertiesForm(SlideGraphController AController)
        {
            InitializeComponent();
            m_controller = AController;
            CurrentSlideView = m_controller.SelectedSlideView;

            m_controller.OnLabelListChanhed += m_controller_OnLabelListChanhed;

            bool slideLocked = (CurrentSlideView.IsLocked && PresentationController.Instance.CanUnlockSlide(CurrentSlideView.Slide)) || DesignerClient.Instance.IsStandAlone;
            bool presentationLocked = PresentationController.Instance.PresentationLocked || DesignerClient.Instance.IsStandAlone;

            this.Text = CurrentSlideView.SlideName + " - Свойства";

            Slide = CurrentSlideView.Slide.Copy();
            Slide.SaveSlideLevelChanges(CurrentSlideView.Slide);

            if (CurrentSlideView.GetOutgoingLinks().Count > 0)
            {
                OldDefLink = NewDefLink = CurrentSlideView.GetOutgoingLinks().Where(l => l.IsDefault).First();
            }

            #region Add bindings
            nameText.DataBindings.Add("Text", Slide, "Name");
            nameText.ReadOnly = !slideLocked;
            labelsList.Enabled = slideLocked;
            labelsList.DataBindings.DefaultDataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;
            RefreshLabels();

            hourSpanEdit.DataBindings.Add("Value", Slide.Time, "Hours");
            hourSpanEdit.Enabled = slideLocked;
            minuteSpanEdit.DataBindings.Add("Value", Slide.Time, "Minutes");
            minuteSpanEdit.Enabled = slideLocked;
            secondSpanEdit.DataBindings.Add("Value", Slide.Time, "Seconds");
            secondSpanEdit.Enabled = slideLocked;
            authorText.DataBindings.Add("Text", Slide, "Author");
            modifiedLabel.DataBindings.Add("Text", Slide, "Modified");
            commentText.DataBindings.Add("Text", Slide, "Comment");
            commentText.ReadOnly = !slideLocked;
            #endregion

            if (nextSlideList.Enabled = NewDefLink != null && presentationLocked)
            {
                List<SlideView> list = CurrentSlideView.GetOutgoingSlideViews();
                list.ForEach(s => nextSlideList.Items.Add(s));
                nextSlideList.SelectedIndex = list.IndexOf(NewDefLink.ToSlideView);
            }

            bool flag = m_controller.StartSlide == CurrentSlideView;
            isStartupCheckBox.Checked = flag;

            bool flag2 = !flag & CurrentSlideView.GetIncomingSlideLinks().Count == 0;

            isStartupCheckBox.Enabled = flag2 & presentationLocked;
            
            bool visible =  presentationLocked | slideLocked;

            if (presentationLocked && !slideLocked)
            {
                visible = isStartupCheckBox.Enabled || nextSlideList.Items.Count > 0;
            }

            okButton.Visible = visible;

            if (!visible)
            {
                this.AcceptButton = cancelButton;
                cancelButton.Text = "OK";
            }

        }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:70,代码来源:SlidePropertiesForm.cs

示例2: LoadSlide

 public void LoadSlide(Slide CurrentSlide)
 {
     if (!CurrentSlide.Cached && CurrentSlide.State != SlideState.New && CurrentSlide.State != SlideState.Edit)
     {
         Slide[] slideArray = DesignerClient.Instance.PresentationWorker.LoadSlides(PresentationController.Instance.PresentationInfo.UniqueName, new[] { CurrentSlide.Id });
         if (slideArray != null && slideArray.Length > 0)
         {
             Slide slide = slideArray.First();
             CurrentSlide.SaveSlideLevelChanges(slide);
             //CurrentSlide.DeviceList.Clear();
             //CurrentSlide.DeviceList.AddRange(slide.DeviceList);
             //CurrentSlide.DisplayList.Clear();
             //CurrentSlide.DisplayList.AddRange(slide.DisplayList);
             //CurrentSlide.SourceList.Clear();
             //CurrentSlide.SourceList.AddRange(slide.SourceList);
             CurrentSlide.Cached = true;
         }
     }
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:19,代码来源:PresentationController.cs


注:本文中的Slide.SaveSlideLevelChanges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。