Have you tried setting the "ToolStripItem" property of the AutomaticUpdater control?
Hi,
How can I use DevExpress ribbon menu with the AutomaticUpdate?
Please give me a sample.
Thank you.
Have you tried setting the "ToolStripItem" property of the AutomaticUpdater control?
Yes, no items shown there.
The DevExpress ribbon menu doesn't inherit any of the default ribbon types of the .NET framework. But no fear, you can still integrate the AutomaticUpdater within your menus.
First add "using wyDay.Controls;" to the top of your code file.
Then, add a click event for that menu item. Add this to the event:
void yourMenuItem_Click(object sender, EventArgs e){ switch (automaticUpdater.UpdateStepOn) { case UpdateStepOn.Checking: case UpdateStepOn.DownloadingUpdate: case UpdateStepOn.ExtractingUpdate:
automaticUpdater.Cancel(); break;
case UpdateStepOn.UpdateReadyToInstall: case UpdateStepOn.UpdateAvailable: case UpdateStepOn.UpdateDownloaded:
automaticUpdater.InstallNow(); break;
default:
automaticUpdater.Visible = true; automaticUpdater.ForceCheckForUpdate(); break; }}
Now we'll be using several events of the AutomaticUpdater control to set the menu text. These are the events you'll be using:
void automaticUpdater_Cancelled(object sender, EventArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CheckForUpdatesMenu;}
void automaticUpdater_BeforeChecking(object sender, BeforeArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CancelCheckingMenu;}
void automaticUpdater_BeforeDownloading(object sender, BeforeArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CancelUpdatingMenu;}
void automaticUpdater_UpdateAvailable(object sender, EventArgs e){ yourMenuItem.Text = automaticUpdater.Translation.DownloadUpdateMenu;}
void automaticUpdater_ReadyToBeInstalled(object sender, EventArgs e){ yourMenuItem.Text = automaticUpdater.Translation.InstallUpdateMenu;}
void automaticUpdater_UpToDate(object sender, SuccessArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CheckForUpdatesMenu;}
void automaticUpdater_CheckingFailed(object sender, FailArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CheckForUpdatesMenu;}
void automaticUpdater_DownloadingOrExtractingFailed(object sender, FailArgs e){ yourMenuItem.Text = automaticUpdater.Translation.CheckForUpdatesMenu;}
Tell me if this helps.
It works.Thank you for your prompt support.
It's my pleasure. If you have any other questions, don't be afraid to ask.
remember to addusing wyDay.Controls;to your code.
works but when i hit cancel it stops but if i hit check again it doesn't check again !! ideas >? 😢
works but when i hit cancel it stops but if i hit check again it doesn't check again !! ideas >? 😢
To clarify !! the animation does not reappear when i hit cancel and then click check again. makes sense ?
What version of the AutomaticUpdater are you using? Did you use code similar to this forum post? Post what code you have that controls checking.
What version of the AutomaticUpdater are you using? Did you use code similar to this forum post? Post what code you have that controls checking.
I using the latest version !!!! and im using the exact same code above 🙁
Grab the main.cs !!!
Put a breakpoint at the "switch(...)" line. When you click the check for updates menu to recheck for updates, what is the "UpdateStepOn"? Also, what step did you cancel?
No sure whats going on !!!
http://i53.tinypic.com/2uig7xc.png
then tries to ForceCheckForUpdate!! Confused !!
No sure whats going on !!!
http://i53.tinypic.com/2uig7xc.png
then tries to ForceCheckForUpdate!! Confused !!
i tried to make a video !!! not sure of helps, not a experience programmmer
I'm not seeing anything wrong. You click check for updates and it checks for updates. When you click cancel it cancels. How is this different that what you expect?
I'm not seeing anything wrong. You click check for updates and it checks for updates. When you click cancel it cancels. How is this different that what you expect?
Check the behavior on the app itself !!! its like the animation visibility goes to true !!
http://www.youtube.com/watch?v=s657nN81VaM
Hope this explains better !
The behavior of the AutomaticUpdater has changed a bit since that code was posted a year ago. Just put Visible = true; before the ForceCheckForUpdate() line.
...... default:
automaticUpdater.Visible = true; automaticUpdater.ForceCheckForUpdate(); break;......
Sorry, I made a typo. It should be "automaticUpdater.Visible = true;" obviously.