Custom work flow
http://runjs.cn/detail/99epj1t2
http://www.cqroad.cn/
https://jsplumbtoolkit.com/demo/flowchart/dom.html
正则表达式的用法
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
namespace ConvertHtml
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void buttonConvert_Click(object sender, EventArgs e)
{
ConvertFiles(richTextBoxFrom.Text);
}
private void ConvertFiles(string path)
{
string[] aspxFiles = Directory.GetFiles(path, "*.aspx", SearchOption.AllDirectories);
foreach (string filePath in aspxFiles)
{
string fileContent = File.ReadAllText(filePath);
if (!string.IsNullOrEmpty(fileContent))
{
fileContent = AddMasterPageIntoPage(fileContent);
File.WriteAllText(filePath, fileContent);
}
}
}
private string ReplaceIngoreCase(string source, string oldValue, string newValue)
{
var regex = new Regex(oldValue, RegexOptions.IgnoreCase);
return regex.Replace(source, newValue);
}
private string AddMasterPageIntoPage(string strHtmlFrom) {
)
return strHtmlFrom;
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<body.*>", "<asp:Content ID=\"bodyContent\" ContentPlaceHolderID=\"mainContent\" runat=\"server\">");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "</body>", "</asp:Content>");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "</html>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<head>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "</head>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<!DOCTYPE HTML.*>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<html>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<meta.*>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, @"<title>.*</title>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, @"<link (.*)css.css(.*)>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, @"<link (.*)style2.css(.*)>", "");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<script language=\"javascript\">", "<asp:Content ID=\"scriptContent\" ContentPlaceHolderID=\"headContent\" runat=\"server\"><script language=\"javascript\">");
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "</script>", "</script></asp:Content>");
strHtmlFrom = Regex.Replace(strHtmlFrom, "<font face='宋体'>(?<content>.*)</font>", "${content}", RegexOptions.IgnoreCase);
strHtmlFrom = Regex.Replace(strHtmlFrom, "<font face=\"宋体\">(?<content>.*)</font>", "${content}", RegexOptions.IgnoreCase);
strHtmlFrom = ReplaceIngoreCase(strHtmlFrom, "<font face='宋体'>|<font face=\"宋体\">", "");
return strHtmlFrom;
}
}
}
Custom work flow的更多相关文章
- Collection View 自定义布局(custom flow layout)
Collection view自定义布局 一般我们自定义布局都会新建一个类,继承自UICollectionViewFlowLayout,然后重写几个方法: prepareLayout():当准备开始布 ...
- Spring Enable annotation – writing a custom Enable annotation
原文地址:https://www.javacodegeeks.com/2015/04/spring-enable-annotation-writing-a-custom-enable-annotati ...
- Advanced Collection Views and Building Custom Layouts
Advanced Collection Views and Building Custom Layouts UICollectionView的结构回顾 首先回顾一下Collection View的构成 ...
- 用 flow.ci 让 Hexo 持续部署
编者按:感谢 @小小小杜 投稿,原文链接Juglans' Blog.如果你也想体验 flow.ci 的自动化持续部署,来 http://flow.ci 首页提交申请,邀请码随后会发送到邮箱:) flo ...
- Upgrade custom workflow in SharePoint
Experience comes when you give a try or do something, I worked in to many SharePoint development pro ...
- The finnacial statements,taxes and cash flow
This chapter-2 we learn about the the financial statements(财务报表),taxes and cash flow.We must pay par ...
- Custom draw 和 Owner draw 的区别
"Custom Draw" is a feature shared by all of Microsoft's common controls, which allows you ...
- Oracle Applications Multiple Organizations Access Control for Custom Code
档 ID 420787.1 White Paper Oracle Applications Multiple Organizations Access Control for Custom Code ...
- Writing custom protocol for nanomsg
http://vitiy.info/writing-custom-protocol-for-nanomsg/ nanomsg is next version of ZeroMQ lib, provid ...
随机推荐
- Git系列教程三 配置与基本命令
一.安装Git 网上有很多安装教程,可以参考.这里使用的是Windows版本的Git,点击这里下载. 二.基本设置 安装完成后,通过点击鼠标右键就可以看到新添加了俩个Git命令:Git GUI Her ...
- localstorage 的属性改变问题
localstorage 得到的是对象,我们打算改对象的某个属性的值,方法是 通过临时变量对象得到,改变临时变量,然后把临时变量给localstorage的方法 var localS = windo ...
- mycat的读写分离设置
官网:http://www.mycat.org.cn/ 一.jdk环境的安装1.安装jdk1.7,这是mycat推荐的jdk环境 2.之前是用yum安装的jdk1.6,首先查找下 #yum info ...
- sublime work flow
Tools -> Developer -> New Snippet <snippet> <content><![CDATA[ }() { ${} } ]]&g ...
- Nodejs:Path对象
模块Path: path.normalize(url) path.join(url1, url2, ..) path.resolve(url1, url2, ..) path.relative(url ...
- C# 构造post参数一种看起来直观点的方法[转]
因为本人经常爱用C#做一些爬虫类的小东西,每次构造post参数的时候,都是直接字符串拼接的方式的,有时候改起来不太方便. 场景: 需要post一个地址 参数列表 : username:管理员 pass ...
- vert.x学习(二),使用Router来定义用户访问路径
这里需要用到vertx-web依赖了,依然是在pom.xml里面导入 <?xml version="1.0" encoding="UTF-8"?> ...
- C++ 环形缓冲区的实现
参考文章:http://blog.csdn.net/linyt/article/details/53355355 本文参考linux系统中 kfifo缓冲区实现.由于没有涉及到锁,在多线程环境下,只适 ...
- inotify监控目录变化重启服务器tornado项目
pycharm 配置了提交服务器项目每次pycharm修改后,虽然保存到服务器但是项目还得自己去服务器kill再启动.就花几分钟写了shell脚本用于监控项目目录变化并重启tornado项目的脚本 如 ...
- maven编译报错 -source 1.5 中不支持 lambda 表达式
在用maven编译项目是由于项目中用了jdk 1.8, 编译是报错 -source 1.5 中不支持 lambda 表达式,Google找到这篇解决方案,记录一下: 编译时报如下错误: [ERROR ...