ブログ貼付用プログラミングコードHTMLコンバータ製作進捗
2015/12/29
とりあえず、C#のキーワードの色付けまでは完了しました。以下URLに置いてありますので利用してみてください。
http://pineplanter.moo.jp/convert/
初期画面の外観はこんな感じ。
プログラミングコードをコピペします。
[C#]ボタンを押すと下にブログに貼り付けた時の外観が表示されます。コピペしたテキストボックスにはHTMLタグが表示されます。
[Select All]ボタンを押すと、HTMLタグが全選択されますので、[Ctrl]+[C]でクリップボードに保存し、ブログのHTMLエディタ上に貼り付ければOKです。
ちなみに、下がブログに貼り付けた時の外観です。とりあえずキーワードまで。今後はコメント分の色付けに挑みます。
using System;
using System.Drawing;
using System.Windows.Forms;
public class IconPanel : PictureBox{
private int index;
public IconPanel(string path){
this.Size = new Size(80, 60);
this.index = -1;
Icon appIcon = Icon.ExtractAssociatedIcon(path);
this.Image = appIcon.ToBitmap();
Label label = new Label(){
Dock = DockStyle.Bottom,
ForeColor = Color.White,
Parent=this,
};
this.Controls.Add(label);
label.Text = System.IO.Path.GetFileName(path);
}
public void setting(int index, int w, int y){
this.index = index;
this.Location = new Point(w, y);
}
public int getIndex(){ return index; }
}
スポンサーリンク