Click here to Skip to main content
15,895,799 members
Articles / Programming Languages / C#

MagicWords: How to build a SlickRun clone in one hour

Rate me:
Please Sign up or sign in to vote.
4.76/5 (15 votes)
11 Feb 20076 min read 48K   892   44  
An improved command line utility inspired by SlickRun.
using System;
using System.Collections.Generic;
using System.Text;

namespace Serialcoder.MagicWords.TranslatorPlugin
{
	public class TranslatorPlugin : Interfaces.ITool
	{
		public TranslatorPlugin()
		{
			m_Alias = "translator";
			m_Hotkey = System.Windows.Forms.Shortcut.ShiftF3;
		}

		#region ITool Members

		string Serialcoder.MagicWords.Interfaces.ITool.Name
		{
			get { return "Translator plugin"; }
		}

		string Serialcoder.MagicWords.Interfaces.ITool.Description
		{
			get { return "This is a Google Translator wrapper"; }
		}

		string Serialcoder.MagicWords.Interfaces.ITool.Author
		{
			get { return "John Roland"; }
		}

		string Serialcoder.MagicWords.Interfaces.ITool.Version
		{
			get { return "1.0"; }
		}

		void Serialcoder.MagicWords.Interfaces.ITool.Initialize()
		{
			//
		}

		void Serialcoder.MagicWords.Interfaces.ITool.Execute(string[] args)
		{
			MainForm form = new MainForm();
			form.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			form.Select();
			form.Focus();
			form.ShowDialog();
		}

		System.Windows.Forms.Shortcut Serialcoder.MagicWords.Interfaces.ITool.HotKey
		{
			get
			{
				return m_Hotkey;
			}
			set
			{
				m_Hotkey = value;
			}
		}

		private string m_Alias;
		private System.Windows.Forms.Shortcut m_Hotkey;

		string Serialcoder.MagicWords.Interfaces.ITool.Alias
		{
			get
			{
				return m_Alias;
			}
			set
			{
				m_Alias = value;
			}
		}

		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions