自动生成仿古文字:横文转竖文,自定义分隔符
来源:互联网 发布:java国际化 编辑:程序博客网 时间:2024/04/29 06:54
自动生成仿古文字
|低|举|疑|床|静
|头|头|是|前|夜
|思|望|地|明|思
|故|明|上|月|
|乡|月|霜|光|
自定义分隔符:
☽低☽举☽疑☽床☽静
☽头☽头☽是☽前☽夜
☽思☽望☽地☽明☽思
☽故☽明☽上☽月☽
☽乡☽月☽霜☽光☽
上面这些怎么自动生成呢!
下面共享C#源代码,需要改进的请自行修改,该版本纯属测试。
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Drawing.Imaging;
- namespace easysayit
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- textBox2.Text = "";
- if (textBox1.Text == "")
- { textBox1.Text = "sosecret.net 专注个人隐私保护"; }
- int line = 10;
- int colum = 10;
- line = int.Parse(textBox4.Text);
- colum = int.Parse(textBox3.Text);
- string a = textBox1.Text;
- //hengtoshu(a, line, colum);
- string s = hengtoshu (a, line, colum);
- //textBox2.Text += s;
- }
- private string hengtoshu(string origin, int line, int colum)
- {
- char[] ori = origin.ToCharArray();
- char[] after = new char[line * (colum * 2 + 1) + line + 4];
- //-----------------添加分隔符---------------
- for (int i = 1; i <= line * (colum * 2 + 1) + line + 1; i++)
- {
- char ins = char.Parse (textBox5.Text);
- after[i - 1] = ins;
- }
- //--------------------添加换行符-------
- for (int i = 1; i <= line; i++)
- {
- after[colum * 2 + 1 + (i - 1) * (colum * 2 + 2)-1] = '/r';
- after[colum * 2 + 1 + (i - 1) * (colum * 2 + 2)] = '/n';
- }
- after[line * (colum * 2 + 1) + line-1] ='/r';
- after[line * (colum * 2 + 1) + line] = '/n';
- after[line * (colum * 2 + 1) + line+1] = '/r';
- after[line * (colum * 2 + 1) + line+2] = '/n';
- //---------------------添加空格------------
- bool flag = false;
- for (int i = 1, count = 0, off = 0; i <= colum; i++, off += 2)
- {
- for (int j = 1; j <= line; j++, count++)
- {
- if (count < ori.Length)
- { after[colum * 2 - 1 - off + (colum * 2 + 2) * (j - 1)] = ori[count]; }
- else
- {
- after[colum * 2 - 1 - off + (colum * 2 + 2) * (j - 1)] = ' ';
- flag = true;
- }
- }
- }
- //------------------------------
- textBox2.Text += new string(after);
- if (!flag)
- {
- origin = origin.Remove(0, colum * line);
- hengtoshu (origin, line, colum);
- return "sosecret.net";
- }
- else { return "sosecret.net"; }
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
- System.Diagnostics.Process.Start("http://www.sosecret.net");
- }
- private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- form2 form2 = new form2();
- form2.ShowDialog();
- }
- private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- }
- private void menuStrip2_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- }
- }
- 自动生成仿古文字:横文转竖文,自定义分隔符
- android 自动输入完成提示 自定义适配器适用于自定义分隔符带中文的提示
- CSS 分隔线 中间带文字 分隔符
- JAVA 自定义文字生成图片
- Textview 里面文字加单词分隔符
- hive-TextInputformat自定义分隔符
- sqoop1.99.7自定义分隔符
- 如何自定义mapreduce在输出的key和value之间自动添加的分隔符
- Android自定义EditText实现手机号码和银行卡号自动分隔
- wps文字自动生成目录三法
- Android TextView中的文字自动生成链接
- Android TextView中的文字自动生成链接
- banner自动生成工具,ascii文字展示
- HTML5自定义文字背景生成签名档
- 自动添加分隔符的EditText
- Hadoop Pig、Hive 自定义输入输出分隔符
- Hadoop Pig、Hive 自定义输入输出分隔符
- mapreduce 自定义key/value 输出分隔符
- 一篇日志,一年之隔
- 如何实现3个table垂直并列,并自适应浏览器高度100%?
- fsdfas
- CS versus EE
- 低版本Office如何打开Office2007的文档
- 自动生成仿古文字:横文转竖文,自定义分隔符
- 会说话,减少奋斗30年
- 关于gridview 中编辑文本框大小的调整
- 2008莆田学院LINUX开机大赛获奖名单
- 本人在嵌入式在线的博客
- Ubuntu8.10安装:菜鸟安装Ubuntu8.10成功经验
- 凡事,偶然中都带着必然
- C#定义鼠标指针形状 网上转来的学习学习
- 回忆未来—张宴