private void GetDefaultSettings()
		{
			if (!RemoteResourceManager.Instance.DefaultSlideSettingsFile.ExistsLocal()) return;
			var document = new XmlDocument();
			document.Load(RemoteResourceManager.Instance.DefaultSlideSettingsFile.LocalPath);
			var node = document.SelectSingleNode(@"/Settings/Size");
			if (node != null)
				SlideSettings = SlideSettings.ReadFromString(node.InnerText.Trim());
		}
		public void Init()
		{
			SlideFormatParser.LoadAvailableFormats();
			if (PowerPointSingleton.Instance.Connect())
			{
				SettingsSource = SettingsSourceEnum.PowerPoint;
				SlideSettings = PowerPointSingleton.Instance.GetSlideSettings() ?? SlideSettings;
			}
			else
			{
				KillPowerPoint();
				SettingsSource = SettingsSourceEnum.Application;
				GetDefaultSettings();
			}
		}
		public static SlideSettings ReadFromString(string size)
		{
			var slideSettings = new SlideSettings();
			switch (size)
			{
				case "4x3":
					slideSettings.SlideSize.Width = 10;
					slideSettings.SlideSize.Height = 7.5m;
					break;
				case "3x4":
					slideSettings.SlideSize.Width = 7.5m;
					slideSettings.SlideSize.Height = 10;
					break;
				case "16x9":
					slideSettings.SlideSize.Width = 13.333m;
					slideSettings.SlideSize.Height = 7.5m;
					break;
				default:
					throw new ArgumentOutOfRangeException("Can't parse slide configuration");
			}
			return slideSettings;
		}
		private PowerPointManager()
		{
			SlideSettings = new SlideSettings();
		}
		public bool IsEqual(SlideSettings target)
		{
			return target.SlideSize.Width == SlideSize.Width &&
				target.SlideSize.Height == SlideSize.Height;
		}
		private void SetSlideSettings(Presentation presentation, SlideSettings settings)
		{
			try
			{
				MessageFilter.Register();
				presentation.PageSetup.SlideWidth = (float)settings.SlideSize.Width * 72;
				presentation.PageSetup.SlideHeight = (float)settings.SlideSize.Height * 72;

				switch (settings.SlideSize.Orientation)
				{
					case SlideOrientationEnum.Landscape:
						presentation.PageSetup.SlideOrientation = MsoOrientation.msoOrientationHorizontal;
						break;
					case SlideOrientationEnum.Portrait:
						presentation.PageSetup.SlideOrientation = MsoOrientation.msoOrientationVertical;
						break;
				}
			}
			catch { }
			finally
			{
				MessageFilter.Revoke();
			}
		}
		public void SetSlideSettings(SlideSettings settings)
		{
			if (PowerPointObject == null) return;
			if (PowerPointObject.ActivePresentation == null) return;
			SetSlideSettings(PowerPointObject.ActivePresentation, settings);
		}
		public SlideSettings GetSlideSettings()
		{
			try
			{
				MessageFilter.Register();
				var settings = new SlideSettings();
				if (PowerPointObject?.ActivePresentation == null) return null;
				settings.SlideSize.Width = Math.Round(Convert.ToDecimal(PowerPointObject.ActivePresentation.PageSetup.SlideWidth / 72), 3);
				settings.SlideSize.Height = Math.Round(Convert.ToDecimal(PowerPointObject.ActivePresentation.PageSetup.SlideHeight / 72), 3);
				return settings;
			}
			catch
			{
				return null;
			}
			finally
			{
				MessageFilter.Revoke();
			}
		}