private static ICommand GetCommand(string script, IYnote ynote) { try { return(YnoteScript.Get <ICommand>(ynote, script, "*.GetCommand")); } catch (Exception ex) { MessageBox.Show("There was an Error running the script : \r\n" + ex.Message, "YnoteScript Host", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(null); } }
/// <summary> /// Builds Context Menu /// </summary> private void BuildContextMenu() { string file = GlobalSettings.SettingsDir + "ContextMenu.ysr"; contextmenu.MenuItems.AddRange(YnoteScript.Get <MenuItem[]>(codebox, file, "*.BuildContextMenu")); }