Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Builds Context Menu
        /// </summary>
        private void BuildContextMenu()
        {
            string file = GlobalSettings.SettingsDir + "ContextMenu.ysr";

            contextmenu.MenuItems.AddRange(YnoteScript.Get <MenuItem[]>(codebox, file, "*.BuildContextMenu"));
        }