Changeset 36601
- Timestamp:
- 02/03/10 18:41:52 (5 weeks ago)
- Location:
- lang/csharp/soyText/soyText
- Files:
-
- 4 modified
-
Document.cs (modified) (2 diffs)
-
DocumentWebServer.cs (modified) (1 diff)
-
Form2.Designer.cs (modified) (9 diffs)
-
Form2.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/csharp/soyText/soyText/Document.cs
r36589 r36601 157 157 public override String ToString() 158 158 { 159 var t = parsed.getValue("title");159 160 160 var tags = TagManipulator.getTags(this); 161 161 var tgh = ""; … … 164 164 tgh = tgh + "[" + tg + "]"; 165 165 } 166 var t = parsed.getValue("title"); 166 167 if (t != null) return tgh+t; 167 var c=parsed.body; 168 t = parsed.getValue("name"); 169 if (t != null) return tgh + t; 170 var c = parsed.body; 168 171 c=c.Replace("\n",""); 169 172 c = c.Replace("\r", ""); -
lang/csharp/soyText/soyText/DocumentWebServer.cs
r36592 r36601 12 12 { 13 13 DocumentSet documentSet; 14 public static string detectContentType(Document d) 15 { 16 var c = d.str["Content-Type"]; 17 if (c != null) return c; 18 var n = d.str["name"]; 19 if (n!=null) { 20 c = "text/plain; charset=utf-8"; 21 if (n.EndsWith(".js")) 22 { 23 c = "text/javascript; charset=utf-8"; 24 } 25 if (n.EndsWith(".html")) 26 { 27 c = "text/html; charset=utf-8"; 28 } 29 } 30 return c; 31 } 14 32 void feedDocument(Document d,HttpListenerResponse res) { 15 var c = d.str["Content-Type"]; 16 if (c == null) 17 { 18 c = "text/plain; charset=utf-8"; 19 } 20 res.ContentType = c; 33 res.ContentType = detectContentType(d); 21 34 Httpd.respondByString(res, d.body); 22 35 } -
lang/csharp/soyText/soyText/Form2.Designer.cs
r36486 r36601 36 36 this.選択範囲を新規ドキュメントに移動MToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 37 37 this.アーカイブAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 38 this.印刷PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 38 39 this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 39 40 this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); … … 48 49 this.外部プログラムを実行RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 49 50 this.tESTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 this.webStartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 50 52 this.移動NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 53 this.ハイパーリンクLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); … … 56 58 this.閉じるCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 57 59 this.検索キャッシュ消去RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 60 this.ファイルToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 61 this.tabControl1 = new SoyText.TabControl2(); 59 this.印刷PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();60 this.webStartToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();61 62 this.menuStrip1.SuspendLayout(); 62 63 this.tabMenu.SuspendLayout(); … … 116 117 this.アーカイブAToolStripMenuItem.Click += new System.EventHandler(this.アーカイブAToolStripMenuItem_Click); 117 118 // 119 // 印刷PToolStripMenuItem 120 // 121 this.印刷PToolStripMenuItem.Name = "印刷PToolStripMenuItem"; 122 this.印刷PToolStripMenuItem.Size = new System.Drawing.Size(291, 22); 123 this.印刷PToolStripMenuItem.Text = "印刷(&P)..."; 124 this.印刷PToolStripMenuItem.Click += new System.EventHandler(this.印刷PToolStripMenuItem_Click); 125 // 118 126 // toolStripSeparator1 119 127 // … … 187 195 this.外部プログラムを実行RToolStripMenuItem, 188 196 this.tESTToolStripMenuItem, 189 this.webStartToolStripMenuItem}); 197 this.webStartToolStripMenuItem, 198 this.ファイルToolStripMenuItem}); 190 199 this.実行RToolStripMenuItem.Name = "実行RToolStripMenuItem"; 191 200 this.実行RToolStripMenuItem.Size = new System.Drawing.Size(57, 20); … … 206 215 this.tESTToolStripMenuItem.Text = "TEST"; 207 216 this.tESTToolStripMenuItem.Click += new System.EventHandler(this.tESTToolStripMenuItem_Click); 217 // 218 // webStartToolStripMenuItem 219 // 220 this.webStartToolStripMenuItem.Name = "webStartToolStripMenuItem"; 221 this.webStartToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 222 this.webStartToolStripMenuItem.Text = "Web Start"; 223 this.webStartToolStripMenuItem.Click += new System.EventHandler(this.webStartToolStripMenuItem_Click); 208 224 // 209 225 // 移動NToolStripMenuItem … … 268 284 this.検索キャッシュ消去RToolStripMenuItem.Text = "検索キャッシュ消去(&R)"; 269 285 this.検索キャッシュ消去RToolStripMenuItem.Click += new System.EventHandler(this.検索キャッシュ消去RToolStripMenuItem_Click); 286 // 287 // ファイルToolStripMenuItem 288 // 289 this.ファイルToolStripMenuItem.Name = "ファイルToolStripMenuItem"; 290 this.ファイルToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5; 291 this.ファイルToolStripMenuItem.Size = new System.Drawing.Size(206, 22); 292 this.ファイルToolStripMenuItem.Text = "ファイル/URLを開く(&O)"; 293 this.ファイルToolStripMenuItem.Click += new System.EventHandler(this.ファイルToolStripMenuItem_Click); 270 294 // 271 295 // tabControl1 … … 280 304 this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); 281 305 this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); 282 //283 // 印刷PToolStripMenuItem284 //285 this.印刷PToolStripMenuItem.Name = "印刷PToolStripMenuItem";286 this.印刷PToolStripMenuItem.Size = new System.Drawing.Size(291, 22);287 this.印刷PToolStripMenuItem.Text = "印刷(&P)...";288 this.印刷PToolStripMenuItem.Click += new System.EventHandler(this.印刷PToolStripMenuItem_Click);289 //290 // webStartToolStripMenuItem291 //292 this.webStartToolStripMenuItem.Name = "webStartToolStripMenuItem";293 this.webStartToolStripMenuItem.Size = new System.Drawing.Size(206, 22);294 this.webStartToolStripMenuItem.Text = "Web Start";295 this.webStartToolStripMenuItem.Click += new System.EventHandler(this.webStartToolStripMenuItem_Click);296 306 // 297 307 // Form2 … … 348 358 private ToolStripMenuItem 印刷PToolStripMenuItem; 349 359 private ToolStripMenuItem webStartToolStripMenuItem; 360 private ToolStripMenuItem ファイルToolStripMenuItem; 350 361 } 351 362 } -
lang/csharp/soyText/soyText/Form2.cs
r36485 r36601 7 7 using System.Text; 8 8 using System.Windows.Forms; 9 using System.Diagnostics; 9 10 10 11 namespace SoyText … … 297 298 workspace.documentSet.startWeb(); 298 299 } 300 301 private void ファイルToolStripMenuItem_Click(object sender, EventArgs e) 302 { 303 var d=curTab.curDoc; 304 if (d.parsed["file"] != null) 305 { 306 Process.Start(d.parsed["file"]); 307 } 308 if (d.parsed["dir"] != null) 309 { 310 Process.Start(d.parsed["dir"]); 311 } 312 if (d.parsed["url"] != null) 313 { 314 Process.Start(d.parsed["url"]); 315 } 316 } 299 317 } 300 318 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)