Customization - Changing Ready Message on UD Form

LOL! Well I appreciate BOTH of your incredibly speedy responses but I’ll take the one with the correct spelling! :wink:

I can’t make fun cause I’m terabull at spelling…

image

:joy:

I’ll give that a try! Thank you guys so much!!! :slight_smile:

Edit: will mark solved shortly… :slight_smile:

2 Likes

But is there not a potential issue if she isnt Popping the message stack? If this is intended to be done multiple times you might want to either consider setting a flag to show you pushed a status, so before pushing another you can pop it. Otherwise, maybe just use reflection on:

protected void setStatusText(string status, bool busy)

or do like Epicor does direct on the status bar (which may have to be grabbed by reflection)

oTrans.statusPanel.Text = status;
oTrans.statusPanel.UltraStatusBar.Update();

Thoughts? From personal experience I can tell you the performance of that message stack isnt great, especially when its a few items tall

1 Like

According to @hkeric.wci, you dont have to get by reflection:
UltraStatusBar ultraStatusBar1 = (UltraStatusBar)oTrans.StatusPanel.UltraStatusBar;

Source: https://www.linkedin.com/pulse/snippet-epicor-add-progressbar-statusbar-haso-keric/

2 Likes

@Chris_Conn, thank you so much for sharing that great post by @hkeric.wci and your thoughts! It was especially fun to play around with the Marquee settings! I love that and will have to incorporate that in other places! :smile:

Like I said I’m a newbie to form customization (if you saw my code, you’d probably gag) but I did a combination of the PushStatusText and @hkeric.wci’s code and it seems to be working the way I need it:

image

image

I might need to change the wording a little…not everyone appreciates my humor around here. :stuck_out_tongue_closed_eyes:

Thank you guys so much! How do I mark all of your posts as the solution? :slight_smile:

1 Like

Ok, it’s sad that I entertain myself with this stuff when I should be doing other more constructive things but I now have it randomly generating a few different (silly) messages to the user. LMBO!

image

(Helps boost morale!) :wink:

That was fun, thank you guys! You Rock!

1 Like

Like a web page from 1998? :joy:

1 Like

Hi. Nice customization. When I customize these forms like the images you have shown, there is way to remove the side panels and even toolbar menu. You can take control over these unwanted objects and dispose them ……

Here is template of what I use:

public class Script
{
Ice.Lib.Framework.EpiTreeViewPanel tree;
Ice.Lib.Framework.EpiGroupBox searchbox;
Ice.UI.App.UD35Entry.ListPanel listpane;
Ice.Lib.Framework.EpiButton btnsearch;
Ice.UI.App.UD35Entry.UD35Form mainmenu;

public void InitializeCustomCode()
{

	tree = (Ice.Lib.Framework.EpiTreeViewPanel)csm.GetNativeControlReference("f2f3147a-68e3-4b67-9865-e4e43d14fc66");
	searchbox = (Ice.Lib.Framework.EpiGroupBox)csm.GetNativeControlReference("c205404a-5523-4c79-8a60-d9271a99b21d");
	listpane = (Ice.UI.App.UD35Entry.ListPanel)csm.GetNativeControlReference("5bc5702d-bf5b-4bcd-8555-a5be760a5449");
	btnsearch = (Ice.Lib.Framework.EpiButton)csm.GetNativeControlReference("3b06b8f2-a9d0-44d0-9aa1-4db6ddc60c77");
	mainmenu = (Ice.UI.App.UD35Entry.UD35Form)csm.GetNativeControlReference("2dcd1674-5e34-4d98-b493-c75747027376");
}


private void UD35Form_Load(object sender, EventArgs args)
{

	tree.Dispose();
	searchbox.Dispose();
	listpane.Dispose();
	btnsearch.Dispose();
	baseToolbarsManager.Visible = false;
}

}

2 Likes

You can use:

PushDisposableStatusText which will pop itself:

using (this.oTrans.PushDisposableStatusText("Printing...", true))
{
	if (this.BuildBartenderFile(whereClauseUD100A) == true)
	{
		// Etc
	}
}

If you use PushStatusText() then you have to follow up with PopStatus();

this.oTrans.PushStatusText("Importing: " + jobNum, true);
bool recordExists = this.CheckRecordExistsByJobNum(jobNum);
this.oTrans.PopStatus();

PS: I’ll port those Posts to E10Help, because LinkedIn is no place for snippets :slight_smile: I mean the Markup is horrible, I was just experimenting with some blogging.

4 Likes

There is what I was looking for!

1 Like

@ERPSysAdmin obviously if you want to change the Text in any other portion of your code then you use

// Assuming you stored ultraStatusBar1 is global
// Check if Panel Exists ultraStatusBar1.Panels.Exists("MyPanelID");
this.ultraStatusBar1.Panels["MyPanelID"].Text = "Updating Text.....";

// Or use
((Infragistics.Win.UltraWinStatusBar.UltraStatusBar)oTrans.StatusPanel.UltraStatusBar).Panels["ID"].Text = "Hello";
1 Like

Thank you @hkeric.wci! I was struggling to figure out how to grab the panel later on and change the text. That’s awesome and very helpful! I did make my ultraStatusBar1 global and (I’m not able to see my code right now) but I think I’m using something like …Panels[1]… to pull from the array. But I like your suggestion even better because I noticed that the element number changes for some users who have say the date displayed at the bottom of their MES windows. Excited to try this! Thank you very much!!! :slight_smile:

Edit: Ok guys, I give up… I was going to research it but since you guys mentioned it, what is “popping” the message stack and why would you want/need to do it? Does it accumulate the messages and you have to “pop” or clear the stack? Do you need to “pop it like its hot”!?..LOL :laughing:

1 Like

LOL! Maaaaybe… :stuck_out_tongue:
Maybe I’ll do something for April fools or to announce someone’s birthday! :smiley:

Edit: Like Mine! It might go a little something like this: Today is your ERPSysAdmin’s birthday! Please feel free to shower her desk, very quietly and anonymously, with high-dollar VISA and Amazon gift cards to show your appreciation to her and ALL she does around this place.
Hmmm…that may be a little too wordy for the marquee. :thinking:

1 Like

LOL Thanks! Great ideas! Thank you so much for sharing! I’ll try this code out! Appreciate it! :slight_smile:

@ERPSysAdmin
Don’t use Panels[1] =) use the name because as soon as someone does this
2018-11-30_1832
Your [1] and [2] and [3] could be any of these.

1 Like

:rofl: Oh man… I started following this thread in hopes of learning a few new tricks (and I did - thanks @hkeric.wci) and it has quickly become the best thing I’ve read all week!

Since nobody else has gotten back to you on this, “pop” just means to remove the last added item from the stack. Think of it like a tower of Lego bricks. You “push” a new brick onto the top of the stack and then “pop” them off one at a time from the top down (LIFO) revealing the brick underneath. There’s a more thorough, yet not terribly technical, explanation of stacks here if you want to delve deeper: https://www.dotnetperls.com/stack

1 Like

If you don’t keep popping them, you will remain on the wrong Status. :slight_smile: Thats why when possible just use the PushDisposableStatusText with a using() block, but thats not always possible, if you want to update the status from within various methods then you use PushStatusText.

// Status Text: Ready
this.oTrans.PushStatusText("Cat.."); // Status Text: Cat...
this.oTrans.PushStatusText("Mouse.."); // Status Text: Mouse...
this.oTrans.PopStatus(); // Status Text: Cat...
this.oTrans.PopStatus(); // Status Text: Ready
1 Like

@jstephens: You could also use this to show progress, if you want to be in someones face.

FormFunctions.LoadSplash("Printing Labels...");
FormFunctions.CloseSplash(); // Later
2 Likes

That makes complete sense! And I actually ran into that issue. Thank you so much for showing me how to call the panels by name! :slight_smile:

Thank you @jstephens! That was really a great explanation of “popping” (I’m so afraid I’m going to misspell that word if ya know what I mean! No spellchecker is going to help you with that! LOL :poop:) that I will never forget, especially when you started talking about Legos! I totally understand Legos! :wink:

image

Edit: I just thought of a new song for “popping” in the context of Legos!
I push a block on and then I “pop” it off, singing AyyyO it’s LIFO! (snort laugh)

Ah! I get it now! Really cool! Thank you!!! You make this stuff seem so easy @hkeric.wci. I really appreciate your code examples (and comments!) to best understand how it works. Thank you ALL so much for your help! :slight_smile: