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 ...
随机推荐
- ionic 踩过的坑-基本布局
目录: 标题栏 : ion-header-bar 页脚栏 : ion-footer-bar header/footer : 样式及内容 内容区 : ion-content 滚动框 : ion-scro ...
- ADO.Net读取器获取数据库数据
string str = Configuration.ConfigurationManager.AppSettings[str].ToString(); string sql = "sele ...
- gradle和maven有什么用?分别有什么区别?
作者:EZLippi链接:http://www.zhihu.com/question/29338218/answer/51293828来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载 ...
- Thinking in Java——笔记(17)
Containers in Depth Full container taxonomy You can usually ignore any class that begins with " ...
- ESXi 5.5开启并配置SNMP
1. 安装vshpere cli 2.设定SNMP通讯字并开启SNMP功能 进入到bin目录. C:\Program Files (x86)\VMware\VMware vSphere CLI\bin ...
- could not get lock /var/lib/dpkg/lock
这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/ap ...
- .NET对象与Windows句柄(一):句柄的基本概念
在.NET编程中,得益于有效的内存管理机制,对象的创建和使用比较方便,大多数情况下我们无须关心对象创建和分配内存的细节,也可以放心的把对象的清理交给自动垃圾回收来完成.由于.NET类库对系统底层对象进 ...
- 《Linux及安全》实践3.1
<Linux及安全>实践三 ELF格式文件分析 一.基础操作 1.查看大小端.32还是64 由此可以看出,本人实践所用到的是32位Ubuntu,数据存储采用小端法. 2.编写hello.c ...
- 去掉无用的多余的空格(string1.前后空格,2.中间空格)
1.使用NSString中的stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]方法只是去掉左右两边的空格: ...
- 在ubuntu上建立多svn版本库
http://lucane.iteye.com/blog/857486 mkdir ~/dev/repository svnadmin create ~/dev/repository/a svnadm ...