예제 #1
0
		public void Init(IPowerPointHelper powerPointHelper)
		{
			SlideFormatParser.LoadAvailableFormats();
			_powerPointHelper = powerPointHelper;
			if (_powerPointHelper.Connect(false))
			{
				SettingsSource = SettingsSourceEnum.PowerPoint;
				GetActiveSettings();
			}
			else
			{
				KillPowerPoint();
				SettingsSource = SettingsSourceEnum.Application;
				GetDefaultSettings();
			}
		}
예제 #2
0
		public static bool IsPowerPointMultipleInstances(IPowerPointHelper powerPointHelper)
		{
			if (Process.GetProcesses().Count(p => p.ProcessName.ToUpper().Contains("POWERPNT")) > 1)
				return true;
			try
			{
				if (!powerPointHelper.Connect(false))
					return false;
				return powerPointHelper.PowerPointObject.Presentations.Count > 1;
			}
			catch
			{
				return false;
			}
		}