Пример #1
0
		public virtual void Inject(InjectType type)
		{
			try
			{
				using (var frm = new InjectForm())
				{
					if (frm.ShowDialog(type) == DialogResult.OK)
						ItemInjected(this, EventArgs.Empty);
				}
			}
			catch (AssemblyResolutionException arException)
			{
				ShowMessage(string.Format("Unable to resolve assembly {0}, please load it prior to injection.", arException.AssemblyReference.Name));
			}
		}
Пример #2
0
 /// <summary>
 /// Inject a specific item
 /// </summary>
 /// <param name="type">item type to inject</param>
 protected virtual void Inject(EInjectType type)
 {
     using (InjectForm frm = new InjectForm())
     {
         if (frm.ShowDialog(type) == DialogResult.OK)
         {
             OnItemInjected();
         }
     }
 }