In the ApplicationManagerPlugin plugin class, add a handler for when the dialog loads - and in that handler, check the type - if it's the set current warehouse dialog (JiwaFinancials.Jiwa.JiwaSetCurrentWarehouseUI.MainForm - requiring a reference to the JiwaSetCurrentWarehouseUI assembly), then hide the desired node(s) in the treeview of the form.
i.e.:
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.DialogFactory.AfterDialogStart += AfterDialogStart;
}
private void AfterDialogStart(JiwaFinancials.Jiwa.JiwaApplication.IJiwaDialog JiwaDialog)
{
if (JiwaDialog is JiwaFinancials.Jiwa.JiwaSetCurrentWarehouseUI.MainForm)
{
// Hide an element of the selection treeview control
JiwaFinancials.Jiwa.JiwaSetCurrentWarehouseUI.MainForm selectionForm = (JiwaFinancials.Jiwa.JiwaSetCurrentWarehouseUI.MainForm)JiwaDialog;
foreach(Infragistics.Win.UltraWinTree.UltraTreeNode node in selectionForm.UltraTree1.Nodes)
{
if (node.Text == "Victoria")
{
node.Visible = false;
}
}
}
}
Sample plugin attached.