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();
			}
		private void RemoveInformationAddOn_OnClick(object sender, RoutedEventArgs e)
			{
			InformationAddOn InfoAddOn = (sender as Button).DataContext as InformationAddOn;
			if (MessageBox.Show($"Wollen Sie den Eintrag \"{InfoAddOn.ActuallBezeichner}\"\r\n" +
								$"{InfoAddOn.FreiText}\r\n" +
								$"wirklich löschen", "Sicherheitsabfrage",
				MessageBoxButton.OKCancel) == MessageBoxResult.Cancel)
				return;
            InformationAddOnModell modell = new InformationAddOnModell();
			modell.InformationAddOnToProcess = InfoAddOn;
			modell.RequestedFunction = InformationAddOnModell.RequestedInformatinAddOnFunction.DeleteInformationAddOn;
			modell.Prepare();

			//			StartInformationAddOnProcessing(Modell);
			}
		private void AddNewInformationAddOn_OnClick(object sender, RoutedEventArgs e)
			{
			DataDependency DataDependencyToCreate = (sender as MenuItem).DataContext as DataDependency;
			InformationAddOnModell Modell = new InformationAddOnModell();
			Modell.DataDependencyToCreate = DataDependencyToCreate;
			Modell.InformationToProcess = InformationenPresentationModellInstance.InformationToProcess;
			Modell.RequestedFunction = InformationAddOnModell.RequestedInformatinAddOnFunction.AddNewInformationAddOn;
			StartInformationAddOnProcessing(Modell);
			}
		private void AddNewSiblingInformationAddOn_OnClick(object sender, RoutedEventArgs e)
			{
			InformationAddOn InfoAddOn = (sender as Button).DataContext as InformationAddOn;
			InformationAddOnModell Modell = new InformationAddOnModell();
			Modell.InformationAddOnToProcess = InfoAddOn;
			Modell.RequestedFunction = InformationAddOnModell.RequestedInformatinAddOnFunction.AddNewSiblingInformationAddOn;
			StartInformationAddOnProcessing(Modell);
			}
Example #5
0
		private void InformationAddOnModellInstanceChanged(InformationAddOnModell OldValue,
			InformationAddOnModell NewValue)
			{
			}