http://www.nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Drawing.Text&feed=atom&action=history
Csharp/C Sharp by API/System.Drawing.Text - История изменений
2024-03-29T12:54:30Z
История изменений этой страницы в вики
MediaWiki 1.30.0
http://www.nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Drawing.Text&diff=5043&oldid=prev
в 15:31, 26 мая 2010
2010-05-26T15:31:35Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="ru">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Предыдущая</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Версия 15:31, 26 мая 2010</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="ru"><div class="mw-diff-empty">(нет различий)</div>
</td></tr></table>
http://www.nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Drawing.Text&diff=5044&oldid=prev
Admin: 1 версия
2010-05-26T12:12:39Z
<p>1 версия</p>
<p><b>Новая страница</b></p><div>* [[csharp/C Sharp by API/System.Drawing.Text/HotkeyPrefix | HotkeyPrefix]]<br />
<br />
==new InstalledFontCollection()==<br />
<br />
<br />
<br />
<source lang="csharp"> <br />
using System;<br />
using System.Collections.Generic;<br />
using System.ruponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
public class Form1 : Form<br />
{<br />
private System.Windows.Forms.GroupBox groupBox1;<br />
private System.Windows.Forms.ruboBox lstFonts;<br />
private System.Windows.Forms.Label label1;<br />
private System.Windows.Forms.StatusStrip statusBar;<br />
private System.Windows.Forms.ToolStripStatusLabel statusLabel;<br />
public Form1() {<br />
InitializeComponent();<br />
System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();<br />
foreach (FontFamily family in fonts.Families)<br />
{<br />
lstFonts.Items.Add(family.Name);<br />
}<br />
}<br />
private void lstFonts_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
this.Invalidate();<br />
}<br />
private void Form1_Paint(object sender, PaintEventArgs e)<br />
{<br />
if (lstFonts.SelectedIndex != -1)<br />
{<br />
e.Graphics.DrawString(lstFonts.Text, new Font(lstFonts.Text, 50), Brushes.Black, 10, 50);<br />
statusBar.Items[0].Text = lstFonts.Text;<br />
}<br />
}<br />
private void InitializeComponent()<br />
{<br />
this.groupBox1 = new System.Windows.Forms.GroupBox();<br />
this.lstFonts = new System.Windows.Forms.ruboBox();<br />
this.label1 = new System.Windows.Forms.Label();<br />
this.statusBar = new System.Windows.Forms.StatusStrip();<br />
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();<br />
this.groupBox1.SuspendLayout();<br />
this.statusBar.SuspendLayout();<br />
this.SuspendLayout();<br />
// <br />
// groupBox1<br />
// <br />
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)<br />
| System.Windows.Forms.AnchorStyles.Right)));<br />
this.groupBox1.Controls.Add(this.lstFonts);<br />
this.groupBox1.Controls.Add(this.label1);<br />
this.groupBox1.Location = new System.Drawing.Point(7, 0);<br />
this.groupBox1.Name = "groupBox1";<br />
this.groupBox1.Size = new System.Drawing.Size(497, 40);<br />
this.groupBox1.TabIndex = 1;<br />
this.groupBox1.TabStop = false;<br />
// <br />
// lstFonts<br />
// <br />
this.lstFonts.DropDownStyle = System.Windows.Forms.ruboBoxStyle.DropDownList;<br />
this.lstFonts.DropDownWidth = 340;<br />
this.lstFonts.FormattingEnabled = true;<br />
this.lstFonts.Location = new System.Drawing.Point(100, 12);<br />
this.lstFonts.Name = "lstFonts";<br />
this.lstFonts.Size = new System.Drawing.Size(340, 21);<br />
this.lstFonts.TabIndex = 1;<br />
this.lstFonts.SelectedIndexChanged += new System.EventHandler(this.lstFonts_SelectedIndexChanged);<br />
// <br />
// label1<br />
// <br />
this.label1.Location = new System.Drawing.Point(12, 16);<br />
this.label1.Name = "label1";<br />
this.label1.Size = new System.Drawing.Size(80, 12);<br />
this.label1.TabIndex = 0;<br />
this.label1.Text = "Choose Font:";<br />
// <br />
// statusBar<br />
// <br />
this.statusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {<br />
this.statusLabel});<br />
this.statusBar.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;<br />
this.statusBar.Location = new System.Drawing.Point(0, 155);<br />
this.statusBar.Name = "statusBar";<br />
this.statusBar.Size = new System.Drawing.Size(516, 22);<br />
this.statusBar.TabIndex = 2;<br />
this.statusBar.Text = "statusStrip1";<br />
// <br />
// statusLabel<br />
// <br />
this.statusLabel.Name = "statusLabel";<br />
// <br />
// Form1<br />
// <br />
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);<br />
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;<br />
this.ClientSize = new System.Drawing.Size(516, 177);<br />
this.Controls.Add(this.groupBox1);<br />
this.Controls.Add(this.statusBar);<br />
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));<br />
this.Text = "Font Viewer";<br />
this.groupBox1.ResumeLayout(false);<br />
this.statusBar.ResumeLayout(false);<br />
this.ResumeLayout(false);<br />
this.PerformLayout();<br />
}<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.Run(new Form1());<br />
}<br />
}<br />
<br />
<br />
<br />
</source></div>
Admin