Esempio n. 1
0
        internal static bool Switch(int id)
        {
            PowerPointWrapper ww = launchedPowerPoints.Where(x => x.Id == id).FirstOrDefault();

            CurrentPowerPoint = ww ?? CurrentPowerPoint;
            CurrentPowerPoint.Show();
            return(ww != null);
        }
        public void Execute(Arguments arguments)
        {
            string            path = arguments.Path.Value;
            PowerPointWrapper powerPointWrapper = PowerPointManager.AddPowerPoint();

            powerPointWrapper.Open(path);
            Scripter.Variables.SetVariableValue(arguments.Result.Value, new Language.IntegerStructure(powerPointWrapper.Id));
        }
Esempio n. 3
0
        public static PowerPointWrapper AddPowerPoint()
        {
            PowerPointWrapper wrapper = new PowerPointWrapper();

            launchedPowerPoints.Add(wrapper);
            CurrentPowerPoint = wrapper;
            return(wrapper);
        }
Esempio n. 4
0
        public void Execute(Arguments arguments)
        {
            PowerPointWrapper ppWrapper = PowerPointManager.CurrentPowerPoint;

            try
            {
                ppWrapper.Close();
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while trying to insert photo. Message: {ex.Message}", ex);
            }
        }
Esempio n. 5
0
        public void Execute(Arguments arguments)
        {
            PowerPointWrapper ppWrapper = PowerPointManager.CurrentPowerPoint;
            string            path      = arguments.Path.Value;
            string            presName  = arguments.PresName.Value;

            try
            {
                ppWrapper.Save(presName, path);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while trying to insert photo. Message: {ex.Message}", ex);
            }
        }
Esempio n. 6
0
        public void Execute(Arguments arguments)
        {
            PowerPointWrapper ppWrapper        = PowerPointManager.CurrentPowerPoint;
            string            textToBeInserted = arguments.TextToBeInserted.Value;
            int textPosition = arguments.TextPosition.Value;

            try
            {
                ppWrapper.InsertText(textToBeInserted, textPosition);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while trying to insert text. Message: {ex.Message}", ex);
            }
        }
        public void Execute(Arguments arguments)
        {
            PowerPointWrapper ppWrapper = PowerPointManager.CurrentPowerPoint;
            int    slidePosition        = arguments.SlidePosition.Value;
            string titleText            = arguments.TitleText.Value;
            string slideText            = arguments.SlideText.Value;
            string slideLayoutText      = arguments.SlideLayout.Value;

            try
            {
                ppWrapper.InsertSlide(slidePosition, titleText, slideText, slideLayoutText);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while trying to insert slide. Message: {ex.Message}", ex);
            }
        }
        public void Execute(Arguments arguments)
        {
            PowerPointWrapper ppWrapper   = PowerPointManager.CurrentPowerPoint;
            string            pathToPhoto = arguments.PathToPhoto.Value;
            int left   = arguments.Left.Value;
            int top    = arguments.Top.Value;
            int height = arguments.Height.Value;
            int width  = arguments.Width.Value;

            try
            {
                ppWrapper.InsertPhoto(pathToPhoto, left, top, height, width);
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error occured while trying to insert photo. Message: {ex.Message}", ex);
            }
        }
Esempio n. 9
0
 public static void Remove(PowerPointWrapper powerPointWrapper)
 {
     launchedPowerPoints.Remove(powerPointWrapper);
 }