private void ThumbPicture_OnClick(object sender, RoutedEventArgs e)
			{
			MaterialJPGForeignKeyConnector SelectedEntry = (MaterialJPGForeignKeyConnector)((Button)sender).DataContext;
			e.Handled = true;
			CsWindow FullSizeImageWindow = new CsWindow();
			//CsGlobal.Wpf.Storage.Window.Handle(FullSizeImageWindow, "FullSizeJPGPictures");
			FullSizeImageWindow.Content = new Image()
				{
				Source = SelectedEntry.MaterialJPG.ValueAsBitmapSource
				};
			FullSizeImageWindow.Title = SelectedEntry.MaterialJPG.Description;
            FullSizeImageWindow.Show();
			}
		private void ShowDBStandBild_OnClick(object sender, RoutedEventArgs e)
			{
			CommonSearchClass SearchClass = ((sender as FrameworkElement).DataContext as CommonSearchClass);

			CsWindow StandBildElementeWindow = new CsWindow();
			//CsGlobal.Wpf.Storage.Window.Handle(StandBildElementeWindow, "StandBildElementeWindow");
			MMUnitsViewer mmUnitsViewerControl = new MMUnitsViewer();
			MMUnitEntriesModell mmUnitEntriesModellInstance = new MMUnitEntriesModell();
			mmUnitEntriesModellInstance.ActuallUsageMode = MMUnitEntriesModell.UsageMode.AllForOneInformation;
            mmUnitsViewerControl.mmUnitEntriesModellInstance = mmUnitEntriesModellInstance;
			StandBildElementeWindow.Content = mmUnitsViewerControl;
			mmUnitEntriesModellInstance.DoStartup(StandBildElementeWindow, SearchClass.InformationenConnectedEntry.ID);
			StandBildElementeWindow.Width = 700;
			StandBildElementeWindow.Height = 600;
            StandBildElementeWindow.ShowDialog();
			}
		private void ToggleUsageWindow_OnClick(object sender, RoutedEventArgs e)
			{
			if (ElementUsageWindow == null)
				{
				if (ElementUsageModellInstance == null)
					ElementUsageModellInstance = new ElementUsageModell();
				ElementUsageWindow = new CsWindow();
				CsGlobal.Wpf.Storage.Window.Handle(ElementUsageWindow, "ElementUsageWindow");

				ElementUsageWindow.Title = "Verwendung der einzelnen Datenelemente";
				(sender as Button).Content = "Schließe Verwendungen";
				ElementUsageWindow.Content = new ElementUsageUI()
					{
					ElementUsageModellInstance = this.ElementUsageModellInstance
					};
				ElementUsageWindow.Closing += (o, args) =>
					{
					(ElementUsageWindow.Content as ElementUsageUI).CloseRequested();
					};

				ElementUsageModellInstance.LoadData();
				ElementUsageWindow.Show();
				}
			else
				{
				ElementUsageWindow.Close();
				ElementUsageWindow = null;
				(sender as Button).Content = "Zeige Verwendungen";
				}
			}
		private void StartTimingsTogetherWindow(Information information)
			{
			CsWindow timingsGroupWindow = new CsWindow();
			timingsGroupWindow.Width = 1200;
			timingsGroupWindow.Height = 600;
			CsGlobal.Wpf.Storage.Window.Handle(timingsGroupWindow, "ShowTimingsToghetherWindow");
			timingsGroupWindow.Title = $"Zeigen aller Timings für {information.Titel}";
			TimingsGroupContainerModell timingsGroupContainerModell = new TimingsGroupContainerModell()
				{
				ParentInformation = information,
				ParentTypId = information.TypId,
				AutoCreationTypUsed = information.Typ.GetAutoCreationTyp

				};
			timingsGroupContainerModell.Create(information);
			timingsGroupWindow.SizeToContent = SizeToContent.Height;
			timingsGroupWindow.Content = new TimingsGroupContainer();
			((TimingsGroupContainer)timingsGroupWindow.Content)
				.TimingsGroupContainerModellInstance = timingsGroupContainerModell;
			((TimingsGroupContainer)timingsGroupWindow.Content).UpdateAllowed = false;
			timingsGroupWindow.Closing += (sender, args) =>
			{
			};
			timingsGroupWindow.ShowDialog();
			}
		private void StartConnectorenTogetherWindow(InformationenPresentationModell modell, bool UpdateAllowed)
			{
			CsWindow connectorenGroupWindow = new CsWindow();
			connectorenGroupWindow.Width = 1200;
			connectorenGroupWindow.Height = 600;
			connectorenGroupWindow.MaxHeight = 900;
			CsGlobal.Wpf.Storage.Window.Handle(connectorenGroupWindow, "ConnectorenToghetherWindow");
			connectorenGroupWindow.Title = $"Bearbeitung aller Connectoren für {modell.InformationToProcess.Titel}";
			modell.InformationToProcess.GetChapters = null;
			ProcessConnectorGroupContainerModell processConnectorGroupContainerModell = new ProcessConnectorGroupContainerModell()
				{
				ParentInformation = modell.InformationToProcess,
				ParentTypId = modell.InformationToProcess.TypId,
				AutoCreationTypUsed = modell.InformationToProcess.Typ.GetAutoCreationTyp

				};
			processConnectorGroupContainerModell.Create(modell.InformationToProcess);
			connectorenGroupWindow.SizeToContent = SizeToContent.Height;
			connectorenGroupWindow.Content = new ProcessConnectorGroupContainer();
			((ProcessConnectorGroupContainer)connectorenGroupWindow.Content)
				.ProcessConnectorGroupContainerModellInstance = processConnectorGroupContainerModell;
			((ProcessConnectorGroupContainer)connectorenGroupWindow.Content).UpdateAllowed = UpdateAllowed;
			connectorenGroupWindow.Closing += (sender, args) =>
			{
			};
			connectorenGroupWindow.ShowDialog();
			}
		private void StartTimingsTogetherWindow(InformationenPresentationModell modell, bool UpdateAllowed)
			{
			CsWindow timingsGroupWindow = new CsWindow();
			timingsGroupWindow.Width = 1200;
			timingsGroupWindow.Height = 600;
			timingsGroupWindow.MaxHeight = 900;
			CsGlobal.Wpf.Storage.Window.Handle(timingsGroupWindow, "TimingsToghetherWindow");
			timingsGroupWindow.Title = $"Bearbeitung aller Timings für {modell.InformationToProcess.Titel}";
			TimingsGroupContainerModell timingsGroupContainerModell = new TimingsGroupContainerModell()
				{
				ParentInformation = modell.InformationToProcess,
				ParentTypId = modell.InformationToProcess.TypId,
				AutoCreationTypUsed = modell.InformationToProcess.Typ.GetAutoCreationTyp

				};
			timingsGroupContainerModell.Create(modell.InformationToProcess);
			timingsGroupWindow.SizeToContent = SizeToContent.Height;
			timingsGroupWindow.Content = new TimingsGroupContainer();
			((TimingsGroupContainer) timingsGroupWindow.Content)
				.TimingsGroupContainerModellInstance = timingsGroupContainerModell;
			((TimingsGroupContainer) timingsGroupWindow.Content).UpdateAllowed = UpdateAllowed;
			timingsGroupWindow.Closing += (sender, args) =>
				{
				};
			timingsGroupWindow.ShowDialog();
			}
		private void StartInformationAddOnProcessing(InformationAddOnModell modell)
			{
			CsWindow informationAddOnWindow = new CsWindow();
			InformationAddOnUI informationAddOnUI = new InformationAddOnUI();
			informationAddOnWindow.Width = 1200;
			informationAddOnWindow.Height = 600;
			if (modell.RequestedFunction == InformationAddOnModell.RequestedInformatinAddOnFunction.AddNewInformationAddOn)
				modell.Prepare();
			informationAddOnUI.InformationAddOnModellInstance = modell;
			informationAddOnWindow.Content = informationAddOnUI;
			modell.InformationAddOnToProcess.ProcessBeforeEachAccessDefaultFilling();
			modell.InformationAddOnToProcess.ProcessBeforeFirstAccessedDefaultFilling();
			if (modell.RequestedFunction != InformationAddOnModell.RequestedInformatinAddOnFunction.AddNewInformationAddOn)
				modell.Prepare();
			CsGlobal.Wpf.Storage.Window.Handle(informationAddOnWindow, "informationAddOnWindow"
					+ modell.InformationAddOnToProcess.Tabelle + modell.RequestedTypeOfInputForInformationAddOn.ToString());
			informationAddOnWindow.Title = $"Bearbeitung für {modell.InformationAddOnToProcess.ActuallBezeichner}"
											+ $" ({modell.InformationAddOnToProcess.DisplayAbleChapterIndex}) in " +
											$"{modell.InformationAddOnToProcess.Information.Titel} - " +
											$"{modell.InformationAddOnToProcess.Information.Typ.NameId}";
			informationAddOnWindow.Closing += (sender, args) =>
				{
				if (modell.InformationAddOnToProcess.RowState != DataRowState.Deleted)
					modell.InformationAddOnToProcess.ProcessTriggeredEntriesAfterCloseDefaultFilling();
				modell.CloseRequested();
				};
			if (modell.RequestedFunction == InformationAddOnModell.RequestedInformatinAddOnFunction.DeleteInformationAddOn)
				{
				informationAddOnWindow.Close();
				return;
				}
			informationAddOnWindow.ShowDialog();
			}
Beispiel #8
0
		private void ScheduledPage_OnClick(object sender, RoutedEventArgs e)
			{
			PageSchedule pageSchedule = (sender as MenuItem).DataContext as PageSchedule;
			if (pageSchedule == null)
				return;
			CsWindow standBildElementeWindow = new CsWindow();
			//CsGlobal.Wpf.Storage.Window.Handle(StandBildElementeWindow, "StandBildElementeWindow");
			MMUnitsViewer mmUnitsViewerControl = new MMUnitsViewer();
			MMUnitEntriesModell mmUnitEntriesModellInstance = new MMUnitEntriesModell();
			mmUnitEntriesModellInstance.ActuallUsageMode = MMUnitEntriesModell.UsageMode.AllForOneInformation;
			mmUnitsViewerControl.mmUnitEntriesModellInstance = mmUnitEntriesModellInstance;
			standBildElementeWindow.Content = mmUnitsViewerControl;
			Guid mmUnitId = pageSchedule.Page.PageGroupId;
			MMUnit mmUnit = Data.DbServer3.MultiMedia.MMUnits.LoadThenFind(mmUnitId);
			mmUnitEntriesModellInstance.DoStartup(standBildElementeWindow, (Guid)mmUnit.MMInformationenId);
			standBildElementeWindow.Width = 700;
			standBildElementeWindow.Height = 600;
			standBildElementeWindow.ShowDialog();
			}