Skip to content

Commit

Permalink
Added admin, user, and all modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
agreenbhm committed May 20, 2016
1 parent 757a104 commit 938a323
Show file tree
Hide file tree
Showing 7 changed files with 439 additions and 179 deletions.
56 changes: 34 additions & 22 deletions OutlookAddIn1/RibbonMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 40 additions & 1 deletion OutlookAddIn1/RibbonMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,39 @@
using Office = Microsoft.Office.Core;
using System.Windows.Forms;
using System.Drawing;
using Microsoft.Win32;

namespace OutlookAddIn1
{
public partial class RibbonMain
{
private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
public void hideButtons(int installType)
{
if(installType == 1)
{
try
{
this.newTicketButton.Visible = false;
}
catch { }
}
else if(installType == 2)
{
try
{
this.button2.Visible = false;
this.assignButton.Visible = false;
this.closeButton.Visible = false;
this.closeTicketResponse.Visible = false;
this.button1.Visible = false;
}
catch { }
}
}

private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
{

}

private void button1_Click_1(object sender, RibbonControlEventArgs e)
Expand Down Expand Up @@ -108,5 +133,19 @@ private void assignButton_Click(object sender, RibbonControlEventArgs e)
}

}

private void newTicketButton_Click(object sender, RibbonControlEventArgs e)
{
try {
Outlook.MailItem mailItem = (Outlook.MailItem)
Globals.ThisAddIn.Application.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.To = Properties.Settings.Default.HelpdeskEmail;
mailItem.Display();
}
catch
{

}
}
}
}
Loading

0 comments on commit 938a323

Please sign in to comment.