예제 #1
0
        private void RenderDialog(DialogResourceData d)
        {
#if NativeDialogs
            RenderDialogNative(d);
#else
            _form = new MenuDialogHelperForm();
            _form.LoadDialog(d.Dialog);

            _form.Show(this);
#endif

            /////////////////////

            __itemsTree.BeginUpdate();
            __itemsTree.Nodes.Clear();

            var root = new TreeNode("Dialog - \"" + d.Dialog.Text + "\"");
            __itemsTree.Nodes.Add(root);

            foreach (var c in d.Dialog.Controls)
            {
                var n = new TreeNode(c.ToString());
                root.Nodes.Add(n);
            }

            root.ExpandAll();

            __itemsTree.EndUpdate();
        }
예제 #2
0
        private void RenderMenu(MenuResourceData m)
        {
            if (_form == null)
            {
                _form = new MenuDialogHelperForm();
            }
            _form.LoadMenu(m.Menu);

            if (!_form.Visible)
            {
                _form.Show(this);
            }

            //////////////////////////////////
            // Populate tree view

            __itemsTree.Nodes.Clear();

            PopulateMenuTreeView(m.Menu.Root, __itemsTree.Nodes);

            __itemsTree.ExpandAll();
        }