Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1677

dockable form question

$
0
0

Hi, I am trying to learn how to create  addins in C# and so far I've been able to create a dockable form. The question I have is: how can I have only one instance? Because if I run the keyin command again it will create another form. I am learning C# in the same time so, maybe this is a simple thing that I am missing right now.

What I would like to achieve is, when keyin the commad, if the form exists(in case is minimized) to appear in normal window state on the screen; if it doesn't exists, just to create it. The code I am using is:

        public static void ShowMyForm(string unparsed)
        {
            pr = new MyForm();
            pr.NETDockable = true;
            Bentley.Windowing.WindowManager bwwm = Bentley.Windowing.WindowManager.GetForMicroStation();
            Bentley.Windowing.WindowContent bwwc = bwwm.DockPanel(pr, pr, pr.Text, Bentley.Windowing.DockLocation.Floating);
            bwwc.Show();
        }

Thank you and I appreciate any suggestion,

e.g.


Viewing all articles
Browse latest Browse all 1677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>