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


C# Slide类代码示例

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


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

示例1: BindSelectedColor

 public void BindSelectedColor(Color color, Slide contentSlide, float slideWidth, float slideHeight)
 {
     BindColorToStyle(color);
     BindColorToVariant(color);
     if (View.IsDisplayDefaultPicture())
     {
         View.EnableUpdatingPreviewImages();
         UpdatePreviewImages(
             View.CreateDefaultPictureItem(),
             contentSlide,
             slideWidth,
             slideHeight);
         View.DisableUpdatingPreviewImages();
         BindStyleToColorPanel();
     }
     else
     {
         UpdatePreviewImages(
             ImageSelectionListSelectedItem.ImageItem ??
             View.CreateDefaultPictureItem(),
             contentSlide,
             slideWidth,
             slideHeight);
     }
 }
开发者ID:youthinkk,项目名称:PowerPointLabs,代码行数:25,代码来源:PictureSlidesLabWindowViewModel.VariationStageControls.cs

示例2: SubmitScore

		public static void SubmitScore(Slide slide, string userId)
		{
			var ltiRequestsRepo = new LtiRequestsRepo();
			var consumersRepo = new ConsumersRepo();
			var visitsRepo = new VisitsRepo();

			var ltiRequest = ltiRequestsRepo.Find(userId, slide.Id);
			if (ltiRequest == null)
				throw new Exception("LtiRequest for user '" + userId + "' not found");

			var consumerSecret = consumersRepo.Find(ltiRequest.ConsumerKey).Secret;

			var score = visitsRepo.GetScore(slide.Id, userId);

			var uri = new UriBuilder(ltiRequest.LisOutcomeServiceUrl);
			if (uri.Host == "localhost")
			{
				uri.Host = "192.168.33.10";
				uri.Port = 80;
				uri.Scheme = "http";
			}

			var outputScore = score / (double)slide.MaxScore;
			/* Sometimes score is bigger then slide's MaxScore, i.e. in case of manual checking */
			if (score > slide.MaxScore)
				outputScore = 1;
			var result = OutcomesClient.PostScore(uri.ToString(), ltiRequest.ConsumerKey, consumerSecret,
				ltiRequest.LisResultSourcedId, outputScore);

			if (!result.IsValid)
				throw new Exception(uri + "\r\n\r\n" + result.Message);
		}
开发者ID:kontur-edu,项目名称:uLearn,代码行数:32,代码来源:LtiUtils.cs

示例3: RenderSlide

		private string RenderSlide(Slide slide)
		{
			var page = StandaloneLayout.Page(course, slide, CreateToc(slide), GetCssFiles(), GetJsFiles());
			foreach (var block in slide.Blocks.OfType<MdBlock>())
				CopyLocalFiles(block.Markdown, slide.Info.Directory.FullName);
			return "<!DOCTYPE html>\n" + page.ToHtmlString();
		}
开发者ID:kontur-edu,项目名称:uLearn,代码行数:7,代码来源:SlideRenderer.cs

示例4: DrawArrow

        static void DrawArrow(Slide slide)
        {
            if (!DrawRObject && !DrawRObject)
            {
                return;
            }

            var color = slide.Type == 1 ? Color.DarkRed : Color.DeepPink;
            var width = 4;

            var circle = new Geometry.Circle2(slide.Position.To2D(), 150f, Game.Time * 300 - slide.StartTime * 300, slide.EndTime * 300 - slide.StartTime * 300).ToPolygon();
            circle.Draw(color, width);

            var startpos = ObjectManager.Player.Position;
            var endpos = slide.Position;
            if (startpos.Distance(endpos) > 100)
            {
                var endpos1 = slide.Position + (startpos - endpos).To2D().Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75;
                var endpos2 = slide.Position + (startpos - endpos).To2D().Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75;

                var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                x1.Draw(color, width - 2);
                var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1);
                y1.Draw(color, width - 2);
                var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2);
                z1.Draw(color, width - 2);
            }
        }
开发者ID:CjShu,项目名称:xQx-LeagueSharp,代码行数:28,代码来源:PlayerObjects.cs

示例5: Presenterd

 public Presenterd(Settings settings, Bus bus)
 {
     currentSlide = Slide.UpcomingCompetitions;
     pausedFor = 0;
     this.settings = settings;
     this.bus = bus;
 }
开发者ID:micolous,项目名称:SAGAPresenter2,代码行数:7,代码来源:Presenterd.cs

示例6: PreviewApplyStyle

        public PreviewInfo PreviewApplyStyle(ImageItem source, Slide contentSlide, 
            float slideWidth, float slideHeight, StyleOption option)
        {
            SetStyleOptions(option);
            SlideWidth = slideWidth;
            SlideHeight = slideHeight;

            var previewInfo = new PreviewInfo();
            var handler = CreateEffectsHandlerForPreview(source, contentSlide);

            // use thumbnail to apply, in order to speed up
            var fullSizeImgPath = source.FullSizeImageFile;
            var originalThumbnail = source.ImageFile;
            source.FullSizeImageFile = null;
            source.ImageFile = source.CroppedThumbnailImageFile ?? source.ImageFile;

            ApplyStyle(handler, source, isActualSize: false);

            // recover the source back
            source.FullSizeImageFile = fullSizeImgPath;
            source.ImageFile = originalThumbnail;
            handler.GetNativeSlide().Export(previewInfo.PreviewApplyStyleImagePath, "JPG",
                    GetPreviewWidth(), PreviewHeight);

            handler.Delete();
            return previewInfo;
        }
开发者ID:digawp,项目名称:PowerPointLabs,代码行数:27,代码来源:StylesDesigner.cs

示例7: SlideLayout

        public SlideLayout(IEnumerable<Display> ADisplays, Slide ASlide)
        {
            m_slide = ASlide;
            m_displays = new List<Display>();
            foreach (Display d in ADisplays)
            {
                if (!WeContainDisplay(d))
                {
                    AddDisplayToSlide(d);
                }
                else
                {
                    m_displays.Add(FindDisplay(d));
                }
            }

            if (m_displays.Count > 0)
            {
                m_windowList = new List<Window>(m_displays[0].WindowList);
                firstDisplay = m_displays.First();
            }
            else
                m_windowList = new List<Window>();

            UpdateDisplayLayout();
        }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:26,代码来源:SlideLayout.cs

示例8: divideToLines

 public static void divideToLines(Slides slides, Slide slide, TextRange textRange)
 {
     var slideNumber = slide.SlideIndex;
     float slideDuration = slide.SlideShowTransition.AdvanceTime;
     int divisionNumber = textRange.Lines().Count;
     float duration = durationAfterDivisions(slideDuration, divisionNumber / 2);
     string textFrmLines = "";
     foreach (TextRange line in textRange.Lines())
     {
         if (textFrmLines.Length > 0)
         {
             textFrmLines += line.Text;
             SlidesManipulation.createNewSlide(slides, ++slideNumber, textFrmLines.Trim(), duration);
             SlidesManipulation.createNewSlide(slides, ++slideNumber, "", 0.01F);
             textFrmLines = "";
         }
         else
         {
             textFrmLines += line.Text;
         }
     }
     //add the rest of textFrmLines
     if (textFrmLines.Length > 0)
     {
         SlidesManipulation.createNewSlide(slides, ++slideNumber, textFrmLines, duration);
         SlidesManipulation.createNewSlide(slides, ++slideNumber, "", 0.1F);
     }
         //delete slides
         slide.Delete();
         slides[slideNumber].Delete();
 }
开发者ID:dariukas,项目名称:Scanorama,代码行数:31,代码来源:TwoLines.cs

示例9: validateIntersection

 private void validateIntersection(Slide slide, IList<JupiterWindow> list)
 {
     for (int i = 0; i < list.Count - 1; i++)
     {
         for (int j = i + 1; j < list.Count; j++)
         {
             Window current = list[i];
             Window other = list[j];
             Rectangle rect1 = new Rectangle(current.Left, current.Top, current.Width, current.Height);
             Rectangle rect2 = new Rectangle(other.Left, other.Top, other.Width, other.Height);
             string currentResourceInfoName = current.Source.ResourceDescriptor == null
                                                  ? string.Empty
                                                  : current.Source.ResourceDescriptor.ResourceInfo.Name;
             string otherResourceInfoName = other.Source.ResourceDescriptor == null
                              ? string.Empty
                              : other.Source.ResourceDescriptor.ResourceInfo.Name;
             if (rect1.IntersectsWith(rect2))
                 throw new Exception(String.Concat(
                     "Сохранение сцены ",
                     slide.Name,
                     " невозможно. На раскладке сцены окна с источниками ",
                     currentResourceInfoName,
                     " и ",
                     otherResourceInfoName,
                     " не должны перекрываться между собой"));
         }
     }
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:28,代码来源:JupiterDisplayDesign.cs

示例10: Frontpage

        public ActionResult Frontpage(RenderModel model)
        {
            IPublishedContent page = model.Content;
            FrontpageRenderModel newModel = new FrontpageRenderModel(page);

            newModel.Header = page.GetPropertyValue<string>("header");
            newModel.Bodytext = page.GetPropertyValue<IHtmlString>("bodyText");
            newModel.CreateReviewUserForm = new CreateReviewUserForm();

            var slideFolder = Umbraco.TypedMedia(page.GetPropertyValue<int>("slideFolder"));

            if (slideFolder != null)
            {
                List<Slide> slides = new List<Slide>();

                foreach (var image in slideFolder.Children)
                {
                    Slide s = new Slide();

                    s.ImageUrl = image.Url;
                    slides.Add(s);
                }
                newModel.Slides = slides;
            }

            //Do some stuff here, then return the base method
            return View(newModel);
        }
开发者ID:Tjornfelt,项目名称:ScrumPower2,代码行数:28,代码来源:FrontpageController.cs

示例11: CreateNewSource

        //[XmlIgnore]
        //[Browsable(false)]
        //public override bool IsSupportPreview
        //{
        //    get { return true; }
        //}


        public override Source CreateNewSource(Slide slide, ModuleConfiguration moduleConfiguration, Dictionary<string, IList<DeviceResourceDescriptor>> resources, Display display)
        {
            //IEDocumentSourceDesign source = new IEDocumentSourceDesign() { Type = this };
            //return source;

            return new IEDocumentSourceDesign { Type = this };
        }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:15,代码来源:IEDocumentSourceConfig.cs

示例12: Create

        public ActionResult Create(Slide model)
        {
            try
            {
                if (FileHelpers.ValidImage(model.image) == false)
                {
                    ModelState.AddModelError("image", "Please choose either a GIF, JPG or PNG image.");
                }

                if (ModelState.IsValid)
                {
                    _slideRepository.Add(model);
                    return RedirectToAction("Index");
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.Message);
            }

            model.image = null;
            model.alt_text = null;

            IEnumerable<ISlide> lstSlides = _slideRepository.GetList();
            List<Slide> slides = _slideMapper.ToList(lstSlides);

            ViewData["SlideCount"] = slides.Count;
            ViewData["Slides"] = slides;

            return View(model);
        }
开发者ID:neiljc07,项目名称:VSEntityFramework,代码行数:31,代码来源:SliderController.cs

示例13: PreviewApplyStyle

        public PreviewInfo PreviewApplyStyle(ImageItem source, Slide contentSlide, 
            float slideWidth, float slideHeight, StyleOption option)
        {
            Logger.Log("PreviewApplyStyle begins");
            SetStyleOptions(option);
            SlideWidth = slideWidth;
            SlideHeight = slideHeight;

            var previewInfo = new PreviewInfo();
            EffectsDesignerForPreview.PreparePreviewing(contentSlide, slideWidth, slideHeight, source);

            // use thumbnail to apply, in order to speed up
            source.BackupFullSizeImageFile = source.FullSizeImageFile;
            var backupImageFile = source.ImageFile;
            source.FullSizeImageFile = null;
            source.ImageFile = source.CroppedThumbnailImageFile ?? source.ImageFile;

            GenerateStyle(EffectsDesignerForPreview, source, isActualSize: false);

            // recover the source back
            source.FullSizeImageFile = source.BackupFullSizeImageFile;
            source.ImageFile = backupImageFile;
            EffectsDesignerForPreview.GetNativeSlide().Export(previewInfo.PreviewApplyStyleImagePath, "JPG",
                    GetPreviewWidth(), PreviewHeight);
            Logger.Log("PreviewApplyStyle done");
            return previewInfo;
        }
开发者ID:nus-fboa2016-PL,项目名称:PowerPointLabs,代码行数:27,代码来源:StylesDesigner.cs

示例14: SaveSlideToFile

 public bool SaveSlideToFile(int slideNumber, string fileName, int width, int height)
 {
     if (_presentation == null)
         throw new NullReferenceException("PowerPoint Presentation is null");
     if (slideNumber > _presentation.Slides.Count) return false;
     //_presentation.Slides[slideNumber].Select();
     //_presentation.SaveAs(fileName, PpSaveAsFileType.ppSaveAsPNG, MsoTriState.msoTrue);
     _slide = _presentation.Slides[slideNumber];
     if (_slide == null) return false;
     MethodInfo mi = _slide.GetType().GetMethod("Export");
     if ((width == -1) || (height == -1))
         mi.Invoke(_slide, new object[] { fileName, "PNG", Missing.Value, Missing.Value });
     else
     {
         // надо ввсети ограничение, чтобы не было больше MAGIC_NUMBER, если будет больше, PPT 2007 хреново работает
         int new_width = width;
         int new_height = height;
         int maxSize = Math.Max(new_width, new_height);
         if (maxSize > MAGIC_NUMBER)
         {
             new_width = (int)(MAGIC_NUMBER/(maxSize*1.0)*new_width);
             new_height = (int) (MAGIC_NUMBER/(maxSize*1.0)*new_height);
         }
         mi.Invoke(_slide, new object[] {fileName, "PNG", new_width, new_height});
     }
     //_presentation.Slides[slideNumber].Export(fileName, "PNG", Missing.Value, Missing.Value);
     return true;
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:28,代码来源:PowerPoint.cs

示例15: RemoveSlide_InvalidSlide_SlideRemoved

        public void RemoveSlide_InvalidSlide_SlideRemoved()
        {
            Slide slide = new Slide(Duration.From(10), Transition.From(TransitionType.None), "Untitled");

            Slideshow slideshow = make_Slideshow("Test");
            slideshow.RemoveSlide(slide);
        }
开发者ID:hendrikdelarey,项目名称:appcampus,代码行数:7,代码来源:SlideshowTests.cs


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