コード例 #1
0
ファイル: MainApp.cs プロジェクト: shaylami/Synagogue
        /// <summary>
        /// change the background according to the day and the holiday
        /// </summary>

        /********************************************************************************************/
        /// <summary>
        /// read the parnas 1 name from XML
        /// </summary>
        private void readParansXML()
        {
            XmlDocument xmlDoc = new XmlDocument();

            if (!File.Exists("parnas.xml"))
            {
                Parnas p = new Parnas();
                p.parnas();
            }
            else
            {
                xmlDoc.Load("parnas.xml");
                XmlNodeList nodeList = xmlDoc.DocumentElement.SelectNodes("/Table/Parnas");
                string      Parnas_id1 = "", prName1 = "";
                foreach (XmlNode node in nodeList)
                {
                    Parnas_id1 = node.SelectSingleNode("Parnas_id").InnerText;
                    prName1    = node.SelectSingleNode("Parnas_name").InnerText;
                    if (Parnas_id1 == "1")
                    {
                        lblParans1.Text = "\u25E6 " + prName1;
                    }
                    if (Parnas_id1 == "2")
                    {
                        lblParans2.Text = "\u25E6 " + prName1;
                    }
                    if (Parnas_id1 == "3")
                    {
                        lblParans3.Text = "\u25E6 " + prName1;
                    }
                    if (Parnas_id1 == "4")
                    {
                        lblParans4.Text = "\u25E6 " + prName1;
                    }
                }
            }
        }
コード例 #2
0
        private void btnWeekParans_Click(object sender, EventArgs e)
        {
            Parnas p = new Parnas();

            p.Show();
        }