Ejemplo n.º 1
0
        private void initTemplateBundle()
        {
            // 1
            TemplateBundle tpl1 = new TemplateBundle();

            tpl1.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了新日志 {*blog*}\" }]";
            db.insert(tpl1);

            // 2
            TemplateBundle tt = new TemplateBundle();

            tt.insert();
            tt.delete();

            // 3
            TemplateBundle tpl3 = new TemplateBundle();

            tpl3.ShortStoryTemplatesStr = "[{ Title: \"{*actor*} 上传了{*photoCount*}张 新照片。\", Body: \"{*photos*}\"  }]";
            db.insert(tpl3);

            // 4
            tt.insert();
            tt.delete();


            // 5
            TemplateBundle tpl5 = new TemplateBundle();

            tpl5.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了论坛主题 {*topic*}\" }]";
            db.insert(tpl5);

            // 6
            TemplateBundle tpl6 = new TemplateBundle();

            tpl6.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了论坛帖子 {*post*}\" }]";
            db.insert(tpl6);

            // 7
            tt.insert();
            tt.delete();

            // 8
            tt.insert();
            tt.delete();


            TemplateBundle tpl9 = new TemplateBundle();

            tpl9.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 和 {*friend*} 成为了好友\" }]";
            db.insert(tpl9);
        }
Ejemplo n.º 2
0
        public void InitTemplateBundle()
        {
            // 1
            TemplateBundle tpl1 = new TemplateBundle();
            tpl1.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了新日志 {*blog*}\" }]";
            db.insert( tpl1 );

            // 2
            TemplateBundle tt = new TemplateBundle();
            tt.insert();
            tt.delete();

            // 3
            TemplateBundle tpl3 = new TemplateBundle();
            tpl3.ShortStoryTemplatesStr = "[{ Title: \"{*actor*} 上传了{*photoCount*}张 新照片。\", Body: \"{*photos*}\"  }]";
            db.insert( tpl3 );

            // 4
            tt.insert();
            tt.delete();

            // 5
            TemplateBundle tpl5 = new TemplateBundle();
            tpl5.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了论坛主题 {*topic*}\" }]";
            db.insert( tpl5 );

            // 6
            TemplateBundle tpl6 = new TemplateBundle();
            tpl6.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 发表了论坛帖子 {*post*}\" }]";
            db.insert( tpl6 );

            // 7
            tt.insert();
            tt.delete();

            // 8
            tt.insert();
            tt.delete();

            TemplateBundle tpl9 = new TemplateBundle();
            tpl9.OneLineStoryTemplatesStr = "[{ Title: \"{*actor*} 和 {*friend*} 成为了好友\" }]";
            db.insert( tpl9 );
        }