public object PropertyPage(object initObject) { if (initObject is IFeatureLayer) { IFeatureLayer layer = (IFeatureLayer)initObject; if (layer.FeatureClass == null) { return(null); } string appPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); Assembly uiAssembly = Assembly.LoadFrom(appPath + @"\gView.Carto.Rendering.UI.dll"); IPropertyPanel2 p = uiAssembly.CreateInstance("gView.Framework.Carto.Rendering.UI.PropertyForm_SimpleLabelRenderer") as IPropertyPanel2; if (p != null) { return(p.PropertyPanel(this, (IFeatureLayer)initObject)); } } return(null); }
public object PropertyPage(object initObject) { if (!(initObject is IFeatureLayer)) { return(null); } try { string appPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); Assembly uiAssembly = Assembly.LoadFrom(appPath + @"\gView.Carto.Rendering.UI.dll"); IPropertyPanel2 p = uiAssembly.CreateInstance("gView.Framework.Carto.Rendering.UI.PropertyForm_LabelGroupRenderer") as IPropertyPanel2; if (p != null) { return(p.PropertyPanel(this, (IFeatureLayer)initObject)); } } catch (Exception ex) { } return(null); }