예제 #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);
        }
예제 #2
0
        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));
        }
예제 #3
0
        public static PowerPointWrapper AddPowerPoint()
        {
            PowerPointWrapper wrapper = new PowerPointWrapper();

            launchedPowerPoints.Add(wrapper);
            CurrentPowerPoint = wrapper;
            return(wrapper);
        }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #9
0
 public static void Remove(PowerPointWrapper powerPointWrapper)
 {
     launchedPowerPoints.Remove(powerPointWrapper);
 }