コード例 #1
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void CreateImage(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Image newImage = TargetPlayerDb.Images.NewRow();
			newImage.Id = Guid.NewGuid();
			newImage.Page = parentPage;
			ApplyLayout(newImage, layoutConnector);
			newImage.Table.Rows.Add(newImage);
			}
コード例 #2
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void CreateVideo(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Video newVideo = TargetPlayerDb.Videos.NewRow();
			newVideo.Id = Guid.NewGuid();
			newVideo.Page = parentPage;

			if (layoutConnector.MMElement.MMVideo == null)
				{
				throw new Exception($"Falsch generiertes {nameof(MMElement)}[{layoutConnector.MMElement.Id}].");
				}
			if (layoutConnector.MMElement.MMVideo != null)
				{
				//if (String.IsNullOrWhiteSpace(layoutConnector.MMElement.MMVideo.PlayerFileNameReference))
				//	throw new FileNotFoundException
				//		($"Bei der MMUnit {layoutConnector.MMElement.MMUnit.NameId} " +
				//		$"({layoutConnector.MMElement.MMUnit.Id}) beim VideoFile " +
				//		$"{layoutConnector.MMElement.MMVideo.OriginalDirectoryNameReference} ist keine " +
				//		$"PlayerFileNameReference eingetragen");
				//FileInfo videoTargetFileName =
				//	VisualBasics.GetPlayerCacheFileInfo(layoutConnector.MMElement.MMVideo.PlayerFileNameReference);
				FileInfo videoTargetFileName =
					VisualBasics.GetPlayerArchiveFileInfo
					(layoutConnector.MMElement.MMVideo.OriginalDirectoryNameReference,
					layoutConnector.MMElement.MMVideo.PlayerBestFittingSourceReference ?? String.Empty);

				newVideo.FileIdentifier = layoutConnector.MMElement.MMVideo.Id;
				newVideo.DiagnosticText = Path.GetFileNameWithoutExtension(videoTargetFileName.FullName);
				newVideo.Extension = Path.GetExtension(videoTargetFileName.FullName).Replace(".", "");
				}
			ApplyLayout(newVideo, layoutConnector);
			newVideo.Table.Add(newVideo);
			}
コード例 #3
0
ファイル: MMUnitExtensions.cs プロジェクト: heinzsack/DEV
		private void PrepareAllForText(MMPartsElementeLayoutConnector layoutConnector)
			{
			}
コード例 #4
0
ファイル: MMUnitExtensions.cs プロジェクト: heinzsack/DEV
		private void PrepareAllForImage(MMPartsElementeLayoutConnector layoutConnector)
			{
			if (layoutConnector.MMElement.MMPicture == null)
				{
				//layoutConnector.MMElement.PictureId =
				//	Guid.Parse("76324157-4251-4e18-bcb2-3ed674e07ce0");
				throw new ArgumentException($"Bei Image Element {layoutConnector.MMElement} " +
						$"({layoutConnector.MMElement.Id}) ist keine ImageId eingetragen");
				}
			if ((String.IsNullOrWhiteSpace(layoutConnector.MMElement.MMPicture.NameId))
				&& (!String.IsNullOrWhiteSpace(layoutConnector.MMElement.TextId)))
				layoutConnector.MMElement.MMPicture.NameId = layoutConnector.MMElement.TextId;
			if (String.IsNullOrWhiteSpace(layoutConnector.MMElement.MMPicture.PlayerFileNameReference))
				layoutConnector.MMElement.MMPicture.PlayerFileNameReference
					= VisualBasics.GetImagePlayerFileReference(layoutConnector.MMElement.MMPicture.Id,
							layoutConnector.MMElement.MMPicture.NameId, 
							layoutConnector.MMElement.MMPicture.Extension);
			if (DoFileCopy)
				{
				FileInfo imageFileInfo = (VisualBasics.GetCentralCacheFileInfo
						(layoutConnector.MMElement.MMPicture.PlayerFileNameReference));
				if (!imageFileInfo.Exists)
					{
					imageFileInfo.CreateDirectory_IfNotExists();
					layoutConnector.MMElement.MMPicture.Get_Value.SaveTo_File(imageFileInfo);
					}
				}
			}
コード例 #5
0
		private bool CreatePlayerVideo(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Video newVideo = ActuallPlayerDb.Videos.NewRow();
			newVideo.Id = Guid.NewGuid();
			newVideo.Page = parentPage;
			if (layoutConnector.MMElement.MMVideo == null)
				{
				layoutConnector.MMElement.MMVideo = Data.DbServer3.MultiMedia.MMVideos
					.GetVideoFile(layoutConnector.MMElement.ValueFileReference);
				}
			if (layoutConnector.MMElement.MMVideo != null)
				{
				FileInfo videoTargetFileName = VisualBasics.CreateVideoCacheFileInfo
					(layoutConnector.MMElement.MMVideo.Id,
						layoutConnector.MMElement.MMVideo.NameId,
						Path.GetExtension(layoutConnector.MMElement
								.MMVideo.Get_BestFittingVideoName).Replace(".", ""));
				if (!videoTargetFileName.Exists)
					{
					int FileLengthInKB = (int)(new FileInfo(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName)).Length / 1024;
					Window copyWindow = new Window();
					copyWindow.Content = new TextBlock()
						{
						Text = $"Kopiert wird {layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName}\r\n" +
								$"in der Länge von {FileLengthInKB} kB"
						};
					copyWindow.Show();
					videoTargetFileName.CreateDirectory_IfNotExists();
					File.Copy(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName,
						videoTargetFileName.FullName);
					copyWindow.Close();

					}
				newVideo.VideoId = layoutConnector.MMElement.MMVideo.Id;
				newVideo.NameId = Path.GetFileNameWithoutExtension(videoTargetFileName.FullName);
				newVideo.Extension = Path.GetExtension(videoTargetFileName.FullName).Replace(".", "");
				}
			FillPlayerVisualFromMMLayoutConnector(newVideo, layoutConnector);
			ActuallPlayerDb.Videos.Rows.Add(newVideo);
			return true;
			}
コード例 #6
0
ファイル: MMUnitExtensions.cs プロジェクト: heinzsack/DEV
		private void PrepareAllForVideo(MMPartsElementeLayoutConnector layoutConnector)
			{
			if (layoutConnector.MMElement.MMVideo == null)
				{
				if (String.IsNullOrEmpty(layoutConnector.MMElement.ValueFileReference))
				throw new ArgumentException($"Bei Video Element {layoutConnector.MMElement} " +
						$"({layoutConnector.MMElement.Id}) ist keine VideoId und " +
						$"ValueFileReference eingetragen");

				layoutConnector.MMElement.MMVideo = MMDataContext.MMVideos
					.GetVideoFile(layoutConnector.MMElement.ValueFileReference);
				if (layoutConnector.MMElement.MMVideo == null)
					throw new ArgumentException($"Bei Video Element {layoutConnector.MMElement} " +
							$"({layoutConnector.MMElement.Id}) konnte für die ValueFileReference " +
							$"{layoutConnector.MMElement.ValueFileReference} keine VideoId " +
							$"gefunden werden");
				}
			if (String.IsNullOrWhiteSpace(layoutConnector.MMElement.MMVideo.PlayerFileNameReference))
				{
				layoutConnector.MMElement.MMVideo.PlayerFileNameReference
					= VisualBasics.GetVideoPlayerFileReference
					(layoutConnector.MMElement.MMVideo.Id,
						layoutConnector.MMElement.MMVideo.NameId,
						Path.GetExtension(layoutConnector.MMElement
							.MMVideo.Get_BestFittingVideoName).Replace(".", "").ToLower());
				}
			if (DoFileCopy)
				{
				FileInfo videoFileInfo = VisualBasics.GetCentralCacheFileInfo
					(layoutConnector.MMElement.MMVideo.PlayerFileNameReference);
				if (!videoFileInfo.Exists)
					{
					int FileLengthInKB = (int)(new FileInfo(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName)).Length / 1024;
					Window copyWindow = new Window();
					copyWindow.Content = new TextBlock()
						{
						Text = $"Kopiert wird aus dem Directory {layoutConnector.MMElement.MMVideo.OriginalDirectoryNameReference}\r\n" +
								$"der File {Path.GetFileName(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName)}\r\n" +
								$"in der Länge von {FileLengthInKB.ToString("N0")} kB\r\n" +
								$"nach {videoFileInfo.FullName}"
						};
					copyWindow.Show();
					videoFileInfo.CreateDirectory_IfNotExists();
					File.Copy(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName,
						videoFileInfo.FullName);
					copyWindow.Close();
					}
				}
			}
コード例 #7
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private bool ApplyLayout(Text newText, MMPartsElementeLayoutConnector layoutConnector)
			{
			newText.DiagnosticText = layoutConnector.MMElement.NameId;
			newText.MarginThickness = layoutConnector.MarginThickness.ToString();
			//new Thickness
			//		((double)layoutConnector.ConnectedElementLayout.PositionLeft,
			//		(double)layoutConnector.ConnectedElementLayout.PositionTop,
			//		(double)(100 - layoutConnector.ConnectedElementLayout.PositionRight),
			//		(double)(100 - layoutConnector.ConnectedElementLayout.PositionBottom)).ToString();
			//newText.PositionLeft = (double)layoutConnector.ConnectedElementLayout.PositionLeft;
			//newText.PositionTop = (double)layoutConnector.ConnectedElementLayout.PositionTop;
			//newText.PositionRight = (double)(100 - layoutConnector.ConnectedElementLayout.PositionRight);
			//newText.PositionBottom = (double)(100 - layoutConnector.ConnectedElementLayout.PositionBottom);
			if (String.IsNullOrEmpty(layoutConnector.TextToProcess))
				newText.TextColumn = layoutConnector.TextToProcess;
			else
				newText.TextColumn = layoutConnector.MMElement.DynamicText;


			//Could be letal, CS 16.28
			if ((newText.TextColumn == "")
				|| (newText.TextColumn == " ")
				|| (newText.TextColumn == "  "))
				return false;



			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontColor))
				newText.Foreground = "Black";
			else
				newText.Foreground = layoutConnector.ConnectedElementLayout.FontColor;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontDescription))
				newText.FontFamily = "Arial";
			else
				newText.FontFamily = layoutConnector.ConnectedElementLayout.FontDescription;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontStyle))
				newText.FontWeight = "Normal";
			else
				newText.FontWeight = layoutConnector.ConnectedElementLayout.FontStyle;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.BackGround))
				newText.Background = "Transparent";
			else
				newText.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newText.FontStyle = "Normal";
			newText.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;
			return true;
			}
コード例 #8
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void ApplyLayout(Image newImage, MMPartsElementeLayoutConnector layoutConnector)
			{
#if DEBUG
			newImage.DiagnosticText = layoutConnector.MMElement.NameId;
#endif
			newImage.MarginThickness = layoutConnector.MarginThickness.ToString();
			newImage.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.FileIdentifier = (Guid)layoutConnector.MMElement.PictureId;
			newImage.Extension = layoutConnector.MMElement.MMPicture.Extension;
			newImage.SortOrder = layoutConnector.DefaultedProcessingOrder;

			}
コード例 #9
0
		private void FillPlayerVisualFromMMLayoutConnector(Video newVideo, MMPartsElementeLayoutConnector layoutConnector)
			{
			newVideo.PositionLeft = layoutConnector.ConnectedElementLayout.PositionLeft;
			newVideo.PositionTop = layoutConnector.ConnectedElementLayout.PositionTop;
			newVideo.PositionRight = 100 - layoutConnector.ConnectedElementLayout.PositionRight;
			newVideo.PositionBottom = 100 - layoutConnector.ConnectedElementLayout.PositionBottom;
			newVideo.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;
			newVideo.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newVideo.Background = layoutConnector.ConnectedElementLayout.BackGround;

			}
コード例 #10
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void CreateVideo(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Video newVideo = TargetPlayerDb.Videos.NewRow();
			newVideo.Id = Guid.NewGuid();
			newVideo.Page = parentPage;

			if (layoutConnector.MMElement.MMVideo == null)
				{
				layoutConnector.MMElement.MMVideo = Data.DbServer3.MultiMedia.MMVideos
					.GetVideoFile(layoutConnector.MMElement.ValueFileReference);
				}
			if (layoutConnector.MMElement.MMVideo != null)
				{
				FileInfo videoTargetFileName =
					VisualBasics.GetPlayerCacheFileInfo(Path.Combine(layoutConnector.MMElement.MMVideo.PlayerFileNameReference));
				//if (!videoTargetFileName.Exists)
				//	{
				//	int FileLengthInKB = (int)(new FileInfo(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName)).Length / 1024;
				//	Window copyWindow = new Window();
				//	copyWindow.Content = new TextBlock()
				//		{
				//		Text = $"Kopiert wird {layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName}\r\n" +
				//				$"in der Länge von {FileLengthInKB} kB"
				//		};
				//	copyWindow.Show();
				//	videoTargetFileName.CreateDirectory_IfNotExists();
				//	File.Copy(layoutConnector.MMElement.MMVideo.Get_BestFittingVideoName,
				//		videoTargetFileName.FullName);
				//	copyWindow.Close();
				//	}
				newVideo.FileIdentifier = layoutConnector.MMElement.MMVideo.Id;
				newVideo.DiagnosticText = Path.GetFileNameWithoutExtension(videoTargetFileName.FullName);
				newVideo.Extension = Path.GetExtension(videoTargetFileName.FullName).Replace(".", "");
				}
			ApplyLayout(newVideo, layoutConnector);
			newVideo.Table.Add(newVideo);
			}
コード例 #11
0
		private void FillPlayerVisualFromMMLayoutConnector(Image newImage, MMPartsElementeLayoutConnector layoutConnector)
			{
			newImage.NameId = layoutConnector.MMElement.NameId;
			newImage.PositionLeft = layoutConnector.ConnectedElementLayout.PositionLeft;
			newImage.PositionTop = layoutConnector.ConnectedElementLayout.PositionTop;
			newImage.PositionRight = 100 - layoutConnector.ConnectedElementLayout.PositionRight;
			newImage.PositionBottom = 100 - layoutConnector.ConnectedElementLayout.PositionBottom;
			newImage.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.ImageId = layoutConnector.MMElement.PictureId;
			FileInfo targetFileInfo = null;
			BitmapSource bitmapSource = null;
			Byte[] FileFormatedValue = null;
			switch (layoutConnector.MMElement.MMElementTyp.TypNameId)
				{
				case "JPGPicture":
					{
					targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid) layoutConnector.MMElement.PictureId,
						layoutConnector.MMElement.TextId, "jpg");
					if (!targetFileInfo.Exists)
						{
						layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
						}
					break;
					}
				case "PNGPicture":
					{
					targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid) layoutConnector.MMElement.PictureId,
						layoutConnector.MMElement.TextId, "png");
					if (!targetFileInfo.Exists)
						{
						layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
						}
					break;
					}
				case "BMPPicture":
					{
					targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid) layoutConnector.MMElement.PictureId,
						layoutConnector.MMElement.TextId, "bmp");
					if (!targetFileInfo.Exists)
						{
						layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
						}
					break;
					}
				case "DynamicPicture":
					{
					targetFileInfo = VisualBasics.CreateImageCacheFileInfo($"{layoutConnector.MMElement.ValueFileReference}",
						layoutConnector.MMElement.TextId, "jpg");
					break;
					}
				case "DynamicOverlayPicture":
					{
					targetFileInfo = VisualBasics.CreateImageCacheFileInfo($"{layoutConnector.MMElement.ValueFileReference}",
						layoutConnector.MMElement.TextId, "png");
					break;
					}
				default:
					throw new Exception($"falscher layoutConnector.MMElement.MMElementTyp.TypNameId " +
										$"({layoutConnector.MMElement.MMElementTyp.TypNameId})");
				}
			newImage.Extension = Path.GetExtension(targetFileInfo.FullName).Replace(".", "").ToLower();
			newImage.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;

			}
コード例 #12
0
		private bool FillPlayerVisualFromMMLayoutConnector(Text newText, MMPartsElementeLayoutConnector layoutConnector)
			{
			newText.NameId = layoutConnector.MMElement.NameId;
			newText.PositionLeft = layoutConnector.ConnectedElementLayout.PositionLeft;
			newText.PositionTop = layoutConnector.ConnectedElementLayout.PositionTop;
			newText.PositionRight = 100 - layoutConnector.ConnectedElementLayout.PositionRight;
			newText.PositionBottom = 100 - layoutConnector.ConnectedElementLayout.PositionBottom;
			if (String.IsNullOrEmpty(layoutConnector.TextToProcess))
				newText.TextColumn = layoutConnector.TextToProcess;
			else
				newText.TextColumn = layoutConnector.MMElement.DynamicText;
			if ((newText.TextColumn == "")
				|| (newText.TextColumn == " ")
				|| (newText.TextColumn == "  "))
				return false;
			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontColor))
				newText.Foreground = "Black";
			else
				newText.Foreground = layoutConnector.ConnectedElementLayout.FontColor;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontDescription))
				newText.FontFamily = "Arial";
			else
				newText.FontFamily = layoutConnector.ConnectedElementLayout.FontDescription;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontStyle))
				newText.FontWeight = "Normal";
			else
				newText.FontWeight = layoutConnector.ConnectedElementLayout.FontStyle;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.BackGround))
				newText.Background = "Transparent";
			else
				newText.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newText.FontStyle = "Normal";
			newText.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;
			return true;
			}
コード例 #13
0
		private bool CreatePlayerText(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Text newText = ActuallPlayerDb.Texts.NewRow();
			newText.Id = Guid.NewGuid();
			newText.Page = parentPage;
			if (FillPlayerVisualFromMMLayoutConnector(newText, layoutConnector) == false)
				return false;
			ActuallPlayerDb.Texts.Rows.Add(newText);
			return true;
			}
コード例 #14
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void CreateText(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			Text newText = TargetPlayerDb.Texts.NewRow();
			newText.Id = Guid.NewGuid();
			newText.Page = parentPage;
			if (ApplyLayout(newText, layoutConnector))
				newText.Table.Rows.Add(newText);
			}
コード例 #15
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void ApplyLayout(Image newImage, MMPartsElementeLayoutConnector layoutConnector)
			{
			newImage.DiagnosticText = layoutConnector.MMElement.NameId;
			newImage.MarginThickness = layoutConnector.MarginThickness.ToString();
			//newImage.PositionLeft = (double)layoutConnector.ConnectedElementLayout.PositionLeft;
			//newImage.PositionTop = (double)layoutConnector.ConnectedElementLayout.PositionTop;
			//newImage.PositionRight = (double)(100 - layoutConnector.ConnectedElementLayout.PositionRight);
			//newImage.PositionBottom = (double)(100 - layoutConnector.ConnectedElementLayout.PositionBottom);
			newImage.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newImage.FileIdentifier = (Guid)layoutConnector.MMElement.PictureId;
			FileInfo targetFileInfo =
				VisualBasics.GetCentralCacheFileInfo(layoutConnector.MMElement.MMPicture.PlayerFileNameReference);
			//BitmapSource bitmapSource = null;
			//Byte[] FileFormatedValue = null;
			//if (layoutConnector.MMElement.MMElementTyp.TypNameId == "JPGPicture")
			//	{
			//	targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid)layoutConnector.MMElement.PictureId,
			//		layoutConnector.MMElement.TextId, "jpg");
			//	if (!targetFileInfo.Exists)
			//		{
			//		layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
			//		}
			//	}
			//else if (layoutConnector.MMElement.MMElementTyp.TypNameId == "PNGPicture")
			//	{
			//	targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid)layoutConnector.MMElement.PictureId,
			//		layoutConnector.MMElement.TextId, "png");
			//	if (!targetFileInfo.Exists)
			//		{
			//		layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
			//		}
			//	}
			//else if (layoutConnector.MMElement.MMElementTyp.TypNameId == "BMPPicture")
			//	{
			//	targetFileInfo = VisualBasics.CreateImageCacheFileInfo((Guid)layoutConnector.MMElement.PictureId,
			//		layoutConnector.MMElement.TextId, "bmp");
			//	if (!targetFileInfo.Exists)
			//		{
			//		layoutConnector.MMElement.Get_Value().SaveTo_File(targetFileInfo);
			//		}
			//	}
			//else if (layoutConnector.MMElement.MMElementTyp.TypNameId == "DynamicPicture")
			//	{
			//	targetFileInfo = VisualBasics.CreateImageCacheFileInfo($"{layoutConnector.MMElement.ValueFileReference}",
			//		layoutConnector.MMElement.TextId, "jpg");
			//	}
			//else if (layoutConnector.MMElement.MMElementTyp.TypNameId == "DynamicOverlayPicture")
			//	{
			//	targetFileInfo = VisualBasics.CreateImageCacheFileInfo($"{layoutConnector.MMElement.ValueFileReference}",
			//		layoutConnector.MMElement.TextId, "png");
			//	}
			//else
			//	throw new Exception($"falscher layoutConnector.MMElement.MMElementTyp.TypNameId " +
			//						$"({layoutConnector.MMElement.MMElementTyp.TypNameId})");
			newImage.Extension = Path.GetExtension(targetFileInfo.FullName).Replace(".", "").ToLower();
			newImage.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;

			}
コード例 #16
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private bool ApplyLayout(Text newText, MMPartsElementeLayoutConnector layoutConnector)
			{
#if DEBUG
			newText.DiagnosticText = layoutConnector.MMElement.NameId;
#endif
			newText.MarginThickness = layoutConnector.MarginThickness.ToString();
			if (!String.IsNullOrEmpty(layoutConnector.TextToProcess))
				newText.TextColumn = layoutConnector.TextToProcess;
			else
				{
				newText.TextColumn = layoutConnector.MMElement.LocalText;
				//newText.TextColumn = "Find the source of this exception and see the following Line.";
				//throw new Exception("Find the source of this exception and see the following Line. " +
				//					"The following line needs connection to other databases then Multimedia" +
				//					"This is Subject to change and should be prevent in first place.");
				}


			//Could be letal, CS 16.28
			if ((newText.TextColumn == "")
				|| (newText.TextColumn == " ")
				|| (newText.TextColumn == "  "))
				return false;



			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontColor))
				newText.Foreground = "Black";
			else
				newText.Foreground = layoutConnector.ConnectedElementLayout.FontColor;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontDescription))
				newText.FontFamily = "Arial";
			else
				newText.FontFamily = layoutConnector.ConnectedElementLayout.FontDescription;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.FontStyle))
				newText.FontWeight = "Normal";
			else
				newText.FontWeight = layoutConnector.ConnectedElementLayout.FontStyle;

			if (String.IsNullOrEmpty(layoutConnector.ConnectedElementLayout.BackGround))
				newText.Background = "Transparent";
			else
				newText.Background = layoutConnector.ConnectedElementLayout.BackGround;
			newText.FontStyle = "Normal";
			newText.SortOrder = layoutConnector.DefaultedProcessingOrder;
			return true;
			}
コード例 #17
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void ApplyLayout(Video newVideo, MMPartsElementeLayoutConnector layoutConnector)
			{
			newVideo.MarginThickness = layoutConnector.MarginThickness.ToString();
			//newVideo.PositionLeft = (double)layoutConnector.ConnectedElementLayout.PositionLeft;
			//newVideo.PositionTop = (double)layoutConnector.ConnectedElementLayout.PositionTop;
			//newVideo.PositionRight = (double)(100 - layoutConnector.ConnectedElementLayout.PositionRight);
			//newVideo.PositionBottom = (double)(100 - layoutConnector.ConnectedElementLayout.PositionBottom);
			newVideo.SortOrder = layoutConnector.MMElement.DefaultedSortOrder;
			newVideo.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newVideo.Background = layoutConnector.ConnectedElementLayout.BackGround;
			}
コード例 #18
0
ファイル: PageGroupGenerator.cs プロジェクト: heinzsack/DEV
		private void ApplyLayout(Video newVideo, MMPartsElementeLayoutConnector layoutConnector)
			{
			newVideo.MarginThickness = layoutConnector.MarginThickness.ToString();
			newVideo.SortOrder = layoutConnector.DefaultedProcessingOrder;
			newVideo.BorderColor = layoutConnector.ConnectedElementLayout.BackGround;
			newVideo.Background = layoutConnector.ConnectedElementLayout.BackGround;
			}
コード例 #19
0
		private bool CreatePlayerImage(Page parentPage, MMPartsElementeLayoutConnector layoutConnector)
			{
			DbEntitiesPlayer.hsserver.ringplayerdb.rows.Image newImage = ActuallPlayerDb.Images.NewRow();
			newImage.Id = Guid.NewGuid();
			newImage.Page = parentPage;
			FillPlayerVisualFromMMLayoutConnector(newImage, layoutConnector);
			ActuallPlayerDb.Images.Rows.Add(newImage);
			return true;
			}