Exemple #1
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            ArrayList SubData = new ArrayList();

            SubData.Add(type);
            SubData.Add(program);

            profile.setButtonData(button, SubData);

            Close();
        }
Exemple #2
0
        private void loadConfig(string activeProfileFilePath)
        {
            try
            {
                //Load the reader with the XML file.
                reader = new XmlTextReader(activeProfileFilePath);
                XmlDocument xml = new XmlDocument();
                xml.Load(activeProfileFilePath);
                string title_name = xml.SelectSingleNode("Profile/Title").InnerText;
                bool   isMinimize = bool.Parse(xml.SelectSingleNode("Profile/Minimize").InnerText);
                selectProfile.Text = title_name;
                profile            = new profile(title_name, isMinimize);

                if (isMinimize)
                {
                    startMinimize.Checked = true;
                }
                else
                {
                    startMinimize.Checked = false;
                }

                for (int i = 1; i <= 9; i++)
                {
                    ArrayList SubData = new ArrayList();

                    string bottomKey     = "Button" + i;
                    string getXMLType    = xml.SelectSingleNode("Profile/" + bottomKey + "/Type").InnerText;
                    string getXMLProgram = xml.SelectSingleNode("Profile/" + bottomKey + "/Program").InnerText;

                    SubData.Add(getXMLType);
                    SubData.Add(getXMLProgram);

                    profile.setButtonData(bottomKey, SubData);
                }
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }