C# 更改customtask上按钮的可见性
实际上,我的Outlook加载项上有一个自定义任务窗格,它运行得非常好。我的问题是,我想更改customTaskPane上显示的一个按钮的可见性,但我不知道如何在我的thisAddin中执行此操作 我尝试这样做的代码部分。也许这更容易理解C# 更改customtask上按钮的可见性,c#,visual-studio-2010,outlook-addin,C#,Visual Studio 2010,Outlook Addin,实际上,我的Outlook加载项上有一个自定义任务窗格,它运行得非常好。我的问题是,我想更改customTaskPane上显示的一个按钮的可见性,但我不知道如何在我的thisAddin中执行此操作 我尝试这样做的代码部分。也许这更容易理解 if (person.Role == 1) { //Person is SysAdmin no Button display
if (person.Role == 1)
{
//Person is SysAdmin no Button display
//How could I change state of my button ??
}
else if (person.Role == 2)
{
//Person is ServiceAdmin display refused button
}
else if (person.Role == 3)
{
//Person is ServiceAgent display refused and considered button when mail is
//not considered and respond button where mail is considered
}
我解决了我的问题
如果有人有同样的问题,我会提出解决方案
我将代码放在userControl.cs而不是thisAddin中,并保存currentInformation上的person.Role信息以在userControl.cs上检索它