I am writting a new plug in for Paint.Net. I built new plugin like Rotate / Zoom plugin.
I have a problem that I want to display some value after executing from Render() function, but I set value to the properties and I get no changed value.
Example:
I have a variable in MyPluginEffectConfigToken.cs
...
private string resultPop;
public string ResultPop
{
get
{
return resultPop;
}
set
{
this.resultPop = value;
}
}
...
I set value for this variable in the Render() function in the MyPluginEffect.cs
...
public unsafe void Render(EffectConfigToken properties, RenderArgs dstArgs, RenderArgs srcArgs, PdnRegion roi)
{
RetinexEffectConfigToken token = (RetinexEffectConfigToken)properties;
token.ResultPop = "new";
...
}
In the MyPluginEffectConfigDialog.cs, I set value for the variable of token in the InitialInitToken() Function
...
protected override void InitialInitToken()
{
theEffectToken = new RetinexEffectConfigToken();
((MyPluginEffectConfigToken)theEffectToken).ResultPop = "old";
}
...
And, I have try many ways but, in the Dialog, I cannot get value of ((MyPluginEffectConfigToken)theEffectToken).ResultPop is "new" value. It always "old" value.
Please help me to solve this problem.
At the moment, I have a solution that the new value in the Render() function is written to a temp file. After that, in the dialog, the value will be gotten from that file. But, I think it is not good.