예제 #1
0
        public ezAction(Shape shape)
        {
            string altText = shape.AlternativeText;


            if (altText.Contains("$action$"))
            {
                string actionText = Utility.ezLangFinder(altText, "action");
                actionText = "{" + actionText + "}";
                ezAction parsedAction = Newtonsoft.Json.JsonConvert.DeserializeObject <ezAction>(actionText);

                if (parsedAction.onClick.ToLower().Contains("next"))
                {
                    this.onClick = "next." + Globals.Ribbons.PowerPointStudioRibbon.ediBxExerKey.Text + "_S" + (shape.Parent.SlideIndex + 1).ToString("000"); //sid = Globals.Ribbons.PowerPointStudioRibbon.ediBxExerKey.Text +"_S"+slide.SlideIndex.ToString("000");
                }
                else if (parsedAction.onClick.ToLower().Contains("back"))
                {
                    this.onClick = "next." + Globals.Ribbons.PowerPointStudioRibbon.ediBxExerKey.Text + "_S" + (shape.Parent.SlideIndex - 1).ToString("000");
                }
                else
                {
                    this.onClick = parsedAction.onClick;
                }

                this.onHover = parsedAction.onHover;
                this.onLoad  = parsedAction.onLoad;
            }
        }
예제 #2
0
        public ezShape(Shape shape)
        {
            string qulifiedShapeName = Utility.qulifiedNameGenerator(shape.Name);

            id     = "sh" + qulifiedShapeName;
            @class = "temp"; //need to get it from alt text. if not found default is 'temp'
            if (shape.AlternativeText.Contains("$class$"))
            {
                @class = classFinder(shape.AlternativeText);
            }
            //text = new ezText(shape); //Need to its structure..When instructed

            if (shape.Type == Microsoft.Office.Core.MsoShapeType.msoMedia && shape.MediaType == PpMediaType.ppMediaTypeSound)
            {
                audioUrl = Utility.getExtractedAudioUrl(shape);
                if (audioUrl != null)
                {
                    this.audioUrl = audioUrl;
                }
            }

            image = new ezImage(shape);

            actions = new ezAction(shape);

            shapeCount++;
        }