Exemple #1
0
		public override object EditValue(
			ITypeDescriptorContext context,
			IServiceProvider       provider,
			object                 value)
		{
			// load the VSDesign assembly
			Assembly assemDesign =
				IngresDataAdapterToolboxItem.LoadDesignAssembly();
			if (assemDesign == null)
				return null;

			// call the counterpart method in the VSDesign assembly.
			Object[] parms;
			parms    = new Object[3];
			parms[0] = context;
			parms[1] = provider;
			parms[2] = value;

			Type t = assemDesign.GetType(
				"Ingres.Client.Design.ConnectionStringUITypeEditor");
			if (t == null)
				return null;
			object o = Activator.CreateInstance(t);
			MethodInfo mi = t.GetMethod("EditIngresValue");
			if (mi == null)
				return null;
			return mi.Invoke(o, parms);
		}
Exemple #2
0
        CreateComponentsCore(System.ComponentModel.Design.IDesignerHost host)
        {
            Assembly assemDesign =
                IngresDataAdapterToolboxItem.LoadDesignAssembly();

            if (assemDesign == null)
            {
                return(null);
            }

            // call the counterpart method in the VSDesign assembly.
            Object[] parms = new Object[1];
            parms[0] = host;

            Type t = assemDesign.GetType(
                "Ingres.Client.Design.IngresDataAdapterToolboxItem");

            if (t == null)
            {
                return(null);
            }
            object     o  = Activator.CreateInstance(t);
            MethodInfo mi = t.GetMethod("CreateIngresComponents");

            if (mi == null)
            {
                return(null);
            }
            return(mi.Invoke(o, parms) as IComponent[]);
        }          // CreateComponentsCore
Exemple #3
0
        // Event handling method for the "Generate DataSet..." verb
        private void OnGenerate(object sender, EventArgs e)
        {
            Assembly assemDesign =
                IngresDataAdapterToolboxItem.LoadDesignAssembly();

            if (assemDesign == null)
            {
                return;
            }

            // call the OnGenerate method item in the VSDesign assembly.
            Object[] parms = new Object[3];
            parms[0] = this.Component;
            parms[1] = sender;
            parms[2] = e;

            Type t = assemDesign.GetType(
                "Ingres.Client.Design.GenDataSetDesigner");

            if (t == null)
            {
                return;
            }
            object     o  = Activator.CreateInstance(t);
            MethodInfo mi = t.GetMethod("OnGenerateIngresDataSet");

            if (mi == null)
            {
                return;
            }
            mi.Invoke(o, parms);
        }  // OnGenerate
Exemple #4
0
        }          // GetDesignAssembly

        internal static Assembly LoadDesignAssembly()
        {
            string designAssembly =
                IngresDataAdapterToolboxItem.GetDesignAssembly();
            Assembly assemDesign = Assembly.Load(designAssembly);

            return(assemDesign);
        }