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 ...
随机推荐
- Tomcat学习记录
阅读摘录如下: 本质 Tomcat最本质就是个能运行JSP/Servlet的Web服务器 , 因此最典型的应用就是用户通过浏览器访问服务器,Tomcat接收到请求后转发给Servlet,由Servle ...
- mysql优化limit分页
- redis 简单应用
Incr $views = Redis::incr('views'); $article_views = Redis::incr('article:' . $article_id . ':views' ...
- swift 资料
swift 开源代码学习 https://github.com/belm/BaiduFM-Swift http://www.cnblogs.com/zzc19920809/p/4881268.html ...
- centos6.7安装Redis
1.创建安装目录 mkdir /usr/local/redis cd /usr/local/src 2.获取安装包:wget http://download.redis.io/releases/red ...
- iOS中的线程安全问题
为了保证线程安全,不会因为多个线程访问造成资源抢夺,出现的运行结果的偏差问题,我们需要使用到线程同步技术,最常用的就是 @synchronized互斥锁(同步锁).NSLock.dispatch_se ...
- BT客户端实现 Peer协议设计
与peer建立tcp连接后,首先发送handshake消息进行握手 handshake消息格式如下: 一个字节0x19 + 一个字符串'BitTorrent protocol' + 8 byte 保留 ...
- asp.net mvc中ViewData、ViewBag和TempData的详解
一.ViewData和ViewBag 1.ViewData和ViewBag都是从Action向View传递数据的方式,当然还有其他方式如向View传递Model. 2.ViewData页面查询数据时需 ...
- Android下Cocos2d创建HelloWorld工程
最近在搭建Cocos2d的环境,结果各种问题,两人弄了一天才能搞好一个环境-! -_-!! 避免大家也可能会遇到我这种情况,所以写一个随笔,让大家也了解下如何搭建吧- 1.环境安装准备 下载 tadp ...
- ios - NSTimer中target的self是强引用问题
当控制器ViewController跳转进入控制器OneViewController中的时候开启定时器,让定时器每隔一段时间打印一次,当OneViewController dismiss的时候,控制器 ...