public KeyInputManager(ClientCore parent) { this._keyBuffer = new LinkedList<Keys>(); this.Parent = parent; this.Keybinds = new Dictionary<Tuple<String, Keys[]>, Tuple<IEvaluatable, IDictionary<String, String>>>(); this.ResetKeyInput(); }
public static void Initialize(IDictionary<String, Object> args) { _host = (ClientCore) args["host"]; AddFunctions(); AddKeybinds(); AddMenus(); }
public MainForm(ClientCore client) { this.Client = client; this.MinibufferStack = new Stack<MinibufferLevel>(); this.MenuItems = new MenuItemCollection(this); InitializeComponent(); Initialize(); }
public SplashForm(ClientCore client) { this.Client = client; InitializeComponent(); }
private static void Main(String[] args) { _parameters = ConfigurationManager.AppSettings.AllKeys .ToDictionary(k => k, k => ConfigurationManager.AppSettings[k]); foreach (Match match in args .TakeWhile(s => s != "--") .Select(s => Regex.Match(s, "(-(?<key>[a-zA-Z0-9_]*)(=(?<value>(\"[^\"]*\")|('[^']*')|(.*)))?)*")) .Where(m => m.Success) ) { _parameters[match.Groups["key"].Value] = match.Groups["value"].Success ? match.Groups["value"].Value : "true"; } if (AppDomain.CurrentDomain.IsDefaultAppDomain()) { Environment.CurrentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); AppDomain domain = AppDomain.CreateDomain( "MetaTweetMint.exe:run", AppDomain.CurrentDomain.Evidence, new AppDomainSetup() { ApplicationBase = Path.GetFullPath(_parameters["init_base"]), PrivateBinPath = _parameters["init_probe"], PrivateBinPathProbe = "true", ApplicationName = "MetaTweetMint", LoaderOptimization = LoaderOptimization.MultiDomainHost, } ); domain.ExecuteAssembly(Assembly.GetExecutingAssembly().Location, args); return; } String cultureString; Thread.CurrentThread.CurrentCulture = _parameters.ContainsKey("culture") ? String.IsNullOrEmpty(cultureString = _parameters["culture"]) ? Thread.CurrentThread.CurrentCulture : cultureString == "invaliant" ? CultureInfo.InvariantCulture : CultureInfo.GetCultureInfo(cultureString) : CultureInfo.InvariantCulture; Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; Application.ThreadException += (sender, e) => new ThreadExceptionDialog(e.Exception) .ShowDialog(); using (ClientCore client = new ClientCore()) { client.Initialize(_parameters); client.Run(); } }