private void RegisterPlugin(Assembly assembly, Plugin plugin, ImageList imageList, bool bAddNodes) { // register the plugin Plugin.AddLoadedPlugin(assembly); Plugin.RegisterTypeHandlers(assembly); Plugin.RegisterAgentTypes(assembly); // register all the groups we need in the node explorer if (bAddNodes && imageList != null) { Plugin.RegisterNodeDesc(assembly, imageList.Images.Count); } else { Plugin.RegisterNodeDesc(assembly); } // add all file managers, exporters and AI types _fileManagers.AddRange(plugin.FileManagers); }
private void RegisterPlugin(Assembly assembly, Plugin plugin, object nodeList, bool bAddNodes) { // register the plugin Plugin.AddLoadedPlugin(assembly); Plugin.RegisterTypeHandlers(assembly); Plugin.RegisterAgentTypes(assembly); // register all the groups we need in the node explorer if (bAddNodes && nodeList is NodeTreeList) { NodeTreeList nodeTreeList = nodeList as NodeTreeList; List<Image> images = Plugin.RegisterNodeDesc(assembly, nodeTreeList.ImageList.Images.Count); foreach (Image image in images) { nodeTreeList.ImageList.Images.Add(image); } } else { Plugin.RegisterNodeDesc(assembly); } // add all file managers, exporters and AI types _fileManagers.AddRange(plugin.FileManagers); }
public static bool Parse(object parent, string paramName, string parStr, Plugin.SetValue setter) { throw new Exception(string.Format(Resources.ExceptionDesignerAttributeIllegalIntegerValue, parStr)); }
public static bool Parse(object parent, string paramName, string parStr, Plugin.SetValue setter) { char result; if (char.TryParse(parStr, out result)) { setter(result); return true; } else { throw new Exception(string.Format(Resources.ExceptionDesignerAttributeIllegalIntegerValue, parStr)); } }
public static bool Parse(object parent, string paramName, string parStr, Plugin.SetValue setter) { ulong result; if (ulong.TryParse(parStr, NumberStyles.Any, CultureInfo.InvariantCulture.NumberFormat, out result)) { setter(result); return true; } else { throw new Exception(string.Format(Resources.ExceptionDesignerAttributeIllegalIntegerValue, parStr)); } }
public static bool Parse(object parent, string paramName, string parStr, Plugin.SetValue setter) { if (!string.IsNullOrEmpty(parStr)) { bool bSet = false; if (parStr.Length >= 2) { if (parStr[0] == '\'' || parStr[0] == '\"') { string strTrimed = parStr.Substring(1, parStr.Length - 2); setter(strTrimed); bSet = true; } } if (!bSet) { setter(parStr); } } else { setter(parStr); } return true; }
public static bool Parse(object parent, string paramName, string parStr, Plugin.SetValue setter) { parStr = parStr.ToLowerInvariant(); if (parStr == "true") { setter(true); return true; } else if (parStr == "false") { setter(false); return true; } else { throw new Exception(string.Format(Resources.ExceptionDesignerAttributeIllegalBooleanValue, parStr)); } }