Пример #1
0
        public static void MakeWelcomePage(string mailaddr, string filename)
        {
            Properties2 prop = Database.GetProperties("");
            string username = prop.GetProperty(mailaddr);
            HtmlWriter writer = new HtmlWriter(filename);
            writer.Title("Welcome to " + username + "'s page!");
            writer.Paragraph(username + "欢迎来到" + username + " 的主页。");
            writer.Paragraph("等着你的邮件哦!");
            writer.MailTo(mailaddr, username);
            writer.Close();

            Console.WriteLine(filename + " is created for " + mailaddr + " (" + username + ")");
        }
Пример #2
0
        internal static Properties2 GetProperties(string dbName)
        {
            Properties2 p = new Properties2();

            string[] strs = str.Split('\n');

            for (int i = 0; i < strs.Length; i++)
            {
                string[] temp = strs[i].Split('=');

                p.Add(new Property(temp[0], temp[1]));
            }
            return(p);
        }
Пример #3
0
        public static void MakeLinkPage(string filename)
        {
            Properties2 prop = Database.GetProperties("");

            HtmlWriter writer = new HtmlWriter(filename);
            writer.Title("Link page");    

            foreach (var item in prop)
            {
                writer.Link(item.Key, item.Value);
            }

            writer.Close();
            Console.WriteLine(filename + " is created.");
        }