Example #1
0
        private void getNianLi(int dy)
        {
            double y = LunarHelper.year2Ayear(this.Caly_y.Text);

            if (y == -10000)
            {
                return;
            }
            y += dy;
            this.Caly_y.Text = LunarHelper.Ayear2year(y);
            if (y < -4712)
            {
                MessageBox.Show("到底了"); return;
            }

            this.StrToFile("<html><META http-equiv=Content-Type content='text/html; charset=utf-8'><body>\r\n" +
                           "<span style='font-family: 宋体; font-size: 12px; line-height: 18px;'>" +
                           lun.nianLiHTML(y) + "<p></p> \r\n" +
                           lun.nianLi2HTML(y) + "\r\n </span></small></body></html>", this.TempPath + "ls2.htm");

            this.webBrowserYearCal.Navigate(this.TempPath + "ls2.htm");
        }