Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FileOpen dialog on indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • koganam
    replied
    Originally posted by andrius View Post
    Dear Buddy,

    you need to add referrence to System.Design.dll file for this to complile. Depending on IDE you use this may vary... On Ninja editor just press right click and follow from there.

    -Andrius.
    That there is the problem if one tries to distribute the indicator. Are we then to instruct the user how to add a reference? I have not seen any "Help" topic on how to add a new reference, when one adds an indicator, without using the right-click configuration dialog box. Suggesting that we write installation code to directly edit Config.xml, will cause a heart attack in the NT developers, so we do not even need to go there.

    Leave a comment:


  • koganam
    replied
    Originally posted by andrius View Post
    What about second part of my question - any ideas how to change description entry for particular plot? Any ideas how to hide plot style and color select dialog at all?
    -Andrius.
    The name that shows for the plot, is set directly when you define the plot in the Initialize() method, thus:

    Code:
      
    Add(new Plot(Color.Green, "[B]This is the name that shows in the configuration GUI[/B]"));
    You hide the plot configuration dialog using this line in the Initialize() method:

    Code:
    PlotsConfigurable = false;

    Leave a comment:


  • ETFVoyageur
    replied
    What is the right way to do this?

    Originally posted by andrius View Post
    Dear Buddy,

    you need to add referrence to System.Design.dll file for this to complile. Depending on IDE you use this may vary... On Ninja editor just press right click and follow from there.

    -Andrius.
    For my future reference, what is the easy way to do that (in the NT editor)?
    • I presume you want just the DLL name so normal search rules are in effect.
    • Entering the name in the "References... | Add..." dialog forces a fully qualified pathname -- I saw no way to avoid that
    • I found a likely looking XML file (Config.xml) and edited that -- inserted between System.Core.dll and System.Drawing.dll, to preserve alphabetic order. (I can just see the NT support folks cringing ...)
    • That worked, but only after stopping and restarting NT

    I presume there is an easier way -- please enlighten me?

    --EV
    Last edited by ETFVoyageur; 01-03-2011, 09:05 PM.

    Leave a comment:


  • Ralph
    replied
    Depending on your coding skills it would be possible to add something like a WinForm to the property grid. Advantage still is that you are conform with the rules how NT sets up an indicator. Here is the link to an example illustrating how that could be reached:


    Regards
    Ralph

    Leave a comment:


  • ejzj1
    replied
    Basically you're right. But In a WinForm, one could structure the input parameters a little bit better.

    Leave a comment:


  • Ralph
    replied
    Do you really want to stop the NT tool? Don't know if that's a good idea. Why don't you use the property grid for input? It is guaranteed to provide its content before the indicator starts operating.
    If the property grid gets to confusing because you need to input a lot of date, then you could develop something with the expansion functionality of the grid (this little + - signs). Especially, if you have a lot of date with a repetitive structure you could use the property expansion quite effectively.

    Regards
    Ralph

    Leave a comment:


  • ejzj1
    replied
    I have a similar problem.

    I want to capture the input parameters for an indicator of a C # form. The call of the OnBarUpdate method should be avoided until the form is closed.

    my idea is:

    public class ParmsForm : Form
    public ParmsForm ()
    {
    this.Text = "C# - einfaches Form";
    this.Size = new Size(600, 400);

    AddContextMenuAndItems();

    addControls();

    }
    .... .... ....
    I call the modal form from inside the OnStartup method:
    protected override void OnStartUp()
    {
    ParmsForm parmsForm = new ParmsForm();
    parmsForm.ShowDialog();
    }
    The form is displayed. However, the OnBarUpdate method is called before the form is closed. My parameters are thus in the indicator is still not known.

    Does anyone provide any solution or idea?

    Leave a comment:


  • andrius
    replied
    Dear Buddy,

    you need to add referrence to System.Design.dll file for this to complile. Depending on IDE you use this may vary... On Ninja editor just press right click and follow from there.

    -Andrius.

    Leave a comment:


  • Buddy
    replied
    The reason I didn't think it would work in 6.5 is because
    // FileNameEditor

    //Does not seem to be valid here

    [Editor(typeof(System.Windows.Forms.Design.FileNameEditor),
    typeof(System.Drawing.Design.UITypeEditor))]


    Then I tried the same in NT7 and found the same thing

    Leave a comment:


  • andrius
    replied
    Dear Buddy,

    the same code works for both NT6.5 and NT7. basically you override System.Windows.Forms.Design.FileNameEditor with something bukkan wrote.

    What about second part of my question - any ideas how to change description entry for particular plot? Any ideas how to hide plot style and color select dialog at all?

    Thank you,
    -Andrius.

    Leave a comment:


  • Buddy
    replied
    How about an equivilant for NT6.5? This would be nice!

    Buddy

    Leave a comment:


  • bukkan
    replied
    ahh the pic made things clear. still its a c# thing and googling will help more rather than searching here.

    heres a sample code

    in the variable region
    Code:
    string open;
    in properties
    Code:
    [Description("")]
            [GridCategory("Parameters")]
            [Editor(typeof(System.Windows.Forms.Design.FileNameEditor),
              typeof(System.Drawing.Design.UITypeEditor))]
            public string Open
            {
                get{return open;}
                set{open = value;}
            }

    Leave a comment:


  • MXASJ
    replied
    For some reason I can't download that JPEG to look at what you are trying to achieve.

    Off the top of my head an enum with a switch statement, say, UserSound that calls the OpenFileDialog if selected should do the trick.

    You might need to watch how you Dispose of things, though.

    Leave a comment:


  • andrius
    replied
    Dear bukkan,

    I am aware about OpenFileDialog(); however I fail to understand how to fit it into Indicator's properties dialog under particular field. Please see screenshotted example what I am trying to achieve...

    Thank you,
    -Andrius.
    Attached Files

    Leave a comment:


  • bukkan
    replied
    what you are asking is standard C# queries. google a bit and you will get the answer. anyway heres a nt code.

    Code:
    using System.Windows.Forms;
    Code:
    protected override void OnStartUp()
            {
                
                OpenFileDialog file = new OpenFileDialog();
                file.ShowDialog();
                
                string path;
                path = file.FileName;
                MessageBox.Show(path);
                
            }

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by SalmaTrader, 07-07-2026, 10:26 PM
0 responses
29 views
0 likes
Last Post SalmaTrader  
Started by CarlTrading, 07-05-2026, 01:16 PM
0 responses
17 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 06-17-2026, 10:32 AM
0 responses
9 views
0 likes
Last Post CaptainJack  
Started by kinfxhk, 06-17-2026, 04:15 AM
0 responses
15 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 06-17-2026, 04:06 AM
0 responses
18 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X