Jump to content

Set default parameter variable?


MadJik
 Share

Recommended Posts

(From this discussion:http://paintdotnet.12.forumer.com/viewtopic.php?p=52031#52031)

I don't know how to set the values for standard 2/3 amounts templates

based on the picture size in this code:

    public override EffectConfigDialog CreateConfigDialog()
   {
     ThreeAmountsConfigDialog dialog = new ThreeAmountsConfigDialog();
     dialog.Amount1Label = Strings.LightRays_Amount1_Name;
     dialog.Amount1Minimum = 4;
     dialog.Amount1Maximum = +200;
     dialog.Amount1Default = 50;

     dialog.Amount2Label = Strings.LightRays_Amount2_Name;
     dialog.Amount2Minimum = -600;
     dialog.Amount2Maximum = +600;
     dialog.Amount2Default = 0;

     dialog.Amount3Label = Strings.LightRays_Amount3_Name;
     dialog.Amount3Minimum = -600;
     dialog.Amount3Maximum = +600;
     dialog.Amount3Default = 0;

     dialog.Text = Strings.LightRays_Name;

     return dialog;
   }

I would like to have something like

    public override EffectConfigDialog CreateConfigDialog()
   {
     ThreeAmountsConfigDialog dialog = new ThreeAmountsConfigDialog();
     dialog.Amount1Label = Strings.LightRays_Amount1_Name;
     dialog.Amount1Minimum = 4;
     dialog.Amount1Maximum = +200;
     dialog.Amount1Default = 50;

     dialog.Amount2Label = Strings.LightRays_Amount2_Name;
     dialog.Amount2Minimum = selection.Left;
     dialog.Amount2Maximum = selection.Right;
     dialog.Amount2Default = selection.Left;

     dialog.Amount3Label = Strings.LightRays_Amount3_Name;
     dialog.Amount3Minimum = selection.Top;
     dialog.Amount3Maximum = selection.Bottom;
     dialog.Amount3Default = selection.Top;

     dialog.Text = Strings.LightRays_Name;

     return dialog;
   }

TY

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...