Пример #1
0
        /// <summary>
        /// creates a dockable widget by classname
        ///
        /// uses parameters and delegates from the windows.config file
        /// </summary>
        /// <returns>
        /// The dockable widget.
        /// </returns>
        /// <param name='classname'>
        /// Classname.
        /// </param>
        public DockableWidget createDockableWidget(String classname)
        {
            XmlNode nd = Configuration.ConfigurationManager.getValue("windows.config", "//window[@class = '" + classname + "']");

            if (nd != null)
            {
                return(DockableWidget.CreateInstance(nd));
            }
            return(null);
        }
Пример #2
0
        //TODO nameing ... functionnames upper or lowercase ?
        public void createPopupWindow(String classname)
        {
            //String configfile = Configuration.ConfigurationManager.AppSettings["windows_config"];
            XmlNode nd = Configuration.ConfigurationManager.getValue("windows.config", "//window[@class = '" + classname + "']");

            if (nd != null)
            {
                DockableWidget wnd = DockableWidget.CreateInstance(nd);
                //addWidget(wnd);
                showAsPopupWindow(wnd);
            }
            else
            {
                //TODO exception or logging ??
                Console.WriteLine("Window " + classname + " has no entry in windows.config");
            }
        }
Пример #3
0
        private void CreateWindow(XmlNode node)
        {
            DockableWidget wnd = DockableWidget.CreateInstance(node);

            addWidget(wnd);
        }