Esempio n. 1
0
        public void OnOK(object sender, EventArgs e)
        {
            // Call |Save| on each preferences panel...
            IEnumerator panels = mPanels.Values.GetEnumerator();

            while (panels.MoveNext())
            {
                PrefPanel currPanel = panels.Current as PrefPanel;
                currPanel.Save();
            }

            // ... then flush preferences to disk for safe keepin'.
            // XXX not just yet.
            // mPrefs.FlushUserPreferences();
        }
Esempio n. 2
0
        public void OnTreeSelect(Object sender, TreeViewEventArgs e)
        {
            TreeNode  selectedNode = e.Node;
            String    panelID      = mNodes[selectedNode.GetHashCode()] as String;
            PrefPanel newPanel     = mPanels[panelID] as PrefPanel;

            if (mCurrentPanel != null)
            {
                mCurrentPanel.Visible = false;
            }
            if (newPanel != null)
            {
                newPanel.Visible = true;
                mCurrentPanel    = newPanel;
            }
            else
            {
                if (selectedNode.FirstNode != null)
                {
                    TreeView treeview = sender as TreeView;
                    treeview.SelectedNode = selectedNode.FirstNode;
                }
            }
        }
Esempio n. 3
0
 public void OnTreeSelect(Object sender, TreeViewEventArgs e)
 {
     TreeNode selectedNode = e.Node;
       String panelID = mNodes[selectedNode.GetHashCode()] as String;
       PrefPanel newPanel = mPanels[panelID] as PrefPanel;
       if (mCurrentPanel != null)
     mCurrentPanel.Visible = false;
       if (newPanel != null) {
     newPanel.Visible = true;
     mCurrentPanel = newPanel;
       }
       else {
     if (selectedNode.FirstNode != null) {
       TreeView treeview = sender as TreeView;
       treeview.SelectedNode = selectedNode.FirstNode;
     }
       }
 }