Skip to content

Instantly share code, notes, and snippets.

@thegoldenmule
Created April 23, 2015 16:18
Show Gist options
  • Save thegoldenmule/04d6ed72e14cff8133e4 to your computer and use it in GitHub Desktop.
Save thegoldenmule/04d6ed72e14cff8133e4 to your computer and use it in GitHub Desktop.
Random Signature Generator!
using System;
using System.Collections.Generic;
using Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
namespace RandomSignature
{
public partial class ThisAddIn
{
Inspectors inspectors;
private static readonly string[] _TitleModifiers =
{
"Senior",
"Chief",
"Lead",
"Principal",
"Architect",
"Master",
"Magical",
"Resident"
};
private static readonly string[] _Nouns =
{
"Code",
"Bit",
"Pixel",
"Vector",
"Differential",
"One-form",
"Matrix",
"Tensor",
"Binary",
"Octal",
"Hexidecimal",
"Refactor",
"Engine",
"n00b",
"Fun",
"Shader",
"Automation",
"Automaton",
"Machine Learning",
"Keyboard",
"Sub-System",
"Super-System",
"Mainframe",
"Super-Cluster",
"Beowulf Cluster"
};
private static readonly string[] _Titles =
{
"Rockstar",
"Pusher",
"Wizard",
"Evangelist",
"Guru",
"Slayer",
"Pwner",
"Architecter",
"Remodeler",
"Refactorer",
"King and Tyrant",
"Brogrammer",
"Fellow",
"Analyzer",
"Scientist",
"Hound",
"Specialist",
"Fabricator"
};
private void ThisAddIn_Startup(object sender, EventArgs e)
{
inspectors = Application.Inspectors;
inspectors.NewInspector += Inspectors_NewInspector;
}
private void ThisAddIn_Shutdown(object sender, EventArgs e)
{
}
private void Inspectors_NewInspector(Inspector Inspector)
{
MailItem mailItem = Inspector.CurrentItem as MailItem;
if (mailItem != null)
{
if (mailItem.EntryID == null)
{
mailItem.Body = string.Format(@"
{0}
// AUTO-GENERATED TITLE, DO NOT EDIT
{1}",
"Benjamin,",//Properties.Settings.Default.Username,
GenerateSignature());
}
}
}
private static string GenerateSignature()
{
var signaturePieces = new List<string>();
var random = new Random();
signaturePieces.Add(_TitleModifiers[random.Next(0, _TitleModifiers.Length - 1)]);
signaturePieces.Add(_Nouns[random.Next(0, _Nouns.Length - 1)]);
signaturePieces.Add(_Titles[random.Next(0, _Titles.Length - 1)]);
return string.Join(" ", signaturePieces);
}
#region VSTO generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
{
Startup += ThisAddIn_Startup;
Shutdown += ThisAddIn_Shutdown;
}
#endregion
}
}
@nemoj463
Copy link

Hello. Do you want to have a cool signature? You should use this signature generator service, which will help you create a customised signature in a few seconds that will meet all your needs and wishes. In addition, by visiting this service you will find detailed instructions on how to use this generator, which will be very useful.

@GlebKozyakow
Copy link

I decided to try out 22Bet Cameroon after hearing great things from my friends, and I wasn't disappointed. The registration process was straightforward, and I was pleasantly surprised by how quickly I could start betting. The welcome get rewards was a fantastic boost, doubling my first deposit and giving me extra funds to explore the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment