Пример #1
0
 /// <summary>
 /// Rename the current item
 /// </summary>
 /// <param name="sender">Event sender</param>
 /// <param name="e">Event parameters</param>
 protected virtual void RenameItem(object sender, EventArgs e)
 {
     IHandler handler = PluginFactory.GetInstance().Package.ActiveHandler;
     if (handler != null && handler.TargetObject != null)
     {
         using (RenameForm frm = new RenameForm()) {
             if (frm.ShowDialog(handler.TargetObject) == DialogResult.OK)
             {
                 OnItemRenamed();
             }
         }
     }
 }
Пример #2
0
		public virtual void RenameItem(object sender, EventArgs e)
		{
			if (ActiveHandler == null || ActiveHandler.TargetObject == null)
				return;

			using (var frm = new RenameForm())
			{
				if (frm.ShowDialog(ActiveHandler.TargetObject) == DialogResult.OK)
					ItemRenamed(this, EventArgs.Empty);
			}
		}
Пример #3
0
		/// <summary>
		/// Rename the current item
		/// </summary>
		/// <param name="sender">Event sender</param>
		/// <param name="e">Event parameters</param>
		protected virtual void RenameItem(object sender, EventArgs e)
		{
			var handler = PluginFactory.GetInstance().Package.ActiveHandler;
			if (handler == null || handler.TargetObject == null)
				return;

			using (var frm = new RenameForm())
			{
				if (frm.ShowDialog(handler.TargetObject) == DialogResult.OK)
					OnItemRenamed();
			}
		}