Modifying baseStatusBar

I am looking to add an item to the “New” button on the status bar for Part Maintenance. After some digging I was able to accomplish adding a Memo button and memo functionality to the RMA module using “baseToolbarsManager.Tools[“MemoTool”].SharedProps.Enabled = true;

image

I want to add an option to this list called “Add New Generated Part Number” that would call a bpm to generate a new formatted part number based on a post by @timshuwy.

Is this possible or should I be looking into a different option?

Thanks,

You can try the below code.

ButtonTool ToolBtnGeneratePart;

	this.ToolBtnGeneratePart = new ButtonTool("ToolBtnGeneratePart");
	this.ToolBtnGeneratePart.SharedProps.Enabled = true;
	this.ToolBtnGeneratePart.SharedProps.Visible  = true;
	this.ToolBtnGeneratePart.SharedProps.Caption = "Generate Part Custom";
	this.ToolBtnGeneratePart.SharedProps.AppearancesSmall.Appearance.Image = EpiUIImages.SmallEnabledImages.Images[EpiUIImages.IndexOf("TaskChk")];
	this.baseToolbarsManager.Tools.Add(ToolBtnGeneratePart);
	((Infragistics.Win.UltraWinToolbars.PopupMenuTool)baseToolbarsManager.Tools["ActionsMenu"]).Tools.Add(this.ToolBtnGeneratePart);
	this.ToolBtnGeneratePart.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ToolBtnGeneratePart_Click);

Thanks! This added the button to the Actions Menu which I didn’t originally think about doing. I still needed to add the following using statement in order for things to work properly:

using Infragistics.Win.UltraWinToolbars;

Here is the final result for others:

Personally, I don’t like modifying the User Interface for this type of action ESPECIALLY because when you move to Kinetic in the future, you will need to re-think how this is done again. If you instead make this BPM triggered on a Method event, then it doesn’t matter what UI is running… Example:

  1. Make a BPM on Part.GetNewPart (post processing) that auto-populates the part number with “NewSeqntialPart”.
  2. make a second BPM so that it triggers on an Part.Update - have it look for “NewSequentialPart” in the part number… if there during an ADD, then have your BPM go get the next sequential part automatically.
    If the user doesn’t want it to get the next sequential part, they can simply override the defaulted part with whatever part number they want.
3 Likes

Thanks for the feedback, I will give this a shot. Will the custom code in the BPM be supported in E11 or will I need to convert this as well?

coding done in BPMs should continue to upgrade unless you attach the BPM to a method that is deactivated. That said, most “normal” BPMs should not run into that problem.