Пример #1
0
		public void StartDataDependencyControl (DataProfile profile,
			CommonProfileModell.RequestedFunction functionToDoParameter)
			{
			if (StartDataDependencyControlCall != null)
				StartDataDependencyControlCall (profile, functionToDoParameter);
			}
Пример #2
0
		public void StartStandBildMappingControl (DataProfile profile,
			CommonProfileModell.RequestedFunction functionToDoParameter)
			{
			if (StartStandBildMappingControlCall != null)
				StartStandBildMappingControlCall (profile, functionToDoParameter);
			}
Пример #3
0
		private void StartStandBildMappingControl (DataProfile profile, 
				CommonProfileModell.RequestedFunction FunctionToDo)
			{
			DataDependencyToWorkFor = profile.ActiveDataDependency;
			DataDependencyCollectionToWorkFor = profile.DataDependencyCollectionToWorkForParameter;
			if (StandBildMappingControlWindow != null)
				StandBildMappingControlWindow.Close ();
			if (StandBildMappingControlWindow == null)
				{
				StandBildMappingControlWindow = new Window ();
//				StandBildMappingControlWindow.Title = CommonProfileModellInstance.HeadLineForProcessableStandBildMappingFull;
				Binding TitleBinding = new Binding ()
					{
					Source = this,
					Path = new PropertyPath ("CommonProfileModellInstance.HeadLineForProcessableStandBildMappingFull")
					};
				StandBildMappingControlWindow.SetBinding (Window.TitleProperty, TitleBinding);

				StandBildMappingControl STBControl = new StandBildMappingControl ();
				StandBildMappingControlWindow.Content = STBControl;

				Binding ModellBinding = new Binding ("CommonProfileModellInstance")
					{Source = this};
				STBControl.SetBinding (StandBildMappingControl.CommonProfileModellInstanceProperty, ModellBinding);

				Binding FullDataDependencyToWorkForBinding = new Binding("FullDataDependencyToWorkFor")
					{ Source = this };
				STBControl.SetBinding(StandBildMappingControl.DataDependencyToWorkForProperty,
								FullDataDependencyToWorkForBinding);

				Binding FullDataDependencyCollectionToWorkForBinding = new Binding("FullDataDependencyCollectionToWorkFor")
						{ Source = this };
				STBControl.SetBinding(StandBildMappingControl.FullDataDependencyCollectionToWorkForProperty,
								FullDataDependencyCollectionToWorkForBinding);
	
				StandBildMappingControlWindow.Closing += (O, Args) =>
					{
					STBControl.CloseRequested ();
					StandBildMappingControlWindow = null;
					};

				switch (FunctionToDo)
					{
					case CommonProfileModell.RequestedFunction.Show:
						STBControl.IsReadOnly = true;
						break;
					case CommonProfileModell.RequestedFunction.New:
					case CommonProfileModell.RequestedFunction.Modify:
					case CommonProfileModell.RequestedFunction.Delete:
						STBControl.IsReadOnly = false;
						break;
					}
				}
			//((CommonProfileModell) CommonProfileModellInstance).FunctionToDo = FunctionToDo;
			//((CommonProfileModell) CommonProfileModellInstance).SelectedDataTemplatesDescription = ActiveFullDataDependency;
			//((CommonProfileModell) CommonProfileModellInstance).DoRequestedFunction ();
			

			StandBildMappingControlWindow.Show ();
			}
Пример #4
0
		private void StartDataDependencyControl(DataProfile profile,
					CommonProfileModell.RequestedFunction FunctionToDo)
			{
			if (DataDependencyControlWindow != null)
				DataDependencyControlWindow.Close ();
			if (DataDependencyControlWindow == null)
				{
				DataDependencyControlWindow = new Window();
				DataDependencyControlWindow.Title = "Bearbeiten von Definitionen zur Speicherung von Informationen";
				DataDependencyControl DDControl = new DataDependencyControl ();
				DataDependencyControlWindow.Content = DDControl;

				Binding ModellBinding = new Binding("CommonProfileModellInstance") 
					{ Source = this };
				DDControl.SetBinding(DataDependencyControl.CommonProfileModellInstanceProperty, ModellBinding);


				DataDependencyControlWindow.Closing += (O, Args) =>
					{
					DDControl.CloseRequested ();
					DataDependencyControlWindow = null;
					};
				
				switch (FunctionToDo)
					{
					case CommonProfileModell.RequestedFunction.Show:
						DDControl.IsReadOnly = true;
						break;
					case CommonProfileModell.RequestedFunction.New:
					case CommonProfileModell.RequestedFunction.Modify:
					case CommonProfileModell.RequestedFunction.Delete:
						DDControl.IsReadOnly = false;
						break;
					case CommonProfileModell.RequestedFunction.NewDataDependency:
						DDControl.IsReadOnly = false;
						break;
					}
				}
			((CommonProfileModell) CommonProfileModellInstance).FunctionToDo = FunctionToDo;
			((CommonProfileModell)CommonProfileModellInstance).SelectedDataDependency = profile.ActiveDataDependency;
			if (profile.ActiveDataDependency != null)
				((CommonProfileModell)CommonProfileModellInstance).SelectedDataDependency = profile.ActiveDataDependency;
			((CommonProfileModell)CommonProfileModellInstance).DoRequestedFunction();
			

			switch (FunctionToDo)
				{
				case CommonProfileModell.RequestedFunction.Modify:
				case CommonProfileModell.RequestedFunction.NewDataDependency:
					if (DataDependencyControlWindow.ShowDialog() == true)
						ProcessNewRequest (profile, FunctionToDo);
					break;
				default:
					DataDependencyControlWindow.Show ();
					break;
				}
			}
Пример #5
0
		private void CreateDataDependencySelectionControlWindow(DataProfile profile, 
				CommonProfileModell.RequestedFunction FunctionToDo)
			{
			if (DataDependencySelectionControlWindow != null)
				DataDependencySelectionControlWindow.Close ();
			DataDependencyCollectionToWorkFor = profile.DataDependencyCollectionToWorkForParameter;
			if (DataDependencySelectionControlWindow == null)
				{
				DataDependencySelectionControlWindow = new Window();
				String TargetElement = String.Empty;
				if (CommonProfileModellInstance.Profile.ActiveTyp != null)
					TargetElement = "zum Typ Element \"" + CommonProfileModellInstance.Profile.ActiveTyp.NameId + "\"";
				else
					if (CommonProfileModellInstance.Profile.ActiveRootDataTemplates != null)
						TargetElement = "zum Root Element \"" 
						+ CommonProfileModellInstance.Profile.ActiveRootDataTemplates.NameId + "\"";
				DataDependencySelectionControlWindow.Title = "Bearbeiten/Ansehen/Auswählen von DataDependency Einträgen " + TargetElement;
				DataDependencySelectionControl DDSelectControl = new DataDependencySelectionControl();
				DataDependencySelectionControlWindow.Content = DDSelectControl;

				Binding ModellBinding = new Binding("CommonProfileModellInstance") { Source = this };
				DDSelectControl.SetBinding(DataDependencySelectionControl.CommonProfileModellInstanceProperty, ModellBinding);

				Binding FullDataDependencyCollectionToWorkForBinding = new Binding("FullDataDependencyCollectionToWorkFor") { Source = this };
				DDSelectControl.SetBinding(DataDependencySelectionControl.FullDataDependencyCollectionToWorkForProperty,
								FullDataDependencyCollectionToWorkForBinding);

				DataDependencySelectionControlWindow.Closing += (O, Args) =>
					{
					DDSelectControl.CloseRequested();
					DataDependencySelectionControlWindow = null;
					};

				switch (FunctionToDo)
					{
					case CommonProfileModell.RequestedFunction.Show:
						DDSelectControl.IsReadOnly = true;
						break;
					case CommonProfileModell.RequestedFunction.Add:
					case CommonProfileModell.RequestedFunction.Remove:
						DDSelectControl.IsReadOnly = false;
						break;
					}
				}
			((CommonProfileModell)CommonProfileModellInstance).FunctionToDo = FunctionToDo;
			((CommonProfileModell)CommonProfileModellInstance).SelectedDataDependency = profile.ActiveDataDependency;
			//if (profile.ActiveDataDependency != null)
			//	{
			//	((CommonProfileModell)CommonProfileModellInstance).SelectedDataDependency = profile.ActiveDataDependency;
			//	((CommonProfileModell)CommonProfileModellInstance).DoRequestedFunction();
			//	}

			}
Пример #6
0
		private void ProcessNewRequest(DataProfile profile,
			CommonProfileModell.RequestedFunction FunctionToDo)
			{
			bool CorrectSelected = false;
			String ElementDescriptionText = CommonProfileModellInstance.GetDataDependencyDescriptionText
					(FunctionToDo, out CorrectSelected);
			if (!CorrectSelected)
				{
				MessageBox.Show("Aus folgendem Grund kann die gewünschte\r\nAktion nicht durchgeführt werden:\r\n"
								 + ElementDescriptionText);
				return;
				}

			if (MessageBox.Show("Wenn Sie OK drücken, wird\r\ndie gewünschte \"" + FunctionToDo.ToString()
					+ "\" Funktion bei folgendem \r\n"
					+ ElementDescriptionText + "\r\ndurchgeführt", "SicherheitsAbfrage",
						MessageBoxButton.OKCancel) != MessageBoxResult.OK)
				return;
			((CommonProfileModell)CommonProfileModellInstance).FunctionToDo = FunctionToDo;
			((CommonProfileModell)CommonProfileModellInstance).SelectedDataDependency = profile.ActiveDataDependency;
			if (profile.ActiveDataDependency != null)
				{
				((CommonProfileModell)CommonProfileModellInstance).DoRequestedFunction();
				}
			return;
			}
Пример #7
0
		private void StartDataDependencySelectionControl (DataProfile profile,
					CommonProfileModell.RequestedFunction FunctionToDo)
			{
			switch (FunctionToDo)
				{
				case CommonProfileModell.RequestedFunction.Add:
					{
					CreateDataDependencySelectionControlWindow(profile, FunctionToDo);
					if (DataDependencySelectionControlWindow.ShowDialog () == false)
						break;
					ProcessAddOrRemoveRequest(CommonProfileModellInstance.Profile, FunctionToDo);
					}
					break;
				case CommonProfileModell.RequestedFunction.Remove:
					{
					ProcessAddOrRemoveRequest (profile, FunctionToDo);
					}
					break;
				case CommonProfileModell.RequestedFunction.NewDataDependency:
					{
					CreateDataDependencySelectionControlWindow(profile, FunctionToDo);
					if (DataDependencySelectionControlWindow.ShowDialog() == false)
						break;
//					ProcessNewRequest (CommonProfileModellInstance.Profile.ActiveFullDataDependency, FunctionToDo);
					}
					break;
				default:
					{
					CreateDataDependencySelectionControlWindow (profile, FunctionToDo);
					DataDependencySelectionControlWindow.Show ();
					}
				break;
				}
			}