G
Guest
I have the following class defined:
[DesignTimeVisible(false),
ToolboxItem(false),
Designer("Agrovision.Data.Design.CommandDesigner, Agrovision.Data.Design,
Version=3.0.3.0, Culture=neutral, PublicKeyToken=27bbda75f3eecde7",
typeof(IDesigner))]
public class CommandClass: Component
{
private string FCommandText;
private string FConnectionName;
private string FTableName;
[DefaultValue(null),
Editor("Agrovision.Data.Design.CommandTextEditor,
Agrovision.Data.Design, Version=3.0.3.0, Culture=neutral,
PublicKeyToken=27bbda75f3eecde7", typeof(UITypeEditor))]
public string CommandText
{
get
{
return FCommandText;
}
set
{
if (FCommandText != value)
{
if (value == null || value.Trim() == String.Empty)
FCommandText = null;
else
FCommandText = value;
}
}
}
[DefaultValue(null),
Editor("Agrovision.Data.Design.ConnectionNameEditor,
Agrovision.Data.Design, Version=3.0.3.0, Culture=neutral,
PublicKeyToken=27bbda75f3eecde7", typeof(UITypeEditor))]
public string ConnectionName
{
get
{
return FConnectionName;
}
set
{
if (FConnectionName != value)
{
if (value == null || value.Trim() == String.Empty)
FConnectionName = null;
else
FConnectionName = value;
}
}
}
[DefaultValue(null)]
public string TableName
{
get
{
return FTableName;
}
set
{
if (FTableName != value)
{
//Check is FTableName is unique
if (value == null || value.Trim() == String.Empty)
FTableName = null;
else
{
FTableName = value;
}
}
}
}
}
When I place this component on a form which has the localizeble property set
to true, the value of the CommandText property is saved to the resx file,
while the values of the ConnectionName and TableName properties are saved in
the Designer.cs file.
What's the reason for this behaviour and how can I prevent that the value of
the CommandText is saved in the resx, because it's not localizable, ofcours.
[DesignTimeVisible(false),
ToolboxItem(false),
Designer("Agrovision.Data.Design.CommandDesigner, Agrovision.Data.Design,
Version=3.0.3.0, Culture=neutral, PublicKeyToken=27bbda75f3eecde7",
typeof(IDesigner))]
public class CommandClass: Component
{
private string FCommandText;
private string FConnectionName;
private string FTableName;
[DefaultValue(null),
Editor("Agrovision.Data.Design.CommandTextEditor,
Agrovision.Data.Design, Version=3.0.3.0, Culture=neutral,
PublicKeyToken=27bbda75f3eecde7", typeof(UITypeEditor))]
public string CommandText
{
get
{
return FCommandText;
}
set
{
if (FCommandText != value)
{
if (value == null || value.Trim() == String.Empty)
FCommandText = null;
else
FCommandText = value;
}
}
}
[DefaultValue(null),
Editor("Agrovision.Data.Design.ConnectionNameEditor,
Agrovision.Data.Design, Version=3.0.3.0, Culture=neutral,
PublicKeyToken=27bbda75f3eecde7", typeof(UITypeEditor))]
public string ConnectionName
{
get
{
return FConnectionName;
}
set
{
if (FConnectionName != value)
{
if (value == null || value.Trim() == String.Empty)
FConnectionName = null;
else
FConnectionName = value;
}
}
}
[DefaultValue(null)]
public string TableName
{
get
{
return FTableName;
}
set
{
if (FTableName != value)
{
//Check is FTableName is unique
if (value == null || value.Trim() == String.Empty)
FTableName = null;
else
{
FTableName = value;
}
}
}
}
}
When I place this component on a form which has the localizeble property set
to true, the value of the CommandText property is saved to the resx file,
while the values of the ConnectionName and TableName properties are saved in
the Designer.cs file.
What's the reason for this behaviour and how can I prevent that the value of
the CommandText is saved in the resx, because it's not localizable, ofcours.