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 ...
随机推荐
- lunece全文检索的入门与简单优化
2016-12-15 项目中需要加载下面几个工具包 1 package com.cn.shupu.util; import java.io.BufferedReader; import java.io ...
- bzoj2523 聪明的学生
bzoj第一题,ctsc2001. 黑书上的递归例题,我们定义time()函数,递归求解即可. 这个题用到了一个小技巧:可以使用枚举来搞算法. #include <iostream> #i ...
- 一个快速double转int的方法(利用magic number)
代码: int i = *reinterpret_cast<int*>(&(d += 6755399441055744.0)); 知识点: 1.reinterpret_cast&l ...
- Sina 新浪Ip归属地Api 很好用的,使用get请求
前言 这几天做了一个客服管理系统,需要根据游客的Ip获取他的归属地,刚开始使用了,www.ip138.com 抓取ip归属地,用这还可以,但是不显示国家:于是是找了这个新浪的Api,很不错啊 用法 1 ...
- LeetCode Add Strings
原题链接在这里:https://leetcode.com/problems/add-strings/ 题目: Given two non-negative numbers num1 and num2 ...
- LintCode Longest Common Subsequence
原题链接在这里:http://www.lintcode.com/en/problem/longest-common-subsequence/ 题目: Given two strings, find t ...
- 如何查看当前使用的Entity Framework版本
Visual Studio 中-----工具-----NuGet套件管理员-----套件管理器控制台-----输入Get-Package即可查看当前使用的版本信息
- css重置reset.css
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,dl, dt, dd, ul, ol, li,pre,form, fieldset, legend, b ...
- devexpress treelist 过滤
FilterMode.Smart 问题:dev 的treelist加过滤条件后,如果根节点不符合条件,则不显示数据 处理方法:把filterMode设置为smart即可. 备忘.
- android.graphic.Path
类path是一个封装的几何学路径包括直线,二次曲线,三次曲线.它可以通过函数canvas.drawPath(path, paint)画出来,可以通过填充方式或者画线方式(由paint的style决定) ...