Ejemplo n.º 1
0
        private void TSMI_PROFILE_Click(object sender, EventArgs e)
        {
            string profilePath = (sender as ToolStripDropDownItem).ToolTipText;

            if (File.Exists(profilePath))
            {
                XPathDocument     xpDoc      = new XPathDocument(profilePath);
                XPathNavigator    navProfile = xpDoc.CreateNavigator().SelectSingleNode("SRWE/Profile");
                XPathNodeIterator iterator   = navProfile.Select("Window");

                UncheckTreeViewNodes(TV_WINDOW_TREE.Nodes);

                while (iterator.MoveNext())
                {
                    UpdateWindowFromProfile(iterator.Current);
                }

                SRWE_Settings.AddRecentProfile(profilePath);                 // Brings profile to TOP of the Recent Profiles list.
            }
            else
            {
                SRWE_Settings.RemoveRecentProfile(profilePath);
            }

            RefreshRecentProfilesMenu();
        }