Compare commits
34 Commits
f11fd0642c
...
v1.5
Author | SHA1 | Date | |
---|---|---|---|
|
dd3f4f4b4b | ||
|
8889b846dc | ||
|
fe0e1dabfd | ||
|
e0786bdb07 | ||
4fa818f35e | |||
11b268a350 | |||
703e8d91ef | |||
de8aa295da | |||
|
232b543a35 | ||
cc63ce349a | |||
|
793337cc5b | ||
|
c5f832b44a | ||
|
024c7b76bd | ||
|
cc161169f1 | ||
|
0ba03444d1 | ||
|
302977c3f4 | ||
a89bbc59ed | |||
691b87b842 | |||
|
ceddd5f66f | ||
|
84561f1ac1 | ||
|
fc60991d85 | ||
|
04bace7267 | ||
|
54ade42409 | ||
|
e927b2685d | ||
|
40f006a309 | ||
|
8da1614ab2 | ||
|
dcea501d11 | ||
|
462aca461e | ||
|
d9277effdd | ||
|
6e366ac081 | ||
|
d871d35d06 | ||
|
f307827fb6 | ||
|
3ce38f2e46 | ||
|
5a0ad1d3d0 |
136
McBitFont/About.Designer.cs
generated
Normal file
@@ -0,0 +1,136 @@
|
||||
namespace McBitFont {
|
||||
partial class About {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(About));
|
||||
this.lblVersion = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblVersion
|
||||
//
|
||||
this.lblVersion.AutoSize = true;
|
||||
this.lblVersion.Location = new System.Drawing.Point(12, 189);
|
||||
this.lblVersion.Name = "lblVersion";
|
||||
this.lblVersion.Size = new System.Drawing.Size(63, 13);
|
||||
this.lblVersion.TabIndex = 0;
|
||||
this.lblVersion.Text = "Version: 1.1";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 80);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(384, 35);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "McBitFont";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.label2.Location = new System.Drawing.Point(0, 115);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(384, 25);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "McFLY\'s Bit Font and Image Editor";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pictureBox1.Image = global::McBitFont.Properties.Resources.icon_64;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(384, 75);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox1.TabIndex = 3;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(0, 140);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(384, 23);
|
||||
this.linkLabel1.TabIndex = 4;
|
||||
this.linkLabel1.Text = "mcfly@mcflyer.ru";
|
||||
this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.button1.Location = new System.Drawing.Point(146, 175);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(89, 27);
|
||||
this.button1.TabIndex = 5;
|
||||
this.button1.Text = "OK";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// About
|
||||
//
|
||||
this.AcceptButton = this.button1;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(384, 211);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.lblVersion);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "About";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "About";
|
||||
this.Load += new System.EventHandler(this.About_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblVersion;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
25
McBitFont/About.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
|
||||
namespace McBitFont {
|
||||
public partial class About : Form {
|
||||
public About() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void About_Load(object sender, EventArgs e) {
|
||||
lblVersion.Text = "Version: v" + MainForm.version;
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
|
||||
System.Diagnostics.Process.Start("mailto:mcfly@mcflyer.ru");
|
||||
}
|
||||
}
|
||||
}
|
140
McBitFont/About.resx
Normal file
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
|
||||
AAA1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTXW1tbW1tbW
|
||||
1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW
|
||||
1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1
|
||||
NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYA
|
||||
AAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tYA
|
||||
AAAAAADW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tYAAAAAAADW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tYAAAAAAAAAAAAAAADW1tYAAAAAAADW1tbW1tY1
|
||||
NTU1NTXW1tbW1tYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYA
|
||||
AAAAAAAAAAAAAADW1tbW1tYAAAAAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAAAAAADW1tbW
|
||||
1tbW1tbW1tYAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tY1
|
||||
NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTUAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
366
McBitFont/Export.Designer.cs
generated
Normal file
@@ -0,0 +1,366 @@
|
||||
namespace McBitFont {
|
||||
partial class Export {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.txtOutput = new System.Windows.Forms.RichTextBox();
|
||||
this.gbScan = new System.Windows.Forms.GroupBox();
|
||||
this.cbVDir = new System.Windows.Forms.ComboBox();
|
||||
this.cbHDir = new System.Windows.Forms.ComboBox();
|
||||
this.cbOrder = new System.Windows.Forms.ComboBox();
|
||||
this.gbOptions = new System.Windows.Forms.GroupBox();
|
||||
this.cbZeroes = new System.Windows.Forms.CheckBox();
|
||||
this.cbHeader = new System.Windows.Forms.CheckBox();
|
||||
this.cbComments = new System.Windows.Forms.CheckBox();
|
||||
this.gbNumbers = new System.Windows.Forms.GroupBox();
|
||||
this.cbBitOrder = new System.Windows.Forms.ComboBox();
|
||||
this.cbNumSize = new System.Windows.Forms.ComboBox();
|
||||
this.cbNumBase = new System.Windows.Forms.ComboBox();
|
||||
this.gbText = new System.Windows.Forms.GroupBox();
|
||||
this.lblXLines = new System.Windows.Forms.Label();
|
||||
this.nudXLines = new System.Windows.Forms.NumericUpDown();
|
||||
this.cbLines = new System.Windows.Forms.ComboBox();
|
||||
this.cbFormat = new System.Windows.Forms.ComboBox();
|
||||
this.btnGenerate = new System.Windows.Forms.Button();
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.gbScan.SuspendLayout();
|
||||
this.gbOptions.SuspendLayout();
|
||||
this.gbNumbers.SuspendLayout();
|
||||
this.gbText.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudXLines)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtOutput
|
||||
//
|
||||
this.txtOutput.AcceptsTab = true;
|
||||
this.txtOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtOutput.AutoWordSelection = true;
|
||||
this.txtOutput.DetectUrls = false;
|
||||
this.txtOutput.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txtOutput.HideSelection = false;
|
||||
this.txtOutput.Location = new System.Drawing.Point(151, 12);
|
||||
this.txtOutput.Name = "txtOutput";
|
||||
this.txtOutput.Size = new System.Drawing.Size(529, 507);
|
||||
this.txtOutput.TabIndex = 0;
|
||||
this.txtOutput.Text = "";
|
||||
this.txtOutput.WordWrap = false;
|
||||
//
|
||||
// gbScan
|
||||
//
|
||||
this.gbScan.Controls.Add(this.cbVDir);
|
||||
this.gbScan.Controls.Add(this.cbHDir);
|
||||
this.gbScan.Controls.Add(this.cbOrder);
|
||||
this.gbScan.Location = new System.Drawing.Point(5, 12);
|
||||
this.gbScan.Name = "gbScan";
|
||||
this.gbScan.Size = new System.Drawing.Size(140, 105);
|
||||
this.gbScan.TabIndex = 1;
|
||||
this.gbScan.TabStop = false;
|
||||
this.gbScan.Text = "Scan";
|
||||
//
|
||||
// cbVDir
|
||||
//
|
||||
this.cbVDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbVDir.FormattingEnabled = true;
|
||||
this.cbVDir.Items.AddRange(new object[] {
|
||||
"Top to Bottom",
|
||||
"Bottom to Top"});
|
||||
this.cbVDir.Location = new System.Drawing.Point(10, 73);
|
||||
this.cbVDir.Name = "cbVDir";
|
||||
this.cbVDir.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbVDir.TabIndex = 2;
|
||||
//
|
||||
// cbHDir
|
||||
//
|
||||
this.cbHDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbHDir.FormattingEnabled = true;
|
||||
this.cbHDir.Items.AddRange(new object[] {
|
||||
"Left to Right",
|
||||
"Right to Left"});
|
||||
this.cbHDir.Location = new System.Drawing.Point(10, 46);
|
||||
this.cbHDir.Name = "cbHDir";
|
||||
this.cbHDir.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbHDir.TabIndex = 1;
|
||||
//
|
||||
// cbOrder
|
||||
//
|
||||
this.cbOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbOrder.FormattingEnabled = true;
|
||||
this.cbOrder.Items.AddRange(new object[] {
|
||||
"Columns",
|
||||
"Rows"});
|
||||
this.cbOrder.Location = new System.Drawing.Point(10, 19);
|
||||
this.cbOrder.Name = "cbOrder";
|
||||
this.cbOrder.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbOrder.TabIndex = 0;
|
||||
this.cbOrder.SelectedIndexChanged += new System.EventHandler(this.cbOrder_SelectedIndexChanged);
|
||||
//
|
||||
// gbOptions
|
||||
//
|
||||
this.gbOptions.Controls.Add(this.cbZeroes);
|
||||
this.gbOptions.Controls.Add(this.cbHeader);
|
||||
this.gbOptions.Controls.Add(this.cbComments);
|
||||
this.gbOptions.Location = new System.Drawing.Point(5, 345);
|
||||
this.gbOptions.Name = "gbOptions";
|
||||
this.gbOptions.Size = new System.Drawing.Size(140, 88);
|
||||
this.gbOptions.TabIndex = 3;
|
||||
this.gbOptions.TabStop = false;
|
||||
this.gbOptions.Text = "Options";
|
||||
//
|
||||
// cbZeroes
|
||||
//
|
||||
this.cbZeroes.AutoSize = true;
|
||||
this.cbZeroes.Checked = true;
|
||||
this.cbZeroes.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbZeroes.Location = new System.Drawing.Point(6, 65);
|
||||
this.cbZeroes.Name = "cbZeroes";
|
||||
this.cbZeroes.Size = new System.Drawing.Size(98, 17);
|
||||
this.cbZeroes.TabIndex = 2;
|
||||
this.cbZeroes.Text = "Leading zeroes";
|
||||
this.cbZeroes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbHeader
|
||||
//
|
||||
this.cbHeader.AutoSize = true;
|
||||
this.cbHeader.Checked = true;
|
||||
this.cbHeader.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbHeader.Location = new System.Drawing.Point(6, 19);
|
||||
this.cbHeader.Name = "cbHeader";
|
||||
this.cbHeader.Size = new System.Drawing.Size(86, 17);
|
||||
this.cbHeader.TabIndex = 1;
|
||||
this.cbHeader.Text = "Meta header";
|
||||
this.cbHeader.UseVisualStyleBackColor = true;
|
||||
this.cbHeader.CheckedChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged);
|
||||
//
|
||||
// cbComments
|
||||
//
|
||||
this.cbComments.AutoSize = true;
|
||||
this.cbComments.Checked = true;
|
||||
this.cbComments.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbComments.Location = new System.Drawing.Point(6, 42);
|
||||
this.cbComments.Name = "cbComments";
|
||||
this.cbComments.Size = new System.Drawing.Size(75, 17);
|
||||
this.cbComments.TabIndex = 0;
|
||||
this.cbComments.Text = "Comments";
|
||||
this.cbComments.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// gbNumbers
|
||||
//
|
||||
this.gbNumbers.Controls.Add(this.cbBitOrder);
|
||||
this.gbNumbers.Controls.Add(this.cbNumSize);
|
||||
this.gbNumbers.Controls.Add(this.cbNumBase);
|
||||
this.gbNumbers.Location = new System.Drawing.Point(5, 123);
|
||||
this.gbNumbers.Name = "gbNumbers";
|
||||
this.gbNumbers.Size = new System.Drawing.Size(140, 105);
|
||||
this.gbNumbers.TabIndex = 4;
|
||||
this.gbNumbers.TabStop = false;
|
||||
this.gbNumbers.Text = "Numbers";
|
||||
//
|
||||
// cbBitOrder
|
||||
//
|
||||
this.cbBitOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbBitOrder.FormattingEnabled = true;
|
||||
this.cbBitOrder.Items.AddRange(new object[] {
|
||||
"LSB Top",
|
||||
"MSB Top"});
|
||||
this.cbBitOrder.Location = new System.Drawing.Point(10, 19);
|
||||
this.cbBitOrder.Name = "cbBitOrder";
|
||||
this.cbBitOrder.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbBitOrder.TabIndex = 5;
|
||||
//
|
||||
// cbNumSize
|
||||
//
|
||||
this.cbNumSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbNumSize.FormattingEnabled = true;
|
||||
this.cbNumSize.Items.AddRange(new object[] {
|
||||
"8 bit",
|
||||
"16 bit",
|
||||
"32 bit"});
|
||||
this.cbNumSize.Location = new System.Drawing.Point(10, 73);
|
||||
this.cbNumSize.Name = "cbNumSize";
|
||||
this.cbNumSize.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbNumSize.TabIndex = 4;
|
||||
//
|
||||
// cbNumBase
|
||||
//
|
||||
this.cbNumBase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbNumBase.FormattingEnabled = true;
|
||||
this.cbNumBase.Items.AddRange(new object[] {
|
||||
"Hexadecimal",
|
||||
"Binary",
|
||||
"Decimal"});
|
||||
this.cbNumBase.Location = new System.Drawing.Point(10, 46);
|
||||
this.cbNumBase.Name = "cbNumBase";
|
||||
this.cbNumBase.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbNumBase.TabIndex = 3;
|
||||
//
|
||||
// gbText
|
||||
//
|
||||
this.gbText.Controls.Add(this.lblXLines);
|
||||
this.gbText.Controls.Add(this.nudXLines);
|
||||
this.gbText.Controls.Add(this.cbLines);
|
||||
this.gbText.Controls.Add(this.cbFormat);
|
||||
this.gbText.Location = new System.Drawing.Point(5, 234);
|
||||
this.gbText.Name = "gbText";
|
||||
this.gbText.Size = new System.Drawing.Size(140, 105);
|
||||
this.gbText.TabIndex = 5;
|
||||
this.gbText.TabStop = false;
|
||||
this.gbText.Text = "Text format";
|
||||
//
|
||||
// lblXLines
|
||||
//
|
||||
this.lblXLines.AutoSize = true;
|
||||
this.lblXLines.Enabled = false;
|
||||
this.lblXLines.Location = new System.Drawing.Point(10, 76);
|
||||
this.lblXLines.Name = "lblXLines";
|
||||
this.lblXLines.Size = new System.Drawing.Size(60, 13);
|
||||
this.lblXLines.TabIndex = 9;
|
||||
this.lblXLines.Text = "X numbers:";
|
||||
//
|
||||
// nudXLines
|
||||
//
|
||||
this.nudXLines.Enabled = false;
|
||||
this.nudXLines.Location = new System.Drawing.Point(76, 73);
|
||||
this.nudXLines.Maximum = new decimal(new int[] {
|
||||
64,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudXLines.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudXLines.Name = "nudXLines";
|
||||
this.nudXLines.Size = new System.Drawing.Size(55, 20);
|
||||
this.nudXLines.TabIndex = 8;
|
||||
this.nudXLines.Value = new decimal(new int[] {
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// cbLines
|
||||
//
|
||||
this.cbLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbLines.FormattingEnabled = true;
|
||||
this.cbLines.Items.AddRange(new object[] {
|
||||
"1 Column per line",
|
||||
"1 Symbol per line",
|
||||
"X Numbers per line"});
|
||||
this.cbLines.Location = new System.Drawing.Point(10, 46);
|
||||
this.cbLines.Name = "cbLines";
|
||||
this.cbLines.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbLines.TabIndex = 7;
|
||||
this.cbLines.SelectedIndexChanged += new System.EventHandler(this.cbLines_SelectedIndexChanged);
|
||||
//
|
||||
// cbFormat
|
||||
//
|
||||
this.cbFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFormat.FormattingEnabled = true;
|
||||
this.cbFormat.Items.AddRange(new object[] {
|
||||
"1D C array",
|
||||
"2D C array",
|
||||
"Comma separated"});
|
||||
this.cbFormat.Location = new System.Drawing.Point(10, 19);
|
||||
this.cbFormat.Name = "cbFormat";
|
||||
this.cbFormat.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbFormat.TabIndex = 6;
|
||||
this.cbFormat.SelectedIndexChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged);
|
||||
//
|
||||
// btnGenerate
|
||||
//
|
||||
this.btnGenerate.Location = new System.Drawing.Point(5, 439);
|
||||
this.btnGenerate.Name = "btnGenerate";
|
||||
this.btnGenerate.Size = new System.Drawing.Size(140, 30);
|
||||
this.btnGenerate.TabIndex = 6;
|
||||
this.btnGenerate.Text = "Generate";
|
||||
this.btnGenerate.UseVisualStyleBackColor = true;
|
||||
this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Location = new System.Drawing.Point(5, 487);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(140, 30);
|
||||
this.btnClose.TabIndex = 7;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Export
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnClose;
|
||||
this.ClientSize = new System.Drawing.Size(692, 531);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.btnGenerate);
|
||||
this.Controls.Add(this.gbText);
|
||||
this.Controls.Add(this.gbNumbers);
|
||||
this.Controls.Add(this.gbOptions);
|
||||
this.Controls.Add(this.gbScan);
|
||||
this.Controls.Add(this.txtOutput);
|
||||
this.MinimumSize = new System.Drawing.Size(700, 570);
|
||||
this.Name = "Export";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Export";
|
||||
this.Load += new System.EventHandler(this.Export_Load);
|
||||
this.gbScan.ResumeLayout(false);
|
||||
this.gbOptions.ResumeLayout(false);
|
||||
this.gbOptions.PerformLayout();
|
||||
this.gbNumbers.ResumeLayout(false);
|
||||
this.gbText.ResumeLayout(false);
|
||||
this.gbText.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudXLines)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RichTextBox txtOutput;
|
||||
private System.Windows.Forms.GroupBox gbScan;
|
||||
private System.Windows.Forms.ComboBox cbVDir;
|
||||
private System.Windows.Forms.ComboBox cbHDir;
|
||||
private System.Windows.Forms.ComboBox cbOrder;
|
||||
private System.Windows.Forms.GroupBox gbOptions;
|
||||
private System.Windows.Forms.CheckBox cbHeader;
|
||||
private System.Windows.Forms.CheckBox cbComments;
|
||||
private System.Windows.Forms.GroupBox gbNumbers;
|
||||
private System.Windows.Forms.ComboBox cbBitOrder;
|
||||
private System.Windows.Forms.ComboBox cbNumSize;
|
||||
private System.Windows.Forms.ComboBox cbNumBase;
|
||||
private System.Windows.Forms.GroupBox gbText;
|
||||
private System.Windows.Forms.Label lblXLines;
|
||||
private System.Windows.Forms.NumericUpDown nudXLines;
|
||||
private System.Windows.Forms.ComboBox cbLines;
|
||||
private System.Windows.Forms.ComboBox cbFormat;
|
||||
private System.Windows.Forms.Button btnGenerate;
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
private System.Windows.Forms.CheckBox cbZeroes;
|
||||
}
|
||||
}
|
394
McBitFont/Export.cs
Normal file
@@ -0,0 +1,394 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace McBitFont {
|
||||
public partial class Export : Form {
|
||||
|
||||
private MainForm mainForm;
|
||||
|
||||
//private List<string> comments = new List<string>();
|
||||
private Dictionary<string, string> comments = new Dictionary<string, string>();
|
||||
|
||||
public Export(object sender) {
|
||||
InitializeComponent();
|
||||
|
||||
mainForm = (MainForm)sender;
|
||||
}
|
||||
|
||||
private void Export_Load(object sender, EventArgs e) {
|
||||
var groupBoxes = Controls.OfType<GroupBox>();
|
||||
foreach (var gb in groupBoxes) {
|
||||
var comboBoxes = gb.Controls.OfType<ComboBox>();
|
||||
foreach (var cb in comboBoxes) {
|
||||
cb.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
comments.Add("header",
|
||||
"// File generated by McBitFont " + MainForm.version + "\n" +
|
||||
"// made by Anton Mukhin (mcfly@mcflyer.ru)\n" +
|
||||
"//\n" +
|
||||
"//\n"
|
||||
);
|
||||
comments.Add("scan_order", "// Scan order: ");
|
||||
comments.Add("scan_hdir", "// Horizontal direction: ");
|
||||
comments.Add("scan_vdir", "// Vertical direction: ");
|
||||
|
||||
comments.Add("num_bit_order", "// Bit order: ");
|
||||
comments.Add("num_base", "// Numbers base: ");
|
||||
comments.Add("num_size", "// Numbers size: ");
|
||||
|
||||
comments.Add("text_format", "// Text format: ");
|
||||
comments.Add("text_lines", "// Numbers per line: ");
|
||||
|
||||
comments.Add("font_header_map",
|
||||
"// Font header map:\n" +
|
||||
"// width; // Font width in pixels\n" +
|
||||
"// height; // Font height in pixels\n" +
|
||||
"// space; // Font space in pixels\n" +
|
||||
"// first; // First character code\n" +
|
||||
"// last; // Last character code\n"
|
||||
);
|
||||
}
|
||||
|
||||
private void cbOrder_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
switch (cbOrder.SelectedIndex) {
|
||||
case 0: // Columns
|
||||
cbBitOrder.Items[0] = "LSB Top";
|
||||
cbBitOrder.Items[1] = "MSB Top";
|
||||
cbLines.Items[0] = "1 Column per line";
|
||||
break;
|
||||
case 1: // Rows
|
||||
cbBitOrder.Items[0] = "LSB Left";
|
||||
cbBitOrder.Items[1] = "MSB Left";
|
||||
cbLines.Items[0] = "1 Row per line";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnGenerate_Click(object sender, EventArgs e) {
|
||||
string output = "";
|
||||
txtOutput.Clear();
|
||||
bool com = cbComments.Checked;
|
||||
bool hdr = cbHeader.Checked;
|
||||
int lines = cbLines.SelectedIndex;
|
||||
int format = cbFormat.SelectedIndex;
|
||||
bool mono = mainForm.monospaced;
|
||||
int lineslim = (int)nudXLines.Value;
|
||||
int fcount = mainForm.frames.Count;
|
||||
|
||||
int imin, jmin, imax, jmax, idir, jdir;
|
||||
|
||||
if (com) {
|
||||
//Header comments
|
||||
output += comments["header"];
|
||||
output += comments["scan_order"] + cbOrder.Text + "\n";
|
||||
output += comments["scan_hdir"] + cbHDir.Text + "\n";
|
||||
output += comments["scan_vdir"] + cbVDir.Text + "\n\n";
|
||||
|
||||
output += comments["num_bit_order"] + cbBitOrder.Text + "\n";
|
||||
output += comments["num_base"] + cbNumBase.Text + "\n";
|
||||
output += comments["num_size"] + cbNumSize.Text + "\n\n";
|
||||
|
||||
output += comments["text_format"] + cbFormat.Text + "\n";
|
||||
output += comments["text_lines"] + cbLines.Text + "\n\n";
|
||||
|
||||
if (hdr) {
|
||||
// comment about meta header map
|
||||
output += comments["font_header_map"] + "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
//Figure out mins and maxes
|
||||
if (cbOrder.SelectedIndex == 0) {
|
||||
if (cbHDir.SelectedIndex == 0) {
|
||||
// Columns; Left to right
|
||||
imin = 0;
|
||||
imax = mainForm.dotWidth;
|
||||
idir = 1;
|
||||
} else {
|
||||
// Columns; Right to left
|
||||
imin = mainForm.dotWidth - 1;
|
||||
imax = -1;
|
||||
idir = -1;
|
||||
}
|
||||
if (cbVDir.SelectedIndex == 0) {
|
||||
// Columns; Top to bottom
|
||||
jmin = 0;
|
||||
jmax = mainForm.dotHeight;
|
||||
jdir = 1;
|
||||
} else {
|
||||
// Columns; Bottom to top
|
||||
jmin = mainForm.dotHeight - 1;
|
||||
jmax = -1;
|
||||
jdir = -1;
|
||||
}
|
||||
} else {
|
||||
if (cbVDir.SelectedIndex == 0) {
|
||||
// Rows; Left to right
|
||||
imin = 0;
|
||||
imax = mainForm.dotHeight;
|
||||
idir = 1;
|
||||
} else {
|
||||
// Rows; Right to left
|
||||
imin = mainForm.dotHeight - 1;
|
||||
imax = -1;
|
||||
idir = -1;
|
||||
}
|
||||
if (cbHDir.SelectedIndex == 0) {
|
||||
// Rows; Top to bottom
|
||||
jmin = 0;
|
||||
jmax = mainForm.dotWidth;
|
||||
jdir = 1;
|
||||
} else {
|
||||
// Rows; Bottom to top
|
||||
jmin = mainForm.dotWidth - 1;
|
||||
jmax = -1;
|
||||
jdir = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ushort bits = 8;
|
||||
string dataType = "uint8_t";
|
||||
switch (cbNumSize.SelectedIndex) {
|
||||
case 0:
|
||||
bits = 8;
|
||||
dataType = "uint8_t";
|
||||
break;
|
||||
case 1:
|
||||
bits = 16;
|
||||
dataType = "uint16_t";
|
||||
break;
|
||||
case 2:
|
||||
bits = 32;
|
||||
dataType = "uint32_t";
|
||||
break;
|
||||
}
|
||||
|
||||
int nbase = 16;
|
||||
string prefix = "0x";
|
||||
string pref = "";
|
||||
int pad = 2;
|
||||
switch (cbNumBase.SelectedIndex) {
|
||||
case 0:
|
||||
nbase = 16;
|
||||
prefix = "0x";
|
||||
pad = cbZeroes.Checked ? bits / 4 : 0;
|
||||
break;
|
||||
case 1:
|
||||
nbase = 2;
|
||||
prefix = "0b";
|
||||
pad = cbZeroes.Checked ? bits : 0;
|
||||
break;
|
||||
case 2:
|
||||
nbase = 10;
|
||||
prefix = "";
|
||||
pad = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
// Array definition
|
||||
if ( format == 0 || format == 1 ) output += "const " + dataType + " " + mainForm.prjName + "[]" + (format==1?"[]":"") + " = {\n";
|
||||
|
||||
// Should we add the meta header?
|
||||
if (hdr) {
|
||||
output +=
|
||||
" // Meta header\n" +
|
||||
" " + (mono ? mainForm.frames.First().width.ToString() : "0") + ", // Font width in pixels; 0 - variable width\n" +
|
||||
" " + mainForm.frames.First().height.ToString() + ", // Font height in pixels\n" +
|
||||
" 0, // Font space (between symbols) in pixels\n" +
|
||||
" " + mainForm.frames.First().code.ToString() + ", // First character code\n" +
|
||||
" " + mainForm.frames.Last().code.ToString() + ", // Last character code\n"
|
||||
;
|
||||
}
|
||||
|
||||
// Brackets for 2D array definition
|
||||
string obracket = format == 1 ? "{ " : "";
|
||||
string cbracket = format == 1 ? " }" : "";
|
||||
|
||||
// Number output counter
|
||||
int numcount = 0;
|
||||
|
||||
if (com) output += " // Data:\n";
|
||||
MainForm.FrameMiniature flast = mainForm.frames.Last();
|
||||
foreach ( MainForm.FrameMiniature f in mainForm.frames) {
|
||||
// For each frame
|
||||
uint b = 0; // current number bits
|
||||
int t, x, y; // t - calculated bit number; x - actual x; y - actual y
|
||||
|
||||
if (com && lines != 1 && fcount > 1) {
|
||||
// Comments enabled and other than "1 symbol per line" selected
|
||||
// Print a symbol comment before its data
|
||||
output += " // " + f.code.ToString() + " --> " + mainForm.decodeSymbol(f.code) + "\n";
|
||||
}
|
||||
if (lines == 1) {
|
||||
// "1 symbol per line" - new line offset
|
||||
output += " ";
|
||||
numcount = 0;
|
||||
}
|
||||
if (!mono && fcount > 1) {
|
||||
// Not a single image; Variable width font - lets post the width as a 1st number
|
||||
|
||||
// Should we post a prefix to the number?
|
||||
pref = (!cbZeroes.Checked && ((f.width < 10 && nbase == 16) || (f.width < 2 && nbase == 2))) ? "" : prefix;
|
||||
output += (lines != 1 ? " " : "") + pref + Convert.ToString(f.width, nbase).PadLeft(pad, '0') + (lines != 0 ? (lines == 1 ? ", " : "") : ",\n");
|
||||
// Count posted numbers
|
||||
numcount++;
|
||||
if (lines != 2) numcount = 0;
|
||||
if (lines == 2 && numcount >= lineslim) {
|
||||
numcount = 0;
|
||||
output += "\n ";
|
||||
}
|
||||
}
|
||||
if (lines == 2 && numcount == 0) {
|
||||
// "X numbers per line" - first line of a symbol offset
|
||||
output += " ";
|
||||
}
|
||||
|
||||
//Figure out mins and maxes for variable width fonts
|
||||
if (!mono && fcount > 1) {
|
||||
if (cbOrder.SelectedIndex == 0) {
|
||||
if (cbHDir.SelectedIndex == 0) {
|
||||
// Columns; Left to right
|
||||
imax = f.width;
|
||||
} else {
|
||||
// Columns; Right to left
|
||||
imin = f.width - 1;
|
||||
}
|
||||
if (cbVDir.SelectedIndex == 0) {
|
||||
// Columns; Top to bottom
|
||||
jmax = f.height;
|
||||
} else {
|
||||
// Columns; Bottom to top
|
||||
jmin = f.height - 1;
|
||||
}
|
||||
} else {
|
||||
if (cbVDir.SelectedIndex == 0) {
|
||||
// Rows; Left to right
|
||||
imax = f.height;
|
||||
} else {
|
||||
// Rows; Right to left
|
||||
imin = f.height - 1;
|
||||
}
|
||||
if (cbHDir.SelectedIndex == 0) {
|
||||
// Rows; Top to bottom
|
||||
jmax = f.width;
|
||||
} else {
|
||||
// Rows; Bottom to top
|
||||
jmin = f.width - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = imin; i != imax; i += idir) {
|
||||
if (lines == 0) {
|
||||
// "Column/Row per line" - new line offset
|
||||
output += " " + obracket;
|
||||
numcount = 0;
|
||||
}
|
||||
for (int j = jmin; j != jmax; j += jdir) {
|
||||
if (jdir < 0) t = jmin - j;
|
||||
else t = j;
|
||||
if (t % bits == 0) b = 0;
|
||||
|
||||
if (cbOrder.SelectedIndex == 0) { // Columns
|
||||
x = i; y = j;
|
||||
} else { // Rows
|
||||
x = j; y = i;
|
||||
}
|
||||
|
||||
if (f.data[x, y]) {
|
||||
if ((cbBitOrder.SelectedIndex == 0 && jdir > 0) || (cbBitOrder.SelectedIndex == 1 && jdir < 0)) {
|
||||
// LSB on top/Left
|
||||
b |= (uint)(1 << (t % bits));
|
||||
} else {
|
||||
// MSB on top/Left
|
||||
b |= (uint)(1 << (bits - (t % bits) - 1));
|
||||
}
|
||||
|
||||
}
|
||||
if (((t + 1) % bits == 0) || j + jdir == jmax) {
|
||||
// we have filled a number with bits - let's post it
|
||||
|
||||
// should we post a comma before the number?
|
||||
output += numcount == 0 ? "" : ", ";
|
||||
|
||||
// should we post a prefix to the number?
|
||||
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
||||
output += pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
||||
|
||||
// count posted numbers
|
||||
numcount++;
|
||||
if (lines == 2 && numcount >= lineslim && !(j + jdir == jmax && i + idir == imax)) {
|
||||
// "X numbers per line" - line break
|
||||
numcount = 0;
|
||||
output += ",\n ";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lines == 0) {
|
||||
// "Column/Row per line" - closing line
|
||||
output += cbracket + ((i+idir==imax) && f.Equals(flast) ? "" : ",") + "\n";
|
||||
}
|
||||
}
|
||||
if (lines == 1) {
|
||||
// "1 symbol per line" - closing line
|
||||
if (!f.Equals(flast)) output += ",";
|
||||
if (com && fcount > 1) {
|
||||
//...with a comment
|
||||
output += " // " + f.code.ToString() + " --> " + mainForm.decodeSymbol(f.code);
|
||||
}
|
||||
output += "\n";
|
||||
}
|
||||
if (lines == 2) {
|
||||
// "X numbers per line" - closing line
|
||||
if (!f.Equals(flast)) output += ",";
|
||||
output += "\n";
|
||||
numcount = 0;
|
||||
}
|
||||
}
|
||||
// Close array definition
|
||||
output += "};\n";
|
||||
|
||||
txtOutput.Text = output;
|
||||
txtOutput.SelectionStart = 0;
|
||||
txtOutput.ScrollToCaret();
|
||||
}
|
||||
|
||||
private void cbFormat_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if (cbFormat.SelectedIndex == 1 && cbHeader.Checked) {
|
||||
MessageBox.Show("Cannot pack the font meta header into 2D array!\nChoose 1D array or disable the meta header.\n(Setting array format to 1D array)", "No header in 2D array!", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
cbFormat.SelectedIndex = 0;
|
||||
}
|
||||
if (!mainForm.monospaced && cbFormat.SelectedIndex == 1 && mainForm.frames.Count > 1) {
|
||||
MessageBox.Show("Cannot pack the variable width font into 2D array!\n(Setting array format to 1D array)", "2D arrays are for monospaced fonts only!", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
cbFormat.SelectedIndex = 0;
|
||||
}
|
||||
if (cbFormat.SelectedIndex == 1) {
|
||||
cbLines.SelectedIndex = 0;
|
||||
cbLines.Enabled = false;
|
||||
} else {
|
||||
cbLines.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbLines_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if (cbLines.SelectedIndex == 2) {
|
||||
nudXLines.Enabled = true;
|
||||
lblXLines.Enabled = true;
|
||||
} else {
|
||||
nudXLines.Enabled = false;
|
||||
lblXLines.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
McBitFont/Export.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
563
McBitFont/Form1.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
namespace McBitFont {
|
||||
partial class Form1 {
|
||||
partial class MainForm {
|
||||
/// <summary>
|
||||
/// Обязательная переменная конструктора.
|
||||
/// </summary>
|
||||
@@ -24,20 +24,15 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("adasd");
|
||||
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("ddddd", 0);
|
||||
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("ffff");
|
||||
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("");
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.dotPanel = new System.Windows.Forms.Panel();
|
||||
this.nudX = new System.Windows.Forms.NumericUpDown();
|
||||
this.nudY = new System.Windows.Forms.NumericUpDown();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.lblType = new System.Windows.Forms.Label();
|
||||
this.cbZoom = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.pbZoom = new System.Windows.Forms.ProgressBar();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.btnMirrorY = new System.Windows.Forms.Button();
|
||||
this.btnMirrorX = new System.Windows.Forms.Button();
|
||||
@@ -46,13 +41,43 @@
|
||||
this.btnShiftUp = new System.Windows.Forms.Button();
|
||||
this.btnShiftRight = new System.Windows.Forms.Button();
|
||||
this.btnShiftLeft = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.outBox = new System.Windows.Forms.TextBox();
|
||||
this.listView1 = new System.Windows.Forms.ListView();
|
||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.btnExport = new System.Windows.Forms.Button();
|
||||
this.miniList = new System.Windows.Forms.ListView();
|
||||
this.ilMiniatures = new System.Windows.Forms.ImageList(this.components);
|
||||
this.btnApply = new System.Windows.Forms.Button();
|
||||
this.hScroll = new System.Windows.Forms.HScrollBar();
|
||||
this.vScroll = new System.Windows.Forms.VScrollBar();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.prependSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.appendSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shiftUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shiftDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shiftLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.shiftRightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.invertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mirrorXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mirrorYToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.dlgSave = new System.Windows.Forms.SaveFileDialog();
|
||||
this.dlgOpen = new System.Windows.Forms.OpenFileDialog();
|
||||
this.btnBaseline = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dotPanel
|
||||
@@ -60,19 +85,21 @@
|
||||
this.dotPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dotPanel.AutoScroll = true;
|
||||
this.dotPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.dotPanel.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.dotPanel.Location = new System.Drawing.Point(12, 12);
|
||||
this.dotPanel.Location = new System.Drawing.Point(12, 27);
|
||||
this.dotPanel.Name = "dotPanel";
|
||||
this.dotPanel.Size = new System.Drawing.Size(613, 542);
|
||||
this.dotPanel.Size = new System.Drawing.Size(389, 498);
|
||||
this.dotPanel.TabIndex = 0;
|
||||
this.dotPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.dotPanel_Paint);
|
||||
this.dotPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dotPanel_MouseMove);
|
||||
this.dotPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dotPanel_MouseMove);
|
||||
this.dotPanel.Resize += new System.EventHandler(this.cbZoom_SelectedIndexChanged);
|
||||
//
|
||||
// nudX
|
||||
//
|
||||
this.nudX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nudX.Location = new System.Drawing.Point(810, 12);
|
||||
this.nudX.Location = new System.Drawing.Point(717, 27);
|
||||
this.nudX.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
@@ -96,7 +123,7 @@
|
||||
// nudY
|
||||
//
|
||||
this.nudY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nudY.Location = new System.Drawing.Point(810, 38);
|
||||
this.nudY.Location = new System.Drawing.Point(717, 49);
|
||||
this.nudY.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
@@ -121,7 +148,7 @@
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(766, 14);
|
||||
this.label1.Location = new System.Drawing.Point(673, 29);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 3;
|
||||
@@ -131,25 +158,25 @@
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(763, 40);
|
||||
this.label2.Location = new System.Drawing.Point(670, 51);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Height:";
|
||||
//
|
||||
// label3
|
||||
// lblType
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(631, 12);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(35, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "label3";
|
||||
this.lblType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblType.Location = new System.Drawing.Point(554, 138);
|
||||
this.lblType.Name = "lblType";
|
||||
this.lblType.Size = new System.Drawing.Size(217, 13);
|
||||
this.lblType.TabIndex = 0;
|
||||
this.lblType.Text = "Monospaced";
|
||||
this.lblType.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
//
|
||||
// cbZoom
|
||||
//
|
||||
this.cbZoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cbZoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbZoom.FormattingEnabled = true;
|
||||
this.cbZoom.Items.AddRange(new object[] {
|
||||
@@ -165,32 +192,23 @@
|
||||
"40",
|
||||
"45",
|
||||
"50"});
|
||||
this.cbZoom.Location = new System.Drawing.Point(631, 533);
|
||||
this.cbZoom.Location = new System.Drawing.Point(605, 45);
|
||||
this.cbZoom.Name = "cbZoom";
|
||||
this.cbZoom.Size = new System.Drawing.Size(59, 21);
|
||||
this.cbZoom.TabIndex = 6;
|
||||
this.cbZoom.TabStop = false;
|
||||
this.cbZoom.SelectedIndexChanged += new System.EventHandler(this.cbZoom_SelectedIndexChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(628, 517);
|
||||
this.label4.Location = new System.Drawing.Point(604, 29);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(62, 13);
|
||||
this.label4.TabIndex = 7;
|
||||
this.label4.Text = "Zoom level:";
|
||||
//
|
||||
// pbZoom
|
||||
//
|
||||
this.pbZoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pbZoom.Location = new System.Drawing.Point(696, 533);
|
||||
this.pbZoom.Name = "pbZoom";
|
||||
this.pbZoom.Size = new System.Drawing.Size(169, 21);
|
||||
this.pbZoom.Step = 1;
|
||||
this.pbZoom.TabIndex = 8;
|
||||
this.pbZoom.Visible = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -202,15 +220,15 @@
|
||||
this.panel1.Controls.Add(this.btnShiftUp);
|
||||
this.panel1.Controls.Add(this.btnShiftRight);
|
||||
this.panel1.Controls.Add(this.btnShiftLeft);
|
||||
this.panel1.Location = new System.Drawing.Point(634, 70);
|
||||
this.panel1.Location = new System.Drawing.Point(428, 27);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(231, 80);
|
||||
this.panel1.Size = new System.Drawing.Size(120, 121);
|
||||
this.panel1.TabIndex = 9;
|
||||
//
|
||||
// btnMirrorY
|
||||
//
|
||||
this.btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnMirrorY.Location = new System.Drawing.Point(188, 4);
|
||||
this.btnMirrorY.Location = new System.Drawing.Point(79, 80);
|
||||
this.btnMirrorY.Name = "btnMirrorY";
|
||||
this.btnMirrorY.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnMirrorY.TabIndex = 6;
|
||||
@@ -221,7 +239,7 @@
|
||||
// btnMirrorX
|
||||
//
|
||||
this.btnMirrorX.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnMirrorX.Location = new System.Drawing.Point(152, 4);
|
||||
this.btnMirrorX.Location = new System.Drawing.Point(43, 80);
|
||||
this.btnMirrorX.Name = "btnMirrorX";
|
||||
this.btnMirrorX.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnMirrorX.TabIndex = 5;
|
||||
@@ -232,7 +250,7 @@
|
||||
// btnInvert
|
||||
//
|
||||
this.btnInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnInvert.Location = new System.Drawing.Point(116, 4);
|
||||
this.btnInvert.Location = new System.Drawing.Point(7, 80);
|
||||
this.btnInvert.Name = "btnInvert";
|
||||
this.btnInvert.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnInvert.TabIndex = 4;
|
||||
@@ -243,7 +261,7 @@
|
||||
// btnShiftDown
|
||||
//
|
||||
this.btnShiftDown.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnShiftDown.Location = new System.Drawing.Point(44, 40);
|
||||
this.btnShiftDown.Location = new System.Drawing.Point(43, 44);
|
||||
this.btnShiftDown.Name = "btnShiftDown";
|
||||
this.btnShiftDown.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnShiftDown.TabIndex = 3;
|
||||
@@ -254,7 +272,7 @@
|
||||
// btnShiftUp
|
||||
//
|
||||
this.btnShiftUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnShiftUp.Location = new System.Drawing.Point(44, 4);
|
||||
this.btnShiftUp.Location = new System.Drawing.Point(43, 8);
|
||||
this.btnShiftUp.Name = "btnShiftUp";
|
||||
this.btnShiftUp.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnShiftUp.TabIndex = 2;
|
||||
@@ -265,7 +283,7 @@
|
||||
// btnShiftRight
|
||||
//
|
||||
this.btnShiftRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnShiftRight.Location = new System.Drawing.Point(80, 40);
|
||||
this.btnShiftRight.Location = new System.Drawing.Point(79, 44);
|
||||
this.btnShiftRight.Name = "btnShiftRight";
|
||||
this.btnShiftRight.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnShiftRight.TabIndex = 1;
|
||||
@@ -276,7 +294,7 @@
|
||||
// btnShiftLeft
|
||||
//
|
||||
this.btnShiftLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btnShiftLeft.Location = new System.Drawing.Point(8, 40);
|
||||
this.btnShiftLeft.Location = new System.Drawing.Point(7, 44);
|
||||
this.btnShiftLeft.Name = "btnShiftLeft";
|
||||
this.btnShiftLeft.Size = new System.Drawing.Size(30, 30);
|
||||
this.btnShiftLeft.TabIndex = 0;
|
||||
@@ -284,82 +302,387 @@
|
||||
this.btnShiftLeft.UseVisualStyleBackColor = true;
|
||||
this.btnShiftLeft.Click += new System.EventHandler(this.btnShiftLeft_Click);
|
||||
//
|
||||
// button1
|
||||
// btnExport
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Location = new System.Drawing.Point(634, 156);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 10;
|
||||
this.button1.Text = "Generate";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnExport.Location = new System.Drawing.Point(696, 109);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnExport.TabIndex = 10;
|
||||
this.btnExport.Text = "Export";
|
||||
this.btnExport.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// outBox
|
||||
// miniList
|
||||
//
|
||||
this.outBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.miniList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.outBox.Font = new System.Drawing.Font("Consolas", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.outBox.Location = new System.Drawing.Point(634, 185);
|
||||
this.outBox.Multiline = true;
|
||||
this.outBox.Name = "outBox";
|
||||
this.outBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.outBox.Size = new System.Drawing.Size(230, 134);
|
||||
this.outBox.TabIndex = 11;
|
||||
this.outBox.Text = "Output text here";
|
||||
this.miniList.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.miniList.GridLines = true;
|
||||
this.miniList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.miniList.HideSelection = false;
|
||||
this.miniList.LargeImageList = this.ilMiniatures;
|
||||
this.miniList.Location = new System.Drawing.Point(428, 154);
|
||||
this.miniList.MultiSelect = false;
|
||||
this.miniList.Name = "miniList";
|
||||
this.miniList.ShowGroups = false;
|
||||
this.miniList.Size = new System.Drawing.Size(343, 395);
|
||||
this.miniList.SmallImageList = this.ilMiniatures;
|
||||
this.miniList.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||
this.miniList.TabIndex = 12;
|
||||
this.miniList.TabStop = false;
|
||||
this.miniList.TileSize = new System.Drawing.Size(50, 50);
|
||||
this.miniList.UseCompatibleStateImageBehavior = false;
|
||||
this.miniList.SelectedIndexChanged += new System.EventHandler(this.miniList_SelectedIndexChanged);
|
||||
//
|
||||
// listView1
|
||||
// ilMiniatures
|
||||
//
|
||||
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listView1.HideSelection = false;
|
||||
this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
|
||||
listViewItem1,
|
||||
listViewItem2,
|
||||
listViewItem3,
|
||||
listViewItem4});
|
||||
this.listView1.LargeImageList = this.imageList1;
|
||||
this.listView1.Location = new System.Drawing.Point(634, 325);
|
||||
this.listView1.MultiSelect = false;
|
||||
this.listView1.Name = "listView1";
|
||||
this.listView1.ShowGroups = false;
|
||||
this.listView1.Size = new System.Drawing.Size(230, 189);
|
||||
this.listView1.SmallImageList = this.imageList1;
|
||||
this.listView1.TabIndex = 12;
|
||||
this.listView1.TabStop = false;
|
||||
this.listView1.TileSize = new System.Drawing.Size(50, 70);
|
||||
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||
this.ilMiniatures.ColorDepth = System.Windows.Forms.ColorDepth.Depth4Bit;
|
||||
this.ilMiniatures.ImageSize = new System.Drawing.Size(50, 50);
|
||||
this.ilMiniatures.TransparentColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
// imageList1
|
||||
// btnApply
|
||||
//
|
||||
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||
this.imageList1.Images.SetKeyName(0, "firmware.png");
|
||||
this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnApply.Location = new System.Drawing.Point(615, 109);
|
||||
this.btnApply.Name = "btnApply";
|
||||
this.btnApply.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnApply.TabIndex = 13;
|
||||
this.btnApply.Text = "Apply";
|
||||
this.btnApply.UseVisualStyleBackColor = true;
|
||||
this.btnApply.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// Form1
|
||||
// hScroll
|
||||
//
|
||||
this.hScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.hScroll.Location = new System.Drawing.Point(12, 528);
|
||||
this.hScroll.Name = "hScroll";
|
||||
this.hScroll.Size = new System.Drawing.Size(389, 21);
|
||||
this.hScroll.TabIndex = 14;
|
||||
this.hScroll.ValueChanged += new System.EventHandler(this.scroll_ValueChanged);
|
||||
//
|
||||
// vScroll
|
||||
//
|
||||
this.vScroll.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.vScroll.LargeChange = 25;
|
||||
this.vScroll.Location = new System.Drawing.Point(404, 27);
|
||||
this.vScroll.Name = "vScroll";
|
||||
this.vScroll.Size = new System.Drawing.Size(21, 498);
|
||||
this.vScroll.TabIndex = 15;
|
||||
this.vScroll.ValueChanged += new System.EventHandler(this.scroll_ValueChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(554, 114);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(24, 13);
|
||||
this.label5.TabIndex = 16;
|
||||
this.label5.Text = "X,Y";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.editToolStripMenuItem,
|
||||
this.toolsToolStripMenuItem,
|
||||
this.aboutToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(784, 24);
|
||||
this.menuStrip1.TabIndex = 17;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripMenuItem,
|
||||
this.openToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
this.newToolStripMenuItem.Image = global::McBitFont.Properties.Resources.file;
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+N";
|
||||
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newToolStripMenuItem.Text = "New";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Image = global::McBitFont.Properties.Resources.folder_open;
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+O";
|
||||
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.openToolStripMenuItem.Text = "Open";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Disk_16;
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+S";
|
||||
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveToolStripMenuItem.Text = "Save as";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Door_out_16;
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+X";
|
||||
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.X)));
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "Exit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.copyToolStripMenuItem,
|
||||
this.pasteToolStripMenuItem,
|
||||
this.prependSymbolToolStripMenuItem,
|
||||
this.appendSymbolToolStripMenuItem,
|
||||
this.removeSymbolToolStripMenuItem,
|
||||
this.applyToolStripMenuItem});
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.editToolStripMenuItem.Text = "Edit";
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Enabled = false;
|
||||
this.copyToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Page_copy_16;
|
||||
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
||||
this.copyToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+C";
|
||||
this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
|
||||
this.copyToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.copyToolStripMenuItem.Text = "Copy";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// pasteToolStripMenuItem
|
||||
//
|
||||
this.pasteToolStripMenuItem.Enabled = false;
|
||||
this.pasteToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Page_paste_16;
|
||||
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
|
||||
this.pasteToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+V";
|
||||
this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
|
||||
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.pasteToolStripMenuItem.Text = "Paste";
|
||||
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
|
||||
//
|
||||
// prependSymbolToolStripMenuItem
|
||||
//
|
||||
this.prependSymbolToolStripMenuItem.Enabled = false;
|
||||
this.prependSymbolToolStripMenuItem.Image = global::McBitFont.Properties.Resources.action_add;
|
||||
this.prependSymbolToolStripMenuItem.Name = "prependSymbolToolStripMenuItem";
|
||||
this.prependSymbolToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Ins";
|
||||
this.prependSymbolToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert)));
|
||||
this.prependSymbolToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.prependSymbolToolStripMenuItem.Text = "Prepend symbol";
|
||||
this.prependSymbolToolStripMenuItem.Click += new System.EventHandler(this.prependSymbolToolStripMenuItem_Click);
|
||||
//
|
||||
// appendSymbolToolStripMenuItem
|
||||
//
|
||||
this.appendSymbolToolStripMenuItem.Enabled = false;
|
||||
this.appendSymbolToolStripMenuItem.Image = global::McBitFont.Properties.Resources.action_add;
|
||||
this.appendSymbolToolStripMenuItem.Name = "appendSymbolToolStripMenuItem";
|
||||
this.appendSymbolToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+End";
|
||||
this.appendSymbolToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.End)));
|
||||
this.appendSymbolToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.appendSymbolToolStripMenuItem.Text = "Append symbol";
|
||||
this.appendSymbolToolStripMenuItem.Click += new System.EventHandler(this.prependSymbolToolStripMenuItem_Click);
|
||||
//
|
||||
// removeSymbolToolStripMenuItem
|
||||
//
|
||||
this.removeSymbolToolStripMenuItem.Enabled = false;
|
||||
this.removeSymbolToolStripMenuItem.Image = global::McBitFont.Properties.Resources.action_remove;
|
||||
this.removeSymbolToolStripMenuItem.Name = "removeSymbolToolStripMenuItem";
|
||||
this.removeSymbolToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Del";
|
||||
this.removeSymbolToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete)));
|
||||
this.removeSymbolToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.removeSymbolToolStripMenuItem.Text = "Remove symbol";
|
||||
this.removeSymbolToolStripMenuItem.Click += new System.EventHandler(this.removeSymbolToolStripMenuItem_Click);
|
||||
//
|
||||
// applyToolStripMenuItem
|
||||
//
|
||||
this.applyToolStripMenuItem.Image = global::McBitFont.Properties.Resources.action_check;
|
||||
this.applyToolStripMenuItem.Name = "applyToolStripMenuItem";
|
||||
this.applyToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Space";
|
||||
this.applyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Space)));
|
||||
this.applyToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
|
||||
this.applyToolStripMenuItem.Text = "Apply";
|
||||
this.applyToolStripMenuItem.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.shiftUpToolStripMenuItem,
|
||||
this.shiftDownToolStripMenuItem,
|
||||
this.shiftLeftToolStripMenuItem,
|
||||
this.shiftRightToolStripMenuItem,
|
||||
this.invertToolStripMenuItem,
|
||||
this.mirrorXToolStripMenuItem,
|
||||
this.mirrorYToolStripMenuItem,
|
||||
this.exportToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
|
||||
this.toolsToolStripMenuItem.Text = "Tools";
|
||||
//
|
||||
// shiftUpToolStripMenuItem
|
||||
//
|
||||
this.shiftUpToolStripMenuItem.Image = global::McBitFont.Properties.Resources.arrow_top;
|
||||
this.shiftUpToolStripMenuItem.Name = "shiftUpToolStripMenuItem";
|
||||
this.shiftUpToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Up";
|
||||
this.shiftUpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up)));
|
||||
this.shiftUpToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.shiftUpToolStripMenuItem.Text = "Shift Up";
|
||||
this.shiftUpToolStripMenuItem.Click += new System.EventHandler(this.btnShiftUp_Click);
|
||||
//
|
||||
// shiftDownToolStripMenuItem
|
||||
//
|
||||
this.shiftDownToolStripMenuItem.Image = global::McBitFont.Properties.Resources.arrow_down;
|
||||
this.shiftDownToolStripMenuItem.Name = "shiftDownToolStripMenuItem";
|
||||
this.shiftDownToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Down";
|
||||
this.shiftDownToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Down)));
|
||||
this.shiftDownToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.shiftDownToolStripMenuItem.Text = "Shift Down";
|
||||
this.shiftDownToolStripMenuItem.Click += new System.EventHandler(this.btnShiftDown_Click);
|
||||
//
|
||||
// shiftLeftToolStripMenuItem
|
||||
//
|
||||
this.shiftLeftToolStripMenuItem.Image = global::McBitFont.Properties.Resources.arrow_back;
|
||||
this.shiftLeftToolStripMenuItem.Name = "shiftLeftToolStripMenuItem";
|
||||
this.shiftLeftToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Left";
|
||||
this.shiftLeftToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Left)));
|
||||
this.shiftLeftToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.shiftLeftToolStripMenuItem.Text = "Shift left";
|
||||
this.shiftLeftToolStripMenuItem.Click += new System.EventHandler(this.btnShiftLeft_Click);
|
||||
//
|
||||
// shiftRightToolStripMenuItem
|
||||
//
|
||||
this.shiftRightToolStripMenuItem.Image = global::McBitFont.Properties.Resources.arrow_next;
|
||||
this.shiftRightToolStripMenuItem.Name = "shiftRightToolStripMenuItem";
|
||||
this.shiftRightToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Right";
|
||||
this.shiftRightToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Right)));
|
||||
this.shiftRightToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.shiftRightToolStripMenuItem.Text = "Shift Right";
|
||||
this.shiftRightToolStripMenuItem.Click += new System.EventHandler(this.btnShiftRight_Click);
|
||||
//
|
||||
// invertToolStripMenuItem
|
||||
//
|
||||
this.invertToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Ionic_Ionicons_Invert_mode_outline_16;
|
||||
this.invertToolStripMenuItem.Name = "invertToolStripMenuItem";
|
||||
this.invertToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+I";
|
||||
this.invertToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.invertToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.invertToolStripMenuItem.Text = "Invert";
|
||||
this.invertToolStripMenuItem.Click += new System.EventHandler(this.btnInvert_Click);
|
||||
//
|
||||
// mirrorXToolStripMenuItem
|
||||
//
|
||||
this.mirrorXToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Shape_flip_horizontal_16;
|
||||
this.mirrorXToolStripMenuItem.Name = "mirrorXToolStripMenuItem";
|
||||
this.mirrorXToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+X";
|
||||
this.mirrorXToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
|
||||
this.mirrorXToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.mirrorXToolStripMenuItem.Text = "Mirror X";
|
||||
this.mirrorXToolStripMenuItem.Click += new System.EventHandler(this.btnMirrorX_Click);
|
||||
//
|
||||
// mirrorYToolStripMenuItem
|
||||
//
|
||||
this.mirrorYToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Shape_flip_vertical_16;
|
||||
this.mirrorYToolStripMenuItem.Name = "mirrorYToolStripMenuItem";
|
||||
this.mirrorYToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Y";
|
||||
this.mirrorYToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
|
||||
this.mirrorYToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.mirrorYToolStripMenuItem.Text = "Mirror Y";
|
||||
this.mirrorYToolStripMenuItem.Click += new System.EventHandler(this.btnMirrorY_Click);
|
||||
//
|
||||
// exportToolStripMenuItem
|
||||
//
|
||||
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
|
||||
this.exportToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+E";
|
||||
this.exportToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
|
||||
this.exportToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
|
||||
this.exportToolStripMenuItem.Text = "Export";
|
||||
this.exportToolStripMenuItem.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20);
|
||||
this.aboutToolStripMenuItem.Text = "About";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||
//
|
||||
// dlgSave
|
||||
//
|
||||
this.dlgSave.DefaultExt = "mbf";
|
||||
this.dlgSave.Filter = "McBitFont files|*.mbf|All files|*.*";
|
||||
//
|
||||
// dlgOpen
|
||||
//
|
||||
this.dlgOpen.DefaultExt = "mbf";
|
||||
this.dlgOpen.Filter = "McBitFont files|*.mbf|All files|*.*";
|
||||
//
|
||||
// btnBaseline
|
||||
//
|
||||
this.btnBaseline.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBaseline.Location = new System.Drawing.Point(615, 80);
|
||||
this.btnBaseline.Name = "btnBaseline";
|
||||
this.btnBaseline.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBaseline.TabIndex = 18;
|
||||
this.btnBaseline.Text = "Baseline";
|
||||
this.btnBaseline.UseVisualStyleBackColor = true;
|
||||
this.btnBaseline.Click += new System.EventHandler(this.btnBaseline_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(877, 566);
|
||||
this.Controls.Add(this.listView1);
|
||||
this.Controls.Add(this.outBox);
|
||||
this.Controls.Add(this.button1);
|
||||
this.ClientSize = new System.Drawing.Size(784, 561);
|
||||
this.Controls.Add(this.btnBaseline);
|
||||
this.Controls.Add(this.btnApply);
|
||||
this.Controls.Add(this.btnExport);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.vScroll);
|
||||
this.Controls.Add(this.hScroll);
|
||||
this.Controls.Add(this.miniList);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.pbZoom);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.cbZoom);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.lblType);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.nudY);
|
||||
this.Controls.Add(this.nudX);
|
||||
this.Controls.Add(this.dotPanel);
|
||||
this.Name = "Form1";
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MinimumSize = new System.Drawing.Size(800, 600);
|
||||
this.Name = "MainForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "McBitFont";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudX)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudY)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -372,10 +695,9 @@
|
||||
private System.Windows.Forms.NumericUpDown nudY;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label lblType;
|
||||
private System.Windows.Forms.ComboBox cbZoom;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.ProgressBar pbZoom;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button btnShiftLeft;
|
||||
private System.Windows.Forms.Button btnShiftRight;
|
||||
@@ -384,10 +706,39 @@
|
||||
private System.Windows.Forms.Button btnInvert;
|
||||
private System.Windows.Forms.Button btnMirrorX;
|
||||
private System.Windows.Forms.Button btnMirrorY;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.TextBox outBox;
|
||||
private System.Windows.Forms.ListView listView1;
|
||||
private System.Windows.Forms.ImageList imageList1;
|
||||
private System.Windows.Forms.Button btnExport;
|
||||
private System.Windows.Forms.ListView miniList;
|
||||
private System.Windows.Forms.ImageList ilMiniatures;
|
||||
private System.Windows.Forms.Button btnApply;
|
||||
private System.Windows.Forms.HScrollBar hScroll;
|
||||
private System.Windows.Forms.VScrollBar vScroll;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeSymbolToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shiftUpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shiftDownToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shiftLeftToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem shiftRightToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem invertToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mirrorXToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mirrorYToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.SaveFileDialog dlgSave;
|
||||
private System.Windows.Forms.OpenFileDialog dlgOpen;
|
||||
private System.Windows.Forms.ToolStripMenuItem applyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem prependSymbolToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem appendSymbolToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem;
|
||||
private System.Windows.Forms.Button btnBaseline;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -9,279 +9,768 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace McBitFont {
|
||||
public partial class Form1 : Form {
|
||||
public partial class MainForm : Form {
|
||||
|
||||
struct FrameMiniature {
|
||||
[Serializable]
|
||||
public struct FrameMiniature {
|
||||
public FrameMiniature(int cc, int ww, int hh) {
|
||||
code = cc;
|
||||
width = ww;
|
||||
height = hh;
|
||||
data = new bool[ww, hh];
|
||||
}
|
||||
public int code;
|
||||
public int width;
|
||||
public int height;
|
||||
public bool[,] data;
|
||||
};
|
||||
|
||||
FrameMiniature f;
|
||||
private int cellSize = 10;
|
||||
private int dotWidth, dotHeight;
|
||||
private Panel[,] dots = new Panel[255,255];
|
||||
[Serializable]
|
||||
public struct SaveBlock {
|
||||
public bool monospaced;
|
||||
public int codepage;
|
||||
public int baseline;
|
||||
public List<FrameMiniature> frames;
|
||||
}
|
||||
|
||||
public Form1() {
|
||||
private FrameMiniature f;
|
||||
public List<FrameMiniature> frames = new List<FrameMiniature>();
|
||||
private int cellSize = 10;
|
||||
public int dotWidth, dotHeight;
|
||||
private int pixelOffset = 5;
|
||||
private int gap;
|
||||
private int w, h;
|
||||
public bool monospaced = false;
|
||||
bool modified = false;
|
||||
bool prjModified = false;
|
||||
public const string version = "1.4";
|
||||
public string prjName = "Untitled";
|
||||
public int codepage = 1251;
|
||||
private FrameMiniature fbuf;
|
||||
private bool fbuffer = false;
|
||||
public int baseline = 0;
|
||||
public bool set_base = false;
|
||||
|
||||
public MainForm() {
|
||||
InitializeComponent();
|
||||
this.dotPanel.MouseWheel += new MouseEventHandler(this.dotPanel_MouseWheel);
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e) {
|
||||
int i, j;
|
||||
|
||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||
dotWidth = (int)nudX.Value;
|
||||
dotHeight = (int)nudY.Value;
|
||||
|
||||
for (i = 0; i < dotWidth; i++) {
|
||||
for (j = 0; j < dotHeight; j++) {
|
||||
Panel p = new Panel();
|
||||
dots[i,j] = NewDot(i, j);
|
||||
}
|
||||
}
|
||||
gap = (cellSize < 5) ? 0 : 1;
|
||||
w = pixelOffset + dotWidth * (cellSize + gap);
|
||||
h = pixelOffset + dotHeight * (cellSize + gap);
|
||||
|
||||
|
||||
cbZoom.SelectedIndex = 3;
|
||||
cbZoom.SelectedIndexChanged += cbZoom_SelectedIndexChanged;
|
||||
|
||||
f.code = 1;
|
||||
f.width = dotWidth;
|
||||
f.height = dotHeight;
|
||||
f.data = new bool[dotWidth, dotHeight];
|
||||
frames.Add(new FrameMiniature(0, dotWidth, dotHeight));
|
||||
miniList.Items.Add("000", "000 Single", "000");
|
||||
miniList.Refresh();
|
||||
miniList.Items[0].Selected = true;
|
||||
miniList.Select();
|
||||
f = copyFrame(frames.Find(x => x.code == 0));
|
||||
|
||||
ListViewItem_SetSpacing(miniList, 50 + 2, 50 + 22);
|
||||
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
|
||||
fbuf = new FrameMiniature(0, dotWidth, dotHeight);
|
||||
}
|
||||
|
||||
private Panel NewDot(int i, int j) {
|
||||
Panel p = new Panel();
|
||||
p.Parent = dotPanel;
|
||||
p.Width = cellSize; p.Height = cellSize;
|
||||
p.BackColor = Color.White;
|
||||
p.BorderStyle = BorderStyle.None;
|
||||
p.Left = 5 + i * (cellSize + 1);
|
||||
p.Top = 5 + j * (cellSize + 1);
|
||||
p.Tag = i.ToString() + ',' + j.ToString();
|
||||
p.MouseMove += dot_MouseMove;
|
||||
p.MouseDown += dot_MouseMove;
|
||||
//p.Paint += dotPanel_Paint;
|
||||
return p;
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
public int MakeLong(short lowPart, short highPart) {
|
||||
return (int)(((ushort)lowPart) | (uint)(highPart << 16));
|
||||
}
|
||||
|
||||
private void dot_MouseMove(object sender, MouseEventArgs e) {
|
||||
Panel p = (Panel)sender;
|
||||
FrameMiniature copyFrame(FrameMiniature frame) {
|
||||
var ff = new FrameMiniature(frame.code, frame.width, frame.height);
|
||||
Array.Copy(frame.data, ff.data, frame.data.Length);
|
||||
return ff;
|
||||
}
|
||||
|
||||
if (e.Button == MouseButtons.Left && p.BackColor != Color.Black) {
|
||||
p.BackColor = Color.Black;
|
||||
public void ListViewItem_SetSpacing(ListView listview, short leftPadding, short topPadding) {
|
||||
const int LVM_FIRST = 0x1000;
|
||||
const int LVM_SETICONSPACING = LVM_FIRST + 53;
|
||||
SendMessage(listview.Handle, LVM_SETICONSPACING, IntPtr.Zero, (IntPtr)MakeLong(leftPadding, topPadding));
|
||||
}
|
||||
|
||||
private void dotPanel_MouseWheel(object sender, MouseEventArgs e) {
|
||||
int t = e.Delta / 120;
|
||||
if (e.Delta == 0) return;
|
||||
if (ModifierKeys.HasFlag(Keys.Shift)) {
|
||||
t += cbZoom.SelectedIndex;
|
||||
if (t > cbZoom.Items.Count - 1) return;
|
||||
if (t < 0) return;
|
||||
cbZoom.SelectedIndex = t;
|
||||
} else if (ModifierKeys.HasFlag(Keys.Control)) {
|
||||
if (hScroll.Enabled) {
|
||||
t = t * -1 * (cellSize + gap) + hScroll.Value;
|
||||
if (t < hScroll.Minimum) t = hScroll.Minimum;
|
||||
if (t > hScroll.Maximum) t = hScroll.Maximum;
|
||||
hScroll.Value = t;
|
||||
}
|
||||
} else {
|
||||
if (vScroll.Enabled) {
|
||||
t = t * -1 * (cellSize + gap) + vScroll.Value;
|
||||
if (t < vScroll.Minimum) t = vScroll.Minimum;
|
||||
if (t > vScroll.Maximum) t = vScroll.Maximum;
|
||||
vScroll.Value = t;
|
||||
}
|
||||
}
|
||||
if (e.Button == MouseButtons.Right && p.BackColor != Color.White) {
|
||||
p.BackColor = Color.White;
|
||||
}
|
||||
label3.Text = "Over: " + p.Tag;
|
||||
p.Capture = false;
|
||||
}
|
||||
|
||||
private void nudX_ValueChanged(object sender, EventArgs e) {
|
||||
if (monospaced) {
|
||||
Bitmap bmp;
|
||||
for (int i = 0; i < frames.Count; i++) {
|
||||
frames[i] = frameResize(frames[i], (int)nudX.Value, dotHeight);
|
||||
bmp = getMiniPictue(frames[i]);
|
||||
string s = frames[i].code.ToString().PadLeft(3, '0');
|
||||
ilMiniatures.Images.RemoveByKey(s);
|
||||
ilMiniatures.Images.Add(s, (Image)bmp);
|
||||
miniList.Items[s].ImageKey = s;
|
||||
}
|
||||
} else {
|
||||
if (nudX.Focused) modified = true;
|
||||
}
|
||||
prjModified = true;
|
||||
dotResize((int)nudX.Value, dotHeight);
|
||||
}
|
||||
|
||||
private void nudY_ValueChanged(object sender, EventArgs e) {
|
||||
Bitmap bmp;
|
||||
for (int i = 0; i < frames.Count; i++) {
|
||||
frames[i] = frameResize(frames[i], dotWidth, (int)nudY.Value);
|
||||
bmp = getMiniPictue(frames[i]);
|
||||
string s = frames[i].code.ToString().PadLeft(3, '0');
|
||||
ilMiniatures.Images.RemoveByKey(s);
|
||||
ilMiniatures.Images.Add(s, (Image)bmp);
|
||||
miniList.Items[s].ImageKey = s;
|
||||
}
|
||||
prjModified = true;
|
||||
dotResize(dotWidth, (int)nudY.Value);
|
||||
}
|
||||
|
||||
private void dotResize(int w, int h) {
|
||||
//Width
|
||||
if (w > dotWidth) {
|
||||
for (int i = dotWidth; i < w; i++) {
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
dots[i, j] = NewDot(i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (w < dotWidth) {
|
||||
for (int i = w; i < dotWidth; i++) {
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
dots[i, j].Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
dotWidth = w;
|
||||
private FrameMiniature frameResize(FrameMiniature ff, int neww, int newh) {
|
||||
int oldw = ff.width;
|
||||
int oldh = ff.height;
|
||||
int imax, jmax;
|
||||
bool[,] t;
|
||||
|
||||
//Height
|
||||
if (h > dotHeight) {
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
for (int j = dotHeight; j < h; j++) {
|
||||
dots[i, j] = NewDot(i, j);
|
||||
}
|
||||
if (neww < oldw) imax = neww;
|
||||
else imax = oldw;
|
||||
if (newh < oldh) jmax = newh;
|
||||
else jmax = oldh;
|
||||
|
||||
ff.width = neww;
|
||||
ff.height = newh;
|
||||
t = new bool[neww, newh];
|
||||
for (int i=0; i<imax; i++) {
|
||||
for (int j=0;j<jmax; j++) {
|
||||
t[i, j] = ff.data[i, j];
|
||||
}
|
||||
}
|
||||
if (h < dotHeight) {
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
for (int j = h; j < dotHeight; j++) {
|
||||
dots[i, j].Dispose();
|
||||
}
|
||||
ff.data = t;
|
||||
|
||||
return ff;
|
||||
}
|
||||
|
||||
private void dotResize(int ww, int hh) {
|
||||
int imax, jmax;
|
||||
bool[,] t;
|
||||
|
||||
if (ww < dotWidth) imax = ww;
|
||||
else imax = dotWidth;
|
||||
if (hh < dotHeight) jmax = hh;
|
||||
else jmax = dotHeight;
|
||||
|
||||
f.width = ww;
|
||||
f.height = hh;
|
||||
t = new bool[ww, hh];
|
||||
for (int i=0; i<imax; i++) {
|
||||
for (int j=0; j<jmax; j++) {
|
||||
t[i, j] = f.data[i, j];
|
||||
}
|
||||
}
|
||||
dotHeight = h;
|
||||
f.data = t;
|
||||
dotWidth = ww;
|
||||
dotHeight = hh;
|
||||
w = pixelOffset + dotWidth * (cellSize + gap);
|
||||
h = pixelOffset + dotHeight * (cellSize + gap);
|
||||
cbZoom_SelectedIndexChanged(cbZoom, null);
|
||||
|
||||
fbuffer = false;
|
||||
}
|
||||
|
||||
private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
cellSize = Convert.ToInt32(cbZoom.Text);
|
||||
dotScale();
|
||||
gap = (cellSize < 5) ? 0 : 1;
|
||||
|
||||
w = pixelOffset + dotWidth * (cellSize + gap);
|
||||
h = pixelOffset + dotHeight * (cellSize + gap);
|
||||
if (w <= dotPanel.Width) {
|
||||
hScroll.Enabled = false;
|
||||
hScroll.Value = 0;
|
||||
} else {
|
||||
hScroll.Maximum = w - dotPanel.Width + 12;
|
||||
hScroll.Minimum = 0;
|
||||
hScroll.Enabled = true;
|
||||
}
|
||||
|
||||
if (h <= dotPanel.Height) {
|
||||
vScroll.Enabled = false;
|
||||
vScroll.Value = 0;
|
||||
} else {
|
||||
vScroll.Maximum = h - dotPanel.Height + 12;
|
||||
vScroll.Minimum = 0;
|
||||
vScroll.Enabled = true;
|
||||
}
|
||||
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnShiftLeft_Click(object sender, EventArgs e) {
|
||||
bool c;
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
Color c = dots[0, j].BackColor;
|
||||
c = f.data[0, j];
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
if (i == dotWidth - 1) {
|
||||
dots[i, j].BackColor = c;
|
||||
f.data[i, j] = c;
|
||||
} else {
|
||||
dots[i, j].BackColor = dots[i+1, j].BackColor;
|
||||
f.data[i, j] = f.data[i + 1, j];
|
||||
}
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnShiftRight_Click(object sender, EventArgs e) {
|
||||
bool c;
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
Color c = dots[dotWidth - 1, j].BackColor;
|
||||
for (int i = dotWidth-1; i >= 0; i--) {
|
||||
c = f.data[dotWidth - 1, j];
|
||||
for (int i = dotWidth - 1; i >= 0; i--) {
|
||||
if (i == 0) {
|
||||
dots[i, j].BackColor = c;
|
||||
f.data[i, j] = c;
|
||||
} else {
|
||||
dots[i, j].BackColor = dots[i - 1, j].BackColor;
|
||||
f.data[i, j] = f.data[i - 1, j];
|
||||
}
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void dotPanel_MouseMove(object sender, MouseEventArgs e) {
|
||||
Panel p = (Panel)sender;
|
||||
p.Capture = false;
|
||||
Rectangle rect1, rect2;
|
||||
if (set_base) {
|
||||
|
||||
int yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
||||
rect1 = new Rectangle(pixelOffset, yy, w, 2);
|
||||
baseline = (e.Y - pixelOffset + vScroll.Value) / (cellSize + gap);
|
||||
|
||||
if (baseline >= dotHeight) baseline = dotHeight - 1;
|
||||
if (baseline < 0) baseline = 0;
|
||||
|
||||
yy = pixelOffset + baseline * (cellSize + gap) - vScroll.Value - 1;
|
||||
rect2 = new Rectangle(pixelOffset, yy, w, 2);
|
||||
|
||||
dotPanel.Invalidate(rect1);
|
||||
dotPanel.Invalidate(rect2);
|
||||
|
||||
if (e.Button == MouseButtons.Left) {
|
||||
set_base = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (e.X >= w || e.X <= pixelOffset || e.Y >= h || e.Y <= pixelOffset) return;
|
||||
int i = (e.X - pixelOffset + hScroll.Value) / (cellSize + gap);
|
||||
int j = (e.Y - pixelOffset + vScroll.Value) / (cellSize + gap);
|
||||
label5.Text = i.ToString() + ',' + j.ToString();
|
||||
|
||||
if (e.Button == MouseButtons.Left && !f.data[i, j]) {
|
||||
Graphics g = dotPanel.CreateGraphics();
|
||||
SolidBrush sbb = new SolidBrush(Color.Black);
|
||||
f.data[i, j] = true;
|
||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
||||
modified = true;
|
||||
rect1 = new Rectangle(x, y, cellSize, cellSize);
|
||||
dotPanel.Invalidate(rect1);
|
||||
}
|
||||
if (e.Button == MouseButtons.Right && f.data[i, j]) {
|
||||
Graphics g = dotPanel.CreateGraphics();
|
||||
SolidBrush sbw = new SolidBrush(Color.White);
|
||||
f.data[i, j] = false;
|
||||
int x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
||||
int y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
||||
modified = true;
|
||||
rect1 = new Rectangle(x, y, cellSize, cellSize);
|
||||
dotPanel.Invalidate(rect1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnShiftUp_Click(object sender, EventArgs e) {
|
||||
bool c;
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
Color c = dots[i, 0].BackColor;
|
||||
c = f.data[i, 0];
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
if (j == dotHeight - 1) {
|
||||
dots[i, j].BackColor = c;
|
||||
f.data[i, j] = c;
|
||||
} else {
|
||||
dots[i, j].BackColor = dots[i, j + 1].BackColor;
|
||||
f.data[i, j] = f.data[i, j + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnShiftDown_Click(object sender, EventArgs e) {
|
||||
bool c;
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
Color c = dots[i, dotHeight - 1].BackColor;
|
||||
c = f.data[i, dotHeight - 1];
|
||||
for (int j = dotHeight-1; j >= 0; j--) {
|
||||
if (j == 0) {
|
||||
dots[i, j].BackColor = c;
|
||||
f.data[i, j] = c;
|
||||
} else {
|
||||
dots[i, j].BackColor = dots[i, j - 1].BackColor;
|
||||
f.data[i, j] = f.data[i, j - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnInvert_Click(object sender, EventArgs e) {
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
if (dots[i, j].BackColor == Color.White)
|
||||
dots[i, j].BackColor = Color.Black;
|
||||
else
|
||||
dots[i, j].BackColor = Color.White;
|
||||
f.data[i, j] = !f.data[i, j];
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnMirrorX_Click(object sender, EventArgs e) {
|
||||
int a, b, j;
|
||||
Color c;
|
||||
bool c;
|
||||
|
||||
for (j = 0; j < dotHeight; j++) {
|
||||
a = 0;
|
||||
b = dotWidth - 1;
|
||||
while (a < b) {
|
||||
c = dots[a, j].BackColor;
|
||||
dots[a, j].BackColor = dots[b, j].BackColor;
|
||||
dots[b, j].BackColor = c;
|
||||
c = f.data[a, j];
|
||||
f.data[a, j] = f.data[b, j];
|
||||
f.data[b, j] = c;
|
||||
a++;
|
||||
b--;
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void btnMirrorY_Click(object sender, EventArgs e) {
|
||||
int a, b, i;
|
||||
Color c;
|
||||
bool c;
|
||||
|
||||
for (i = 0; i < dotWidth; i++) {
|
||||
a = 0;
|
||||
b = dotHeight - 1;
|
||||
while (a < b) {
|
||||
c = dots[i, a].BackColor;
|
||||
dots[i, a].BackColor = dots[i, b].BackColor;
|
||||
dots[i, b].BackColor = c;
|
||||
c = f.data[i, a];
|
||||
f.data[i, a] = f.data[i, b];
|
||||
f.data[i, b] = c;
|
||||
a++;
|
||||
b--;
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e) {
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
if (dots[i, j].BackColor == Color.Black) f.data[i, j] = true;
|
||||
else f.data[i, j] = false;
|
||||
if (modified) {
|
||||
if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
||||
saveFrame();
|
||||
} else {
|
||||
f = copyFrame(frames.Find(x => x.code == f.code));
|
||||
}
|
||||
modified = false;
|
||||
}
|
||||
|
||||
|
||||
Export eform = new Export(this);
|
||||
eform.ShowDialog();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e) {
|
||||
saveFrame();
|
||||
}
|
||||
|
||||
private void saveFrame() {
|
||||
int index = frames.FindIndex(x => x.code == f.code);
|
||||
frames[index] = f;
|
||||
|
||||
var sizedBMP = getMiniPictue(f);
|
||||
string s = f.code.ToString().PadLeft(3, '0');
|
||||
ilMiniatures.Images.RemoveByKey(s);
|
||||
ilMiniatures.Images.Add(s, (Image)sizedBMP);
|
||||
sizedBMP.Dispose();
|
||||
modified = false;
|
||||
prjModified = true;
|
||||
}
|
||||
|
||||
private Bitmap getMiniPictue(FrameMiniature m) {
|
||||
int picSize = (m.width > m.height) ? m.width : m.height;
|
||||
var bmp = new Bitmap(picSize, picSize);
|
||||
int imin = m.width < picSize ? (picSize - m.width) / 2 : 0;
|
||||
int jmin = m.height < picSize ? (picSize - m.height) / 2 : 0;
|
||||
Color c;
|
||||
for (int i = 0; i < m.width; i++) {
|
||||
for (int j = 0; j < m.height; j++) {
|
||||
c = m.data[i, j] ? Color.Black : Color.White;
|
||||
bmp.SetPixel(i+imin, j+jmin, c);
|
||||
}
|
||||
}
|
||||
var sizedBMP = new Bitmap(bmp, new Size(50, 50));
|
||||
bmp.Dispose();
|
||||
return sizedBMP;
|
||||
}
|
||||
|
||||
private void dotPanel_Paint(object sender, PaintEventArgs e) {
|
||||
Graphics g = dotPanel.CreateGraphics();
|
||||
SolidBrush sbb = new SolidBrush(Color.Black);
|
||||
SolidBrush sbw = new SolidBrush(Color.White);
|
||||
SolidBrush sb;
|
||||
Pen p = new Pen(Color.FromArgb(64, Color.Green));
|
||||
int x, y;
|
||||
|
||||
for (int i=0; i<dotWidth; i++) {
|
||||
x = pixelOffset + i * (cellSize + gap) - hScroll.Value;
|
||||
if (gap > 0 && i != 0 && (i % 8) == 0) {
|
||||
g.DrawLine(p, x - 1, pixelOffset - vScroll.Value, x - 1, h);
|
||||
}
|
||||
for (int j=0; j<dotHeight; j++) {
|
||||
y = pixelOffset + j * (cellSize + gap) - vScroll.Value;
|
||||
if (gap > 0 && i == 0 && j != 0 && (j % 8) == 0) {
|
||||
g.DrawLine(p, pixelOffset - hScroll.Value, y-1, w, y-1);
|
||||
}
|
||||
if (f.data[i, j]) sb = sbb;
|
||||
else sb = sbw;
|
||||
g.FillRectangle(sb, x, (baseline == j ? y+1 : y), cellSize, (baseline == j ? cellSize-1 : cellSize));
|
||||
}
|
||||
}
|
||||
|
||||
outBox.Clear();
|
||||
String str;
|
||||
Byte b = 0;
|
||||
for (ushort i = 0; i < dotWidth; i++) {
|
||||
str = "";
|
||||
for (ushort j = 0; j < dotHeight; j++) {
|
||||
if (j % 8 == 0) b = 0;
|
||||
if (f.data[i, j]) {
|
||||
b |= (Byte)(1 << (j % 8));
|
||||
}
|
||||
if ( ((j + 1) % 8 == 0) || j+1 == dotHeight ) {
|
||||
if (str.Length > 0) str += " ";
|
||||
str += "0x" + Convert.ToString(b, 16).PadLeft(2, '0') + ',';
|
||||
}
|
||||
}
|
||||
outBox.AppendText(str);
|
||||
outBox.AppendText(Environment.NewLine);
|
||||
if (baseline > 0 && gap > 0) {
|
||||
x = pixelOffset - hScroll.Value;
|
||||
y = pixelOffset + baseline * (cellSize + gap) - vScroll.Value;
|
||||
g.DrawLine(
|
||||
new Pen(Color.Blue, 2),
|
||||
x, y,
|
||||
w, y
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void dotScale() {
|
||||
bool large = dotWidth * dotHeight > 12 * 12;
|
||||
int gap = (cellSize < 5) ? 0 : 1;
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
if (large) {
|
||||
pbZoom.Maximum = dotWidth * dotHeight;
|
||||
pbZoom.Value = 0;
|
||||
pbZoom.Visible = true;
|
||||
dotPanel.Visible = false;
|
||||
}
|
||||
for (int i = 0; i < dotWidth; i++) {
|
||||
for (int j = 0; j < dotHeight; j++) {
|
||||
dots[i, j].Width = cellSize; dots[i, j].Height = cellSize;
|
||||
dots[i, j].Left = 5 + i * (cellSize + gap);
|
||||
dots[i, j].Top = 5 + j * (cellSize + gap);
|
||||
if (large) pbZoom.PerformStep();
|
||||
public string decodeSymbol(int code) {
|
||||
var enc = Encoding.GetEncoding(codepage);
|
||||
if (code < 32) return "";
|
||||
return enc.GetString(new byte[] { (byte)code });
|
||||
}
|
||||
|
||||
private FrameMiniature fillFrame(FrameMiniature ff, Font font, int sx, int sy) {
|
||||
string s = decodeSymbol(ff.code);
|
||||
Bitmap bmp = new Bitmap(ff.width, ff.height);
|
||||
Graphics g = Graphics.FromImage(bmp);
|
||||
g.Clear(Color.White);
|
||||
g.SmoothingMode = SmoothingMode.None;
|
||||
g.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
|
||||
g.DrawString(s, font, Brushes.Black, sx, sy);
|
||||
g.Flush();
|
||||
|
||||
for (int i = 0; i < ff.width; i++)
|
||||
for (int j = 0; j < ff.height; j++) {
|
||||
if (bmp.GetPixel(i, j).Name != "ffffffff")
|
||||
ff.data[i, j] = true;
|
||||
}
|
||||
|
||||
bmp.Dispose();
|
||||
g.Dispose();
|
||||
return ff;
|
||||
}
|
||||
|
||||
private void newToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
if (prjModified) {
|
||||
if (MessageBox.Show("The project is modified.\nDo you want to save it first?", "Project was modified!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) {
|
||||
saveToolStripMenuItem.PerformClick();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (large) {
|
||||
dotPanel.Visible = true;
|
||||
pbZoom.Visible = false;
|
||||
}
|
||||
New form = new New(this);
|
||||
if (form.ShowDialog() == DialogResult.OK) {
|
||||
frames.Clear();
|
||||
miniList.Clear();
|
||||
ilMiniatures.Images.Clear();
|
||||
|
||||
string append = "";
|
||||
int neww = (int)form.nudNewX.Value;
|
||||
int newh = (int)form.nudNewY.Value;
|
||||
nudX.Value = neww;
|
||||
nudY.Value = newh;
|
||||
FrameMiniature newf;
|
||||
if (form.cbSingle.Checked) {
|
||||
frames.Add( new FrameMiniature(0, neww, newh));
|
||||
//f = frames.Find(x => x.code == 0);
|
||||
append = "Single";
|
||||
monospaced = false;
|
||||
} else {
|
||||
int i;
|
||||
if (form.cbNotPrintable.Checked) {
|
||||
for (i = 0; i < 32; i++) {
|
||||
newf = new FrameMiniature(i, neww, newh);
|
||||
if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value);
|
||||
frames.Add(newf);
|
||||
}
|
||||
}
|
||||
if (form.cbLatin.Checked) {
|
||||
for (i = 32; i < 128; i++) {
|
||||
newf = new FrameMiniature(i, neww, newh);
|
||||
if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value);
|
||||
frames.Add(newf);
|
||||
}
|
||||
}
|
||||
if (form.cbExtended.Checked) {
|
||||
for (i = 128; i < 256; i++) {
|
||||
newf = new FrameMiniature(i, neww, newh);
|
||||
if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value);
|
||||
frames.Add(newf);
|
||||
}
|
||||
}
|
||||
monospaced = form.rbMono.Checked;
|
||||
}
|
||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||
codepage = (form.cbEncoding.SelectedItem as New.EncodingItem).Code;
|
||||
foreach (FrameMiniature ff in frames) {
|
||||
var s = ff.code.ToString().PadLeft(3, '0');
|
||||
ilMiniatures.Images.Add(s, (Image)getMiniPictue(ff));
|
||||
var sss = decodeSymbol(ff.code);
|
||||
miniList.Items.Add(s, s+' '+append+sss, s);
|
||||
}
|
||||
f = copyFrame(frames.First());
|
||||
dotPanel.Refresh();
|
||||
miniList.Refresh();
|
||||
form.Dispose();
|
||||
|
||||
baseline = 0;
|
||||
|
||||
prjName = "Untitled";
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
modified = false;
|
||||
checkForAdd();
|
||||
fbuffer = false;
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private void miniList_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if (miniList.FocusedItem == null) return;
|
||||
if (modified) {
|
||||
if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
||||
saveFrame();
|
||||
}
|
||||
modified = false;
|
||||
}
|
||||
if (miniList.SelectedItems.Count == 0) {
|
||||
removeSymbolToolStripMenuItem.Enabled = false;
|
||||
copyToolStripMenuItem.Enabled = false;
|
||||
pasteToolStripMenuItem.Enabled = false;
|
||||
return;
|
||||
//miniList.Items[0].Selected = true;
|
||||
}
|
||||
var sel = miniList.SelectedItems[0];
|
||||
int code = Convert.ToInt32(sel.ImageKey);
|
||||
FrameMiniature ff = copyFrame(frames.Find(x => x.code == code));
|
||||
nudX.Value = ff.width;
|
||||
nudY.Value = ff.height;
|
||||
f = ff;
|
||||
dotPanel.Refresh();
|
||||
ff = frames.Find(x => x.code == code);
|
||||
if (frames.Count > 1 && (ff.Equals(frames.First()) || ff.Equals(frames.Last()))) {
|
||||
removeSymbolToolStripMenuItem.Enabled = true;
|
||||
} else {
|
||||
removeSymbolToolStripMenuItem.Enabled = false;
|
||||
}
|
||||
copyToolStripMenuItem.Enabled = true;
|
||||
if (fbuffer) pasteToolStripMenuItem.Enabled = true;
|
||||
else pasteToolStripMenuItem.Enabled = false;
|
||||
}
|
||||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
if (dlgSave.ShowDialog() == DialogResult.OK) {
|
||||
SaveBlock sav;
|
||||
sav.monospaced = monospaced;
|
||||
sav.frames = frames;
|
||||
sav.codepage = codepage;
|
||||
sav.baseline = baseline;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
using (Stream ms = File.OpenWrite(dlgSave.FileName)) {
|
||||
formatter.Serialize(ms, sav);
|
||||
ms.Close();
|
||||
}
|
||||
prjModified = false;
|
||||
prjName = Path.GetFileNameWithoutExtension(dlgSave.FileName);
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
}
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
if (prjModified) {
|
||||
if (MessageBox.Show("The project is modified.\nDo you want to save it first?", "Project was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
||||
saveToolStripMenuItem.PerformClick();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (dlgOpen.ShowDialog() == DialogResult.OK) {
|
||||
SaveBlock sav;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
|
||||
using (FileStream fs = File.Open(dlgOpen.FileName, FileMode.Open)) {
|
||||
sav = (SaveBlock)formatter.Deserialize(fs);
|
||||
fs.Close();
|
||||
}
|
||||
monospaced = sav.monospaced;
|
||||
codepage = sav.codepage;
|
||||
baseline = sav.baseline;
|
||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||
frames = sav.frames;
|
||||
miniList.Items.Clear();
|
||||
ilMiniatures.Images.Clear();
|
||||
foreach (FrameMiniature ff in frames) {
|
||||
var s = ff.code.ToString().PadLeft(3, '0');
|
||||
var sss = decodeSymbol(ff.code);
|
||||
ilMiniatures.Images.Add(s, (Image)getMiniPictue(ff));
|
||||
miniList.Items.Add(s, s + ' ' + sss, s);
|
||||
}
|
||||
nudX.ValueChanged -= nudX_ValueChanged;
|
||||
nudY.ValueChanged -= nudY_ValueChanged;
|
||||
nudX.Value = frames.First().width;
|
||||
nudY.Value = frames.First().height;
|
||||
dotResize((int)nudX.Value, (int)nudY.Value);
|
||||
nudX.ValueChanged += nudX_ValueChanged;
|
||||
nudY.ValueChanged += nudY_ValueChanged;
|
||||
f = copyFrame(frames.First());
|
||||
dotPanel.Refresh();
|
||||
miniList.Refresh();
|
||||
modified = false;
|
||||
prjModified = false;
|
||||
|
||||
prjName = Path.GetFileNameWithoutExtension(dlgOpen.FileName);
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
checkForAdd();
|
||||
fbuffer = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void removeSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
if (miniList.SelectedItems.Count == 0) {
|
||||
removeSymbolToolStripMenuItem.Enabled = false;
|
||||
return;
|
||||
}
|
||||
var sel = miniList.SelectedItems[0].ImageKey;
|
||||
int code = Convert.ToInt32(miniList.SelectedItems[0].ImageKey);
|
||||
FrameMiniature ff = frames.Find(x => x.code == code);
|
||||
frames.Remove(ff);
|
||||
miniList.SelectedItems[0].Remove();
|
||||
//miniList.Items[0].Selected = true;
|
||||
}
|
||||
|
||||
private void prependSymbolToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
FrameMiniature ff;
|
||||
if (sender == prependSymbolToolStripMenuItem) {
|
||||
ff = new FrameMiniature(frames.First().code - 1, dotWidth, dotHeight);
|
||||
frames.Insert(0, ff);
|
||||
} else {
|
||||
ff = new FrameMiniature(frames.Last().code + 1, dotWidth, dotHeight);
|
||||
frames.Add(ff);
|
||||
}
|
||||
|
||||
var s = ff.code.ToString().PadLeft(3, '0');
|
||||
ilMiniatures.Images.Add(s, (Image)getMiniPictue(ff));
|
||||
var sss = decodeSymbol(ff.code);
|
||||
miniList.Items.Add(s, s + ' ' + sss, s);
|
||||
checkForAdd();
|
||||
}
|
||||
|
||||
private void checkForAdd() {
|
||||
if (frames.Count > 1) {
|
||||
if (frames.First().code > 0) prependSymbolToolStripMenuItem.Enabled = true;
|
||||
else prependSymbolToolStripMenuItem.Enabled = false;
|
||||
if (frames.Last().code < 255) appendSymbolToolStripMenuItem.Enabled = true;
|
||||
else appendSymbolToolStripMenuItem.Enabled = false;
|
||||
} else {
|
||||
prependSymbolToolStripMenuItem.Enabled = false;
|
||||
appendSymbolToolStripMenuItem.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
fbuffer = true;
|
||||
fbuf = copyFrame(f);
|
||||
pasteToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
|
||||
private void pasteToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
Array.Copy(fbuf.data, f.data, fbuf.data.Length);
|
||||
dotPanel.Refresh();
|
||||
modified = true;
|
||||
}
|
||||
|
||||
private void aboutToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
About form = new About();
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnBaseline_Click(object sender, EventArgs e) {
|
||||
set_base = !set_base;
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) {
|
||||
if (prjModified) {
|
||||
if (MessageBox.Show("The project is modified.\nAre you sure you want to quit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) {
|
||||
e.Cancel = true;
|
||||
} else {
|
||||
e.Cancel = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void scroll_ValueChanged(object sender, EventArgs e) {
|
||||
dotPanel.Refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -117,74 +117,36 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="ilMiniatures.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>127, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dlgSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>242, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dlgOpen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>336, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAG
|
||||
DgAAAk1TRnQBSQFMAwEBAAEIAQABCAEAATIBAAEyAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
AcgDAAEyAwABAQEAAQgFAAEQAScYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wBqAAH/AewBEgHz
|
||||
BAAB9AJtAfQEAAHzARIB7AH/tAAB8QIAAesEAAHvAgAB7wQAAesCAAHxtAAB8AIAAesEAAH3AgAB9wQA
|
||||
AesCAAHwtAAB8AIAAesEAAH3AgAB9wQAAesCAAHwtAAB8AIAAesEAAH3AgAB9wQAAesCAAHwtAAB8AIA
|
||||
AesEAAH3AgAB9wQAAesCAAHwtAAB9ALwAfIEAAHzAvAB8wQAAfIC8AH0swAW/7AAAf8B7wERFAABEQHv
|
||||
Af+tAAH/ARIYAAESAf+sAAHvGgAB76sAAf8BERoAAREB/6MAAf8B8QTwAfQB/xwAAf8B9ATwAfEB/5wA
|
||||
AewFAAHwAf8cAAH/AfAFAAHsnAABEwUAAfAB/wgAAQcB8wHrBgAB6wHzAQcIAAH/AfAFAAESnAAB8wXr
|
||||
AfIB/wcAAfACAAH0BgAB9AIAAfAHAAH/AfIF6wHzowAB/wYAAfADAAHwBgAB8AMAAfAGAAH/qgAB/wUA
|
||||
AfADAAHyAQ4BAAEOAgcBDgEAAQ4B8gMAAfAFAAH/qgAB/wQAAfADAAHyAQ4BDwEOAe8CAAHvAQ4BDwEO
|
||||
AfIDAAHwBAAB/6oAAf8DAAHwAwAB8gEOAewC/wH0AgAB9AL/AewBDgHyAwAB8AMAAf+jAAH0Ae8E9wHz
|
||||
Af8CAAHwAwAB8gEOAQAB8AgAAfABAAEOAfIDAAHwAgAB/wHzBPcB7wH0nAABbQUAAfAB/wEAAe0DAAHy
|
||||
AQ4CAAHrAf8GAAH/AesCAAEOAfIDAAHtAQAB/wHwBQABbZwAAW0FAAHwAf8BAAHtAwAB8gEOAgAB6wH/
|
||||
BgAB/wHrAgABDgHyAwAB7QEAAf8B8AUAAW2cAAH0Ae8E9wHzAf8CAAHwAwAB8gEOAQAB8AgAAfABAAEO
|
||||
AfIDAAHwAgAB/wHzBPcB7wH0owAB/wMAAfADAAHyAQ4B7AL/AfQCAAH0Av8B7AEOAfIDAAHwAwAB/6oA
|
||||
Af8EAAHwAwAB8gEOARABDgHvAgAB7wEOAQ8BDgHyAwAB8AQAAf+qAAH/BQAB8AMAAfIBDgEAAQ8CBwEO
|
||||
AQABDgHyAwAB8AUAAf+qAAH/BgAB8AMAAfAGAAHwAwAB8AYAAf+jAAHzBesB8gH/BwAB8AIAAfQGAAH0
|
||||
AgAB8AcAAf8B8gXrAfOcAAETBQAB8AH/CAABBwHzAesGAAHrAfMBBwgAAf8B8AUAARKcAAHsBQAB8AH/
|
||||
HAAB/wHwBQAB7JwAAf8B8QTwAfQB/xwAAf8B9ATwAfEB/6MAAf8BERoAAREB/6sAAe8aAAHvrAAB/wES
|
||||
GAABEgH/rQAB/wHvAREUAAERAe8B/7AAFv+zAAH0AvAB8gQAAfMC8AHzBAAB8gLwAfS0AAHwAgAB6wQA
|
||||
AfcCAAH3BAAB6wIAAfC0AAHwAgAB6wQAAfcCAAH3BAAB6wIAAfC0AAHwAgAB6wQAAfcCAAH3BAAB6wIA
|
||||
AfC0AAHwAgAB6wQAAfcCAAH3BAAB6wIAAfC0AAHwAgAB6wQAAe8CAAHvBAAB6wIAAfG0AAH/AewBEgHz
|
||||
BAAB9AJtAfQEAAHzARIB7AH//wD/AP8AAUIBTQE+BwABPgMAASgDAAHIAwABMgMAAQEBAAEBBQABeAEF
|
||||
FgAD/wEABv8BwBUABv8BwBUABv8BwBUAAf8B/gIeAR8B/wHAFQAB/wH+Ah4BHwH/AcAVAAH/Af4CHgEf
|
||||
Af8BwBUAAf8B/gIeAR8B/wHAFQAB/wH+Ah4BHwH/AcAVAAH/Af4CHgEfAf8BwBUAAf8B/gIeAR8B/wHA
|
||||
FQAB/wH8AgABDwH/AcAVAAH/AfACAAEDAf8BwBUAAf8B4AIAAQEB/wHAFQAB/wHgAgABAQH/AcAVAAH/
|
||||
AcADAAH/AcAVAAHgBAABAQHAFQAB4AQAAQEBwBUAAeAEAAEBAcAVAAHgAQABGAEGAQABAQHAFQAB/wHA
|
||||
ATgBBwEAAf8BwBUAAf8BwAFwAQMBgAH/AcAVAAH/AcAB4AHBAcAB/wHAFQAB/wHBAsAB4AH/AcAVAAHg
|
||||
AQMBhwH4AXABAQHAFQAB4AEHAQMB8AE4AQEBwBUAAeABBwEDAfABOAEBAcAVAAHgAQMBhwH4AXABAQHA
|
||||
FQAB/wHBAsAB4AH/AcAVAAH/AcAB4AHBAcAB/wHAFQAB/wHAAXABAwGAAf8BwBUAAf8BwAE4AQcBAAH/
|
||||
AcAVAAHgAQABGAEGAQABAQHAFQAB4AQAAQEBwBUAAeAEAAEBAcAVAAHgBAABAQHAFQAB/wHAAwAB/wHA
|
||||
FQAB/wHgAgABAQH/AcAVAAH/AeACAAEBAf8BwBUAAf8B8AIAAQMB/wHAFQAB/wH8AgABDwH/AcAVAAH/
|
||||
Af4CHgEfAf8BwBUAAf8B/gIeAR8B/wHAFQAB/wH+Ah4BHwH/AcAVAAH/Af4CHgEfAf8BwBUAAf8B/gIe
|
||||
AR8B/wHAFQAB/wH+Ah4BHwH/AcAVAAH/Af4CHgEfAf8BwBUABv8BwBUABv8BwBUABv8BwBUACw==
|
||||
AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA
|
||||
AAA1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTXW1tbW1tbW
|
||||
1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW
|
||||
1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1
|
||||
NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYA
|
||||
AAAAAADW1tbW1tbW1tbW1tbW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tYA
|
||||
AAAAAADW1tbW1tYAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tYAAAAAAADW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tYAAAAAAAAAAAAAAADW1tYAAAAAAADW1tbW1tY1
|
||||
NTU1NTXW1tbW1tYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYA
|
||||
AAAAAAAAAAAAAADW1tbW1tYAAAAAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAAAAAADW1tbW
|
||||
1tbW1tbW1tYAAAAAAAAAAADW1tbW1tY1NTU1NTXW1tbW1tYAAAAAAADW1tbW1tbW1tbW1tbW1tbW1tYA
|
||||
AAAAAADW1tbW1tY1NTU1NTXW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tY1
|
||||
NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTUAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@@ -12,6 +12,21 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -32,6 +47,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -46,17 +64,44 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export.Designer.cs">
|
||||
<DependentUpon>Export.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="New.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="New.Designer.cs">
|
||||
<DependentUpon>New.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export.resx">
|
||||
<DependentUpon>Export.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="New.resx">
|
||||
<DependentUpon>New.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@@ -65,6 +110,7 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -79,5 +125,84 @@
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_remove.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrow_back.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrow_down.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrow_next.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrow_top.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\file.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\folder_open.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_check.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Shape-flip-vertical.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Shape-flip-horizontal.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-paste.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-copy.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Door-out.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Disk.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-white.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Folder-page.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Folder.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Ionic-Ionicons-Invert-mode-outline.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="icon_64.ico" />
|
||||
<None Include="Resources\icon_64.png" />
|
||||
<None Include="Resources\icon_32.png" />
|
||||
<None Include="Resources\icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 и x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
510
McBitFont/New.Designer.cs
generated
Normal file
@@ -0,0 +1,510 @@
|
||||
namespace McBitFont {
|
||||
partial class New {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.nudNewX = new System.Windows.Forms.NumericUpDown();
|
||||
this.nudNewY = new System.Windows.Forms.NumericUpDown();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.rbMono = new System.Windows.Forms.RadioButton();
|
||||
this.rbVar = new System.Windows.Forms.RadioButton();
|
||||
this.cbNotPrintable = new System.Windows.Forms.CheckBox();
|
||||
this.cbLatin = new System.Windows.Forms.CheckBox();
|
||||
this.cbExtended = new System.Windows.Forms.CheckBox();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.cbSingle = new System.Windows.Forms.CheckBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.cbEncoding = new System.Windows.Forms.ComboBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pbChar2 = new System.Windows.Forms.PictureBox();
|
||||
this.pbChar1 = new System.Windows.Forms.PictureBox();
|
||||
this.btnFont = new System.Windows.Forms.Button();
|
||||
this.dlgFont = new System.Windows.Forms.FontDialog();
|
||||
this.cbFontBased = new System.Windows.Forms.CheckBox();
|
||||
this.lblFont = new System.Windows.Forms.Label();
|
||||
this.nudShiftX = new System.Windows.Forms.NumericUpDown();
|
||||
this.nudShiftY = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblShiftX = new System.Windows.Forms.Label();
|
||||
this.lblShiftY = new System.Windows.Forms.Label();
|
||||
this.pnlFont = new System.Windows.Forms.Panel();
|
||||
this.nudChar2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.nudChar1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudNewX)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudNewY)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbChar2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbChar1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudShiftX)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudShiftY)).BeginInit();
|
||||
this.pnlFont.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudChar2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudChar1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nudNewX
|
||||
//
|
||||
this.nudNewX.Location = new System.Drawing.Point(68, 32);
|
||||
this.nudNewX.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewX.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewX.Name = "nudNewX";
|
||||
this.nudNewX.Size = new System.Drawing.Size(57, 20);
|
||||
this.nudNewX.TabIndex = 0;
|
||||
this.nudNewX.Value = new decimal(new int[] {
|
||||
32,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewX.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
this.nudNewX.Enter += new System.EventHandler(this.nudFocus);
|
||||
//
|
||||
// nudNewY
|
||||
//
|
||||
this.nudNewY.Location = new System.Drawing.Point(68, 58);
|
||||
this.nudNewY.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewY.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewY.Name = "nudNewY";
|
||||
this.nudNewY.Size = new System.Drawing.Size(57, 20);
|
||||
this.nudNewY.TabIndex = 1;
|
||||
this.nudNewY.Value = new decimal(new int[] {
|
||||
32,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudNewY.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
this.nudNewY.Enter += new System.EventHandler(this.nudFocus);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(24, 34);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Width:";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(21, 60);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(41, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Height:";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// rbMono
|
||||
//
|
||||
this.rbMono.AutoSize = true;
|
||||
this.rbMono.Checked = true;
|
||||
this.rbMono.Location = new System.Drawing.Point(24, 84);
|
||||
this.rbMono.Name = "rbMono";
|
||||
this.rbMono.Size = new System.Drawing.Size(87, 17);
|
||||
this.rbMono.TabIndex = 4;
|
||||
this.rbMono.TabStop = true;
|
||||
this.rbMono.Text = "Monospaced";
|
||||
this.rbMono.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbVar
|
||||
//
|
||||
this.rbVar.AutoSize = true;
|
||||
this.rbVar.Location = new System.Drawing.Point(24, 107);
|
||||
this.rbVar.Name = "rbVar";
|
||||
this.rbVar.Size = new System.Drawing.Size(91, 17);
|
||||
this.rbVar.TabIndex = 5;
|
||||
this.rbVar.Text = "Variable width";
|
||||
this.rbVar.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbNotPrintable
|
||||
//
|
||||
this.cbNotPrintable.AutoSize = true;
|
||||
this.cbNotPrintable.Location = new System.Drawing.Point(140, 54);
|
||||
this.cbNotPrintable.Name = "cbNotPrintable";
|
||||
this.cbNotPrintable.Size = new System.Drawing.Size(116, 17);
|
||||
this.cbNotPrintable.TabIndex = 7;
|
||||
this.cbNotPrintable.Text = "0-31 (Not printable)";
|
||||
this.cbNotPrintable.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbLatin
|
||||
//
|
||||
this.cbLatin.AutoSize = true;
|
||||
this.cbLatin.Checked = true;
|
||||
this.cbLatin.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbLatin.Location = new System.Drawing.Point(140, 77);
|
||||
this.cbLatin.Name = "cbLatin";
|
||||
this.cbLatin.Size = new System.Drawing.Size(91, 17);
|
||||
this.cbLatin.TabIndex = 8;
|
||||
this.cbLatin.Text = "32-127 (Latin)";
|
||||
this.cbLatin.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbExtended
|
||||
//
|
||||
this.cbExtended.AutoSize = true;
|
||||
this.cbExtended.Location = new System.Drawing.Point(140, 100);
|
||||
this.cbExtended.Name = "cbExtended";
|
||||
this.cbExtended.Size = new System.Drawing.Size(119, 17);
|
||||
this.cbExtended.TabIndex = 9;
|
||||
this.cbExtended.Text = "128-255 (Extended)";
|
||||
this.cbExtended.UseVisualStyleBackColor = true;
|
||||
this.cbExtended.CheckedChanged += new System.EventHandler(this.cbExtended_CheckedChanged);
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnOK.Location = new System.Drawing.Point(47, 178);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOK.TabIndex = 10;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(140, 178);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnCancel.TabIndex = 11;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// cbSingle
|
||||
//
|
||||
this.cbSingle.AutoSize = true;
|
||||
this.cbSingle.Location = new System.Drawing.Point(140, 31);
|
||||
this.cbSingle.Name = "cbSingle";
|
||||
this.cbSingle.Size = new System.Drawing.Size(84, 17);
|
||||
this.cbSingle.TabIndex = 12;
|
||||
this.cbSingle.Text = "Single frame";
|
||||
this.cbSingle.UseVisualStyleBackColor = true;
|
||||
this.cbSingle.CheckedChanged += new System.EventHandler(this.cbSingle_CheckedChanged);
|
||||
//
|
||||
// toolTip1
|
||||
//
|
||||
this.toolTip1.AutoPopDelay = 10000;
|
||||
this.toolTip1.InitialDelay = 500;
|
||||
this.toolTip1.ReshowDelay = 100;
|
||||
this.toolTip1.ToolTipTitle = "Info";
|
||||
//
|
||||
// cbEncoding
|
||||
//
|
||||
this.cbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbEncoding.Enabled = false;
|
||||
this.cbEncoding.FormattingEnabled = true;
|
||||
this.cbEncoding.Location = new System.Drawing.Point(140, 123);
|
||||
this.cbEncoding.Name = "cbEncoding";
|
||||
this.cbEncoding.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbEncoding.TabIndex = 13;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.pbChar2);
|
||||
this.panel1.Controls.Add(this.pbChar1);
|
||||
this.panel1.Location = new System.Drawing.Point(6, 24);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(200, 124);
|
||||
this.panel1.TabIndex = 14;
|
||||
//
|
||||
// pbChar2
|
||||
//
|
||||
this.pbChar2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pbChar2.Location = new System.Drawing.Point(100, 0);
|
||||
this.pbChar2.Name = "pbChar2";
|
||||
this.pbChar2.Size = new System.Drawing.Size(100, 124);
|
||||
this.pbChar2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pbChar2.TabIndex = 1;
|
||||
this.pbChar2.TabStop = false;
|
||||
//
|
||||
// pbChar1
|
||||
//
|
||||
this.pbChar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pbChar1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pbChar1.Name = "pbChar1";
|
||||
this.pbChar1.Size = new System.Drawing.Size(100, 124);
|
||||
this.pbChar1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pbChar1.TabIndex = 0;
|
||||
this.pbChar1.TabStop = false;
|
||||
//
|
||||
// btnFont
|
||||
//
|
||||
this.btnFont.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnFont.Location = new System.Drawing.Point(6, 178);
|
||||
this.btnFont.Name = "btnFont";
|
||||
this.btnFont.Size = new System.Drawing.Size(71, 23);
|
||||
this.btnFont.TabIndex = 15;
|
||||
this.btnFont.Text = "Font ...";
|
||||
this.btnFont.UseVisualStyleBackColor = true;
|
||||
this.btnFont.Click += new System.EventHandler(this.btnFont_Click);
|
||||
//
|
||||
// dlgFont
|
||||
//
|
||||
this.dlgFont.Font = new System.Drawing.Font("Courier New", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.dlgFont.ShowEffects = false;
|
||||
//
|
||||
// cbFontBased
|
||||
//
|
||||
this.cbFontBased.AutoSize = true;
|
||||
this.cbFontBased.Location = new System.Drawing.Point(24, 130);
|
||||
this.cbFontBased.Name = "cbFontBased";
|
||||
this.cbFontBased.Size = new System.Drawing.Size(101, 17);
|
||||
this.cbFontBased.TabIndex = 16;
|
||||
this.cbFontBased.Text = "Based on a font";
|
||||
this.cbFontBased.UseVisualStyleBackColor = true;
|
||||
this.cbFontBased.CheckedChanged += new System.EventHandler(this.cbFontBased_CheckedChanged);
|
||||
//
|
||||
// lblFont
|
||||
//
|
||||
this.lblFont.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblFont.Location = new System.Drawing.Point(83, 183);
|
||||
this.lblFont.Name = "lblFont";
|
||||
this.lblFont.Size = new System.Drawing.Size(123, 18);
|
||||
this.lblFont.TabIndex = 17;
|
||||
this.lblFont.Text = "font";
|
||||
//
|
||||
// nudShiftX
|
||||
//
|
||||
this.nudShiftX.Location = new System.Drawing.Point(61, 2);
|
||||
this.nudShiftX.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.nudShiftX.Name = "nudShiftX";
|
||||
this.nudShiftX.Size = new System.Drawing.Size(45, 20);
|
||||
this.nudShiftX.TabIndex = 18;
|
||||
this.nudShiftX.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
//
|
||||
// nudShiftY
|
||||
//
|
||||
this.nudShiftY.Location = new System.Drawing.Point(161, 2);
|
||||
this.nudShiftY.Minimum = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.nudShiftY.Name = "nudShiftY";
|
||||
this.nudShiftY.Size = new System.Drawing.Size(45, 20);
|
||||
this.nudShiftY.TabIndex = 19;
|
||||
this.nudShiftY.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
//
|
||||
// lblShiftX
|
||||
//
|
||||
this.lblShiftX.AutoSize = true;
|
||||
this.lblShiftX.Location = new System.Drawing.Point(14, 4);
|
||||
this.lblShiftX.Name = "lblShiftX";
|
||||
this.lblShiftX.Size = new System.Drawing.Size(41, 13);
|
||||
this.lblShiftX.TabIndex = 20;
|
||||
this.lblShiftX.Text = "Shift X:";
|
||||
this.lblShiftX.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// lblShiftY
|
||||
//
|
||||
this.lblShiftY.AutoSize = true;
|
||||
this.lblShiftY.Location = new System.Drawing.Point(114, 4);
|
||||
this.lblShiftY.Name = "lblShiftY";
|
||||
this.lblShiftY.Size = new System.Drawing.Size(41, 13);
|
||||
this.lblShiftY.TabIndex = 21;
|
||||
this.lblShiftY.Text = "Shift Y:";
|
||||
this.lblShiftY.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// pnlFont
|
||||
//
|
||||
this.pnlFont.Controls.Add(this.label4);
|
||||
this.pnlFont.Controls.Add(this.label3);
|
||||
this.pnlFont.Controls.Add(this.nudChar2);
|
||||
this.pnlFont.Controls.Add(this.nudChar1);
|
||||
this.pnlFont.Controls.Add(this.lblShiftX);
|
||||
this.pnlFont.Controls.Add(this.lblShiftY);
|
||||
this.pnlFont.Controls.Add(this.panel1);
|
||||
this.pnlFont.Controls.Add(this.btnFont);
|
||||
this.pnlFont.Controls.Add(this.nudShiftY);
|
||||
this.pnlFont.Controls.Add(this.lblFont);
|
||||
this.pnlFont.Controls.Add(this.nudShiftX);
|
||||
this.pnlFont.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.pnlFont.Location = new System.Drawing.Point(270, 0);
|
||||
this.pnlFont.Name = "pnlFont";
|
||||
this.pnlFont.Size = new System.Drawing.Size(214, 211);
|
||||
this.pnlFont.TabIndex = 22;
|
||||
this.pnlFont.Visible = false;
|
||||
//
|
||||
// nudChar2
|
||||
//
|
||||
this.nudChar2.Location = new System.Drawing.Point(161, 149);
|
||||
this.nudChar2.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudChar2.Name = "nudChar2";
|
||||
this.nudChar2.Size = new System.Drawing.Size(45, 20);
|
||||
this.nudChar2.TabIndex = 23;
|
||||
this.nudChar2.Value = new decimal(new int[] {
|
||||
97,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudChar2.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
//
|
||||
// nudChar1
|
||||
//
|
||||
this.nudChar1.Location = new System.Drawing.Point(61, 149);
|
||||
this.nudChar1.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudChar1.Name = "nudChar1";
|
||||
this.nudChar1.Size = new System.Drawing.Size(45, 20);
|
||||
this.nudChar1.TabIndex = 22;
|
||||
this.nudChar1.Value = new decimal(new int[] {
|
||||
65,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudChar1.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(14, 152);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(45, 13);
|
||||
this.label3.TabIndex = 24;
|
||||
this.label3.Text = "Sample:";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(112, 152);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(45, 13);
|
||||
this.label4.TabIndex = 25;
|
||||
this.label4.Text = "Sample:";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// New
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(484, 211);
|
||||
this.Controls.Add(this.pnlFont);
|
||||
this.Controls.Add(this.cbFontBased);
|
||||
this.Controls.Add(this.cbEncoding);
|
||||
this.Controls.Add(this.cbSingle);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.cbExtended);
|
||||
this.Controls.Add(this.cbLatin);
|
||||
this.Controls.Add(this.cbNotPrintable);
|
||||
this.Controls.Add(this.rbVar);
|
||||
this.Controls.Add(this.rbMono);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.nudNewY);
|
||||
this.Controls.Add(this.nudNewX);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(300, 220);
|
||||
this.Name = "New";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "New";
|
||||
this.Load += new System.EventHandler(this.New_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudNewX)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudNewY)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbChar2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbChar1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudShiftX)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudShiftY)).EndInit();
|
||||
this.pnlFont.ResumeLayout(false);
|
||||
this.pnlFont.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudChar2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudChar1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.NumericUpDown nudNewX;
|
||||
public System.Windows.Forms.NumericUpDown nudNewY;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
public System.Windows.Forms.RadioButton rbMono;
|
||||
public System.Windows.Forms.RadioButton rbVar;
|
||||
public System.Windows.Forms.CheckBox cbNotPrintable;
|
||||
public System.Windows.Forms.CheckBox cbLatin;
|
||||
public System.Windows.Forms.CheckBox cbExtended;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
public System.Windows.Forms.CheckBox cbSingle;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
public System.Windows.Forms.ComboBox cbEncoding;
|
||||
public System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.PictureBox pbChar2;
|
||||
private System.Windows.Forms.PictureBox pbChar1;
|
||||
private System.Windows.Forms.Button btnFont;
|
||||
public System.Windows.Forms.FontDialog dlgFont;
|
||||
public System.Windows.Forms.CheckBox cbFontBased;
|
||||
private System.Windows.Forms.Label lblFont;
|
||||
public System.Windows.Forms.NumericUpDown nudShiftX;
|
||||
public System.Windows.Forms.NumericUpDown nudShiftY;
|
||||
private System.Windows.Forms.Label lblShiftX;
|
||||
private System.Windows.Forms.Label lblShiftY;
|
||||
private System.Windows.Forms.Panel pnlFont;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
public System.Windows.Forms.NumericUpDown nudChar2;
|
||||
public System.Windows.Forms.NumericUpDown nudChar1;
|
||||
}
|
||||
}
|
182
McBitFont/New.cs
Normal file
@@ -0,0 +1,182 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace McBitFont {
|
||||
public partial class New : Form {
|
||||
|
||||
public class EncodingItem {
|
||||
public string Text { get; set; }
|
||||
public int Code { get; set; }
|
||||
|
||||
public EncodingItem(int code, string text) {
|
||||
Code = code;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return Text;
|
||||
}
|
||||
}
|
||||
|
||||
private MainForm mainForm;
|
||||
|
||||
|
||||
public New(MainForm form) {
|
||||
InitializeComponent();
|
||||
mainForm = form;
|
||||
this.Width = 300; this.Height = 250;
|
||||
}
|
||||
|
||||
private void cbSingle_CheckedChanged(object sender, EventArgs e) {
|
||||
bool c = !cbSingle.Checked;
|
||||
bool f = cbFontBased.Checked;
|
||||
cbNotPrintable.Enabled = c;
|
||||
cbLatin.Enabled = c;
|
||||
cbExtended.Enabled = c;
|
||||
cbFontBased.Enabled = c;
|
||||
rbMono.Enabled = c;
|
||||
rbVar.Enabled = c;
|
||||
pnlFont.Visible = c && f;
|
||||
this.Width = c && f ? 500 : 300;
|
||||
}
|
||||
|
||||
private void New_Load(object sender, EventArgs e) {
|
||||
toolTip1.SetToolTip(nudNewX, "Frame Width;\nCharacter width;\nDefault character width for Variable width fonts");
|
||||
toolTip1.SetToolTip(nudNewY, "Frame Height;\nCharacter height");
|
||||
toolTip1.SetToolTip(rbMono, "Monospaced font");
|
||||
toolTip1.SetToolTip(rbVar, "Variable width font");
|
||||
toolTip1.SetToolTip(cbSingle, "Create one single frame");
|
||||
toolTip1.SetToolTip(cbNotPrintable, "Add not printable characters with codes 0 - 31");
|
||||
toolTip1.SetToolTip(cbLatin, "Add Latin characters with codes 32 - 127");
|
||||
toolTip1.SetToolTip(cbExtended, "Add Extended characters with codes 128 - 255");
|
||||
|
||||
cbEncoding.Items.Clear();
|
||||
cbEncoding.Items.Add(new EncodingItem(1250, "Central European"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1251, "Cyrillic"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1252, "Western European"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1253, "Greek"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1254, "Turkish"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1255, "Hebrew"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1256, "Arabic"));
|
||||
cbEncoding.Items.Add(new EncodingItem(1257, "Baltic"));
|
||||
cbEncoding.SelectedIndex = 1;
|
||||
|
||||
lblFont.Text = dlgFont.Font.Name + " " + dlgFont.Font.Size.ToString();
|
||||
updateChars();
|
||||
}
|
||||
|
||||
private void updateChars() {
|
||||
int neww, newh;
|
||||
const int pbw = 100;
|
||||
const int pbh = 124;
|
||||
int w = (int)nudNewX.Value;
|
||||
int h = (int)nudNewY.Value;
|
||||
int difw = pbw - w;
|
||||
int difh = pbh - h;
|
||||
string[] chars = { "A", "a" };
|
||||
PictureBox[] pbs = { pbChar1, pbChar2 };
|
||||
|
||||
if (difw > 0) {
|
||||
if (difh > 0) {
|
||||
//not wider, not taller
|
||||
if (difw < difh) {
|
||||
neww = pbw;
|
||||
newh = h * pbw / w;
|
||||
} else {
|
||||
newh = pbh;
|
||||
neww = w * pbh / h;
|
||||
}
|
||||
} else {
|
||||
// not wider, taller
|
||||
newh = pbh;
|
||||
neww = w * pbh / h;
|
||||
}
|
||||
} else {
|
||||
if (difh > 0) {
|
||||
//wider, not taller
|
||||
neww = pbw;
|
||||
newh = h * pbw / w;
|
||||
} else {
|
||||
// wider, taller
|
||||
if (difw > difh) {
|
||||
neww = pbw;
|
||||
newh = h * pbw / w;
|
||||
} else {
|
||||
newh = pbh;
|
||||
neww = w * pbh / h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bitmap bmp, result;
|
||||
Graphics g;
|
||||
chars[0] = mainForm.decodeSymbol((int)nudChar1.Value);
|
||||
chars[1] = mainForm.decodeSymbol((int)nudChar2.Value);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
bmp = new Bitmap((int)nudNewX.Value, (int)nudNewY.Value);
|
||||
g = Graphics.FromImage(bmp);
|
||||
g.Clear(Color.White);
|
||||
g.SmoothingMode = SmoothingMode.None;
|
||||
g.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
|
||||
g.DrawString(chars[i], dlgFont.Font, Brushes.Black, (int)nudShiftX.Value, (int)nudShiftY.Value);
|
||||
g.Flush();
|
||||
|
||||
result = new Bitmap(neww, newh);
|
||||
using (Graphics gr = Graphics.FromImage(result)) {
|
||||
gr.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||
gr.PixelOffsetMode = PixelOffsetMode.Half;
|
||||
gr.DrawImage(bmp, 0, 0, neww, newh);
|
||||
}
|
||||
pbs[i].Image = result;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e) {
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e) {
|
||||
DialogResult= DialogResult.OK;
|
||||
}
|
||||
|
||||
private void nudFocus(object sender, EventArgs e) {
|
||||
NumericUpDown nud = (NumericUpDown)sender;
|
||||
|
||||
nud.Select(0, nud.Text.Length);
|
||||
}
|
||||
|
||||
private void cbExtended_CheckedChanged(object sender, EventArgs e) {
|
||||
cbEncoding.Enabled = cbExtended.Checked;
|
||||
}
|
||||
|
||||
private void cbFontBased_CheckedChanged(object sender, EventArgs e) {
|
||||
bool c = !cbSingle.Checked;
|
||||
bool f = cbFontBased.Checked;
|
||||
pnlFont.Visible = c && f;
|
||||
this.Width = c && f ? 500 : 300;
|
||||
}
|
||||
|
||||
private void btnFont_Click(object sender, EventArgs e) {
|
||||
if (dlgFont.ShowDialog() == DialogResult.OK) {
|
||||
lblFont.Text = dlgFont.Font.Name + " " + dlgFont.Font.Size.ToString();
|
||||
updateChars();
|
||||
}
|
||||
}
|
||||
|
||||
private void nudNewX_ValueChanged(object sender, EventArgs e) {
|
||||
updateChars();
|
||||
}
|
||||
}
|
||||
}
|
126
McBitFont/New.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dlgFont.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>114, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@@ -13,7 +13,7 @@ namespace McBitFont {
|
||||
static void Main() {
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанных со сборкой.
|
||||
[assembly: AssemblyTitle("McBitFont")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyDescription("McFLY's Bit Font and Image Editor")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("McBitFont")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyCopyright("© Anton Mukhin, 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
||||
// используя "*", как показано ниже:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.5.0.0")]
|
||||
|
273
McBitFont/Properties/Resources.Designer.cs
generated
@@ -1,53 +1,54 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программным средством.
|
||||
// Версия среды выполнения: 4.0.30319.42000
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
|
||||
// код создан повторно.
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace McBitFont.Properties {
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
|
||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
||||
/// </summary>
|
||||
// Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
|
||||
// класс с помощью таких средств, как ResGen или Visual Studio.
|
||||
// Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
|
||||
// с параметром /str или заново постройте свой VS-проект.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
||||
// с помощью такого средства, как ResGen или Visual Studio.
|
||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
||||
// с параметром /str или перестройте свой проект VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
|
||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if ((resourceMan == null)) {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("McBitFont.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Переопределяет свойство CurrentUICulture текущего потока для всех
|
||||
/// подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
|
||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
@@ -58,5 +59,235 @@ namespace McBitFont.Properties {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap action_add {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("action_add", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap action_check {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("action_check", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap action_remove {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("action_remove", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrow_back {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrow_back", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrow_down {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrow_down", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrow_next {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrow_next", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrow_top {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrow_top", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Disk_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Disk.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Door_out_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Door-out.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Folder_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Folder.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Folder_page_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Folder-page.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Page_copy_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Page-copy.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Page_paste_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Page-paste.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Page_white_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Page-white.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Shape_flip_horizontal_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Shape-flip-horizontal.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Famfamfam_Silk_Shape_flip_vertical_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Famfamfam-Silk-Shape-flip-vertical.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap file {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("file", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap folder_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("folder_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icon_32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon_32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap icon_64 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("icon_64", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Ionic_Ionicons_Invert_mode_outline_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Ionic-Ionicons-Invert-mode-outline.16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
@@ -60,6 +60,7 @@
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
@@ -68,9 +69,10 @@
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
@@ -85,9 +87,10 @@
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -109,9 +112,79 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Ionic-Ionicons-Invert-mode-outline.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Ionic-Ionicons-Invert-mode-outline.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow_next" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Page-copy.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Page-copy.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Disk.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Disk.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="action_check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\action_check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Page-white.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Page-white.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Door-out.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Door-out.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Folder-page.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Folder-page.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Folder.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Folder.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="action_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\action_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="folder_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Page-paste.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Page-paste.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="action_remove" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\action_remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="file" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\file.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Shape-flip-vertical.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Shape-flip-vertical.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Famfamfam-Silk-Shape-flip-horizontal.16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Famfamfam-Silk-Shape-flip-horizontal.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icon_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icon_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\icon_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
McBitFont/Resources/Famfamfam-Silk-Disk.16.png
Normal file
After Width: | Height: | Size: 899 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Door-out.16.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Folder-page.16.png
Normal file
After Width: | Height: | Size: 931 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Folder.16.png
Normal file
After Width: | Height: | Size: 732 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Page-copy.16.png
Normal file
After Width: | Height: | Size: 966 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Page-paste.16.png
Normal file
After Width: | Height: | Size: 914 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Page-white.16.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Shape-flip-horizontal.16.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
McBitFont/Resources/Famfamfam-Silk-Shape-flip-vertical.16.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
McBitFont/Resources/Ionic-Ionicons-Invert-mode-outline.16.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
McBitFont/Resources/action_add.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
McBitFont/Resources/action_check.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
McBitFont/Resources/action_remove.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
McBitFont/Resources/arrow_back.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
McBitFont/Resources/arrow_down.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
McBitFont/Resources/arrow_next.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
McBitFont/Resources/arrow_top.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
McBitFont/Resources/file.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
McBitFont/Resources/folder_open.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
McBitFont/Resources/icon.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
McBitFont/Resources/icon_32.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
McBitFont/Resources/icon_64.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
McBitFont/Resources/save.png
Normal file
After Width: | Height: | Size: 353 B |
BIN
McBitFont/icon.ico
Normal file
After Width: | Height: | Size: 894 B |
BIN
McBitFont/icon_64.ico
Normal file
After Width: | Height: | Size: 13 KiB |
36
README.md
@@ -1,3 +1,37 @@
|
||||
# McBitFont
|
||||
|
||||
pixel based Font to C arrays converter
|
||||
McFLY's Bit Font and Image Editor
|
||||
|
||||
Features:
|
||||
- Generate a project based on a font installed in the system
|
||||
- Basic pixel manipulations: shift, flip, invert, etc...
|
||||
- Save / Load your project for later edits
|
||||
- Export as a C array in different formats
|
||||
|
||||
Requires .Net Framework 4.7+
|
||||
|
||||
Some basic hints on the interface:
|
||||
- Mouse 1 to mark a puxel black
|
||||
- Mouse 2 to mark a puxel white
|
||||
- Drag the mouse holding a button to draw pixels
|
||||
- Mouse Scroll to scroll up and down
|
||||
- Crtl + scroll to scroll left and right
|
||||
- Shift + scroll to zoom
|
||||
|
||||
|
||||
Download in the Releases section!
|
||||
|
||||
|
||||
### Screenshots:
|
||||
|
||||
Main window
|
||||
|
||||

|
||||
|
||||
New project dialog
|
||||
|
||||

|
||||
|
||||
Export dialog
|
||||
|
||||

|
||||
|
BIN
examples/CP437_Cyr_8x16.mbf
Normal file
BIN
examples/Font_5x7.mbf
Normal file
BIN
examples/Numbers_11x16.mbf
Normal file
BIN
examples/Numbers_13x20.mbf
Normal file
BIN
examples/gyver_icons_7x7.mbf
Normal file
BIN
examples/gyver_icons_8x8.mbf
Normal file
BIN
examples/icons_9x9.mbf
Normal file
BIN
icons/Avosoft-Warm-Toolbar-Paste.16.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
icons/Custom-Icon-Design-Flatastic-1-Copy.16.png
Normal file
After Width: | Height: | Size: 585 B |
BIN
icons/Custom-Icon-Design-Flatastic-8-Paste.16.png
Normal file
After Width: | Height: | Size: 584 B |
BIN
icons/Everaldo-Crystal-Clear-Mimetype-kmultiple-copy.16.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
icons/Famfamfam-Silk-Disk.16.png
Normal file
After Width: | Height: | Size: 899 B |
BIN
icons/Famfamfam-Silk-Door-out.16.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
icons/Famfamfam-Silk-Folder-page.16.png
Normal file
After Width: | Height: | Size: 931 B |
BIN
icons/Famfamfam-Silk-Folder.16.png
Normal file
After Width: | Height: | Size: 732 B |
BIN
icons/Famfamfam-Silk-Page-copy.16.png
Normal file
After Width: | Height: | Size: 966 B |
BIN
icons/Famfamfam-Silk-Page-paste.16.png
Normal file
After Width: | Height: | Size: 914 B |
BIN
icons/Famfamfam-Silk-Page-white-copy.16.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
icons/Famfamfam-Silk-Page-white.16.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
icons/Famfamfam-Silk-Shape-flip-horizontal.16.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
icons/Famfamfam-Silk-Shape-flip-vertical.16.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
icons/Iconleak-Stainless-Copy.16.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
icons/action_add.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
icons/action_check.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
icons/action_delete.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
icons/action_remove.png
Normal file
After Width: | Height: | Size: 201 B |
BIN
icons/app/icon.ico
Normal file
After Width: | Height: | Size: 894 B |
BIN
icons/app/icon.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
icons/app/icon_32.ico
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
icons/app/icon_32.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
icons/app/icon_64.ico
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icons/app/icon_64.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
icons/application.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
icons/arrow_back.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
icons/arrow_down.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
icons/arrow_next.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
icons/arrow_top.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
icons/comments.png
Normal file
After Width: | Height: | Size: 279 B |
BIN
icons/download.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
icons/file.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
icons/folder.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
icons/folder_files.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
icons/folder_open.png
Normal file
After Width: | Height: | Size: 389 B |
BIN
icons/letter.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
icons/letter_open.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
icons/login.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
icons/maximize.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
icons/minimize.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
icons/reply.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
icons/rss.png
Normal file
After Width: | Height: | Size: 539 B |
BIN
icons/save.png
Normal file
After Width: | Height: | Size: 353 B |
BIN
icons/search.png
Normal file
After Width: | Height: | Size: 539 B |
BIN
icons/time.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
icons/user.png
Normal file
After Width: | Height: | Size: 552 B |
BIN
images/Screenshot_01.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
images/Screenshot_02.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
images/Screenshot_03.png
Normal file
After Width: | Height: | Size: 43 KiB |