public GimpParam(PDBArgType type, object value) : this() { _param.type = type; switch (type) { case PDBArgType.Int32: _param.data.d_int32 = (Int32)value; break; case PDBArgType.Float: _param.data.d_float = (double)value; break; case PDBArgType.String: _param.data.d_string = Marshal.StringToHGlobalAuto((string)value); break; case PDBArgType.Drawable: _param.data.d_drawable = (value as Drawable).ID; break; case PDBArgType.Image: _param.data.d_image = (value as Image).ID; break; case PDBArgType.Status: _param.data.d_status = (PDBStatusType)value; break; default: Console.WriteLine("GetGimpParam: couldn't create"); break; } }
public GimpParam(PDBArgType type, object value) : this() { _param.type = type; switch (type) { case PDBArgType.Int32: _param.data.d_int32 = (Int32) value; break; case PDBArgType.Float: _param.data.d_float = (double) value; break; case PDBArgType.String: _param.data.d_string = Marshal.StringToHGlobalAuto((string) value); break; case PDBArgType.Drawable: _param.data.d_drawable = (value as Drawable).ID; break; case PDBArgType.Image: _param.data.d_image = (value as Image).ID; break; case PDBArgType.Status: _param.data.d_status = (PDBStatusType) value; break; default: Console.WriteLine("GetGimpParam: couldn't create"); break; } }