We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Loading toolbar states, taking long time

Thread ID:

Created:

Updated:

Platform:

Replies:

78346 Dec 10,2008 12:09 AM Dec 12,2008 04:43 AM Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On December 10, 2008 12:09 AM

Hi,

Previously with syncfusion version 5.1.1.47, I used SaveBarState() and LoadBarState() methods to save into database and load from the database the toolbar states.
Here is the code snippet I have used:

private void SaveToolbarState()
{
MemoryStream memoryStream = new MemoryStream();

// save the customized data into the stream
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.SaveBarCustomization(serializer);
mainFrameBarManager.SaveBarState(serializer); // here I am getting Object refference not set to an instance exception.
serializer.PersistNow();
}

private void LoadToolbarState()
{

// get the byte array from backend

MemoryStream memoryStream = new MemoryStream(buff, 0, buff.Length);
memoryStream.Seek(0, SeekOrigin.Begin);

AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memoryStream);
mainFrameBarManager.LoadBarCustomization(serializer);
mainFrameBarManager.LoadBarState(serializer);
}


Now I upgraded into syncfusion version 6.4.0.15. After upgrading, the following problems has raised.

1) In SaveToolbarState() method, at this line mainFrameBarManager.SaveBarState(serializer) I am getting "Object refference not set to an instance" exception.

Why this exception has raised?

2) If I use another approach to save toolbar states into XML file and load from XML file, as attached file
(or)
to save toolbar states into windows regestry load from windows registry, as attached file.
If I run my application more than 6 or more times it is taking long time to load toolbar states.

Why it is taking long time to load toolbar states?
How can I reduce the time to load toolbar states?

Please run attached samples, you will understood clearly.

Repeat it more than 10 times, each time your will find it will increate the time to load toolbar states.

Thanks & Regards
-Kishan



ToolBarStates_cdd03c12.zip

Hemaladha K [Syncfusion]
Replied On December 11, 2008 07:06 AM

Hi Kishan,

Thank you for your interest in Syncfusion Products.

1. "Object reference not set to an instance" exception throws in SaveToolBarState() method.

I am afraid that I was not able to reproduce the reported issue, please refer to the below sample which I have tested the issue.
http://websamples.syncfusion.com/samples/Tools.Windows/F78346/Tools_WF_SaveState.zip

2. Form takes long time to load when load the toolbar state.

We suspect this issue to be a defect and we have forwarded this to our development team for more analysis. We will get back to you on 15th December, 2008 with more details.

Please let me know if any concerns.

Regards,
Hema


Administrator [Syncfusion]
Replied On December 11, 2008 07:53 AM

Hi Hema,

Thanks for reply.
For the first point, I already kept that code in try, catch block. So that your not able to reproduce the exception.

Please run attached .cs file you will get exception.

Please help me, how to avoid that exception?

Thanks
-Kishan



Tools_WF_SaveState_b3237560.zip

Hemaladha K [Syncfusion]
Replied On December 12, 2008 04:43 AM

Hi Kishan,

Thank you for your update.

Please followup the incident 52074 for more details regarding this issue.

Please let me know if any concerns.

Regards,
Hema


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;