Ejemplo n.º 1
0
        /// <summary>
        ///     Creates a new user control for the job and adds it to the stackpanel
        /// </summary>
        private void RegisterNewJob(CacheJob sender, EventArgs args)
        {
            if (!Dispatcher.CheckAccess())
            {
                Dispatcher.Invoke(() => RegisterNewJob(sender, args));
                return;
            }

            var userControl = new CacheJobUserControl(sender);

            jobsStackPanel.Children.Add(userControl);
        }
Ejemplo n.º 2
0
		/// <summary>
		///     Creates a new user control for the job and adds it to the stackpanel
		/// </summary>
		private void RegisterNewJob(CacheJob sender, EventArgs args)
		{
			if (!Dispatcher.CheckAccess())
			{
				Dispatcher.Invoke(() => RegisterNewJob(sender, args));
				return;
			}

			var userControl = new CacheJobUserControl(sender);
			jobsStackPanel.Children.Add(userControl);
		}