|
Thad Smith
Guest
|
We just picked up the package and our add-in needs to access data that is secured using a different set of credentials. I added a Property Page and it is saving/reading the settings, but how do I gain access to them in a Form.
And yes, I am new to this add-in world.
Thanks for any help/direction. |
|
Posted 02 May, 2008 16:39:40
|
|
Top
|
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Thad.
What the Form do you mean? Please describe the issue in more detail. |
|
Posted 03 May, 2008 08:24:12
|
|
Top
|
|
Thad Smith
Guest
|
What I have is a Add-in Express Form that is attached below the outlook todo pane. It has some controls on it to display information. In order to know what information to retrieve, I have to connect to a webservice. The webservice and credentials are set on a Property Page under Tools>Options that I setup. The Property Page seems to save and retrieve the information for me. What I am needing, is the way to retrieve these settings from where they are stored. |
|
Posted 03 May, 2008 17:19:37
|
|
Top
|
|
Fedor Shihantsov
Guest
|
Hi Thad,
You can move the code, which retrieves settings, to the add-in module.
Then use the ADXOlForm.AddinModule property to access this code.
|
|
Posted 05 May, 2008 12:15:48
|
|
Top
|
|
Thad Smith
Guest
|
Is there example somewhere of how to pull this information from the AddinModule. I looked at the object and do see how to get that information. Also, I do not know the ID that is being used to store my information. All I have is are text boxes on the property page and I set the dirty and call OnStatusChange().
Sorry if I am not being clear. |
|
Posted 05 May, 2008 14:00:18
|
|
Top
|
|
Thad Smith
Guest
|
I am going to restate what I am looking for in hope that is will be more clear. I have a ADXOlPropertyPage that saves a TextBox Value to some store location. I would like to get that TextBox Value out of its saved store for use in my Addin.
Thanks. Less than a week of use and its already saved a ton of time. |
|
Posted 06 May, 2008 17:08:36
|
|
Top
|
|
Fedor Shihantsov
Guest
|
Thad,
See example:
<The AddinModule code>
public class AddinModule : AddinExpress.MSO.ADXAddinModule
{
...
public void SaveDataToRegistry(string Data)
{
...
}
public string GetDataFromRegistry()
{
...
}
...
}
</the AddinModule code>
<save data from ADXOlPropertyPage>
public class PropertyPage1 : AddinExpress.MSO.ADXOlPropertyPage
{
...
private void PropertyPage1_Apply(object sender, EventArgs e)
{
(AddinExpress.MSO.ADXAddinModule.CurrentInstance as OutlookPropertyPage.AddinModule).SaveDataToRegistry(textBox1.Text);
}
...
}
</save data from ADXOlPropertyPage>
<load data to ADXOlForm>
public class ADXOlForm1 : AddinExpress.OL.ADXOlForm
{
...
private void ADXOlForm1_Load(object sender, EventArgs e)
{
textBox1.Text = (AddinExpress.MSO.ADXAddinModule.CurrentInstance as OutlookPropertyPage.AddinModule).GetDataFromRegistry();
}
...
}
</load data to ADXOlForm>
|
|
Posted 07 May, 2008 03:53:54
|
|
Top
|
|