示例#1
0
		private void Window_Closing (object sender, System.ComponentModel.CancelEventArgs e)
			{
			if (m_TableProcessing != null)
				{
				m_TableProcessing.ClosedFromOutside ();
				}
			if (m_FunctionSelection != null)
				{
				m_FunctionSelection.ClosedFromOutside ();
				}
			if (m_CacheSynchronizationWorker != null)
				{
				this.IsEnabled = false;
				ManagedFileHandling.FileHandlingModell FileHandlingModellInstance = new ManagedFileHandling.FileHandlingModell ();
				if (FileHandlingModellInstance.TransportsPending > 0)
					{
					if (GraphicsSingleton.Instance.GraphicsHandler != null)
						if (GraphicsSingleton.Instance.GraphicsHandler != null)
							GraphicsSingleton.Instance.GraphicsHandler.Close ();
					DispatcherTimer FilehandlingAfterClosing = new DispatcherTimer ();
					FilehandlingAfterClosing.Interval = TimeSpan.FromMilliseconds (1);
					FilehandlingAfterClosing.Tag = FileHandlingModellInstance;
					FilehandlingAfterClosing.Tick += new EventHandler (FilehandlingAfterClosing_Tick);
					e.Cancel = true;
					FilehandlingAfterClosing.Start ();
					return;
					}
				FileHandlingModellInstance.CheckAndStartCopyOrderProcessing(RootGrid);

				this.IsEnabled = true;
				if (m_CacheSynchronizationWorker.IsBusy)
					{
					MessageBoxResult Result = MessageBox.Show
						("Das Synchronisieren der Bilder ist noch aktiv.\r\n"
						+ "Wenn diese Arbeit beendet ist,\r\n"
						+ "schließt sich das Programm automatisch\r\n"
						+ "\"Ja\" für warten, \"Nein\" für sofort beenden",
						"Sicherheitsabfrage", MessageBoxButton.YesNo);
					if (Result == MessageBoxResult.Yes)
						{
						m_CloseMeWhenSynchronizationIsFinish = true;
						e.Cancel = true;
						}
					}
				
				}
			CVM.LayoutManagerControl.DoClosingProcessing (this, LayoutDefinition);

			SaveUserSettings ();
			if ((Content != null)
				&& (m_TableProcessing != null)
				&& (Content.GetType () == typeof (TableProcessing)))
				m_TableProcessing.CloseMe (true);
			}
示例#2
0
		void FileHandlingTimer_Tick (object sender, EventArgs e)
			{
			(sender as DispatcherTimer).Stop ();
			ManagedFileHandling.FileHandlingModell FileHandlingModellInstance = new ManagedFileHandling.FileHandlingModell ();
			if (FileHandlingModellInstance.TransportsPending > 0)
				{
				FileHandlingModellInstance.CheckAndStartCopyOrderProcessing(RootGrid);
				}
			DispatcherTimer StandardProcessingTimer = new DispatcherTimer ();
			StandardProcessingTimer.Interval = TimeSpan.FromMilliseconds (1);
			StandardProcessingTimer.Tick += new EventHandler (StandardProcessingTimer_Tick);
			StandardProcessingTimer.Start ();
			}