Compare commits
141 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7db0b6d76e | ||
|
2930c42260 | ||
|
ace97302f2 | ||
|
ad15f08233 | ||
|
64531aecf0 | ||
|
4dd4743b21 | ||
|
686ff7b780 | ||
|
30729aca2f | ||
|
6cbc206260 | ||
d70d8d8a3c | |||
e5a4baadb7 | |||
37abcf2c8e | |||
2c2a8d6158 | |||
|
4115455a54 | ||
67be566605 | |||
7aa75224ee | |||
4fe2af03b0 | |||
|
fc4822065a | ||
|
3778a753fb | ||
|
20bd7095dd | ||
8ed1e33f22 | |||
|
1eb463c94f | ||
30142fda26 | |||
|
70a4d34d69 | ||
|
c913525b31 | ||
|
42c72b907f | ||
|
32a8ffd749 | ||
|
c092aebeca | ||
|
346088b532 | ||
|
ac7981d40a | ||
|
dd3ecfcf3e | ||
|
6ba4a56197 | ||
|
87b46ec714 | ||
|
12593ef7ad | ||
|
b01bff86b9 | ||
3e734432f4 | |||
aa5b8354d6 | |||
|
7952263595 | ||
07906b8abc | |||
25e54c35e7 | |||
fc3ef33f3e | |||
|
780f92ccf5 | ||
|
cebbdc63c8 | ||
|
8ca83b7edc | ||
|
9cfe8ef5c3 | ||
76ca7ccf35 | |||
|
3c656b36a7 | ||
|
9f6f5ba5d7 | ||
|
4fa3d9bc49 | ||
|
1a26a2d16b | ||
|
e0a4a6194c | ||
|
6971686f88 | ||
|
ac2e345397 | ||
|
d1d653bc34 | ||
1c034fded1 | |||
|
a05352acf7 | ||
2f86598a2a | |||
|
313f35bb3e | ||
|
679b4fc61d | ||
|
eda7af8f67 | ||
|
4381d6d911 | ||
|
8d34e34326 | ||
|
92027a0ee3 | ||
6c32edac6e | |||
f9c9d440ec | |||
|
f8b53f2dab | ||
|
2a4b36d368 | ||
083ede5985 | |||
5208d40a92 | |||
519720f2ef | |||
88ee72567e | |||
0d923ef8ed | |||
|
5e1a2085cf | ||
|
ca21c43926 | ||
|
c10a8e49ff | ||
|
5d17ba5538 | ||
4f80a5df1b | |||
37f2bb5eac | |||
57d4ecfd54 | |||
912b15ff3f | |||
c892e3076d | |||
295b079dab | |||
d508f0ab35 | |||
68c2e10ab5 | |||
d7dfcd3931 | |||
b1986c0f28 | |||
1034bd98d6 | |||
|
c1a8d30760 | ||
|
ab77f9de21 | ||
|
a5e3c8812f | ||
|
1bf2de8b43 | ||
|
6e48acc3bf | ||
|
6c97aa32d1 | ||
|
a287ddaee7 | ||
|
0f2da5542c | ||
|
ce21792088 | ||
8c08c9a897 | |||
ca8b53ba74 | |||
038fd42841 | |||
|
ce3b0ddd94 | ||
|
e76778d8fb | ||
|
19c12754ef | ||
|
f33b107fdb | ||
|
4d39b3586e | ||
|
5e55c0a5ea | ||
|
ca42d3819f | ||
|
bbfccc2308 | ||
|
ea3de134d2 | ||
faf14caec2 | |||
6a8ff0eb50 | |||
011c24b94b | |||
6fbe668284 | |||
5fc69e9992 | |||
f2b01d4a27 | |||
5164060ffc | |||
68bce8e14e | |||
6fb5a1f773 | |||
2a940c8933 | |||
0aeec8bd19 | |||
d24143d1a6 | |||
03ef799381 | |||
647e5f5601 | |||
|
c5e440ee44 | ||
|
34bec25b3d | ||
|
b1acbdd98f | ||
|
6d5f90aaac | ||
72ad6e5be0 | |||
9d1ca65f34 | |||
|
dd3f4f4b4b | ||
|
8889b846dc | ||
|
fe0e1dabfd | ||
|
e0786bdb07 | ||
4fa818f35e | |||
11b268a350 | |||
703e8d91ef | |||
de8aa295da | |||
|
232b543a35 | ||
cc63ce349a | |||
|
793337cc5b | ||
|
c5f832b44a | ||
|
024c7b76bd |
3
.gitignore
vendored
@@ -4,6 +4,9 @@
|
|||||||
##
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
|
examples/tests/32x32/
|
||||||
|
examples/tests/PNGout/
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
|
145
McBitFont/About.Designer.cs
generated
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
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));
|
||||||
|
lblVersion = new System.Windows.Forms.Label();
|
||||||
|
label1 = new System.Windows.Forms.Label();
|
||||||
|
label2 = new System.Windows.Forms.Label();
|
||||||
|
pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||||
|
button1 = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// lblVersion
|
||||||
|
//
|
||||||
|
lblVersion.AutoSize = true;
|
||||||
|
lblVersion.Location = new System.Drawing.Point(14, 210);
|
||||||
|
lblVersion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
lblVersion.Name = "lblVersion";
|
||||||
|
lblVersion.Size = new System.Drawing.Size(66, 15);
|
||||||
|
lblVersion.TabIndex = 0;
|
||||||
|
lblVersion.Text = "Version: 0.0";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
label1.Location = new System.Drawing.Point(0, 77);
|
||||||
|
label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new System.Drawing.Size(448, 36);
|
||||||
|
label1.TabIndex = 1;
|
||||||
|
label1.Text = "McBitFont";
|
||||||
|
label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
label2.Location = new System.Drawing.Point(0, 118);
|
||||||
|
label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new System.Drawing.Size(448, 29);
|
||||||
|
label2.TabIndex = 2;
|
||||||
|
label2.Text = "McFLY's Bit Font and Image Editor";
|
||||||
|
label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// pictureBox1
|
||||||
|
//
|
||||||
|
pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
pictureBox1.Image = Properties.Resources.icon_64;
|
||||||
|
pictureBox1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
pictureBox1.Margin = new System.Windows.Forms.Padding(4, 12, 4, 3);
|
||||||
|
pictureBox1.Name = "pictureBox1";
|
||||||
|
pictureBox1.Size = new System.Drawing.Size(448, 74);
|
||||||
|
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||||
|
pictureBox1.TabIndex = 3;
|
||||||
|
pictureBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// linkLabel1
|
||||||
|
//
|
||||||
|
linkLabel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
|
||||||
|
linkLabel1.Location = new System.Drawing.Point(0, 155);
|
||||||
|
linkLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
linkLabel1.Name = "linkLabel1";
|
||||||
|
linkLabel1.Size = new System.Drawing.Size(448, 24);
|
||||||
|
linkLabel1.TabIndex = 4;
|
||||||
|
linkLabel1.TabStop = true;
|
||||||
|
linkLabel1.Text = "mcfly@mcflyer.ru";
|
||||||
|
linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
linkLabel1.LinkClicked += linkLabel1_LinkClicked;
|
||||||
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||||
|
button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
button1.Location = new System.Drawing.Point(170, 194);
|
||||||
|
button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
button1.Name = "button1";
|
||||||
|
button1.Size = new System.Drawing.Size(104, 31);
|
||||||
|
button1.TabIndex = 5;
|
||||||
|
button1.Text = "OK";
|
||||||
|
button1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// About
|
||||||
|
//
|
||||||
|
AcceptButton = button1;
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(448, 236);
|
||||||
|
Controls.Add(button1);
|
||||||
|
Controls.Add(linkLabel1);
|
||||||
|
Controls.Add(pictureBox1);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(lblVersion);
|
||||||
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||||
|
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
MaximizeBox = false;
|
||||||
|
MinimizeBox = false;
|
||||||
|
Name = "About";
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "About McBitFont";
|
||||||
|
Load += About_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
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: " + 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>
|
@@ -1,6 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
</startup>
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
304
McBitFont/ChangeHistory.cs
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using static McBitFont.MainForm;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
internal class ChangeHistory {
|
||||||
|
private MainForm mainForm;
|
||||||
|
private List<ChangeEvent> timeline = [];
|
||||||
|
private List<FrameMiniature> canvasChanges = [];
|
||||||
|
private List<List<FrameMiniature>> fontChanges = [];
|
||||||
|
private List<int> selectionChanges = [];
|
||||||
|
private int canvasIndex = 0;
|
||||||
|
private int fontIndex = 0;
|
||||||
|
private int selectionIndex = 0;
|
||||||
|
public int Depth { get; set; }
|
||||||
|
public int Index { get; set; } = -1;
|
||||||
|
public int Count {
|
||||||
|
get { return timeline.Count; }
|
||||||
|
}
|
||||||
|
public int Undos {
|
||||||
|
get { return Index < 0 ? 0 : Index + 1; }
|
||||||
|
}
|
||||||
|
public int Redos {
|
||||||
|
get { return Index < 0 ? Count : Count - Index - 1; }
|
||||||
|
}
|
||||||
|
public bool Doing { get; set; } = false;
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
public ChangeHistory(MainForm form, int depth = 100) {
|
||||||
|
timeline = [];
|
||||||
|
canvasChanges = [];
|
||||||
|
fontChanges = [];
|
||||||
|
selectionChanges = [];
|
||||||
|
mainForm = form;
|
||||||
|
Depth = depth;
|
||||||
|
ResetIndices();
|
||||||
|
Add();
|
||||||
|
Doing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void ResetIndices() {
|
||||||
|
Index = -1;
|
||||||
|
canvasIndex = 0;
|
||||||
|
fontIndex = 0;
|
||||||
|
selectionIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ChangeType {
|
||||||
|
None = 0,
|
||||||
|
Canvas = 1, // Changes made to canvas
|
||||||
|
Font = 2, // Symbol width has been changed
|
||||||
|
Selection = 3 // Selected another frame
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeEvent(ChangeType type, FrameMiniature? canvas = null) {
|
||||||
|
public ChangeType Type { get; set; } = type;
|
||||||
|
public FrameMiniature? Canvas { get; set; } = canvas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FrameMiniature CopyFrameSimple(FrameMiniature f) {
|
||||||
|
FrameMiniature newf = new(f.code, f.width, f.height);
|
||||||
|
Array.Copy(f.data, newf.data, f.data.Length);
|
||||||
|
return newf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear() {
|
||||||
|
timeline.Clear();
|
||||||
|
canvasChanges.Clear();
|
||||||
|
fontChanges.Clear();
|
||||||
|
selectionChanges.Clear();
|
||||||
|
ResetIndices();
|
||||||
|
Add();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove from a proper list by change type
|
||||||
|
private bool RemoveByType(ChangeEvent ce, bool first = true) {
|
||||||
|
switch (ce.Type) {
|
||||||
|
case ChangeType.Canvas:
|
||||||
|
if (canvasChanges.Count <= 1) return false;
|
||||||
|
if ((first && canvasIndex > 0) || (!first && canvasIndex == canvasChanges.Count - 1)) canvasIndex--;
|
||||||
|
canvasChanges.RemoveAt(first ? 0 : canvasChanges.Count - 1);
|
||||||
|
break;
|
||||||
|
case ChangeType.Font:
|
||||||
|
if (fontChanges.Count <= 1) return false;
|
||||||
|
if ((first && fontIndex > 0) || (!first && fontIndex == fontChanges.Count - 1)) fontIndex--;
|
||||||
|
if (ce.Canvas != null) {
|
||||||
|
if ((first && canvasIndex > 0) || (!first && canvasIndex == canvasChanges.Count - 1)) canvasIndex--;
|
||||||
|
canvasChanges.Remove((FrameMiniature)ce.Canvas);
|
||||||
|
}
|
||||||
|
fontChanges.RemoveAt(first ? 0 : fontChanges.Count - 1);
|
||||||
|
break;
|
||||||
|
case ChangeType.Selection:
|
||||||
|
if (selectionChanges.Count <= 1) return false;
|
||||||
|
if ((first && selectionIndex > 0) || (!first && selectionIndex == selectionChanges.Count - 1)) selectionIndex--;
|
||||||
|
if (ce.Canvas != null) {
|
||||||
|
if ((first && canvasIndex > 0) || (!first && canvasIndex == canvasChanges.Count - 1)) canvasIndex--;
|
||||||
|
canvasChanges.Remove((FrameMiniature)ce.Canvas);
|
||||||
|
}
|
||||||
|
selectionChanges.RemoveAt(first ? 0 : selectionChanges.Count - 1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((first && Index > 0) || (!first && Index == Count - 1) || Count == 1) Index--;
|
||||||
|
timeline.RemoveAt(first ? 0 : Count - 1);
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove oldest event
|
||||||
|
private bool RemoveOldest() {
|
||||||
|
if (Count == 0) return false;
|
||||||
|
ChangeEvent ce = timeline.First();
|
||||||
|
RemoveByType(ce);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove last event
|
||||||
|
public bool RemoveLast() {
|
||||||
|
if (Count == 0) return false;
|
||||||
|
var ce = timeline.Last();
|
||||||
|
RemoveByType(ce, false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove history tail
|
||||||
|
private void TruncateTail() {
|
||||||
|
// Check if the Index does not point to the last event
|
||||||
|
//while (Index < Count - 1) Remove
|
||||||
|
if (Index >= -1 && Index < Count - 1) {
|
||||||
|
timeline.RemoveRange( Index + 1, Count - Index - 1);
|
||||||
|
canvasChanges.RemoveRange( canvasIndex + 1, canvasChanges.Count - canvasIndex - 1);
|
||||||
|
fontChanges.RemoveRange( fontIndex + 1, fontChanges.Count - fontIndex - 1);
|
||||||
|
selectionChanges.RemoveRange(selectionIndex + 1, selectionChanges.Count - selectionIndex - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add first states to all lists
|
||||||
|
private void Add() {
|
||||||
|
Add(mainForm.f, false);
|
||||||
|
Add(mainForm.frames, false);
|
||||||
|
var fff = mainForm.f; // Marshal-by-reference warning workaround
|
||||||
|
int ccс = fff.code; //
|
||||||
|
Add(ccс, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add canvas change
|
||||||
|
public FrameMiniature? Add(FrameMiniature f, bool useIndex = true) {
|
||||||
|
if (Doing) return null ;
|
||||||
|
TruncateTail();
|
||||||
|
|
||||||
|
if (Count >= Depth) RemoveOldest();
|
||||||
|
canvasChanges.Add(CopyFrameSimple(f));
|
||||||
|
if (useIndex) {
|
||||||
|
timeline.Add(new ChangeEvent(ChangeType.Canvas));
|
||||||
|
Index++;
|
||||||
|
canvasIndex++;
|
||||||
|
}
|
||||||
|
return canvasChanges.Last();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add Font change
|
||||||
|
public void Add(List<FrameMiniature> ff, bool useIndex = true) {
|
||||||
|
if (Doing) return;
|
||||||
|
TruncateTail();
|
||||||
|
|
||||||
|
var l = new List<FrameMiniature>();
|
||||||
|
foreach (var f in ff) {
|
||||||
|
l.Add(CopyFrameSimple(f));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Count >= Depth) RemoveOldest();
|
||||||
|
fontChanges.Add(l);
|
||||||
|
if (useIndex) {
|
||||||
|
var canv = Add(mainForm.f, false);
|
||||||
|
canvasIndex++;
|
||||||
|
timeline.Add(new ChangeEvent(ChangeType.Font, canv));
|
||||||
|
Index++;
|
||||||
|
fontIndex++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add Frame selection change
|
||||||
|
public void Add(int code, bool useIndex = true) {
|
||||||
|
if (Doing) return;
|
||||||
|
TruncateTail();
|
||||||
|
|
||||||
|
if (Count >= Depth) RemoveOldest();
|
||||||
|
selectionChanges.Add(code);
|
||||||
|
if (useIndex) {
|
||||||
|
var canv = Add(mainForm.f, false);
|
||||||
|
canvasIndex++;
|
||||||
|
timeline.Add(new ChangeEvent(ChangeType.Selection, canv));
|
||||||
|
Index++;
|
||||||
|
selectionIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Do(bool undo = true) {
|
||||||
|
if (!undo && Index >= Count - 1) return;
|
||||||
|
Doing = true;
|
||||||
|
var ce = timeline.ElementAt(Index + (undo ? 0 : 1));
|
||||||
|
int dIndex = undo ? -1 : 1;
|
||||||
|
FrameMiniature fff;
|
||||||
|
switch (ce.Type) {
|
||||||
|
case ChangeType.Canvas:
|
||||||
|
canvasIndex += dIndex;
|
||||||
|
mainForm.f = CopyFrameSimple(canvasChanges[canvasIndex]);
|
||||||
|
mainForm.SetModified();
|
||||||
|
mainForm.nudX.ValueChanged -= mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged -= mainForm.nudY_ValueChanged;
|
||||||
|
mainForm.nudY.Value = mainForm.dotHeight = canvasChanges[canvasIndex].height;
|
||||||
|
mainForm.nudX.Value = mainForm.dotWidth = canvasChanges[canvasIndex].width;
|
||||||
|
mainForm.SetNewWH();
|
||||||
|
mainForm.nudX.ValueChanged += mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged += mainForm.nudY_ValueChanged;
|
||||||
|
break;
|
||||||
|
case ChangeType.Font:
|
||||||
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
|
string selItem = "";
|
||||||
|
int selCode = 0;
|
||||||
|
if (mainForm.miniList.SelectedItems.Count > 0) {
|
||||||
|
selItem = mainForm.miniList.SelectedItems[0].Name;
|
||||||
|
selCode = Convert.ToInt32(selItem);
|
||||||
|
}
|
||||||
|
fontIndex += dIndex;
|
||||||
|
canvasIndex += dIndex;
|
||||||
|
mainForm.frames.Clear();
|
||||||
|
mainForm.miniList.Clear();
|
||||||
|
mainForm.ilMiniatures.Images.Clear();
|
||||||
|
foreach (var f in fontChanges[fontIndex]) {
|
||||||
|
mainForm.frames.Add(CopyFrameSimple(f));
|
||||||
|
}
|
||||||
|
mainForm.FillFrameLists();
|
||||||
|
|
||||||
|
if (selItem != "") {
|
||||||
|
var selection = mainForm.miniList.Items.Find(selItem, false);
|
||||||
|
if (selection.Length > 0) selection[0].Selected = true;
|
||||||
|
fff = mainForm.frames.Find(x => x.code == selCode);
|
||||||
|
} else {
|
||||||
|
mainForm.miniList.Items[0].Selected = true;
|
||||||
|
fff = mainForm.frames[0];
|
||||||
|
}
|
||||||
|
mainForm.f = mainForm.CopyFrame(fff);
|
||||||
|
mainForm.nudX.ValueChanged -= mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged -= mainForm.nudY_ValueChanged;
|
||||||
|
mainForm.nudY.Value = mainForm.dotHeight = fff.height;
|
||||||
|
mainForm.nudX.Value = mainForm.dotWidth = fff.width;
|
||||||
|
mainForm.SetNewWH();
|
||||||
|
mainForm.nudX.ValueChanged += mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged += mainForm.nudY_ValueChanged;
|
||||||
|
|
||||||
|
Cursor.Current = Cursors.Default;
|
||||||
|
break;
|
||||||
|
case ChangeType.Selection:
|
||||||
|
selectionIndex += dIndex;
|
||||||
|
canvasIndex += dIndex;
|
||||||
|
var s = selectionChanges[selectionIndex].ToString().PadLeft(3, '0');
|
||||||
|
var sel = mainForm.miniList.Items.Find(s, false);
|
||||||
|
if (sel.Length > 0) sel[0].Selected = true;
|
||||||
|
fff = mainForm.frames.Find(x => x.code == selectionChanges[selectionIndex]);
|
||||||
|
mainForm.f = CopyFrameSimple(fff);
|
||||||
|
mainForm.nudX.ValueChanged -= mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged -= mainForm.nudY_ValueChanged;
|
||||||
|
mainForm.nudY.Value = mainForm.dotHeight = fff.height;
|
||||||
|
mainForm.nudX.Value = mainForm.dotWidth = fff.width;
|
||||||
|
mainForm.SetNewWH();
|
||||||
|
mainForm.nudX.ValueChanged += mainForm.nudX_ValueChanged;
|
||||||
|
mainForm.nudY.ValueChanged += mainForm.nudY_ValueChanged;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Index += dIndex;
|
||||||
|
Doing = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Undo last change
|
||||||
|
public bool Undo() {
|
||||||
|
if (Undos < 1) return false;
|
||||||
|
Do();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Redo last ondone change
|
||||||
|
public bool Redo() {
|
||||||
|
if (Redos < 1) return false;
|
||||||
|
Do(false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
187
McBitFont/CodeShift.Designer.cs
generated
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
namespace McBitFont {
|
||||||
|
partial class CodeShift {
|
||||||
|
/// <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() {
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
rbShiftLeft = new System.Windows.Forms.RadioButton();
|
||||||
|
rbShiftRight = new System.Windows.Forms.RadioButton();
|
||||||
|
rbSpecify = new System.Windows.Forms.RadioButton();
|
||||||
|
lblValue = new System.Windows.Forms.Label();
|
||||||
|
nudValue = new System.Windows.Forms.NumericUpDown();
|
||||||
|
btnOK = new System.Windows.Forms.Button();
|
||||||
|
btnCancel = new System.Windows.Forms.Button();
|
||||||
|
lblMessage = new System.Windows.Forms.Label();
|
||||||
|
lblRange = new System.Windows.Forms.Label();
|
||||||
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudValue).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// rbShiftLeft
|
||||||
|
//
|
||||||
|
rbShiftLeft.AutoSize = true;
|
||||||
|
rbShiftLeft.Location = new System.Drawing.Point(12, 12);
|
||||||
|
rbShiftLeft.Name = "rbShiftLeft";
|
||||||
|
rbShiftLeft.Size = new System.Drawing.Size(134, 19);
|
||||||
|
rbShiftLeft.TabIndex = 0;
|
||||||
|
rbShiftLeft.Text = "Shift Left (towards 0)";
|
||||||
|
toolTip1.SetToolTip(rbShiftLeft, "Shift all symbols left on the code sequence decreasing codes");
|
||||||
|
rbShiftLeft.UseVisualStyleBackColor = true;
|
||||||
|
rbShiftLeft.CheckedChanged += ModeChanged;
|
||||||
|
//
|
||||||
|
// rbShiftRight
|
||||||
|
//
|
||||||
|
rbShiftRight.AutoSize = true;
|
||||||
|
rbShiftRight.Location = new System.Drawing.Point(12, 37);
|
||||||
|
rbShiftRight.Name = "rbShiftRight";
|
||||||
|
rbShiftRight.Size = new System.Drawing.Size(154, 19);
|
||||||
|
rbShiftRight.TabIndex = 1;
|
||||||
|
rbShiftRight.Text = "Shift Right (towards 255)";
|
||||||
|
toolTip1.SetToolTip(rbShiftRight, "Shift all symbols right on the code sequence increasing codes");
|
||||||
|
rbShiftRight.UseVisualStyleBackColor = true;
|
||||||
|
rbShiftRight.CheckedChanged += ModeChanged;
|
||||||
|
//
|
||||||
|
// rbSpecify
|
||||||
|
//
|
||||||
|
rbSpecify.AutoSize = true;
|
||||||
|
rbSpecify.Location = new System.Drawing.Point(12, 62);
|
||||||
|
rbSpecify.Name = "rbSpecify";
|
||||||
|
rbSpecify.Size = new System.Drawing.Size(118, 19);
|
||||||
|
rbSpecify.TabIndex = 2;
|
||||||
|
rbSpecify.Text = "Specify start code";
|
||||||
|
toolTip1.SetToolTip(rbSpecify, "Specify the code for the first symbol in sequence");
|
||||||
|
rbSpecify.UseVisualStyleBackColor = true;
|
||||||
|
rbSpecify.CheckedChanged += ModeChanged;
|
||||||
|
//
|
||||||
|
// lblValue
|
||||||
|
//
|
||||||
|
lblValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
lblValue.Location = new System.Drawing.Point(156, 8);
|
||||||
|
lblValue.Name = "lblValue";
|
||||||
|
lblValue.Size = new System.Drawing.Size(110, 15);
|
||||||
|
lblValue.TabIndex = 3;
|
||||||
|
lblValue.Text = "Shift by:";
|
||||||
|
lblValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// nudValue
|
||||||
|
//
|
||||||
|
nudValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
nudValue.Location = new System.Drawing.Point(185, 27);
|
||||||
|
nudValue.Maximum = new decimal(new int[] { 254, 0, 0, 0 });
|
||||||
|
nudValue.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudValue.Name = "nudValue";
|
||||||
|
nudValue.Size = new System.Drawing.Size(50, 23);
|
||||||
|
nudValue.TabIndex = 5;
|
||||||
|
nudValue.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudValue.ValueChanged += nudValue_ValueChanged;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
btnOK.Location = new System.Drawing.Point(24, 155);
|
||||||
|
btnOK.Name = "btnOK";
|
||||||
|
btnOK.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnOK.TabIndex = 6;
|
||||||
|
btnOK.Text = "OK";
|
||||||
|
btnOK.UseVisualStyleBackColor = true;
|
||||||
|
btnOK.Click += btnOK_Click;
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
btnCancel.Location = new System.Drawing.Point(156, 155);
|
||||||
|
btnCancel.Name = "btnCancel";
|
||||||
|
btnCancel.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnCancel.TabIndex = 7;
|
||||||
|
btnCancel.Text = "Cancel";
|
||||||
|
btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
btnCancel.Click += btnCancel_Click;
|
||||||
|
//
|
||||||
|
// lblMessage
|
||||||
|
//
|
||||||
|
lblMessage.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
lblMessage.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
lblMessage.ForeColor = System.Drawing.Color.DarkRed;
|
||||||
|
lblMessage.Location = new System.Drawing.Point(0, 84);
|
||||||
|
lblMessage.Name = "lblMessage";
|
||||||
|
lblMessage.Size = new System.Drawing.Size(268, 68);
|
||||||
|
lblMessage.TabIndex = 8;
|
||||||
|
lblMessage.Text = "Message";
|
||||||
|
lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// lblRange
|
||||||
|
//
|
||||||
|
lblRange.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
lblRange.Location = new System.Drawing.Point(183, 53);
|
||||||
|
lblRange.Name = "lblRange";
|
||||||
|
lblRange.Size = new System.Drawing.Size(62, 31);
|
||||||
|
lblRange.TabIndex = 9;
|
||||||
|
lblRange.Text = "min: 222\r\nmax: 222";
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
|
//
|
||||||
|
// CodeShift
|
||||||
|
//
|
||||||
|
AcceptButton = btnOK;
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
CancelButton = btnCancel;
|
||||||
|
ClientSize = new System.Drawing.Size(268, 191);
|
||||||
|
Controls.Add(lblRange);
|
||||||
|
Controls.Add(lblMessage);
|
||||||
|
Controls.Add(btnCancel);
|
||||||
|
Controls.Add(btnOK);
|
||||||
|
Controls.Add(nudValue);
|
||||||
|
Controls.Add(lblValue);
|
||||||
|
Controls.Add(rbSpecify);
|
||||||
|
Controls.Add(rbShiftRight);
|
||||||
|
Controls.Add(rbShiftLeft);
|
||||||
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
MaximizeBox = false;
|
||||||
|
MinimizeBox = false;
|
||||||
|
Name = "CodeShift";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "Code Shift";
|
||||||
|
Load += CodeShift_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudValue).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.Label lblValue;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
public System.Windows.Forms.RadioButton rbShiftLeft;
|
||||||
|
public System.Windows.Forms.RadioButton rbShiftRight;
|
||||||
|
public System.Windows.Forms.RadioButton rbSpecify;
|
||||||
|
public System.Windows.Forms.NumericUpDown nudValue;
|
||||||
|
private System.Windows.Forms.Label lblMessage;
|
||||||
|
private System.Windows.Forms.Label lblRange;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
}
|
||||||
|
}
|
99
McBitFont/CodeShift.cs
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
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 CodeShift : Form {
|
||||||
|
|
||||||
|
private int maxLeft, maxRight, maxSC, count;
|
||||||
|
public int sc;
|
||||||
|
|
||||||
|
public CodeShift(MainForm parent) {
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
count = parent.frames.Count;
|
||||||
|
sc = parent.frames.First().code;
|
||||||
|
maxLeft = sc;
|
||||||
|
maxRight = 255 - sc - count + 1;
|
||||||
|
maxSC = sc + maxRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CodeShift_Load(object sender, EventArgs e) {
|
||||||
|
byte enabled = 7;
|
||||||
|
string msg = "";
|
||||||
|
if (maxLeft < 1) {
|
||||||
|
rbShiftLeft.Enabled = false;
|
||||||
|
enabled -= 1;
|
||||||
|
msg += "Cannot shift left: Start code is " + sc.ToString() + ".";
|
||||||
|
}
|
||||||
|
if (maxRight < 1) {
|
||||||
|
rbShiftRight.Enabled = false;
|
||||||
|
enabled -= 2;
|
||||||
|
msg += "\nCannot shift right: Last code is " + (sc + count - 1).ToString() + ".";
|
||||||
|
}
|
||||||
|
if (maxSC <= 0) {
|
||||||
|
rbSpecify.Enabled = false;
|
||||||
|
enabled -= 4;
|
||||||
|
msg += "\nCannot shift: The font is full." + (sc + count - 1).ToString();
|
||||||
|
}
|
||||||
|
lblMessage.Text = msg;
|
||||||
|
|
||||||
|
if ((enabled & 1) > 0) rbShiftLeft.Checked = true;
|
||||||
|
else if ((enabled & 2) > 0) rbShiftRight.Checked = true;
|
||||||
|
else if ((enabled & 4) > 0) rbSpecify.Checked = true;
|
||||||
|
else {
|
||||||
|
btnOK.Enabled = false;
|
||||||
|
nudValue.Enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//ModeChanged(rbShiftLeft, null);
|
||||||
|
//nudValue.Minimum = 1;
|
||||||
|
//nudValue.Maximum = maxLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ModeChanged(object sender, EventArgs e) {
|
||||||
|
if (rbSpecify.Checked) {
|
||||||
|
lblValue.Text = "New start code:";
|
||||||
|
nudValue.Minimum = 0;
|
||||||
|
nudValue.Maximum = maxSC;
|
||||||
|
nudValue.Value = 0;
|
||||||
|
lblRange.Text = "min: 0\nmax: " + maxSC.ToString();
|
||||||
|
} else {
|
||||||
|
lblValue.Text = "Shift by:";
|
||||||
|
nudValue.Minimum = 1;
|
||||||
|
nudValue.Value = 1;
|
||||||
|
if (rbShiftLeft.Checked) {
|
||||||
|
nudValue.Maximum = maxLeft;
|
||||||
|
lblRange.Text = "min: 1\nmax: " + maxLeft.ToString();
|
||||||
|
}
|
||||||
|
if (rbShiftRight.Checked) {
|
||||||
|
nudValue.Maximum = maxRight;
|
||||||
|
lblRange.Text = "min: 1\nmax: " + maxRight.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nudValue_ValueChanged(object sender, EventArgs e) {
|
||||||
|
if (rbSpecify.Checked) {
|
||||||
|
if (nudValue.Value == sc) btnOK.Enabled = false;
|
||||||
|
else btnOK.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
123
McBitFont/CodeShift.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?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>
|
||||||
|
</root>
|
521
McBitFont/Export.Designer.cs
generated
@@ -23,320 +23,337 @@
|
|||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent() {
|
private void InitializeComponent() {
|
||||||
this.txtOutput = new System.Windows.Forms.RichTextBox();
|
components = new System.ComponentModel.Container();
|
||||||
this.gbScan = new System.Windows.Forms.GroupBox();
|
txtOutput = new System.Windows.Forms.RichTextBox();
|
||||||
this.cbVDir = new System.Windows.Forms.ComboBox();
|
gbScan = new System.Windows.Forms.GroupBox();
|
||||||
this.cbHDir = new System.Windows.Forms.ComboBox();
|
cbVDir = new System.Windows.Forms.ComboBox();
|
||||||
this.cbOrder = new System.Windows.Forms.ComboBox();
|
cbHDir = new System.Windows.Forms.ComboBox();
|
||||||
this.gbOptions = new System.Windows.Forms.GroupBox();
|
cbOrder = new System.Windows.Forms.ComboBox();
|
||||||
this.cbZeroes = new System.Windows.Forms.CheckBox();
|
gbOptions = new System.Windows.Forms.GroupBox();
|
||||||
this.cbHeader = new System.Windows.Forms.CheckBox();
|
cbPacked = new System.Windows.Forms.CheckBox();
|
||||||
this.cbComments = new System.Windows.Forms.CheckBox();
|
cbZeroes = new System.Windows.Forms.CheckBox();
|
||||||
this.gbNumbers = new System.Windows.Forms.GroupBox();
|
cbHeader = new System.Windows.Forms.CheckBox();
|
||||||
this.cbBitOrder = new System.Windows.Forms.ComboBox();
|
cbComments = new System.Windows.Forms.CheckBox();
|
||||||
this.cbNumSize = new System.Windows.Forms.ComboBox();
|
gbNumbers = new System.Windows.Forms.GroupBox();
|
||||||
this.cbNumBase = new System.Windows.Forms.ComboBox();
|
cbBitOrder = new System.Windows.Forms.ComboBox();
|
||||||
this.gbText = new System.Windows.Forms.GroupBox();
|
cbNumSize = new System.Windows.Forms.ComboBox();
|
||||||
this.lblXLines = new System.Windows.Forms.Label();
|
cbNumBase = new System.Windows.Forms.ComboBox();
|
||||||
this.nudXLines = new System.Windows.Forms.NumericUpDown();
|
gbText = new System.Windows.Forms.GroupBox();
|
||||||
this.cbLines = new System.Windows.Forms.ComboBox();
|
lblXLines = new System.Windows.Forms.Label();
|
||||||
this.cbFormat = new System.Windows.Forms.ComboBox();
|
nudXLines = new System.Windows.Forms.NumericUpDown();
|
||||||
this.btnGenerate = new System.Windows.Forms.Button();
|
cbLines = new System.Windows.Forms.ComboBox();
|
||||||
this.btnClose = new System.Windows.Forms.Button();
|
cbFormat = new System.Windows.Forms.ComboBox();
|
||||||
this.gbScan.SuspendLayout();
|
btnGenerate = new System.Windows.Forms.Button();
|
||||||
this.gbOptions.SuspendLayout();
|
btnClose = new System.Windows.Forms.Button();
|
||||||
this.gbNumbers.SuspendLayout();
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
this.gbText.SuspendLayout();
|
gbScan.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudXLines)).BeginInit();
|
gbOptions.SuspendLayout();
|
||||||
this.SuspendLayout();
|
gbNumbers.SuspendLayout();
|
||||||
|
gbText.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudXLines).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// txtOutput
|
// txtOutput
|
||||||
//
|
//
|
||||||
this.txtOutput.AcceptsTab = true;
|
txtOutput.AcceptsTab = true;
|
||||||
this.txtOutput.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
txtOutput.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
txtOutput.AutoWordSelection = true;
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
txtOutput.DetectUrls = false;
|
||||||
this.txtOutput.AutoWordSelection = true;
|
txtOutput.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
this.txtOutput.DetectUrls = false;
|
txtOutput.HideSelection = false;
|
||||||
this.txtOutput.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
txtOutput.Location = new System.Drawing.Point(176, 14);
|
||||||
this.txtOutput.HideSelection = false;
|
txtOutput.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.txtOutput.Location = new System.Drawing.Point(151, 12);
|
txtOutput.Name = "txtOutput";
|
||||||
this.txtOutput.Name = "txtOutput";
|
txtOutput.Size = new System.Drawing.Size(616, 584);
|
||||||
this.txtOutput.Size = new System.Drawing.Size(529, 507);
|
txtOutput.TabIndex = 0;
|
||||||
this.txtOutput.TabIndex = 0;
|
txtOutput.Text = "";
|
||||||
this.txtOutput.Text = "";
|
txtOutput.WordWrap = false;
|
||||||
this.txtOutput.WordWrap = false;
|
|
||||||
//
|
//
|
||||||
// gbScan
|
// gbScan
|
||||||
//
|
//
|
||||||
this.gbScan.Controls.Add(this.cbVDir);
|
gbScan.Controls.Add(cbVDir);
|
||||||
this.gbScan.Controls.Add(this.cbHDir);
|
gbScan.Controls.Add(cbHDir);
|
||||||
this.gbScan.Controls.Add(this.cbOrder);
|
gbScan.Controls.Add(cbOrder);
|
||||||
this.gbScan.Location = new System.Drawing.Point(5, 12);
|
gbScan.Location = new System.Drawing.Point(6, 14);
|
||||||
this.gbScan.Name = "gbScan";
|
gbScan.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbScan.Size = new System.Drawing.Size(140, 105);
|
gbScan.Name = "gbScan";
|
||||||
this.gbScan.TabIndex = 1;
|
gbScan.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbScan.TabStop = false;
|
gbScan.Size = new System.Drawing.Size(163, 121);
|
||||||
this.gbScan.Text = "Scan";
|
gbScan.TabIndex = 1;
|
||||||
|
gbScan.TabStop = false;
|
||||||
|
gbScan.Text = "Scan";
|
||||||
//
|
//
|
||||||
// cbVDir
|
// cbVDir
|
||||||
//
|
//
|
||||||
this.cbVDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbVDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbVDir.FormattingEnabled = true;
|
cbVDir.FormattingEnabled = true;
|
||||||
this.cbVDir.Items.AddRange(new object[] {
|
cbVDir.Items.AddRange(new object[] { "Top to Bottom", "Bottom to Top" });
|
||||||
"Top to Bottom",
|
cbVDir.Location = new System.Drawing.Point(12, 84);
|
||||||
"Bottom to Top"});
|
cbVDir.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbVDir.Location = new System.Drawing.Point(10, 73);
|
cbVDir.Name = "cbVDir";
|
||||||
this.cbVDir.Name = "cbVDir";
|
cbVDir.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbVDir.Size = new System.Drawing.Size(121, 21);
|
cbVDir.TabIndex = 2;
|
||||||
this.cbVDir.TabIndex = 2;
|
|
||||||
//
|
//
|
||||||
// cbHDir
|
// cbHDir
|
||||||
//
|
//
|
||||||
this.cbHDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbHDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbHDir.FormattingEnabled = true;
|
cbHDir.FormattingEnabled = true;
|
||||||
this.cbHDir.Items.AddRange(new object[] {
|
cbHDir.Items.AddRange(new object[] { "Left to Right", "Right to Left" });
|
||||||
"Left to Right",
|
cbHDir.Location = new System.Drawing.Point(12, 53);
|
||||||
"Right to Left"});
|
cbHDir.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbHDir.Location = new System.Drawing.Point(10, 46);
|
cbHDir.Name = "cbHDir";
|
||||||
this.cbHDir.Name = "cbHDir";
|
cbHDir.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbHDir.Size = new System.Drawing.Size(121, 21);
|
cbHDir.TabIndex = 1;
|
||||||
this.cbHDir.TabIndex = 1;
|
|
||||||
//
|
//
|
||||||
// cbOrder
|
// cbOrder
|
||||||
//
|
//
|
||||||
this.cbOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbOrder.FormattingEnabled = true;
|
cbOrder.FormattingEnabled = true;
|
||||||
this.cbOrder.Items.AddRange(new object[] {
|
cbOrder.Items.AddRange(new object[] { "Columns", "Rows" });
|
||||||
"Columns",
|
cbOrder.Location = new System.Drawing.Point(12, 22);
|
||||||
"Rows"});
|
cbOrder.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbOrder.Location = new System.Drawing.Point(10, 19);
|
cbOrder.Name = "cbOrder";
|
||||||
this.cbOrder.Name = "cbOrder";
|
cbOrder.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbOrder.Size = new System.Drawing.Size(121, 21);
|
cbOrder.TabIndex = 0;
|
||||||
this.cbOrder.TabIndex = 0;
|
cbOrder.SelectedIndexChanged += cbOrder_SelectedIndexChanged;
|
||||||
this.cbOrder.SelectedIndexChanged += new System.EventHandler(this.cbOrder_SelectedIndexChanged);
|
|
||||||
//
|
//
|
||||||
// gbOptions
|
// gbOptions
|
||||||
//
|
//
|
||||||
this.gbOptions.Controls.Add(this.cbZeroes);
|
gbOptions.Controls.Add(cbPacked);
|
||||||
this.gbOptions.Controls.Add(this.cbHeader);
|
gbOptions.Controls.Add(cbZeroes);
|
||||||
this.gbOptions.Controls.Add(this.cbComments);
|
gbOptions.Controls.Add(cbHeader);
|
||||||
this.gbOptions.Location = new System.Drawing.Point(5, 345);
|
gbOptions.Controls.Add(cbComments);
|
||||||
this.gbOptions.Name = "gbOptions";
|
gbOptions.Location = new System.Drawing.Point(6, 398);
|
||||||
this.gbOptions.Size = new System.Drawing.Size(140, 88);
|
gbOptions.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbOptions.TabIndex = 3;
|
gbOptions.Name = "gbOptions";
|
||||||
this.gbOptions.TabStop = false;
|
gbOptions.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbOptions.Text = "Options";
|
gbOptions.Size = new System.Drawing.Size(163, 116);
|
||||||
|
gbOptions.TabIndex = 3;
|
||||||
|
gbOptions.TabStop = false;
|
||||||
|
gbOptions.Text = "Options";
|
||||||
|
//
|
||||||
|
// cbPacked
|
||||||
|
//
|
||||||
|
cbPacked.AutoSize = true;
|
||||||
|
cbPacked.Location = new System.Drawing.Point(7, 90);
|
||||||
|
cbPacked.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
cbPacked.Name = "cbPacked";
|
||||||
|
cbPacked.Size = new System.Drawing.Size(89, 19);
|
||||||
|
cbPacked.TabIndex = 3;
|
||||||
|
cbPacked.Text = "Packed font";
|
||||||
|
toolTip1.SetToolTip(cbPacked, "Pack symbols utilizing all bits within a symbol");
|
||||||
|
cbPacked.UseVisualStyleBackColor = true;
|
||||||
|
cbPacked.CheckedChanged += cbPacked_CheckedChanged;
|
||||||
//
|
//
|
||||||
// cbZeroes
|
// cbZeroes
|
||||||
//
|
//
|
||||||
this.cbZeroes.AutoSize = true;
|
cbZeroes.AutoSize = true;
|
||||||
this.cbZeroes.Checked = true;
|
cbZeroes.Checked = true;
|
||||||
this.cbZeroes.CheckState = System.Windows.Forms.CheckState.Checked;
|
cbZeroes.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbZeroes.Location = new System.Drawing.Point(6, 65);
|
cbZeroes.Location = new System.Drawing.Point(7, 66);
|
||||||
this.cbZeroes.Name = "cbZeroes";
|
cbZeroes.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbZeroes.Size = new System.Drawing.Size(98, 17);
|
cbZeroes.Name = "cbZeroes";
|
||||||
this.cbZeroes.TabIndex = 2;
|
cbZeroes.Size = new System.Drawing.Size(104, 19);
|
||||||
this.cbZeroes.Text = "Leading zeroes";
|
cbZeroes.TabIndex = 2;
|
||||||
this.cbZeroes.UseVisualStyleBackColor = true;
|
cbZeroes.Text = "Leading zeroes";
|
||||||
|
toolTip1.SetToolTip(cbZeroes, "Add leading zeroes: 0x01 / 0x1");
|
||||||
|
cbZeroes.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// cbHeader
|
// cbHeader
|
||||||
//
|
//
|
||||||
this.cbHeader.AutoSize = true;
|
cbHeader.AutoSize = true;
|
||||||
this.cbHeader.Checked = true;
|
cbHeader.Checked = true;
|
||||||
this.cbHeader.CheckState = System.Windows.Forms.CheckState.Checked;
|
cbHeader.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbHeader.Location = new System.Drawing.Point(6, 19);
|
cbHeader.Location = new System.Drawing.Point(7, 18);
|
||||||
this.cbHeader.Name = "cbHeader";
|
cbHeader.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbHeader.Size = new System.Drawing.Size(86, 17);
|
cbHeader.Name = "cbHeader";
|
||||||
this.cbHeader.TabIndex = 1;
|
cbHeader.Size = new System.Drawing.Size(92, 19);
|
||||||
this.cbHeader.Text = "Meta header";
|
cbHeader.TabIndex = 1;
|
||||||
this.cbHeader.UseVisualStyleBackColor = true;
|
cbHeader.Text = "Meta header";
|
||||||
this.cbHeader.CheckedChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged);
|
toolTip1.SetToolTip(cbHeader, "Add meta header with meta data");
|
||||||
|
cbHeader.UseVisualStyleBackColor = true;
|
||||||
|
cbHeader.CheckedChanged += cbFormat_SelectedIndexChanged;
|
||||||
//
|
//
|
||||||
// cbComments
|
// cbComments
|
||||||
//
|
//
|
||||||
this.cbComments.AutoSize = true;
|
cbComments.AutoSize = true;
|
||||||
this.cbComments.Checked = true;
|
cbComments.Checked = true;
|
||||||
this.cbComments.CheckState = System.Windows.Forms.CheckState.Checked;
|
cbComments.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbComments.Location = new System.Drawing.Point(6, 42);
|
cbComments.Location = new System.Drawing.Point(7, 42);
|
||||||
this.cbComments.Name = "cbComments";
|
cbComments.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbComments.Size = new System.Drawing.Size(75, 17);
|
cbComments.Name = "cbComments";
|
||||||
this.cbComments.TabIndex = 0;
|
cbComments.Size = new System.Drawing.Size(85, 19);
|
||||||
this.cbComments.Text = "Comments";
|
cbComments.TabIndex = 0;
|
||||||
this.cbComments.UseVisualStyleBackColor = true;
|
cbComments.Text = "Comments";
|
||||||
|
toolTip1.SetToolTip(cbComments, "Add descriptive comments");
|
||||||
|
cbComments.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// gbNumbers
|
// gbNumbers
|
||||||
//
|
//
|
||||||
this.gbNumbers.Controls.Add(this.cbBitOrder);
|
gbNumbers.Controls.Add(cbBitOrder);
|
||||||
this.gbNumbers.Controls.Add(this.cbNumSize);
|
gbNumbers.Controls.Add(cbNumSize);
|
||||||
this.gbNumbers.Controls.Add(this.cbNumBase);
|
gbNumbers.Controls.Add(cbNumBase);
|
||||||
this.gbNumbers.Location = new System.Drawing.Point(5, 123);
|
gbNumbers.Location = new System.Drawing.Point(6, 142);
|
||||||
this.gbNumbers.Name = "gbNumbers";
|
gbNumbers.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbNumbers.Size = new System.Drawing.Size(140, 105);
|
gbNumbers.Name = "gbNumbers";
|
||||||
this.gbNumbers.TabIndex = 4;
|
gbNumbers.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbNumbers.TabStop = false;
|
gbNumbers.Size = new System.Drawing.Size(163, 121);
|
||||||
this.gbNumbers.Text = "Numbers";
|
gbNumbers.TabIndex = 4;
|
||||||
|
gbNumbers.TabStop = false;
|
||||||
|
gbNumbers.Text = "Numbers";
|
||||||
//
|
//
|
||||||
// cbBitOrder
|
// cbBitOrder
|
||||||
//
|
//
|
||||||
this.cbBitOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbBitOrder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbBitOrder.FormattingEnabled = true;
|
cbBitOrder.FormattingEnabled = true;
|
||||||
this.cbBitOrder.Items.AddRange(new object[] {
|
cbBitOrder.Items.AddRange(new object[] { "LSB Top", "MSB Top" });
|
||||||
"LSB Top",
|
cbBitOrder.Location = new System.Drawing.Point(12, 22);
|
||||||
"MSB Top"});
|
cbBitOrder.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.cbBitOrder.Location = new System.Drawing.Point(10, 19);
|
cbBitOrder.Name = "cbBitOrder";
|
||||||
this.cbBitOrder.Name = "cbBitOrder";
|
cbBitOrder.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbBitOrder.Size = new System.Drawing.Size(121, 21);
|
cbBitOrder.TabIndex = 5;
|
||||||
this.cbBitOrder.TabIndex = 5;
|
|
||||||
//
|
//
|
||||||
// cbNumSize
|
// cbNumSize
|
||||||
//
|
//
|
||||||
this.cbNumSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbNumSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbNumSize.FormattingEnabled = true;
|
cbNumSize.FormattingEnabled = true;
|
||||||
this.cbNumSize.Items.AddRange(new object[] {
|
cbNumSize.Items.AddRange(new object[] { "8 bit", "16 bit", "32 bit" });
|
||||||
"8 bit",
|
cbNumSize.Location = new System.Drawing.Point(12, 84);
|
||||||
"16 bit",
|
cbNumSize.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
"32 bit"});
|
cbNumSize.Name = "cbNumSize";
|
||||||
this.cbNumSize.Location = new System.Drawing.Point(10, 73);
|
cbNumSize.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbNumSize.Name = "cbNumSize";
|
cbNumSize.TabIndex = 4;
|
||||||
this.cbNumSize.Size = new System.Drawing.Size(121, 21);
|
|
||||||
this.cbNumSize.TabIndex = 4;
|
|
||||||
//
|
//
|
||||||
// cbNumBase
|
// cbNumBase
|
||||||
//
|
//
|
||||||
this.cbNumBase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbNumBase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbNumBase.FormattingEnabled = true;
|
cbNumBase.FormattingEnabled = true;
|
||||||
this.cbNumBase.Items.AddRange(new object[] {
|
cbNumBase.Items.AddRange(new object[] { "Hexadecimal", "Binary", "Decimal" });
|
||||||
"Hexadecimal",
|
cbNumBase.Location = new System.Drawing.Point(12, 53);
|
||||||
"Binary",
|
cbNumBase.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
"Decimal"});
|
cbNumBase.Name = "cbNumBase";
|
||||||
this.cbNumBase.Location = new System.Drawing.Point(10, 46);
|
cbNumBase.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbNumBase.Name = "cbNumBase";
|
cbNumBase.TabIndex = 3;
|
||||||
this.cbNumBase.Size = new System.Drawing.Size(121, 21);
|
|
||||||
this.cbNumBase.TabIndex = 3;
|
|
||||||
//
|
//
|
||||||
// gbText
|
// gbText
|
||||||
//
|
//
|
||||||
this.gbText.Controls.Add(this.lblXLines);
|
gbText.Controls.Add(lblXLines);
|
||||||
this.gbText.Controls.Add(this.nudXLines);
|
gbText.Controls.Add(nudXLines);
|
||||||
this.gbText.Controls.Add(this.cbLines);
|
gbText.Controls.Add(cbLines);
|
||||||
this.gbText.Controls.Add(this.cbFormat);
|
gbText.Controls.Add(cbFormat);
|
||||||
this.gbText.Location = new System.Drawing.Point(5, 234);
|
gbText.Location = new System.Drawing.Point(6, 270);
|
||||||
this.gbText.Name = "gbText";
|
gbText.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbText.Size = new System.Drawing.Size(140, 105);
|
gbText.Name = "gbText";
|
||||||
this.gbText.TabIndex = 5;
|
gbText.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.gbText.TabStop = false;
|
gbText.Size = new System.Drawing.Size(163, 121);
|
||||||
this.gbText.Text = "Text format";
|
gbText.TabIndex = 5;
|
||||||
|
gbText.TabStop = false;
|
||||||
|
gbText.Text = "Text format";
|
||||||
//
|
//
|
||||||
// lblXLines
|
// lblXLines
|
||||||
//
|
//
|
||||||
this.lblXLines.AutoSize = true;
|
lblXLines.AutoSize = true;
|
||||||
this.lblXLines.Enabled = false;
|
lblXLines.Enabled = false;
|
||||||
this.lblXLines.Location = new System.Drawing.Point(10, 76);
|
lblXLines.Location = new System.Drawing.Point(12, 88);
|
||||||
this.lblXLines.Name = "lblXLines";
|
lblXLines.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
this.lblXLines.Size = new System.Drawing.Size(60, 13);
|
lblXLines.Name = "lblXLines";
|
||||||
this.lblXLines.TabIndex = 9;
|
lblXLines.Size = new System.Drawing.Size(67, 15);
|
||||||
this.lblXLines.Text = "X numbers:";
|
lblXLines.TabIndex = 9;
|
||||||
|
lblXLines.Text = "X numbers:";
|
||||||
//
|
//
|
||||||
// nudXLines
|
// nudXLines
|
||||||
//
|
//
|
||||||
this.nudXLines.Enabled = false;
|
nudXLines.Enabled = false;
|
||||||
this.nudXLines.Location = new System.Drawing.Point(76, 73);
|
nudXLines.Location = new System.Drawing.Point(89, 84);
|
||||||
this.nudXLines.Maximum = new decimal(new int[] {
|
nudXLines.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
64,
|
nudXLines.Maximum = new decimal(new int[] { 64, 0, 0, 0 });
|
||||||
0,
|
nudXLines.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
0,
|
nudXLines.Name = "nudXLines";
|
||||||
0});
|
nudXLines.Size = new System.Drawing.Size(64, 23);
|
||||||
this.nudXLines.Minimum = new decimal(new int[] {
|
nudXLines.TabIndex = 8;
|
||||||
1,
|
nudXLines.Value = new decimal(new int[] { 8, 0, 0, 0 });
|
||||||
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
|
// cbLines
|
||||||
//
|
//
|
||||||
this.cbLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbLines.FormattingEnabled = true;
|
cbLines.FormattingEnabled = true;
|
||||||
this.cbLines.Items.AddRange(new object[] {
|
cbLines.Items.AddRange(new object[] { "1 Column per line", "1 Symbol per line", "X Numbers per line" });
|
||||||
"1 Column per line",
|
cbLines.Location = new System.Drawing.Point(12, 53);
|
||||||
"1 Symbol per line",
|
cbLines.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
"X Numbers per line"});
|
cbLines.Name = "cbLines";
|
||||||
this.cbLines.Location = new System.Drawing.Point(10, 46);
|
cbLines.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbLines.Name = "cbLines";
|
cbLines.TabIndex = 7;
|
||||||
this.cbLines.Size = new System.Drawing.Size(121, 21);
|
cbLines.SelectedIndexChanged += cbLines_SelectedIndexChanged;
|
||||||
this.cbLines.TabIndex = 7;
|
|
||||||
this.cbLines.SelectedIndexChanged += new System.EventHandler(this.cbLines_SelectedIndexChanged);
|
|
||||||
//
|
//
|
||||||
// cbFormat
|
// cbFormat
|
||||||
//
|
//
|
||||||
this.cbFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbFormat.FormattingEnabled = true;
|
cbFormat.FormattingEnabled = true;
|
||||||
this.cbFormat.Items.AddRange(new object[] {
|
cbFormat.Items.AddRange(new object[] { "1D C array", "2D C array", "Comma separated" });
|
||||||
"1D C array",
|
cbFormat.Location = new System.Drawing.Point(12, 22);
|
||||||
"2D C array",
|
cbFormat.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
"Comma separated"});
|
cbFormat.Name = "cbFormat";
|
||||||
this.cbFormat.Location = new System.Drawing.Point(10, 19);
|
cbFormat.Size = new System.Drawing.Size(140, 23);
|
||||||
this.cbFormat.Name = "cbFormat";
|
cbFormat.TabIndex = 6;
|
||||||
this.cbFormat.Size = new System.Drawing.Size(121, 21);
|
cbFormat.SelectedIndexChanged += cbFormat_SelectedIndexChanged;
|
||||||
this.cbFormat.TabIndex = 6;
|
|
||||||
this.cbFormat.SelectedIndexChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged);
|
|
||||||
//
|
//
|
||||||
// btnGenerate
|
// btnGenerate
|
||||||
//
|
//
|
||||||
this.btnGenerate.Location = new System.Drawing.Point(5, 439);
|
btnGenerate.Location = new System.Drawing.Point(6, 520);
|
||||||
this.btnGenerate.Name = "btnGenerate";
|
btnGenerate.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.btnGenerate.Size = new System.Drawing.Size(140, 30);
|
btnGenerate.Name = "btnGenerate";
|
||||||
this.btnGenerate.TabIndex = 6;
|
btnGenerate.Size = new System.Drawing.Size(163, 35);
|
||||||
this.btnGenerate.Text = "Generate";
|
btnGenerate.TabIndex = 6;
|
||||||
this.btnGenerate.UseVisualStyleBackColor = true;
|
btnGenerate.Text = "Generate";
|
||||||
this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click);
|
btnGenerate.UseVisualStyleBackColor = true;
|
||||||
|
btnGenerate.Click += btnGenerate_Click;
|
||||||
//
|
//
|
||||||
// btnClose
|
// btnClose
|
||||||
//
|
//
|
||||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.btnClose.Location = new System.Drawing.Point(5, 487);
|
btnClose.Location = new System.Drawing.Point(6, 562);
|
||||||
this.btnClose.Name = "btnClose";
|
btnClose.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.btnClose.Size = new System.Drawing.Size(140, 30);
|
btnClose.Name = "btnClose";
|
||||||
this.btnClose.TabIndex = 7;
|
btnClose.Size = new System.Drawing.Size(163, 35);
|
||||||
this.btnClose.Text = "Close";
|
btnClose.TabIndex = 7;
|
||||||
this.btnClose.UseVisualStyleBackColor = true;
|
btnClose.Text = "Close";
|
||||||
|
btnClose.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
//
|
//
|
||||||
// Export
|
// Export
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.btnClose;
|
CancelButton = btnClose;
|
||||||
this.ClientSize = new System.Drawing.Size(692, 531);
|
ClientSize = new System.Drawing.Size(807, 613);
|
||||||
this.Controls.Add(this.btnClose);
|
Controls.Add(btnClose);
|
||||||
this.Controls.Add(this.btnGenerate);
|
Controls.Add(btnGenerate);
|
||||||
this.Controls.Add(this.gbText);
|
Controls.Add(gbText);
|
||||||
this.Controls.Add(this.gbNumbers);
|
Controls.Add(gbNumbers);
|
||||||
this.Controls.Add(this.gbOptions);
|
Controls.Add(gbOptions);
|
||||||
this.Controls.Add(this.gbScan);
|
Controls.Add(gbScan);
|
||||||
this.Controls.Add(this.txtOutput);
|
Controls.Add(txtOutput);
|
||||||
this.MinimumSize = new System.Drawing.Size(700, 570);
|
Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
this.Name = "Export";
|
MinimumSize = new System.Drawing.Size(814, 652);
|
||||||
this.ShowIcon = false;
|
Name = "Export";
|
||||||
this.ShowInTaskbar = false;
|
ShowIcon = false;
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
ShowInTaskbar = false;
|
||||||
this.Text = "Export";
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Load += new System.EventHandler(this.Export_Load);
|
Text = "Export";
|
||||||
this.gbScan.ResumeLayout(false);
|
Load += Export_Load;
|
||||||
this.gbOptions.ResumeLayout(false);
|
gbScan.ResumeLayout(false);
|
||||||
this.gbOptions.PerformLayout();
|
gbOptions.ResumeLayout(false);
|
||||||
this.gbNumbers.ResumeLayout(false);
|
gbOptions.PerformLayout();
|
||||||
this.gbText.ResumeLayout(false);
|
gbNumbers.ResumeLayout(false);
|
||||||
this.gbText.PerformLayout();
|
gbText.ResumeLayout(false);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudXLines)).EndInit();
|
gbText.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
((System.ComponentModel.ISupportInitialize)nudXLines).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,5 +379,7 @@
|
|||||||
private System.Windows.Forms.Button btnGenerate;
|
private System.Windows.Forms.Button btnGenerate;
|
||||||
private System.Windows.Forms.Button btnClose;
|
private System.Windows.Forms.Button btnClose;
|
||||||
private System.Windows.Forms.CheckBox cbZeroes;
|
private System.Windows.Forms.CheckBox cbZeroes;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
private System.Windows.Forms.CheckBox cbPacked;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -33,25 +33,26 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
comments.Add("header",
|
comments.Add("header",
|
||||||
"// File generated by McBitFont " + MainForm.version + "\n" +
|
"// File generated by McBitFont v" + MainForm.version + "\n" +
|
||||||
"// made by Anton Mukhin (mcfly@mcflyer.ru)\n" +
|
"// made by Anton Mukhin (mcfly@mcflyer.ru)\n" +
|
||||||
"//\n" +
|
"//\n" +
|
||||||
"//\n"
|
"//\n"
|
||||||
);
|
);
|
||||||
comments.Add("scan_order", "// Scan order: ");
|
comments.Add("scan_order", "// Scan order: ");
|
||||||
comments.Add("scan_hdir", "// Horizontal direction: ");
|
comments.Add("scan_hdir", "// Horizontal direction: ");
|
||||||
comments.Add("scan_vdir", "// Vertical direction: ");
|
comments.Add("scan_vdir", "// Vertical direction: ");
|
||||||
|
|
||||||
comments.Add("num_bit_order", "// Bit order: ");
|
comments.Add("num_bit_order", "// Bit order: ");
|
||||||
comments.Add("num_base", "// Numbers base: ");
|
comments.Add("num_base", "// Numbers base: ");
|
||||||
comments.Add("num_size", "// Numbers size: ");
|
comments.Add("num_size", "// Numbers size: ");
|
||||||
|
|
||||||
comments.Add("text_format", "// Text format: ");
|
comments.Add("text_format", "// Text format: ");
|
||||||
comments.Add("text_lines", "// Numbers per line: ");
|
comments.Add("text_lines", "// Numbers per line: ");
|
||||||
|
|
||||||
comments.Add("font_header_map",
|
comments.Add("font_header_map",
|
||||||
"// Font header map:\n" +
|
"// Font header map:\n" +
|
||||||
"// width; // Font width in pixels\n" +
|
"// packed; // Flag for packed font\n" +
|
||||||
|
"// width; // Font width in pixels (0 - variable width)\n" +
|
||||||
"// height; // Font height in pixels\n" +
|
"// height; // Font height in pixels\n" +
|
||||||
"// space; // Font space in pixels\n" +
|
"// space; // Font space in pixels\n" +
|
||||||
"// first; // First character code\n" +
|
"// first; // First character code\n" +
|
||||||
@@ -76,9 +77,11 @@ namespace McBitFont {
|
|||||||
|
|
||||||
private void btnGenerate_Click(object sender, EventArgs e) {
|
private void btnGenerate_Click(object sender, EventArgs e) {
|
||||||
string output = "";
|
string output = "";
|
||||||
|
int bTotal = 0;
|
||||||
txtOutput.Clear();
|
txtOutput.Clear();
|
||||||
bool com = cbComments.Checked;
|
bool com = cbComments.Checked;
|
||||||
bool hdr = cbHeader.Checked;
|
bool hdr = cbHeader.Checked;
|
||||||
|
bool packed = cbPacked.Checked;
|
||||||
int lines = cbLines.SelectedIndex;
|
int lines = cbLines.SelectedIndex;
|
||||||
int format = cbFormat.SelectedIndex;
|
int format = cbFormat.SelectedIndex;
|
||||||
bool mono = mainForm.monospaced;
|
bool mono = mainForm.monospaced;
|
||||||
@@ -88,8 +91,8 @@ namespace McBitFont {
|
|||||||
int imin, jmin, imax, jmax, idir, jdir;
|
int imin, jmin, imax, jmax, idir, jdir;
|
||||||
|
|
||||||
if (com) {
|
if (com) {
|
||||||
//Header comments
|
// Header comments
|
||||||
output += comments["header"];
|
//output += comments["header"];
|
||||||
output += comments["scan_order"] + cbOrder.Text + "\n";
|
output += comments["scan_order"] + cbOrder.Text + "\n";
|
||||||
output += comments["scan_hdir"] + cbHDir.Text + "\n";
|
output += comments["scan_hdir"] + cbHDir.Text + "\n";
|
||||||
output += comments["scan_vdir"] + cbVDir.Text + "\n\n";
|
output += comments["scan_vdir"] + cbVDir.Text + "\n\n";
|
||||||
@@ -107,7 +110,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Figure out mins and maxes
|
// Figure out mins and maxes
|
||||||
if (cbOrder.SelectedIndex == 0) {
|
if (cbOrder.SelectedIndex == 0) {
|
||||||
if (cbHDir.SelectedIndex == 0) {
|
if (cbHDir.SelectedIndex == 0) {
|
||||||
// Columns; Left to right
|
// Columns; Left to right
|
||||||
@@ -156,7 +159,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// C data type selection
|
||||||
ushort bits = 8;
|
ushort bits = 8;
|
||||||
string dataType = "uint8_t";
|
string dataType = "uint8_t";
|
||||||
switch (cbNumSize.SelectedIndex) {
|
switch (cbNumSize.SelectedIndex) {
|
||||||
@@ -197,30 +200,32 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Array definition
|
// Array definition
|
||||||
if ( format == 0 || format == 1 ) output += "const " + dataType + " " + mainForm.prjName + "[]" + (format==1?"[]":"") + " = {\n";
|
if (format == 0 || format == 1) output += "const " + dataType + " " + mainForm.prjName + "[]" + (format == 1 ? "[]" : "") + " = {\n";
|
||||||
|
|
||||||
// Should we add the meta header?
|
// Should we add the meta header?
|
||||||
if (hdr) {
|
if (hdr) {
|
||||||
output +=
|
output +=
|
||||||
" // Meta header\n" +
|
" // Meta header\n" +
|
||||||
" " + (mono ? mainForm.frames.First().width.ToString() : "0") + ", // Font width in pixels; 0 - variable width\n" +
|
" " + (packed ? "1" : "0") + ", // Is it a packed font?\n" +
|
||||||
|
" " + (mono || mainForm.frames.Count == 1 ? mainForm.frames.First().width.ToString() : "0") + ", // Font width in pixels; 0 - variable width\n" +
|
||||||
" " + mainForm.frames.First().height.ToString() + ", // Font height in pixels\n" +
|
" " + mainForm.frames.First().height.ToString() + ", // Font height in pixels\n" +
|
||||||
" 0, // Font space (between symbols) in pixels\n" +
|
" 0, // Font space (between symbols) in pixels\n" +
|
||||||
" " + mainForm.frames.First().code.ToString() + ", // First character code\n" +
|
" " + mainForm.frames.First().code.ToString() + ", // First character code\n" +
|
||||||
" " + mainForm.frames.Last().code.ToString() + ", // Last character code\n"
|
" " + mainForm.frames.Last().code.ToString() + ", // Last character code\n"
|
||||||
;
|
;
|
||||||
|
bTotal += 6*bits / 8; // Count bytes total
|
||||||
}
|
}
|
||||||
|
|
||||||
// Brackets for 2D array definition
|
// Brackets for 2D array definition
|
||||||
string obracket = format == 1 ? "{ " : "";
|
string obracket = format == 1 ? "{ " : "";
|
||||||
string cbracket = format == 1 ? " }" : "";
|
string cbracket = format == 1 ? " }" : "";
|
||||||
|
|
||||||
// Number output counter
|
// Number output counter
|
||||||
int numcount = 0;
|
int numcount = 0;
|
||||||
|
|
||||||
if (com) output += " // Data:\n";
|
if (com) output += " // Data:\n";
|
||||||
MainForm.FrameMiniature flast = mainForm.frames.Last();
|
MainForm.FrameMiniature flast = mainForm.frames.Last();
|
||||||
foreach ( MainForm.FrameMiniature f in mainForm.frames) {
|
foreach (MainForm.FrameMiniature f in mainForm.frames) {
|
||||||
// For each frame
|
// For each frame
|
||||||
uint b = 0; // current number bits
|
uint b = 0; // current number bits
|
||||||
int t, x, y; // t - calculated bit number; x - actual x; y - actual y
|
int t, x, y; // t - calculated bit number; x - actual x; y - actual y
|
||||||
@@ -228,7 +233,9 @@ namespace McBitFont {
|
|||||||
if (com && lines != 1 && fcount > 1) {
|
if (com && lines != 1 && fcount > 1) {
|
||||||
// Comments enabled and other than "1 symbol per line" selected
|
// Comments enabled and other than "1 symbol per line" selected
|
||||||
// Print a symbol comment before its data
|
// Print a symbol comment before its data
|
||||||
output += " // " + f.code.ToString() + " --> " + mainForm.decodeSymbol(f.code) + "\n";
|
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code);
|
||||||
|
if (f.note != "" && f.note != null) output += " (" + f.note.ToString() + ")";
|
||||||
|
output += "\n";
|
||||||
}
|
}
|
||||||
if (lines == 1) {
|
if (lines == 1) {
|
||||||
// "1 symbol per line" - new line offset
|
// "1 symbol per line" - new line offset
|
||||||
@@ -241,6 +248,7 @@ namespace McBitFont {
|
|||||||
// Should we post a prefix to the number?
|
// Should we post a prefix to the number?
|
||||||
pref = (!cbZeroes.Checked && ((f.width < 10 && nbase == 16) || (f.width < 2 && nbase == 2))) ? "" : prefix;
|
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");
|
output += (lines != 1 ? " " : "") + pref + Convert.ToString(f.width, nbase).PadLeft(pad, '0') + (lines != 0 ? (lines == 1 ? ", " : "") : ",\n");
|
||||||
|
bTotal += bits / 8; // Count bytes total
|
||||||
// Count posted numbers
|
// Count posted numbers
|
||||||
numcount++;
|
numcount++;
|
||||||
if (lines != 2) numcount = 0;
|
if (lines != 2) numcount = 0;
|
||||||
@@ -289,6 +297,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t = jdir < 0 ? bits+1 : -1;
|
||||||
for (int i = imin; i != imax; i += idir) {
|
for (int i = imin; i != imax; i += idir) {
|
||||||
if (lines == 0) {
|
if (lines == 0) {
|
||||||
// "Column/Row per line" - new line offset
|
// "Column/Row per line" - new line offset
|
||||||
@@ -296,8 +305,13 @@ namespace McBitFont {
|
|||||||
numcount = 0;
|
numcount = 0;
|
||||||
}
|
}
|
||||||
for (int j = jmin; j != jmax; j += jdir) {
|
for (int j = jmin; j != jmax; j += jdir) {
|
||||||
if (jdir < 0) t = jmin - j;
|
if (packed) {
|
||||||
else t = j;
|
t += jdir;
|
||||||
|
if (t < 0 || t % bits == 0) t = jdir < 0 ? bits : 0;
|
||||||
|
} else {
|
||||||
|
if (jdir < 0) t = jmin - j;
|
||||||
|
else t = j;
|
||||||
|
}
|
||||||
if (t % bits == 0) b = 0;
|
if (t % bits == 0) b = 0;
|
||||||
|
|
||||||
if (cbOrder.SelectedIndex == 0) { // Columns
|
if (cbOrder.SelectedIndex == 0) { // Columns
|
||||||
@@ -314,9 +328,9 @@ namespace McBitFont {
|
|||||||
// MSB on top/Left
|
// MSB on top/Left
|
||||||
b |= (uint)(1 << (bits - (t % bits) - 1));
|
b |= (uint)(1 << (bits - (t % bits) - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (((t + 1) % bits == 0) || j + jdir == jmax) {
|
if (((t + 1) % bits == 0) || (j + jdir == jmax && !packed)) {
|
||||||
// we have filled a number with bits - let's post it
|
// we have filled a number with bits - let's post it
|
||||||
|
|
||||||
// should we post a comma before the number?
|
// should we post a comma before the number?
|
||||||
@@ -325,6 +339,7 @@ namespace McBitFont {
|
|||||||
// should we post a prefix to the number?
|
// should we post a prefix to the number?
|
||||||
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
||||||
output += pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
output += pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
||||||
|
bTotal += bits / 8; // Count bytes total
|
||||||
|
|
||||||
// count posted numbers
|
// count posted numbers
|
||||||
numcount++;
|
numcount++;
|
||||||
@@ -337,15 +352,27 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
if (lines == 0) {
|
if (lines == 0) {
|
||||||
// "Column/Row per line" - closing line
|
// "Column/Row per line" - closing line
|
||||||
output += cbracket + ((i+idir==imax) && f.Equals(flast) ? "" : ",") + "\n";
|
output += cbracket + ((i + idir == imax) && f.Equals(flast) ? "" : ",") + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (packed && (f.width * f.height) % bits > 0) {
|
||||||
|
// post leftovers in last number
|
||||||
|
|
||||||
|
// should we post a prefix to the number?
|
||||||
|
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
||||||
|
output += (numcount > 0? ", " : "") + pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
||||||
|
bTotal += bits / 8; // Count bytes total
|
||||||
|
|
||||||
|
// count posted numbers
|
||||||
|
numcount++;
|
||||||
|
}
|
||||||
if (lines == 1) {
|
if (lines == 1) {
|
||||||
// "1 symbol per line" - closing line
|
// "1 symbol per line" - closing line
|
||||||
if (!f.Equals(flast)) output += ",";
|
if (!f.Equals(flast) && f.width > 0) output += ",";
|
||||||
if (com && fcount > 1) {
|
if (com && fcount > 1) {
|
||||||
//...with a comment
|
//...with a comment
|
||||||
output += " // " + f.code.ToString() + " --> " + mainForm.decodeSymbol(f.code);
|
output += " // " + f.code.ToString() + " --> " + mainForm.DecodeSymbol(f.code);
|
||||||
|
if (f.note != "" && f.note != null) output += " (" + f.note.ToString() + ")";
|
||||||
}
|
}
|
||||||
output += "\n";
|
output += "\n";
|
||||||
}
|
}
|
||||||
@@ -359,6 +386,12 @@ namespace McBitFont {
|
|||||||
// Close array definition
|
// Close array definition
|
||||||
output += "};\n";
|
output += "};\n";
|
||||||
|
|
||||||
|
// Add header and bytes total counter
|
||||||
|
if (com) {
|
||||||
|
output = "// Bytes total: " + bTotal.ToString() + "\n" + output;
|
||||||
|
output = comments["header"] + output;
|
||||||
|
}
|
||||||
|
|
||||||
txtOutput.Text = output;
|
txtOutput.Text = output;
|
||||||
txtOutput.SelectionStart = 0;
|
txtOutput.SelectionStart = 0;
|
||||||
txtOutput.ScrollToCaret();
|
txtOutput.ScrollToCaret();
|
||||||
@@ -382,6 +415,10 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void cbLines_SelectedIndexChanged(object sender, EventArgs e) {
|
private void cbLines_SelectedIndexChanged(object sender, EventArgs e) {
|
||||||
|
if (cbLines.SelectedIndex == 0 && cbPacked.Checked) {
|
||||||
|
MessageBox.Show("Cannot make one line per column/row in packed font as there are bytes used in several columns/rows!\n(Setting text format to 1 Symbol per line)", "No 1 Symbol per line for packed fonts!", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
cbLines.SelectedIndex = 1;
|
||||||
|
}
|
||||||
if (cbLines.SelectedIndex == 2) {
|
if (cbLines.SelectedIndex == 2) {
|
||||||
nudXLines.Enabled = true;
|
nudXLines.Enabled = true;
|
||||||
lblXLines.Enabled = true;
|
lblXLines.Enabled = true;
|
||||||
@@ -390,5 +427,9 @@ namespace McBitFont {
|
|||||||
lblXLines.Enabled = false;
|
lblXLines.Enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cbPacked_CheckedChanged(object sender, EventArgs e) {
|
||||||
|
if (cbPacked.Checked && cbLines.SelectedIndex == 0) cbLines.SelectedIndex = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
@@ -117,4 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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>
|
</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>
|
||||||
</root>
|
</root>
|
3
McBitFont/FodyWeavers.xml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||||
|
<Costura />
|
||||||
|
</Weavers>
|
216
McBitFont/FontTester.Designer.cs
generated
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
namespace McBitFont {
|
||||||
|
partial class FontTester {
|
||||||
|
/// <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() {
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
lblSpace = new System.Windows.Forms.Label();
|
||||||
|
nudSpace = new System.Windows.Forms.NumericUpDown();
|
||||||
|
lblText = new System.Windows.Forms.Label();
|
||||||
|
tbText = new System.Windows.Forms.TextBox();
|
||||||
|
dotPanel = new System.Windows.Forms.Panel();
|
||||||
|
vScroll = new System.Windows.Forms.VScrollBar();
|
||||||
|
hScroll = new System.Windows.Forms.HScrollBar();
|
||||||
|
lblZoom = new System.Windows.Forms.Label();
|
||||||
|
cbZoom = new System.Windows.Forms.ComboBox();
|
||||||
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
btnCopy = new System.Windows.Forms.Button();
|
||||||
|
chkBaseline = new System.Windows.Forms.CheckBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudSpace).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// lblSpace
|
||||||
|
//
|
||||||
|
lblSpace.AutoSize = true;
|
||||||
|
lblSpace.Location = new System.Drawing.Point(12, 9);
|
||||||
|
lblSpace.Name = "lblSpace";
|
||||||
|
lblSpace.Size = new System.Drawing.Size(41, 15);
|
||||||
|
lblSpace.TabIndex = 0;
|
||||||
|
lblSpace.Text = "Space:";
|
||||||
|
//
|
||||||
|
// nudSpace
|
||||||
|
//
|
||||||
|
nudSpace.Location = new System.Drawing.Point(59, 6);
|
||||||
|
nudSpace.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
|
nudSpace.Name = "nudSpace";
|
||||||
|
nudSpace.Size = new System.Drawing.Size(40, 23);
|
||||||
|
nudSpace.TabIndex = 2;
|
||||||
|
toolTip1.SetToolTip(nudSpace, "Space between symbols in pixels");
|
||||||
|
nudSpace.Value = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudSpace.ValueChanged += Scrolling;
|
||||||
|
//
|
||||||
|
// lblText
|
||||||
|
//
|
||||||
|
lblText.AutoSize = true;
|
||||||
|
lblText.Location = new System.Drawing.Point(12, 37);
|
||||||
|
lblText.Name = "lblText";
|
||||||
|
lblText.Size = new System.Drawing.Size(138, 15);
|
||||||
|
lblText.TabIndex = 2;
|
||||||
|
lblText.Text = "Text to test the font with:";
|
||||||
|
//
|
||||||
|
// tbText
|
||||||
|
//
|
||||||
|
tbText.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
tbText.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
tbText.Location = new System.Drawing.Point(12, 55);
|
||||||
|
tbText.Name = "tbText";
|
||||||
|
tbText.Size = new System.Drawing.Size(260, 29);
|
||||||
|
tbText.TabIndex = 1;
|
||||||
|
toolTip1.SetToolTip(tbText, "Text to test the font with");
|
||||||
|
tbText.TextChanged += Text_Changed;
|
||||||
|
//
|
||||||
|
// dotPanel
|
||||||
|
//
|
||||||
|
dotPanel.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
dotPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
|
dotPanel.BackColor = System.Drawing.Color.White;
|
||||||
|
dotPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
dotPanel.Location = new System.Drawing.Point(12, 90);
|
||||||
|
dotPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
dotPanel.Name = "dotPanel";
|
||||||
|
dotPanel.Size = new System.Drawing.Size(238, 98);
|
||||||
|
dotPanel.TabIndex = 4;
|
||||||
|
dotPanel.Paint += PaintPixels;
|
||||||
|
dotPanel.Resize += ZoomChanged;
|
||||||
|
//
|
||||||
|
// vScroll
|
||||||
|
//
|
||||||
|
vScroll.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
vScroll.LargeChange = 25;
|
||||||
|
vScroll.Location = new System.Drawing.Point(251, 84);
|
||||||
|
vScroll.Name = "vScroll";
|
||||||
|
vScroll.Size = new System.Drawing.Size(21, 104);
|
||||||
|
vScroll.TabIndex = 17;
|
||||||
|
vScroll.ValueChanged += Scrolling;
|
||||||
|
//
|
||||||
|
// hScroll
|
||||||
|
//
|
||||||
|
hScroll.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
|
||||||
|
hScroll.Location = new System.Drawing.Point(12, 188);
|
||||||
|
hScroll.Name = "hScroll";
|
||||||
|
hScroll.Size = new System.Drawing.Size(238, 21);
|
||||||
|
hScroll.TabIndex = 16;
|
||||||
|
hScroll.ValueChanged += Scrolling;
|
||||||
|
//
|
||||||
|
// lblZoom
|
||||||
|
//
|
||||||
|
lblZoom.AutoSize = true;
|
||||||
|
lblZoom.Location = new System.Drawing.Point(173, 9);
|
||||||
|
lblZoom.Name = "lblZoom";
|
||||||
|
lblZoom.Size = new System.Drawing.Size(42, 15);
|
||||||
|
lblZoom.TabIndex = 18;
|
||||||
|
lblZoom.Text = "Zoom:";
|
||||||
|
//
|
||||||
|
// cbZoom
|
||||||
|
//
|
||||||
|
cbZoom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
cbZoom.FormattingEnabled = true;
|
||||||
|
cbZoom.Items.AddRange(new object[] { "1", "2", "3", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50" });
|
||||||
|
cbZoom.Location = new System.Drawing.Point(222, 6);
|
||||||
|
cbZoom.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||||
|
cbZoom.Name = "cbZoom";
|
||||||
|
cbZoom.Size = new System.Drawing.Size(50, 23);
|
||||||
|
cbZoom.TabIndex = 3;
|
||||||
|
cbZoom.TabStop = false;
|
||||||
|
toolTip1.SetToolTip(cbZoom, "Zoom level");
|
||||||
|
cbZoom.SelectedIndexChanged += ZoomChanged;
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
btnCopy.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||||
|
btnCopy.Image = Properties.Resources.Famfamfam_Silk_Page_copy_16;
|
||||||
|
btnCopy.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnCopy.Location = new System.Drawing.Point(110, 214);
|
||||||
|
btnCopy.Name = "btnCopy";
|
||||||
|
btnCopy.Size = new System.Drawing.Size(80, 30);
|
||||||
|
btnCopy.TabIndex = 5;
|
||||||
|
btnCopy.Text = " Copy";
|
||||||
|
btnCopy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnCopy, "Copy BitPixels you see to Clipboard");
|
||||||
|
btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
btnCopy.MouseClick += Copy_Click;
|
||||||
|
//
|
||||||
|
// chkBaseline
|
||||||
|
//
|
||||||
|
chkBaseline.AutoSize = true;
|
||||||
|
chkBaseline.Location = new System.Drawing.Point(203, 36);
|
||||||
|
chkBaseline.Name = "chkBaseline";
|
||||||
|
chkBaseline.Size = new System.Drawing.Size(69, 19);
|
||||||
|
chkBaseline.TabIndex = 4;
|
||||||
|
chkBaseline.Text = "Baseline";
|
||||||
|
chkBaseline.UseVisualStyleBackColor = true;
|
||||||
|
chkBaseline.CheckedChanged += Scrolling;
|
||||||
|
//
|
||||||
|
// FontTester
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(284, 251);
|
||||||
|
Controls.Add(btnCopy);
|
||||||
|
Controls.Add(chkBaseline);
|
||||||
|
Controls.Add(cbZoom);
|
||||||
|
Controls.Add(lblZoom);
|
||||||
|
Controls.Add(vScroll);
|
||||||
|
Controls.Add(hScroll);
|
||||||
|
Controls.Add(dotPanel);
|
||||||
|
Controls.Add(tbText);
|
||||||
|
Controls.Add(lblText);
|
||||||
|
Controls.Add(nudSpace);
|
||||||
|
Controls.Add(lblSpace);
|
||||||
|
MaximizeBox = false;
|
||||||
|
MinimizeBox = false;
|
||||||
|
MinimumSize = new System.Drawing.Size(300, 290);
|
||||||
|
Name = "FontTester";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "Font Tester";
|
||||||
|
Load += FontTester_Load;
|
||||||
|
Resize += Form_Resize;
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudSpace).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lblSpace;
|
||||||
|
private System.Windows.Forms.NumericUpDown nudSpace;
|
||||||
|
private System.Windows.Forms.Label lblText;
|
||||||
|
private System.Windows.Forms.TextBox tbText;
|
||||||
|
private System.Windows.Forms.Panel dotPanel;
|
||||||
|
private System.Windows.Forms.VScrollBar vScroll;
|
||||||
|
private System.Windows.Forms.HScrollBar hScroll;
|
||||||
|
private System.Windows.Forms.Label lblZoom;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
private System.Windows.Forms.ComboBox cbZoom;
|
||||||
|
private System.Windows.Forms.CheckBox chkBaseline;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
}
|
||||||
|
}
|
205
McBitFont/FontTester.cs
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
using MessagePack;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
public partial class FontTester : Form {
|
||||||
|
|
||||||
|
private int codepage = 1251;
|
||||||
|
private int height;
|
||||||
|
private List<MainForm.FrameMiniature> frames;
|
||||||
|
private int baseline;
|
||||||
|
private readonly int absentWidth = 5;
|
||||||
|
private readonly int pixelOffset = 5;
|
||||||
|
|
||||||
|
private int baselineThickness = 1;
|
||||||
|
private byte[] encoded = [];
|
||||||
|
private int cellSize;
|
||||||
|
private int width;
|
||||||
|
|
||||||
|
private readonly DataFormats.Format clpbFormat = DataFormats.GetFormat("McBitFontFrame");
|
||||||
|
|
||||||
|
public FontTester(int codepage, int height, int baseline, List<MainForm.FrameMiniature> frames) {
|
||||||
|
InitializeComponent();
|
||||||
|
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
|
this.codepage = codepage;
|
||||||
|
this.height = height;
|
||||||
|
this.baseline = baseline;
|
||||||
|
this.frames = frames;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FontTester_Load(object sender, EventArgs e) {
|
||||||
|
cbZoom.SelectedIndex = 2;
|
||||||
|
//cbZoom.SelectedIndexChanged += ZoomChanged;
|
||||||
|
dotPanel.MouseWheel += new MouseEventHandler(DotPanel_MouseWheel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PaintPixels(object sender, PaintEventArgs e) {
|
||||||
|
Graphics g = dotPanel.CreateGraphics();
|
||||||
|
SolidBrush sbb = new SolidBrush(Color.Black);
|
||||||
|
SolidBrush sbw = new SolidBrush(Color.White);
|
||||||
|
SolidBrush sbp = new SolidBrush(Color.LightPink);
|
||||||
|
SolidBrush sb;
|
||||||
|
Pen blackPen = new(Color.Black);
|
||||||
|
Pen bluePen = new(Color.FromArgb(100, 20, 20, 200), baselineThickness);
|
||||||
|
int x, y, i, j;
|
||||||
|
|
||||||
|
// Sycle through ecoded bytes of test text
|
||||||
|
int space = (int)nudSpace.Value;
|
||||||
|
int index = 0;
|
||||||
|
for (int c = 0; c < encoded.Length; c++) {
|
||||||
|
// Check if we have such symbol
|
||||||
|
var f = frames.FindAll(x => x.code == encoded[c]);
|
||||||
|
if (f.Count == 1) {
|
||||||
|
// Draw the symbol
|
||||||
|
for (i = 0; i < f[0].width; i++) {
|
||||||
|
x = pixelOffset + (index + i) * cellSize - hScroll.Value;
|
||||||
|
for (j = 0; j < f[0].height; j++) {
|
||||||
|
y = pixelOffset + j * cellSize - vScroll.Value;
|
||||||
|
// Fill the cell with color
|
||||||
|
if (f[0].data[i, j]) sb = sbb;
|
||||||
|
else sb = sbw;
|
||||||
|
g.FillRectangle(sb, x, y, cellSize, cellSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
index += (f[0].width > 0 ? f[0].width + space : 0);
|
||||||
|
} else {
|
||||||
|
blackPen.Width = cellSize;
|
||||||
|
blackPen.Alignment = System.Drawing.Drawing2D.PenAlignment.Inset;
|
||||||
|
x = pixelOffset + index * cellSize - hScroll.Value;
|
||||||
|
y = pixelOffset - vScroll.Value;
|
||||||
|
g.DrawRectangle(blackPen, x, y + cellSize, absentWidth * cellSize, (height - 2) * cellSize);
|
||||||
|
g.FillRectangle(sbp, x + cellSize, y + 2 * cellSize, (absentWidth - 2) * cellSize, (height - 4) * cellSize);
|
||||||
|
index += 5 + space;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw baseline
|
||||||
|
if (chkBaseline.Checked && baseline > 0) {
|
||||||
|
x = pixelOffset - hScroll.Value;
|
||||||
|
y = pixelOffset + baseline * cellSize - vScroll.Value;
|
||||||
|
g.DrawLine(bluePen, x, y, dotPanel.Width - 2 * pixelOffset, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Text_Changed(object sender, EventArgs e) {
|
||||||
|
int space = (int)nudSpace.Value;
|
||||||
|
|
||||||
|
encoded = Encoding.GetEncoding(codepage).GetBytes(tbText.Text);
|
||||||
|
|
||||||
|
width = space > 0 ? space : 1;
|
||||||
|
for (int c = 0; c < encoded.Length; c++) {
|
||||||
|
var f = frames.FindAll(x => x.code == encoded[c]);
|
||||||
|
width += (f.Count == 1 ? f[0].width : absentWidth) + space;
|
||||||
|
}
|
||||||
|
dotPanel.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ZoomChanged(object sender, EventArgs e) {
|
||||||
|
cellSize = Convert.ToInt32(cbZoom.Text);
|
||||||
|
|
||||||
|
int w = pixelOffset + width * cellSize;
|
||||||
|
int h = pixelOffset + height * cellSize;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Baseline thickness calc
|
||||||
|
baselineThickness = cellSize / 5;
|
||||||
|
if (baselineThickness > 5) baselineThickness = 5;
|
||||||
|
if (baselineThickness < 1) baselineThickness = 1;
|
||||||
|
|
||||||
|
dotPanel.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DotPanel_MouseWheel(object sender, MouseEventArgs e) {
|
||||||
|
int t = e.Delta / 120;
|
||||||
|
if (e.Delta == 0) return;
|
||||||
|
if (ModifierKeys.HasFlag(Keys.Control)) {
|
||||||
|
t += cbZoom.SelectedIndex;
|
||||||
|
if (t > cbZoom.Items.Count - 1) return;
|
||||||
|
if (t < 0) return;
|
||||||
|
cbZoom.SelectedIndex = t;
|
||||||
|
} else if (ModifierKeys.HasFlag(Keys.Shift)) {
|
||||||
|
if (hScroll.Enabled) {
|
||||||
|
t = t * -1 * cellSize + 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 + vScroll.Value;
|
||||||
|
if (t < vScroll.Minimum) t = vScroll.Minimum;
|
||||||
|
if (t > vScroll.Maximum) t = vScroll.Maximum;
|
||||||
|
vScroll.Value = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Scrolling(object sender, EventArgs e) {
|
||||||
|
dotPanel.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form_Resize(object sender, EventArgs e) {
|
||||||
|
btnCopy.Left = this.Width / 2 - 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Copy_Click(object sender, MouseEventArgs e) {
|
||||||
|
if (encoded.Length < 1) {
|
||||||
|
MessageBox.Show("Nothing to copy! Type some symbols first.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Sycle through ecoded bytes of test text
|
||||||
|
int space = (int)nudSpace.Value;
|
||||||
|
int index = 0;
|
||||||
|
int i, j;
|
||||||
|
MainForm.FrameMiniature ff = new(0, width, frames[0].height);
|
||||||
|
for (int c = 0; c < encoded.Length; c++) {
|
||||||
|
// Check if we have such symbol
|
||||||
|
var f = frames.FindAll(x => x.code == encoded[c]);
|
||||||
|
if (f.Count == 1) {
|
||||||
|
// Draw the symbol
|
||||||
|
for (i = 0; i < f[0].width; i++) {
|
||||||
|
for (j = 0; j < f[0].height; j++) {
|
||||||
|
// Fill the frame with data
|
||||||
|
ff.data[index + i, j] = f[0].data[i, j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
index += (f[0].width > 0 ? f[0].width + space : 0);
|
||||||
|
} else {
|
||||||
|
index += 5 + space;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Copy the frame we made into Clipboard
|
||||||
|
var bb = MessagePackSerializer.Serialize(ChangeHistory.CopyFrameSimple(ff));
|
||||||
|
DataObject clpbObj = new DataObject(clpbFormat.Name, bb);
|
||||||
|
Clipboard.SetDataObject(clpbObj, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
123
McBitFont/FontTester.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?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>
|
||||||
|
</root>
|
1729
McBitFont/Form1.Designer.cs
generated
1732
McBitFont/Form1.cs
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
@@ -117,6 +117,12 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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>
|
</resheader>
|
||||||
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>436, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="cmMinilist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>534, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="ilMiniatures.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>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@@ -129,6 +135,12 @@
|
|||||||
<metadata name="dlgOpen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="dlgOpen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>336, 17</value>
|
<value>336, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="dlgSavePNG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>644, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="cmBaseline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>763, 17</value>
|
||||||
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<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">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
169
McBitFont/FrameScreenshot.Designer.cs
generated
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
namespace McBitFont {
|
||||||
|
partial class FrameScreenshot {
|
||||||
|
/// <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() {
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
btnClose = new System.Windows.Forms.Button();
|
||||||
|
btnOK = new System.Windows.Forms.Button();
|
||||||
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
nudUpscale = new System.Windows.Forms.NumericUpDown();
|
||||||
|
chkTransparent = new System.Windows.Forms.CheckBox();
|
||||||
|
chkBlackBG = new System.Windows.Forms.CheckBox();
|
||||||
|
btnCopy = new System.Windows.Forms.Button();
|
||||||
|
dlgSaveImage = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
lblUpscale = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudUpscale).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// btnClose
|
||||||
|
//
|
||||||
|
btnClose.Location = new System.Drawing.Point(234, 67);
|
||||||
|
btnClose.Name = "btnClose";
|
||||||
|
btnClose.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnClose.TabIndex = 3;
|
||||||
|
btnClose.Text = "Close";
|
||||||
|
toolTip1.SetToolTip(btnClose, "Close the dialog");
|
||||||
|
btnClose.UseVisualStyleBackColor = true;
|
||||||
|
btnClose.Click += btnClose_Click;
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
btnOK.Image = Properties.Resources.Famfamfam_Silk_Disk_16;
|
||||||
|
btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnOK.Location = new System.Drawing.Point(12, 67);
|
||||||
|
btnOK.Name = "btnOK";
|
||||||
|
btnOK.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnOK.TabIndex = 1;
|
||||||
|
btnOK.Text = "Save";
|
||||||
|
btnOK.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnOK, "Save to file");
|
||||||
|
btnOK.UseVisualStyleBackColor = true;
|
||||||
|
btnOK.Click += btnOK_Click;
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
|
//
|
||||||
|
// nudUpscale
|
||||||
|
//
|
||||||
|
nudUpscale.Location = new System.Drawing.Point(71, 27);
|
||||||
|
nudUpscale.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
|
nudUpscale.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
|
nudUpscale.Name = "nudUpscale";
|
||||||
|
nudUpscale.Size = new System.Drawing.Size(51, 23);
|
||||||
|
nudUpscale.TabIndex = 2;
|
||||||
|
toolTip1.SetToolTip(nudUpscale, "Pixel upscale factor (4 means that for each frame pixel there will be 4x4 pixels generated)");
|
||||||
|
nudUpscale.Value = new decimal(new int[] { 4, 0, 0, 0 });
|
||||||
|
//
|
||||||
|
// chkTransparent
|
||||||
|
//
|
||||||
|
chkTransparent.AutoSize = true;
|
||||||
|
chkTransparent.Location = new System.Drawing.Point(144, 18);
|
||||||
|
chkTransparent.Name = "chkTransparent";
|
||||||
|
chkTransparent.Size = new System.Drawing.Size(155, 19);
|
||||||
|
chkTransparent.TabIndex = 5;
|
||||||
|
chkTransparent.Text = "Transparent background";
|
||||||
|
toolTip1.SetToolTip(chkTransparent, "Make background transparent (Doesn't work with clipboard - background will be gray)");
|
||||||
|
chkTransparent.UseVisualStyleBackColor = true;
|
||||||
|
chkTransparent.CheckedChanged += chkTransparent_CheckedChanged;
|
||||||
|
//
|
||||||
|
// chkBlackBG
|
||||||
|
//
|
||||||
|
chkBlackBG.AutoSize = true;
|
||||||
|
chkBlackBG.Enabled = false;
|
||||||
|
chkBlackBG.Location = new System.Drawing.Point(144, 35);
|
||||||
|
chkBlackBG.Name = "chkBlackBG";
|
||||||
|
chkBlackBG.Size = new System.Drawing.Size(132, 19);
|
||||||
|
chkBlackBG.TabIndex = 6;
|
||||||
|
chkBlackBG.Text = "Background is black";
|
||||||
|
toolTip1.SetToolTip(chkBlackBG, "White color is considered as background by default. Check this to invert that");
|
||||||
|
chkBlackBG.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnCopy
|
||||||
|
//
|
||||||
|
btnCopy.Image = Properties.Resources.Famfamfam_Silk_Page_copy_16;
|
||||||
|
btnCopy.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnCopy.Location = new System.Drawing.Point(122, 67);
|
||||||
|
btnCopy.Name = "btnCopy";
|
||||||
|
btnCopy.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnCopy.TabIndex = 7;
|
||||||
|
btnCopy.Text = "Copy";
|
||||||
|
btnCopy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnCopy, "Copy to clipboard");
|
||||||
|
btnCopy.UseVisualStyleBackColor = true;
|
||||||
|
btnCopy.Click += btnCopy_Click;
|
||||||
|
//
|
||||||
|
// dlgSaveImage
|
||||||
|
//
|
||||||
|
dlgSaveImage.DefaultExt = "png";
|
||||||
|
dlgSaveImage.Filter = "PNG Image|*.png;*.PNG";
|
||||||
|
//
|
||||||
|
// lblUpscale
|
||||||
|
//
|
||||||
|
lblUpscale.AutoSize = true;
|
||||||
|
lblUpscale.Location = new System.Drawing.Point(71, 9);
|
||||||
|
lblUpscale.Name = "lblUpscale";
|
||||||
|
lblUpscale.Size = new System.Drawing.Size(51, 15);
|
||||||
|
lblUpscale.TabIndex = 4;
|
||||||
|
lblUpscale.Text = "Upscale:";
|
||||||
|
//
|
||||||
|
// FrameScreenshot
|
||||||
|
//
|
||||||
|
AcceptButton = btnClose;
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
CancelButton = btnClose;
|
||||||
|
ClientSize = new System.Drawing.Size(334, 111);
|
||||||
|
Controls.Add(btnCopy);
|
||||||
|
Controls.Add(chkBlackBG);
|
||||||
|
Controls.Add(chkTransparent);
|
||||||
|
Controls.Add(nudUpscale);
|
||||||
|
Controls.Add(lblUpscale);
|
||||||
|
Controls.Add(btnClose);
|
||||||
|
Controls.Add(btnOK);
|
||||||
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
Name = "FrameScreenshot";
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "Frame Screenshot";
|
||||||
|
Load += FrameScreenshot_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudUpscale).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btnClose;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
private System.Windows.Forms.SaveFileDialog dlgSaveImage;
|
||||||
|
private System.Windows.Forms.Label lblUpscale;
|
||||||
|
private System.Windows.Forms.NumericUpDown nudUpscale;
|
||||||
|
private System.Windows.Forms.CheckBox chkTransparent;
|
||||||
|
private System.Windows.Forms.CheckBox chkBlackBG;
|
||||||
|
private System.Windows.Forms.Button btnCopy;
|
||||||
|
}
|
||||||
|
}
|
87
McBitFont/FrameScreenshot.cs
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using static McBitFont.MainForm;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
public partial class FrameScreenshot : Form {
|
||||||
|
|
||||||
|
private FrameMiniature f;
|
||||||
|
|
||||||
|
public FrameScreenshot(FrameMiniature frame) {
|
||||||
|
InitializeComponent();
|
||||||
|
f = frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Bitmap GenerateScreenshot() {
|
||||||
|
int upscale = (int)nudUpscale.Value;
|
||||||
|
int x, y;
|
||||||
|
bool transp = chkTransparent.Checked;
|
||||||
|
bool blackBG = chkBlackBG.Checked;
|
||||||
|
|
||||||
|
Bitmap bmp = new(f.width * upscale, f.height * upscale);
|
||||||
|
SolidBrush bb = new(Color.Black);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
for (x = 0; x < f.width; x++) {
|
||||||
|
for (y = 0; y < f.height; y++) {
|
||||||
|
if (f.data[x, y]) {
|
||||||
|
if (!transp || (transp && !blackBG)) g.FillRectangle(bb, x * upscale, y * upscale, upscale, upscale);
|
||||||
|
} else
|
||||||
|
if (!transp || (transp && blackBG)) g.FillRectangle(bw, x * upscale, y * upscale, upscale, upscale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e) {
|
||||||
|
if (dlgSaveImage.ShowDialog() == DialogResult.OK) {
|
||||||
|
|
||||||
|
Bitmap bmp = GenerateScreenshot();
|
||||||
|
|
||||||
|
bool err = false;
|
||||||
|
try {
|
||||||
|
bmp.Save(dlgSaveImage.FileName, ImageFormat.Png);
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
err = true;
|
||||||
|
MessageBox.Show("There was an error during image save: " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
if (!err) MessageBox.Show("Screenshot has been saved!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrameScreenshot_Load(object sender, EventArgs e) {
|
||||||
|
btnOK.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnClose_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void chkTransparent_CheckedChanged(object sender, EventArgs e) {
|
||||||
|
chkBlackBG.Enabled = chkTransparent.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCopy_Click(object sender, EventArgs e) {
|
||||||
|
Bitmap bmp = GenerateScreenshot();
|
||||||
|
using MemoryStream stream = new();
|
||||||
|
bmp.Save(stream, ImageFormat.Png);
|
||||||
|
DataObject data = new("PNG", stream);
|
||||||
|
data.SetImage(bmp);
|
||||||
|
Clipboard.SetDataObject(data, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
McBitFont/FrameScreenshot.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="dlgSaveImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>115, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
423
McBitFont/ImageImporter.Designer.cs
generated
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
namespace McBitFont {
|
||||||
|
partial class ImageImporter {
|
||||||
|
/// <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() {
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
btnOK = new System.Windows.Forms.Button();
|
||||||
|
btnCancel = new System.Windows.Forms.Button();
|
||||||
|
pbOriginal = new System.Windows.Forms.PictureBox();
|
||||||
|
pbProcessed = new System.Windows.Forms.PictureBox();
|
||||||
|
btnLoadImage = new System.Windows.Forms.Button();
|
||||||
|
dlgLoadImage = new System.Windows.Forms.OpenFileDialog();
|
||||||
|
pbScaled = new System.Windows.Forms.PictureBox();
|
||||||
|
btnConvert = new System.Windows.Forms.Button();
|
||||||
|
tbPixelization = new System.Windows.Forms.TrackBar();
|
||||||
|
lblPixelization = new System.Windows.Forms.Label();
|
||||||
|
lblThreshold = new System.Windows.Forms.Label();
|
||||||
|
tbThreshold = new System.Windows.Forms.TrackBar();
|
||||||
|
lblWhite = new System.Windows.Forms.Label();
|
||||||
|
lblBlack = new System.Windows.Forms.Label();
|
||||||
|
btnResize = new System.Windows.Forms.Button();
|
||||||
|
lblOrigSize = new System.Windows.Forms.Label();
|
||||||
|
lblProcessedSize = new System.Windows.Forms.Label();
|
||||||
|
lblScaledSize = new System.Windows.Forms.Label();
|
||||||
|
label1 = new System.Windows.Forms.Label();
|
||||||
|
label2 = new System.Windows.Forms.Label();
|
||||||
|
label3 = new System.Windows.Forms.Label();
|
||||||
|
label4 = new System.Windows.Forms.Label();
|
||||||
|
lblTransparency = new System.Windows.Forms.Label();
|
||||||
|
tbTransparency = new System.Windows.Forms.TrackBar();
|
||||||
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
|
label5 = new System.Windows.Forms.Label();
|
||||||
|
label6 = new System.Windows.Forms.Label();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbOriginal).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbProcessed).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbScaled).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbPixelization).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbThreshold).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbTransparency).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
btnOK.Enabled = false;
|
||||||
|
btnOK.Location = new System.Drawing.Point(171, 345);
|
||||||
|
btnOK.Name = "btnOK";
|
||||||
|
btnOK.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnOK.TabIndex = 0;
|
||||||
|
btnOK.Text = "OK";
|
||||||
|
btnOK.UseVisualStyleBackColor = true;
|
||||||
|
btnOK.Click += btnOK_Click;
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
btnCancel.Location = new System.Drawing.Point(377, 345);
|
||||||
|
btnCancel.Name = "btnCancel";
|
||||||
|
btnCancel.Size = new System.Drawing.Size(88, 27);
|
||||||
|
btnCancel.TabIndex = 1;
|
||||||
|
btnCancel.Text = "Cancel";
|
||||||
|
btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
btnCancel.Click += btnCancel_Click;
|
||||||
|
//
|
||||||
|
// pbOriginal
|
||||||
|
//
|
||||||
|
pbOriginal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
pbOriginal.Location = new System.Drawing.Point(12, 27);
|
||||||
|
pbOriginal.Name = "pbOriginal";
|
||||||
|
pbOriginal.Size = new System.Drawing.Size(200, 200);
|
||||||
|
pbOriginal.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
pbOriginal.TabIndex = 2;
|
||||||
|
pbOriginal.TabStop = false;
|
||||||
|
//
|
||||||
|
// pbProcessed
|
||||||
|
//
|
||||||
|
pbProcessed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
pbProcessed.Location = new System.Drawing.Point(218, 27);
|
||||||
|
pbProcessed.Name = "pbProcessed";
|
||||||
|
pbProcessed.Size = new System.Drawing.Size(200, 200);
|
||||||
|
pbProcessed.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
pbProcessed.TabIndex = 3;
|
||||||
|
pbProcessed.TabStop = false;
|
||||||
|
//
|
||||||
|
// btnLoadImage
|
||||||
|
//
|
||||||
|
btnLoadImage.Image = Properties.Resources.folder_open;
|
||||||
|
btnLoadImage.Location = new System.Drawing.Point(57, 233);
|
||||||
|
btnLoadImage.Name = "btnLoadImage";
|
||||||
|
btnLoadImage.Size = new System.Drawing.Size(110, 27);
|
||||||
|
btnLoadImage.TabIndex = 4;
|
||||||
|
btnLoadImage.Text = " Load Image";
|
||||||
|
btnLoadImage.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnLoadImage.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnLoadImage, "Load image from a file");
|
||||||
|
btnLoadImage.UseVisualStyleBackColor = true;
|
||||||
|
btnLoadImage.Click += btnLoadImage_Click;
|
||||||
|
//
|
||||||
|
// dlgLoadImage
|
||||||
|
//
|
||||||
|
dlgLoadImage.AddExtension = false;
|
||||||
|
dlgLoadImage.Filter = "Images|*.bmp;*.png;*.gif;*.jpg;*.jpeg|All files|*.*";
|
||||||
|
dlgLoadImage.ShowPreview = true;
|
||||||
|
//
|
||||||
|
// pbScaled
|
||||||
|
//
|
||||||
|
pbScaled.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
pbScaled.Location = new System.Drawing.Point(424, 27);
|
||||||
|
pbScaled.Name = "pbScaled";
|
||||||
|
pbScaled.Size = new System.Drawing.Size(200, 200);
|
||||||
|
pbScaled.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
pbScaled.TabIndex = 5;
|
||||||
|
pbScaled.TabStop = false;
|
||||||
|
//
|
||||||
|
// btnConvert
|
||||||
|
//
|
||||||
|
btnConvert.Enabled = false;
|
||||||
|
btnConvert.Image = Properties.Resources.calculator;
|
||||||
|
btnConvert.Location = new System.Drawing.Point(263, 233);
|
||||||
|
btnConvert.Name = "btnConvert";
|
||||||
|
btnConvert.Size = new System.Drawing.Size(110, 27);
|
||||||
|
btnConvert.TabIndex = 6;
|
||||||
|
btnConvert.Text = " Convert";
|
||||||
|
btnConvert.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnConvert.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnConvert, "Convert image to pixelated black and white");
|
||||||
|
btnConvert.UseVisualStyleBackColor = true;
|
||||||
|
btnConvert.Click += btnConvert_Click;
|
||||||
|
//
|
||||||
|
// tbPixelization
|
||||||
|
//
|
||||||
|
tbPixelization.AutoSize = false;
|
||||||
|
tbPixelization.Cursor = System.Windows.Forms.Cursors.SizeWE;
|
||||||
|
tbPixelization.LargeChange = 2;
|
||||||
|
tbPixelization.Location = new System.Drawing.Point(39, 296);
|
||||||
|
tbPixelization.Maximum = 25;
|
||||||
|
tbPixelization.Minimum = 1;
|
||||||
|
tbPixelization.Name = "tbPixelization";
|
||||||
|
tbPixelization.Size = new System.Drawing.Size(128, 32);
|
||||||
|
tbPixelization.TabIndex = 7;
|
||||||
|
toolTip1.SetToolTip(tbPixelization, "Pixelization level. Higher value makes bigger pixels during conversion");
|
||||||
|
tbPixelization.Value = 1;
|
||||||
|
tbPixelization.ValueChanged += tbPixelization_ValueChanged;
|
||||||
|
tbPixelization.KeyDown += tbPixelization_KeyDown;
|
||||||
|
//
|
||||||
|
// lblPixelization
|
||||||
|
//
|
||||||
|
lblPixelization.Location = new System.Drawing.Point(39, 323);
|
||||||
|
lblPixelization.Name = "lblPixelization";
|
||||||
|
lblPixelization.Size = new System.Drawing.Size(128, 15);
|
||||||
|
lblPixelization.TabIndex = 8;
|
||||||
|
lblPixelization.Text = "Pixelization: 1";
|
||||||
|
lblPixelization.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// lblThreshold
|
||||||
|
//
|
||||||
|
lblThreshold.Location = new System.Drawing.Point(263, 323);
|
||||||
|
lblThreshold.Name = "lblThreshold";
|
||||||
|
lblThreshold.Size = new System.Drawing.Size(110, 15);
|
||||||
|
lblThreshold.TabIndex = 10;
|
||||||
|
lblThreshold.Text = "Threshold: 0";
|
||||||
|
lblThreshold.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// tbThreshold
|
||||||
|
//
|
||||||
|
tbThreshold.AutoSize = false;
|
||||||
|
tbThreshold.Cursor = System.Windows.Forms.Cursors.SizeWE;
|
||||||
|
tbThreshold.LargeChange = 10;
|
||||||
|
tbThreshold.Location = new System.Drawing.Point(254, 296);
|
||||||
|
tbThreshold.Maximum = 127;
|
||||||
|
tbThreshold.Minimum = -128;
|
||||||
|
tbThreshold.Name = "tbThreshold";
|
||||||
|
tbThreshold.Size = new System.Drawing.Size(128, 32);
|
||||||
|
tbThreshold.TabIndex = 9;
|
||||||
|
tbThreshold.TickFrequency = 8;
|
||||||
|
toolTip1.SetToolTip(tbThreshold, "Black / White conversion threshold");
|
||||||
|
tbThreshold.ValueChanged += tbThreshold_ValueChanged;
|
||||||
|
tbThreshold.KeyDown += tbThreshold_KeyDown;
|
||||||
|
//
|
||||||
|
// lblWhite
|
||||||
|
//
|
||||||
|
lblWhite.AutoSize = true;
|
||||||
|
lblWhite.Location = new System.Drawing.Point(221, 282);
|
||||||
|
lblWhite.Name = "lblWhite";
|
||||||
|
lblWhite.Size = new System.Drawing.Size(67, 15);
|
||||||
|
lblWhite.TabIndex = 11;
|
||||||
|
lblWhite.Text = "More white";
|
||||||
|
lblWhite.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// lblBlack
|
||||||
|
//
|
||||||
|
lblBlack.AutoSize = true;
|
||||||
|
lblBlack.Location = new System.Drawing.Point(349, 282);
|
||||||
|
lblBlack.Name = "lblBlack";
|
||||||
|
lblBlack.Size = new System.Drawing.Size(66, 15);
|
||||||
|
lblBlack.TabIndex = 12;
|
||||||
|
lblBlack.Text = "More black";
|
||||||
|
//
|
||||||
|
// btnResize
|
||||||
|
//
|
||||||
|
btnResize.Enabled = false;
|
||||||
|
btnResize.Image = Properties.Resources.arrow_inout;
|
||||||
|
btnResize.Location = new System.Drawing.Point(464, 233);
|
||||||
|
btnResize.Name = "btnResize";
|
||||||
|
btnResize.Size = new System.Drawing.Size(120, 27);
|
||||||
|
btnResize.TabIndex = 13;
|
||||||
|
btnResize.Text = " Resize to frame";
|
||||||
|
btnResize.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
btnResize.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||||
|
toolTip1.SetToolTip(btnResize, "Resize converted image to fit the current frame");
|
||||||
|
btnResize.UseVisualStyleBackColor = true;
|
||||||
|
btnResize.Click += btnResize_Click;
|
||||||
|
//
|
||||||
|
// lblOrigSize
|
||||||
|
//
|
||||||
|
lblOrigSize.AutoSize = true;
|
||||||
|
lblOrigSize.Location = new System.Drawing.Point(12, 9);
|
||||||
|
lblOrigSize.Name = "lblOrigSize";
|
||||||
|
lblOrigSize.Size = new System.Drawing.Size(30, 15);
|
||||||
|
lblOrigSize.TabIndex = 14;
|
||||||
|
lblOrigSize.Text = "0 x 0";
|
||||||
|
//
|
||||||
|
// lblProcessedSize
|
||||||
|
//
|
||||||
|
lblProcessedSize.AutoSize = true;
|
||||||
|
lblProcessedSize.Location = new System.Drawing.Point(218, 9);
|
||||||
|
lblProcessedSize.Name = "lblProcessedSize";
|
||||||
|
lblProcessedSize.Size = new System.Drawing.Size(30, 15);
|
||||||
|
lblProcessedSize.TabIndex = 15;
|
||||||
|
lblProcessedSize.Text = "0 x 0";
|
||||||
|
//
|
||||||
|
// lblScaledSize
|
||||||
|
//
|
||||||
|
lblScaledSize.AutoSize = true;
|
||||||
|
lblScaledSize.Location = new System.Drawing.Point(424, 9);
|
||||||
|
lblScaledSize.Name = "lblScaledSize";
|
||||||
|
lblScaledSize.Size = new System.Drawing.Size(30, 15);
|
||||||
|
lblScaledSize.TabIndex = 16;
|
||||||
|
lblScaledSize.Text = "0 x 0";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
label1.Location = new System.Drawing.Point(6, 279);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new System.Drawing.Size(209, 2);
|
||||||
|
label1.TabIndex = 17;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
label2.Location = new System.Drawing.Point(421, 279);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new System.Drawing.Size(209, 2);
|
||||||
|
label2.TabIndex = 18;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
label3.Location = new System.Drawing.Point(421, 230);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new System.Drawing.Size(2, 51);
|
||||||
|
label3.TabIndex = 19;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
|
label4.Location = new System.Drawing.Point(215, 230);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new System.Drawing.Size(2, 51);
|
||||||
|
label4.TabIndex = 20;
|
||||||
|
//
|
||||||
|
// lblTransparency
|
||||||
|
//
|
||||||
|
lblTransparency.Location = new System.Drawing.Point(438, 323);
|
||||||
|
lblTransparency.Name = "lblTransparency";
|
||||||
|
lblTransparency.Size = new System.Drawing.Size(184, 15);
|
||||||
|
lblTransparency.TabIndex = 22;
|
||||||
|
lblTransparency.Text = "Transparency threshold: 32";
|
||||||
|
lblTransparency.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// tbTransparency
|
||||||
|
//
|
||||||
|
tbTransparency.AutoSize = false;
|
||||||
|
tbTransparency.Cursor = System.Windows.Forms.Cursors.SizeWE;
|
||||||
|
tbTransparency.LargeChange = 16;
|
||||||
|
tbTransparency.Location = new System.Drawing.Point(464, 296);
|
||||||
|
tbTransparency.Maximum = 255;
|
||||||
|
tbTransparency.Name = "tbTransparency";
|
||||||
|
tbTransparency.Size = new System.Drawing.Size(128, 32);
|
||||||
|
tbTransparency.SmallChange = 4;
|
||||||
|
tbTransparency.TabIndex = 21;
|
||||||
|
tbTransparency.TickFrequency = 8;
|
||||||
|
toolTip1.SetToolTip(tbTransparency, "Transparency threshold. Higher value makes more white");
|
||||||
|
tbTransparency.Value = 4;
|
||||||
|
tbTransparency.ValueChanged += tbTransparency_ValueChanged;
|
||||||
|
tbTransparency.KeyDown += tbTransparency_KeyDown;
|
||||||
|
//
|
||||||
|
// toolTip1
|
||||||
|
//
|
||||||
|
toolTip1.AutoPopDelay = 10000;
|
||||||
|
toolTip1.InitialDelay = 500;
|
||||||
|
toolTip1.ReshowDelay = 100;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
label5.AutoSize = true;
|
||||||
|
label5.Location = new System.Drawing.Point(438, 282);
|
||||||
|
label5.Name = "label5";
|
||||||
|
label5.Size = new System.Drawing.Size(66, 15);
|
||||||
|
label5.TabIndex = 24;
|
||||||
|
label5.Text = "More black";
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
label6.AutoSize = true;
|
||||||
|
label6.Location = new System.Drawing.Point(555, 282);
|
||||||
|
label6.Name = "label6";
|
||||||
|
label6.Size = new System.Drawing.Size(67, 15);
|
||||||
|
label6.TabIndex = 23;
|
||||||
|
label6.Text = "More white";
|
||||||
|
label6.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// ImageImporter
|
||||||
|
//
|
||||||
|
AcceptButton = btnOK;
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
CancelButton = btnCancel;
|
||||||
|
ClientSize = new System.Drawing.Size(634, 381);
|
||||||
|
Controls.Add(label5);
|
||||||
|
Controls.Add(label6);
|
||||||
|
Controls.Add(lblTransparency);
|
||||||
|
Controls.Add(tbTransparency);
|
||||||
|
Controls.Add(label4);
|
||||||
|
Controls.Add(label3);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(lblScaledSize);
|
||||||
|
Controls.Add(lblProcessedSize);
|
||||||
|
Controls.Add(lblOrigSize);
|
||||||
|
Controls.Add(btnResize);
|
||||||
|
Controls.Add(lblBlack);
|
||||||
|
Controls.Add(lblWhite);
|
||||||
|
Controls.Add(lblThreshold);
|
||||||
|
Controls.Add(tbThreshold);
|
||||||
|
Controls.Add(lblPixelization);
|
||||||
|
Controls.Add(tbPixelization);
|
||||||
|
Controls.Add(btnConvert);
|
||||||
|
Controls.Add(pbScaled);
|
||||||
|
Controls.Add(btnLoadImage);
|
||||||
|
Controls.Add(pbProcessed);
|
||||||
|
Controls.Add(pbOriginal);
|
||||||
|
Controls.Add(btnCancel);
|
||||||
|
Controls.Add(btnOK);
|
||||||
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
MaximizeBox = false;
|
||||||
|
MinimizeBox = false;
|
||||||
|
Name = "ImageImporter";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
Text = "Import Image";
|
||||||
|
Paint += ImageImporter_Paint;
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbOriginal).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbProcessed).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbScaled).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbPixelization).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbThreshold).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)tbTransparency).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
private System.Windows.Forms.PictureBox pbOriginal;
|
||||||
|
private System.Windows.Forms.PictureBox pbProcessed;
|
||||||
|
private System.Windows.Forms.Button btnLoadImage;
|
||||||
|
private System.Windows.Forms.OpenFileDialog dlgLoadImage;
|
||||||
|
private System.Windows.Forms.PictureBox pbScaled;
|
||||||
|
private System.Windows.Forms.Button btnConvert;
|
||||||
|
private System.Windows.Forms.TrackBar tbPixelization;
|
||||||
|
private System.Windows.Forms.Label lblPixelization;
|
||||||
|
private System.Windows.Forms.Label lblThreshold;
|
||||||
|
private System.Windows.Forms.TrackBar tbThreshold;
|
||||||
|
private System.Windows.Forms.Label lblWhite;
|
||||||
|
private System.Windows.Forms.Label lblBlack;
|
||||||
|
private System.Windows.Forms.Button btnResize;
|
||||||
|
private System.Windows.Forms.Label lblOrigSize;
|
||||||
|
private System.Windows.Forms.Label lblProcessedSize;
|
||||||
|
private System.Windows.Forms.Label lblScaledSize;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.Label lblTransparency;
|
||||||
|
private System.Windows.Forms.TrackBar tbTransparency;
|
||||||
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
}
|
||||||
|
}
|
235
McBitFont/ImageImporter.cs
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
public partial class ImageImporter : Form {
|
||||||
|
|
||||||
|
private int fw, fh, pixelization, threshold;
|
||||||
|
private Color[] colorPool = [Color.Black, Color.White];
|
||||||
|
private Bitmap bmpOriginal, bmpProcessed;
|
||||||
|
public Bitmap bmpScaled;
|
||||||
|
|
||||||
|
public ImageImporter(int width, int height) {
|
||||||
|
InitializeComponent();
|
||||||
|
fw = width;
|
||||||
|
fh = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateControls(byte level) {
|
||||||
|
switch (level) {
|
||||||
|
case 1:
|
||||||
|
bmpProcessed = null;
|
||||||
|
bmpScaled = null;
|
||||||
|
pbProcessed.Image = null;
|
||||||
|
pbScaled.Image = null;
|
||||||
|
lblProcessedSize.Text = "0 x 0";
|
||||||
|
lblScaledSize.Text = "0 x 0";
|
||||||
|
btnResize.Enabled = false;
|
||||||
|
btnOK.Enabled = false;
|
||||||
|
btnConvert.Enabled = true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
bmpScaled = null;
|
||||||
|
pbScaled.Image = null;
|
||||||
|
lblScaledSize.Text = "0 x 0";
|
||||||
|
btnOK.Enabled = false;
|
||||||
|
btnResize.Enabled = true;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
btnOK.Enabled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e) {
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pick a color from color pool that is closest to an average of given colors
|
||||||
|
private Color PickColor(Color[] colors) {
|
||||||
|
int i;
|
||||||
|
int r = 0; int g = 0; int b = 0;
|
||||||
|
|
||||||
|
// Calculating average color amongst givet color set
|
||||||
|
for (i = 0; i < colors.Length; i++) {
|
||||||
|
r += colors[i].R;
|
||||||
|
g += colors[i].G;
|
||||||
|
b += colors[i].B;
|
||||||
|
}
|
||||||
|
r /= colors.Length;
|
||||||
|
g /= colors.Length;
|
||||||
|
b /= colors.Length;
|
||||||
|
|
||||||
|
int near = 1000;
|
||||||
|
int ind = 0;
|
||||||
|
|
||||||
|
// Picking a closts color from color pool
|
||||||
|
for (i = 0; i < colorPool.Length; i++) {
|
||||||
|
int valR = colorPool[i].R - r + threshold;
|
||||||
|
int valG = colorPool[i].R - g + threshold;
|
||||||
|
int valB = colorPool[i].R - b + threshold;
|
||||||
|
if (valR < 0) valR = -valR;
|
||||||
|
if (valG < 0) valG = -valG;
|
||||||
|
if (valB < 0) valB = -valB;
|
||||||
|
|
||||||
|
threshold = tbThreshold.Value;
|
||||||
|
int total = valR + valG + valB;
|
||||||
|
|
||||||
|
if (total < near) {
|
||||||
|
ind = i;
|
||||||
|
near = total;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return colorPool[ind];
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void DrawArrow(Graphics g, Point from, Point to, float thickness = 1, Color? color = null) {
|
||||||
|
if (color == null) color = Color.Black;
|
||||||
|
var pen = new Pen((Color)color, thickness) {
|
||||||
|
CustomEndCap = new AdjustableArrowCap(4, 5)
|
||||||
|
};
|
||||||
|
g.DrawLine(pen, from, to);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbPixelization_ValueChanged(object sender, EventArgs e) {
|
||||||
|
lblPixelization.Text = "Pixelization: " + tbPixelization.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbThreshold_ValueChanged(object sender, EventArgs e) {
|
||||||
|
lblThreshold.Text = "Threshold: " + tbThreshold.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnLoadImage_Click(object sender, EventArgs e) {
|
||||||
|
if (dlgLoadImage.ShowDialog() == DialogResult.OK) {
|
||||||
|
bmpOriginal = new Bitmap(dlgLoadImage.FileName);
|
||||||
|
|
||||||
|
pbOriginal.Image = Draw200x200(bmpOriginal);
|
||||||
|
lblOrigSize.Text = bmpOriginal.Width.ToString() + " x " + bmpOriginal.Height.ToString()
|
||||||
|
+ " (" + pbOriginal.Image.Width.ToString() + " x " + pbOriginal.Image.Height.ToString() + ")";
|
||||||
|
|
||||||
|
// Clear other images
|
||||||
|
UpdateControls(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnConvert_Click(object sender, EventArgs e) {
|
||||||
|
pixelization = tbPixelization.Value;
|
||||||
|
//Bitmap bmOrig = (Bitmap)pbOriginal.Image;
|
||||||
|
bmpProcessed = new Bitmap(bmpOriginal.Width, bmpOriginal.Height);
|
||||||
|
|
||||||
|
// Processing image
|
||||||
|
using (Graphics g = Graphics.FromImage(bmpProcessed)) {
|
||||||
|
List<Color> block;
|
||||||
|
Rectangle rect = new Rectangle();
|
||||||
|
SolidBrush sb = new SolidBrush(Color.Black);
|
||||||
|
Color final = Color.Black;
|
||||||
|
Color pixel;
|
||||||
|
|
||||||
|
// Going through original image with steps = pixelization
|
||||||
|
for (int x = 0; x < bmpOriginal.Width; x += pixelization) {
|
||||||
|
for (int y = 0; y < bmpOriginal.Height; y += pixelization) {
|
||||||
|
block = [];
|
||||||
|
|
||||||
|
// Going throug a block pixel by pixel to calculate its average color later
|
||||||
|
for (int v = 0; v < pixelization; v++) {
|
||||||
|
for (int c = 0; c < pixelization; c++) {
|
||||||
|
if (x + v < bmpOriginal.Width && y + c < bmpOriginal.Height) {
|
||||||
|
pixel = bmpOriginal.GetPixel(x + v, y + c);
|
||||||
|
if (pixel.A <= tbTransparency.Value) pixel = Color.White;
|
||||||
|
block.Add(pixel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Getting a color from the color pool and painting the block
|
||||||
|
if (block.Count > 0) {
|
||||||
|
final = PickColor(block.ToArray());
|
||||||
|
sb.Color = final;
|
||||||
|
|
||||||
|
rect.X = x;
|
||||||
|
rect.Y = y;
|
||||||
|
rect.Width = pixelization;
|
||||||
|
rect.Height = pixelization;
|
||||||
|
|
||||||
|
g.FillRectangle(sb, rect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pbProcessed.Image = Draw200x200(bmpProcessed);
|
||||||
|
lblProcessedSize.Text = bmpProcessed.Width.ToString() + " x " + bmpProcessed.Height.ToString()
|
||||||
|
+ " (" + pbProcessed.Image.Width.ToString() + " x " + pbProcessed.Image.Height.ToString() + ")";
|
||||||
|
|
||||||
|
UpdateControls(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnResize_Click(object sender, EventArgs e) {
|
||||||
|
bmpScaled = DrawScaled(bmpProcessed, fw, fh);
|
||||||
|
|
||||||
|
pbScaled.Image = Draw200x200(bmpScaled);
|
||||||
|
lblScaledSize.Text = bmpScaled.Width.ToString() + " x " + bmpScaled.Height.ToString()
|
||||||
|
+ " (" + pbScaled.Image.Width.ToString() + " x " + pbScaled.Image.Height.ToString() + ")";
|
||||||
|
UpdateControls(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw 200x200 bitmap for picturebox
|
||||||
|
private static Bitmap Draw200x200(Bitmap bmpRef) {
|
||||||
|
return DrawScaled(bmpRef, 200, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw scaled bitmap keeping aspect ratio
|
||||||
|
private static Bitmap DrawScaled(Bitmap bmpRef, int w, int h) {
|
||||||
|
var scale = Math.Min(w / (double)bmpRef.Width, h / (double)bmpRef.Height);
|
||||||
|
var bmpNew = new Bitmap((int)(bmpRef.Width * scale), (int)(bmpRef.Height * scale));
|
||||||
|
|
||||||
|
using (Graphics g = Graphics.FromImage(bmpNew)) {
|
||||||
|
g.InterpolationMode = InterpolationMode.NearestNeighbor;
|
||||||
|
g.PixelOffsetMode = PixelOffsetMode.Half;
|
||||||
|
g.DrawImage(bmpRef, 0, 0, bmpNew.Width, bmpNew.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bmpNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbThreshold_KeyDown(object sender, KeyEventArgs e) {
|
||||||
|
if (e.KeyCode == Keys.C) {
|
||||||
|
tbThreshold.Value = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbPixelization_KeyDown(object sender, KeyEventArgs e) {
|
||||||
|
if (e.KeyCode == Keys.C) {
|
||||||
|
tbPixelization.Value = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbTransparency_ValueChanged(object sender, EventArgs e) {
|
||||||
|
lblTransparency.Text = "Transparency threshold: " + tbTransparency.Value.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbTransparency_KeyDown(object sender, KeyEventArgs e) {
|
||||||
|
if (e.KeyCode == Keys.C) {
|
||||||
|
tbTransparency.Value = 32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImageImporter_Paint(object sender, PaintEventArgs e) {
|
||||||
|
DrawArrow(e.Graphics, new Point(175, 246), new Point(255, 246), 2, Color.SlateGray);
|
||||||
|
DrawArrow(e.Graphics, new Point(380, 246), new Point(455, 246), 2, Color.SlateGray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
McBitFont/ImageImporter.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>147, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dlgLoadImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
@@ -1,129 +1,87 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>net9.0-windows</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{7C01529E-4414-405F-9B57-19FA4AF8ED60}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>McBitFont</RootNamespace>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
<AssemblyName>McBitFont</AssemblyName>
|
<Install>true</Install>
|
||||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
<InstallFrom>Disk</InstallFrom>
|
||||||
<FileAlignment>512</FileAlignment>
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
<Deterministic>true</Deterministic>
|
<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>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
|
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
||||||
|
<AssemblyVersion>2.9.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>2.9.0.0</FileVersion>
|
||||||
|
<Version>$(VersionPrefix)2.9.0</Version>
|
||||||
|
<Copyright>Anton Mukhin</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<DebugType>portable</DebugType>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<DebugType>portable</DebugType>
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Content Include="icon.ico" />
|
||||||
<Reference Include="System.Core" />
|
<Content Include="icon_64.ico" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<PackageReference Include="Costura.Fody" Version="6.0.0">
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<Reference Include="System.Data" />
|
</PackageReference>
|
||||||
<Reference Include="System.Deployment" />
|
<PackageReference Include="MessagePack" Version="3.1.3" />
|
||||||
<Reference Include="System.Drawing" />
|
<PackageReference Include="MessagePack.Annotations" Version="3.1.3" />
|
||||||
<Reference Include="System.Net.Http" />
|
<PackageReference Include="MessagePackAnalyzer" Version="3.1.3" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.5" />
|
||||||
<Reference Include="System.Xml" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
|
<PackageReference Include="Microsoft.NET.StringTools" Version="17.11.4" />
|
||||||
|
<PackageReference Include="System.Collections.Immutable" Version="9.0.5" />
|
||||||
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
|
||||||
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Export.cs">
|
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||||
<SubType>Form</SubType>
|
<Visible>False</Visible>
|
||||||
</Compile>
|
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 и x64%29</ProductName>
|
||||||
<Compile Include="Export.Designer.cs">
|
<Install>true</Install>
|
||||||
<DependentUpon>Export.cs</DependentUpon>
|
</BootstrapperPackage>
|
||||||
</Compile>
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
<Compile Include="Form1.cs">
|
<Visible>False</Visible>
|
||||||
<SubType>Form</SubType>
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
</Compile>
|
<Install>false</Install>
|
||||||
<Compile Include="Form1.Designer.cs">
|
</BootstrapperPackage>
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
</ItemGroup>
|
||||||
</Compile>
|
<ItemGroup>
|
||||||
<Compile Include="New.cs">
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
<SubType>Form</SubType>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
|
||||||
<Compile Include="New.Designer.cs">
|
|
||||||
<DependentUpon>New.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<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>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
</Compile>
|
</Compile>
|
||||||
<None Include="Properties\Settings.settings">
|
<Compile Update="Properties\Settings.Designer.cs">
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
</Project>
|
172
McBitFont/McCursor.cs
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace McBitFont {
|
||||||
|
internal class McCursor {
|
||||||
|
|
||||||
|
public struct IconInfo {
|
||||||
|
public bool fIcon;
|
||||||
|
public int xHotspot;
|
||||||
|
public int yHotspot;
|
||||||
|
public IntPtr hbmMask;
|
||||||
|
public IntPtr hbmColor;
|
||||||
|
}
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
|
public static extern bool GetIconInfo(IntPtr hIcon, ref IconInfo pIconInfo);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern IntPtr CreateIconIndirect(ref IconInfo icon);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a cursor from a bitmap without resizing and with the specified
|
||||||
|
/// hot spot
|
||||||
|
/// </summary>
|
||||||
|
public static Cursor CreateCursorNoResize(Bitmap bmp, int xHotSpot, int yHotSpot) {
|
||||||
|
IntPtr ptr = bmp.GetHicon();
|
||||||
|
IconInfo tmp = new IconInfo();
|
||||||
|
GetIconInfo(ptr, ref tmp);
|
||||||
|
tmp.xHotspot = xHotSpot;
|
||||||
|
tmp.yHotspot = yHotSpot;
|
||||||
|
tmp.fIcon = false;
|
||||||
|
ptr = CreateIconIndirect(ref tmp);
|
||||||
|
return new Cursor(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a 32x32 cursor from a bitmap, with the hot spot in the middle
|
||||||
|
/// </summary>
|
||||||
|
public static Cursor CreateCursor(Bitmap bmp) {
|
||||||
|
int xHotSpot = 16;
|
||||||
|
int yHotSpot = 16;
|
||||||
|
|
||||||
|
IntPtr ptr = ((Bitmap)ResizeImage(bmp, 32, 32)).GetHicon();
|
||||||
|
IconInfo tmp = new IconInfo();
|
||||||
|
GetIconInfo(ptr, ref tmp);
|
||||||
|
tmp.xHotspot = xHotSpot;
|
||||||
|
tmp.yHotspot = yHotSpot;
|
||||||
|
tmp.fIcon = false;
|
||||||
|
ptr = CreateIconIndirect(ref tmp);
|
||||||
|
return new Cursor(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Resize the image to the specified width and height.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="image">The image to resize.</param>
|
||||||
|
/// <param name="width">The width to resize to.</param>
|
||||||
|
/// <param name="height">The height to resize to.</param>
|
||||||
|
/// <returns>The resized image.</returns>
|
||||||
|
public static Bitmap ResizeImage(Image image, int width, int height) {
|
||||||
|
var destRect = new Rectangle(0, 0, width, height);
|
||||||
|
var destImage = new Bitmap(width, height);
|
||||||
|
|
||||||
|
destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);
|
||||||
|
|
||||||
|
using (var graphics = Graphics.FromImage(destImage)) {
|
||||||
|
graphics.CompositingMode = CompositingMode.SourceCopy;
|
||||||
|
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
graphics.SmoothingMode = SmoothingMode.HighQuality;
|
||||||
|
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||||
|
|
||||||
|
using (var wrapMode = new ImageAttributes()) {
|
||||||
|
wrapMode.SetWrapMode(WrapMode.TileFlipXY);
|
||||||
|
graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return destImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursor(int penSize, int cellSize, int gap) {
|
||||||
|
int size = (cellSize + gap) * penSize;
|
||||||
|
|
||||||
|
Bitmap bmp = new(size, size);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new(Color.FromArgb(160, Color.White));
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.DrawRectangle(pb, 0, 0, size-1, size-1);
|
||||||
|
g.FillRectangle(bw, 1, 1, size - 2, size - 2);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, cellSize / 2, cellSize / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorSelect() {
|
||||||
|
Point[] arrow = { new(1, 1), new(12, 12), new(11, 13), new(6, 13), new(2, 17), new(1, 16) };
|
||||||
|
Point[] corner1 = { new(13, 6), new(20, 6), new(20, 13), new(17, 13), new(17, 9), new(13, 9) };
|
||||||
|
Point[] corner2 = { new(17, 16), new(20, 16), new(20, 23), new(13, 23), new(13, 20), new(17, 20) };
|
||||||
|
Point[] corner3 = { new(3, 16), new(6, 16), new(6, 20), new(10, 20), new(10, 23), new(3, 23) };
|
||||||
|
Point[] corner4 = { new(6, 6), new(10, 6), new(10, 9), new(6, 9) };
|
||||||
|
|
||||||
|
Bitmap bmp = new(21, 24);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new (Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, corner1);
|
||||||
|
g.DrawPolygon(pb, corner1);
|
||||||
|
g.FillPolygon(bw, corner2);
|
||||||
|
g.DrawPolygon(pb, corner2);
|
||||||
|
g.FillPolygon(bw, corner3);
|
||||||
|
g.DrawPolygon(pb, corner3);
|
||||||
|
g.FillPolygon(bw, corner4);
|
||||||
|
g.DrawPolygon(pb, corner4);
|
||||||
|
g.FillPolygon(bw, arrow);
|
||||||
|
g.DrawPolygon(pb, arrow);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorLines() {
|
||||||
|
Point[] arrow = { new(1, 1), new(12, 12), new(11, 13), new(6, 13), new(2, 17), new(1, 16) };
|
||||||
|
Rectangle line = new(0, 18, 20, 5);
|
||||||
|
|
||||||
|
Bitmap bmp = new(21, 24);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
Pen pw = new(Color.White, 1);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
SolidBrush bb = new(Color.Black);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, arrow);
|
||||||
|
g.DrawPolygon(pb, arrow);
|
||||||
|
g.FillRectangle(bb, line);
|
||||||
|
g.DrawRectangle(pw, line);
|
||||||
|
}
|
||||||
|
|
||||||
|
return CreateCursorNoResize(bmp, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Cursor GetCursorDrag() {
|
||||||
|
Point[] arrow1 = { new(11, 0), new(15, 4), new(13, 4), new(13, 7), new(9, 7), new(9, 4), new(7, 4) };
|
||||||
|
Point[] arrow2 = { new(22, 11), new(18, 15), new(18, 13), new(15, 13), new(15, 9), new(18, 9), new(18, 7) };
|
||||||
|
Point[] arrow3 = { new(11, 22), new(7, 18), new(9, 18), new(9, 15), new(13, 15), new(13, 18), new(15, 18) };
|
||||||
|
Point[] arrow4 = { new(0, 11), new(4, 7), new(4, 9), new(7, 9), new(7, 13), new(4, 13), new(4, 15) };
|
||||||
|
|
||||||
|
Bitmap bmp = new(23, 23);
|
||||||
|
Pen pb = new(Color.Black, 1);
|
||||||
|
SolidBrush bw = new(Color.White);
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp)) {
|
||||||
|
g.FillPolygon(bw, arrow1);
|
||||||
|
g.DrawPolygon(pb, arrow1);
|
||||||
|
g.FillPolygon(bw, arrow2);
|
||||||
|
g.DrawPolygon(pb, arrow2);
|
||||||
|
g.FillPolygon(bw, arrow3);
|
||||||
|
g.DrawPolygon(pb, arrow3);
|
||||||
|
g.FillPolygon(bw, arrow4);
|
||||||
|
g.DrawPolygon(pb, arrow4);
|
||||||
|
}
|
||||||
|
return CreateCursorNoResize(bmp, 11, 11);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
565
McBitFont/New.Designer.cs
generated
@@ -23,229 +23,421 @@
|
|||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent() {
|
private void InitializeComponent() {
|
||||||
this.components = new System.ComponentModel.Container();
|
components = new System.ComponentModel.Container();
|
||||||
this.nudNewX = new System.Windows.Forms.NumericUpDown();
|
nudNewX = new System.Windows.Forms.NumericUpDown();
|
||||||
this.nudNewY = new System.Windows.Forms.NumericUpDown();
|
nudNewY = new System.Windows.Forms.NumericUpDown();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
label1 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
label2 = new System.Windows.Forms.Label();
|
||||||
this.rbMono = new System.Windows.Forms.RadioButton();
|
rbMono = new System.Windows.Forms.RadioButton();
|
||||||
this.rbVar = new System.Windows.Forms.RadioButton();
|
rbVar = new System.Windows.Forms.RadioButton();
|
||||||
this.cbNotPrintable = new System.Windows.Forms.CheckBox();
|
cbNotPrintable = new System.Windows.Forms.CheckBox();
|
||||||
this.cbLatin = new System.Windows.Forms.CheckBox();
|
cbLatin = new System.Windows.Forms.CheckBox();
|
||||||
this.cbExtended = new System.Windows.Forms.CheckBox();
|
cbExtended = new System.Windows.Forms.CheckBox();
|
||||||
this.btnOK = new System.Windows.Forms.Button();
|
btnOK = new System.Windows.Forms.Button();
|
||||||
this.btnCancel = new System.Windows.Forms.Button();
|
btnCancel = new System.Windows.Forms.Button();
|
||||||
this.cbSingle = new System.Windows.Forms.CheckBox();
|
cbSingle = new System.Windows.Forms.CheckBox();
|
||||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
toolTip1 = new System.Windows.Forms.ToolTip(components);
|
||||||
this.cbEncoding = new System.Windows.Forms.ComboBox();
|
cbEncoding = new System.Windows.Forms.ComboBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudNewX)).BeginInit();
|
panel1 = new System.Windows.Forms.Panel();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudNewY)).BeginInit();
|
pbChar2 = new System.Windows.Forms.PictureBox();
|
||||||
this.SuspendLayout();
|
pbChar1 = new System.Windows.Forms.PictureBox();
|
||||||
|
btnFont = new System.Windows.Forms.Button();
|
||||||
|
dlgFont = new System.Windows.Forms.FontDialog();
|
||||||
|
cbFontBased = new System.Windows.Forms.CheckBox();
|
||||||
|
lblFont = new System.Windows.Forms.Label();
|
||||||
|
nudShiftX = new System.Windows.Forms.NumericUpDown();
|
||||||
|
nudShiftY = new System.Windows.Forms.NumericUpDown();
|
||||||
|
lblShiftX = new System.Windows.Forms.Label();
|
||||||
|
lblShiftY = new System.Windows.Forms.Label();
|
||||||
|
pnlFont = new System.Windows.Forms.Panel();
|
||||||
|
label4 = new System.Windows.Forms.Label();
|
||||||
|
label3 = new System.Windows.Forms.Label();
|
||||||
|
nudChar2 = new System.Windows.Forms.NumericUpDown();
|
||||||
|
nudChar1 = new System.Windows.Forms.NumericUpDown();
|
||||||
|
cbDigits = new System.Windows.Forms.CheckBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudNewX).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudNewY).BeginInit();
|
||||||
|
panel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbChar2).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbChar1).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudShiftX).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudShiftY).BeginInit();
|
||||||
|
pnlFont.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudChar2).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudChar1).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// nudNewX
|
// nudNewX
|
||||||
//
|
//
|
||||||
this.nudNewX.Location = new System.Drawing.Point(74, 19);
|
nudNewX.Location = new System.Drawing.Point(68, 32);
|
||||||
this.nudNewX.Maximum = new decimal(new int[] {
|
nudNewX.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
255,
|
nudNewX.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
0,
|
nudNewX.Name = "nudNewX";
|
||||||
0,
|
nudNewX.Size = new System.Drawing.Size(57, 23);
|
||||||
0});
|
nudNewX.TabIndex = 0;
|
||||||
this.nudNewX.Minimum = new decimal(new int[] {
|
nudNewX.Value = new decimal(new int[] { 32, 0, 0, 0 });
|
||||||
1,
|
nudNewX.ValueChanged += nudNewX_ValueChanged;
|
||||||
0,
|
nudNewX.Enter += nudFocus;
|
||||||
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.Enter += new System.EventHandler(this.nudFocus);
|
|
||||||
//
|
//
|
||||||
// nudNewY
|
// nudNewY
|
||||||
//
|
//
|
||||||
this.nudNewY.Location = new System.Drawing.Point(74, 45);
|
nudNewY.Location = new System.Drawing.Point(68, 58);
|
||||||
this.nudNewY.Maximum = new decimal(new int[] {
|
nudNewY.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
255,
|
nudNewY.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
0,
|
nudNewY.Name = "nudNewY";
|
||||||
0,
|
nudNewY.Size = new System.Drawing.Size(57, 23);
|
||||||
0});
|
nudNewY.TabIndex = 1;
|
||||||
this.nudNewY.Minimum = new decimal(new int[] {
|
nudNewY.Value = new decimal(new int[] { 32, 0, 0, 0 });
|
||||||
1,
|
nudNewY.ValueChanged += nudNewX_ValueChanged;
|
||||||
0,
|
nudNewY.Enter += nudFocus;
|
||||||
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.Enter += new System.EventHandler(this.nudFocus);
|
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(30, 21);
|
label1.Location = new System.Drawing.Point(24, 34);
|
||||||
this.label1.Name = "label1";
|
label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
label1.Size = new System.Drawing.Size(42, 15);
|
||||||
this.label1.TabIndex = 2;
|
label1.TabIndex = 2;
|
||||||
this.label1.Text = "Width:";
|
label1.Text = "Width:";
|
||||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(27, 47);
|
label2.Location = new System.Drawing.Point(21, 60);
|
||||||
this.label2.Name = "label2";
|
label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(41, 13);
|
label2.Size = new System.Drawing.Size(46, 15);
|
||||||
this.label2.TabIndex = 3;
|
label2.TabIndex = 3;
|
||||||
this.label2.Text = "Height:";
|
label2.Text = "Height:";
|
||||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
//
|
//
|
||||||
// rbMono
|
// rbMono
|
||||||
//
|
//
|
||||||
this.rbMono.AutoSize = true;
|
rbMono.AutoSize = true;
|
||||||
this.rbMono.Checked = true;
|
rbMono.Checked = true;
|
||||||
this.rbMono.Location = new System.Drawing.Point(30, 71);
|
rbMono.Location = new System.Drawing.Point(24, 84);
|
||||||
this.rbMono.Name = "rbMono";
|
rbMono.Name = "rbMono";
|
||||||
this.rbMono.Size = new System.Drawing.Size(87, 17);
|
rbMono.Size = new System.Drawing.Size(94, 19);
|
||||||
this.rbMono.TabIndex = 4;
|
rbMono.TabIndex = 4;
|
||||||
this.rbMono.TabStop = true;
|
rbMono.TabStop = true;
|
||||||
this.rbMono.Text = "Monospaced";
|
rbMono.Text = "Monospaced";
|
||||||
this.rbMono.UseVisualStyleBackColor = true;
|
rbMono.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// rbVar
|
// rbVar
|
||||||
//
|
//
|
||||||
this.rbVar.AutoSize = true;
|
rbVar.AutoSize = true;
|
||||||
this.rbVar.Location = new System.Drawing.Point(30, 94);
|
rbVar.Location = new System.Drawing.Point(24, 107);
|
||||||
this.rbVar.Name = "rbVar";
|
rbVar.Name = "rbVar";
|
||||||
this.rbVar.Size = new System.Drawing.Size(91, 17);
|
rbVar.Size = new System.Drawing.Size(99, 19);
|
||||||
this.rbVar.TabIndex = 5;
|
rbVar.TabIndex = 5;
|
||||||
this.rbVar.Text = "Variable width";
|
rbVar.Text = "Variable width";
|
||||||
this.rbVar.UseVisualStyleBackColor = true;
|
rbVar.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// cbNotPrintable
|
// cbNotPrintable
|
||||||
//
|
//
|
||||||
this.cbNotPrintable.AutoSize = true;
|
cbNotPrintable.AutoSize = true;
|
||||||
this.cbNotPrintable.Location = new System.Drawing.Point(146, 35);
|
cbNotPrintable.Location = new System.Drawing.Point(140, 77);
|
||||||
this.cbNotPrintable.Name = "cbNotPrintable";
|
cbNotPrintable.Name = "cbNotPrintable";
|
||||||
this.cbNotPrintable.Size = new System.Drawing.Size(116, 17);
|
cbNotPrintable.Size = new System.Drawing.Size(130, 19);
|
||||||
this.cbNotPrintable.TabIndex = 7;
|
cbNotPrintable.TabIndex = 7;
|
||||||
this.cbNotPrintable.Text = "0-31 (Not printable)";
|
cbNotPrintable.Text = "0-31 (Not printable)";
|
||||||
this.cbNotPrintable.UseVisualStyleBackColor = true;
|
cbNotPrintable.UseVisualStyleBackColor = true;
|
||||||
|
cbNotPrintable.CheckedChanged += checkboxChanged;
|
||||||
//
|
//
|
||||||
// cbLatin
|
// cbLatin
|
||||||
//
|
//
|
||||||
this.cbLatin.AutoSize = true;
|
cbLatin.AutoSize = true;
|
||||||
this.cbLatin.Checked = true;
|
cbLatin.Checked = true;
|
||||||
this.cbLatin.CheckState = System.Windows.Forms.CheckState.Checked;
|
cbLatin.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbLatin.Location = new System.Drawing.Point(146, 58);
|
cbLatin.Location = new System.Drawing.Point(140, 100);
|
||||||
this.cbLatin.Name = "cbLatin";
|
cbLatin.Name = "cbLatin";
|
||||||
this.cbLatin.Size = new System.Drawing.Size(91, 17);
|
cbLatin.Size = new System.Drawing.Size(98, 19);
|
||||||
this.cbLatin.TabIndex = 8;
|
cbLatin.TabIndex = 8;
|
||||||
this.cbLatin.Text = "32-127 (Latin)";
|
cbLatin.Text = "32-127 (Latin)";
|
||||||
this.cbLatin.UseVisualStyleBackColor = true;
|
cbLatin.UseVisualStyleBackColor = true;
|
||||||
|
cbLatin.CheckedChanged += checkboxChanged;
|
||||||
//
|
//
|
||||||
// cbExtended
|
// cbExtended
|
||||||
//
|
//
|
||||||
this.cbExtended.AutoSize = true;
|
cbExtended.AutoSize = true;
|
||||||
this.cbExtended.Location = new System.Drawing.Point(146, 81);
|
cbExtended.Location = new System.Drawing.Point(140, 123);
|
||||||
this.cbExtended.Name = "cbExtended";
|
cbExtended.Name = "cbExtended";
|
||||||
this.cbExtended.Size = new System.Drawing.Size(119, 17);
|
cbExtended.Size = new System.Drawing.Size(126, 19);
|
||||||
this.cbExtended.TabIndex = 9;
|
cbExtended.TabIndex = 9;
|
||||||
this.cbExtended.Text = "128-255 (Extended)";
|
cbExtended.Text = "128-255 (Extended)";
|
||||||
this.cbExtended.UseVisualStyleBackColor = true;
|
cbExtended.UseVisualStyleBackColor = true;
|
||||||
this.cbExtended.CheckedChanged += new System.EventHandler(this.cbExtended_CheckedChanged);
|
cbExtended.CheckedChanged += checkboxChanged;
|
||||||
//
|
//
|
||||||
// btnOK
|
// btnOK
|
||||||
//
|
//
|
||||||
this.btnOK.Location = new System.Drawing.Point(56, 143);
|
btnOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
|
||||||
this.btnOK.Name = "btnOK";
|
btnOK.Location = new System.Drawing.Point(47, 178);
|
||||||
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
btnOK.Name = "btnOK";
|
||||||
this.btnOK.TabIndex = 10;
|
btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnOK.Text = "OK";
|
btnOK.TabIndex = 10;
|
||||||
this.btnOK.UseVisualStyleBackColor = true;
|
btnOK.Text = "OK";
|
||||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
btnOK.UseVisualStyleBackColor = true;
|
||||||
|
btnOK.Click += btnOK_Click;
|
||||||
//
|
//
|
||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
|
||||||
this.btnCancel.Location = new System.Drawing.Point(165, 143);
|
btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.btnCancel.Name = "btnCancel";
|
btnCancel.Location = new System.Drawing.Point(140, 178);
|
||||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.TabIndex = 11;
|
btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnCancel.Text = "Cancel";
|
btnCancel.TabIndex = 11;
|
||||||
this.btnCancel.UseVisualStyleBackColor = true;
|
btnCancel.Text = "Cancel";
|
||||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
btnCancel.Click += btnCancel_Click;
|
||||||
//
|
//
|
||||||
// cbSingle
|
// cbSingle
|
||||||
//
|
//
|
||||||
this.cbSingle.AutoSize = true;
|
cbSingle.AutoSize = true;
|
||||||
this.cbSingle.Location = new System.Drawing.Point(146, 12);
|
cbSingle.Location = new System.Drawing.Point(140, 31);
|
||||||
this.cbSingle.Name = "cbSingle";
|
cbSingle.Name = "cbSingle";
|
||||||
this.cbSingle.Size = new System.Drawing.Size(84, 17);
|
cbSingle.Size = new System.Drawing.Size(92, 19);
|
||||||
this.cbSingle.TabIndex = 12;
|
cbSingle.TabIndex = 12;
|
||||||
this.cbSingle.Text = "Single frame";
|
cbSingle.Text = "Single frame";
|
||||||
this.cbSingle.UseVisualStyleBackColor = true;
|
cbSingle.UseVisualStyleBackColor = true;
|
||||||
this.cbSingle.CheckedChanged += new System.EventHandler(this.cbSingle_CheckedChanged);
|
cbSingle.CheckedChanged += checkboxChanged;
|
||||||
//
|
//
|
||||||
// toolTip1
|
// toolTip1
|
||||||
//
|
//
|
||||||
this.toolTip1.AutoPopDelay = 10000;
|
toolTip1.AutoPopDelay = 10000;
|
||||||
this.toolTip1.InitialDelay = 500;
|
toolTip1.InitialDelay = 500;
|
||||||
this.toolTip1.ReshowDelay = 100;
|
toolTip1.ReshowDelay = 100;
|
||||||
this.toolTip1.ToolTipTitle = "Info";
|
toolTip1.ToolTipTitle = "Info";
|
||||||
//
|
//
|
||||||
// cbEncoding
|
// cbEncoding
|
||||||
//
|
//
|
||||||
this.cbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
cbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cbEncoding.Enabled = false;
|
cbEncoding.Enabled = false;
|
||||||
this.cbEncoding.FormattingEnabled = true;
|
cbEncoding.FormattingEnabled = true;
|
||||||
this.cbEncoding.Location = new System.Drawing.Point(146, 104);
|
cbEncoding.Location = new System.Drawing.Point(140, 146);
|
||||||
this.cbEncoding.Name = "cbEncoding";
|
cbEncoding.Name = "cbEncoding";
|
||||||
this.cbEncoding.Size = new System.Drawing.Size(121, 21);
|
cbEncoding.Size = new System.Drawing.Size(121, 23);
|
||||||
this.cbEncoding.TabIndex = 13;
|
cbEncoding.TabIndex = 13;
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
panel1.Controls.Add(pbChar2);
|
||||||
|
panel1.Controls.Add(pbChar1);
|
||||||
|
panel1.Location = new System.Drawing.Point(6, 24);
|
||||||
|
panel1.Name = "panel1";
|
||||||
|
panel1.Size = new System.Drawing.Size(200, 124);
|
||||||
|
panel1.TabIndex = 14;
|
||||||
|
//
|
||||||
|
// pbChar2
|
||||||
|
//
|
||||||
|
pbChar2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
pbChar2.Location = new System.Drawing.Point(100, 0);
|
||||||
|
pbChar2.Name = "pbChar2";
|
||||||
|
pbChar2.Size = new System.Drawing.Size(100, 124);
|
||||||
|
pbChar2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
pbChar2.TabIndex = 1;
|
||||||
|
pbChar2.TabStop = false;
|
||||||
|
//
|
||||||
|
// pbChar1
|
||||||
|
//
|
||||||
|
pbChar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
pbChar1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
pbChar1.Name = "pbChar1";
|
||||||
|
pbChar1.Size = new System.Drawing.Size(100, 124);
|
||||||
|
pbChar1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
pbChar1.TabIndex = 0;
|
||||||
|
pbChar1.TabStop = false;
|
||||||
|
//
|
||||||
|
// btnFont
|
||||||
|
//
|
||||||
|
btnFont.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
btnFont.Location = new System.Drawing.Point(6, 178);
|
||||||
|
btnFont.Name = "btnFont";
|
||||||
|
btnFont.Size = new System.Drawing.Size(71, 23);
|
||||||
|
btnFont.TabIndex = 15;
|
||||||
|
btnFont.Text = "Font ...";
|
||||||
|
btnFont.UseVisualStyleBackColor = true;
|
||||||
|
btnFont.Click += btnFont_Click;
|
||||||
|
//
|
||||||
|
// dlgFont
|
||||||
|
//
|
||||||
|
dlgFont.Font = new System.Drawing.Font("Courier New", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 204);
|
||||||
|
dlgFont.ShowEffects = false;
|
||||||
|
//
|
||||||
|
// cbFontBased
|
||||||
|
//
|
||||||
|
cbFontBased.AutoSize = true;
|
||||||
|
cbFontBased.Location = new System.Drawing.Point(24, 130);
|
||||||
|
cbFontBased.Name = "cbFontBased";
|
||||||
|
cbFontBased.Size = new System.Drawing.Size(108, 19);
|
||||||
|
cbFontBased.TabIndex = 16;
|
||||||
|
cbFontBased.Text = "Based on a font";
|
||||||
|
cbFontBased.UseVisualStyleBackColor = true;
|
||||||
|
cbFontBased.CheckedChanged += checkboxChanged;
|
||||||
|
//
|
||||||
|
// lblFont
|
||||||
|
//
|
||||||
|
lblFont.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
lblFont.Location = new System.Drawing.Point(83, 183);
|
||||||
|
lblFont.Name = "lblFont";
|
||||||
|
lblFont.Size = new System.Drawing.Size(123, 18);
|
||||||
|
lblFont.TabIndex = 17;
|
||||||
|
lblFont.Text = "font";
|
||||||
|
//
|
||||||
|
// nudShiftX
|
||||||
|
//
|
||||||
|
nudShiftX.Location = new System.Drawing.Point(61, 2);
|
||||||
|
nudShiftX.Minimum = new decimal(new int[] { 100, 0, 0, int.MinValue });
|
||||||
|
nudShiftX.Name = "nudShiftX";
|
||||||
|
nudShiftX.Size = new System.Drawing.Size(45, 23);
|
||||||
|
nudShiftX.TabIndex = 18;
|
||||||
|
nudShiftX.ValueChanged += nudNewX_ValueChanged;
|
||||||
|
//
|
||||||
|
// nudShiftY
|
||||||
|
//
|
||||||
|
nudShiftY.Location = new System.Drawing.Point(161, 2);
|
||||||
|
nudShiftY.Minimum = new decimal(new int[] { 100, 0, 0, int.MinValue });
|
||||||
|
nudShiftY.Name = "nudShiftY";
|
||||||
|
nudShiftY.Size = new System.Drawing.Size(45, 23);
|
||||||
|
nudShiftY.TabIndex = 19;
|
||||||
|
nudShiftY.ValueChanged += nudNewX_ValueChanged;
|
||||||
|
//
|
||||||
|
// lblShiftX
|
||||||
|
//
|
||||||
|
lblShiftX.AutoSize = true;
|
||||||
|
lblShiftX.Location = new System.Drawing.Point(14, 4);
|
||||||
|
lblShiftX.Name = "lblShiftX";
|
||||||
|
lblShiftX.Size = new System.Drawing.Size(44, 15);
|
||||||
|
lblShiftX.TabIndex = 20;
|
||||||
|
lblShiftX.Text = "Shift X:";
|
||||||
|
lblShiftX.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// lblShiftY
|
||||||
|
//
|
||||||
|
lblShiftY.AutoSize = true;
|
||||||
|
lblShiftY.Location = new System.Drawing.Point(114, 4);
|
||||||
|
lblShiftY.Name = "lblShiftY";
|
||||||
|
lblShiftY.Size = new System.Drawing.Size(44, 15);
|
||||||
|
lblShiftY.TabIndex = 21;
|
||||||
|
lblShiftY.Text = "Shift Y:";
|
||||||
|
lblShiftY.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// pnlFont
|
||||||
|
//
|
||||||
|
pnlFont.Controls.Add(label4);
|
||||||
|
pnlFont.Controls.Add(label3);
|
||||||
|
pnlFont.Controls.Add(nudChar2);
|
||||||
|
pnlFont.Controls.Add(nudChar1);
|
||||||
|
pnlFont.Controls.Add(lblShiftX);
|
||||||
|
pnlFont.Controls.Add(lblShiftY);
|
||||||
|
pnlFont.Controls.Add(panel1);
|
||||||
|
pnlFont.Controls.Add(btnFont);
|
||||||
|
pnlFont.Controls.Add(nudShiftY);
|
||||||
|
pnlFont.Controls.Add(lblFont);
|
||||||
|
pnlFont.Controls.Add(nudShiftX);
|
||||||
|
pnlFont.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
|
pnlFont.Location = new System.Drawing.Point(270, 0);
|
||||||
|
pnlFont.Name = "pnlFont";
|
||||||
|
pnlFont.Size = new System.Drawing.Size(214, 211);
|
||||||
|
pnlFont.TabIndex = 22;
|
||||||
|
pnlFont.Visible = false;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.AutoSize = true;
|
||||||
|
label4.Location = new System.Drawing.Point(112, 152);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new System.Drawing.Size(49, 15);
|
||||||
|
label4.TabIndex = 25;
|
||||||
|
label4.Text = "Sample:";
|
||||||
|
label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new System.Drawing.Point(14, 152);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new System.Drawing.Size(49, 15);
|
||||||
|
label3.TabIndex = 24;
|
||||||
|
label3.Text = "Sample:";
|
||||||
|
label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||||
|
//
|
||||||
|
// nudChar2
|
||||||
|
//
|
||||||
|
nudChar2.Location = new System.Drawing.Point(161, 149);
|
||||||
|
nudChar2.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
|
nudChar2.Name = "nudChar2";
|
||||||
|
nudChar2.Size = new System.Drawing.Size(45, 23);
|
||||||
|
nudChar2.TabIndex = 23;
|
||||||
|
nudChar2.Value = new decimal(new int[] { 97, 0, 0, 0 });
|
||||||
|
nudChar2.ValueChanged += nudNewX_ValueChanged;
|
||||||
|
//
|
||||||
|
// nudChar1
|
||||||
|
//
|
||||||
|
nudChar1.Location = new System.Drawing.Point(61, 149);
|
||||||
|
nudChar1.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
|
||||||
|
nudChar1.Name = "nudChar1";
|
||||||
|
nudChar1.Size = new System.Drawing.Size(45, 23);
|
||||||
|
nudChar1.TabIndex = 22;
|
||||||
|
nudChar1.Value = new decimal(new int[] { 65, 0, 0, 0 });
|
||||||
|
nudChar1.ValueChanged += nudNewX_ValueChanged;
|
||||||
|
//
|
||||||
|
// cbDigits
|
||||||
|
//
|
||||||
|
cbDigits.AutoSize = true;
|
||||||
|
cbDigits.Location = new System.Drawing.Point(140, 54);
|
||||||
|
cbDigits.Name = "cbDigits";
|
||||||
|
cbDigits.Size = new System.Drawing.Size(82, 19);
|
||||||
|
cbDigits.TabIndex = 23;
|
||||||
|
cbDigits.Text = "Digits only";
|
||||||
|
cbDigits.UseVisualStyleBackColor = true;
|
||||||
|
cbDigits.CheckedChanged += checkboxChanged;
|
||||||
//
|
//
|
||||||
// New
|
// New
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.btnOK;
|
AcceptButton = btnOK;
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.CancelButton = this.btnCancel;
|
CancelButton = btnCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(284, 181);
|
ClientSize = new System.Drawing.Size(484, 211);
|
||||||
this.Controls.Add(this.cbEncoding);
|
Controls.Add(cbDigits);
|
||||||
this.Controls.Add(this.cbSingle);
|
Controls.Add(pnlFont);
|
||||||
this.Controls.Add(this.btnCancel);
|
Controls.Add(cbFontBased);
|
||||||
this.Controls.Add(this.btnOK);
|
Controls.Add(cbEncoding);
|
||||||
this.Controls.Add(this.cbExtended);
|
Controls.Add(cbSingle);
|
||||||
this.Controls.Add(this.cbLatin);
|
Controls.Add(btnCancel);
|
||||||
this.Controls.Add(this.cbNotPrintable);
|
Controls.Add(btnOK);
|
||||||
this.Controls.Add(this.rbVar);
|
Controls.Add(cbExtended);
|
||||||
this.Controls.Add(this.rbMono);
|
Controls.Add(cbLatin);
|
||||||
this.Controls.Add(this.label2);
|
Controls.Add(cbNotPrintable);
|
||||||
this.Controls.Add(this.label1);
|
Controls.Add(rbVar);
|
||||||
this.Controls.Add(this.nudNewY);
|
Controls.Add(rbMono);
|
||||||
this.Controls.Add(this.nudNewX);
|
Controls.Add(label2);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
Controls.Add(label1);
|
||||||
this.MaximizeBox = false;
|
Controls.Add(nudNewY);
|
||||||
this.MaximumSize = new System.Drawing.Size(300, 220);
|
Controls.Add(nudNewX);
|
||||||
this.MinimizeBox = false;
|
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
this.MinimumSize = new System.Drawing.Size(300, 220);
|
MaximizeBox = false;
|
||||||
this.Name = "New";
|
MinimizeBox = false;
|
||||||
this.ShowIcon = false;
|
MinimumSize = new System.Drawing.Size(300, 220);
|
||||||
this.ShowInTaskbar = false;
|
Name = "New";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
ShowIcon = false;
|
||||||
this.Text = "New";
|
ShowInTaskbar = false;
|
||||||
this.Load += new System.EventHandler(this.New_Load);
|
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudNewX)).EndInit();
|
Text = "New";
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudNewY)).EndInit();
|
Load += New_Load;
|
||||||
this.ResumeLayout(false);
|
((System.ComponentModel.ISupportInitialize)nudNewX).EndInit();
|
||||||
this.PerformLayout();
|
((System.ComponentModel.ISupportInitialize)nudNewY).EndInit();
|
||||||
|
panel1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbChar2).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pbChar1).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudShiftX).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudShiftY).EndInit();
|
||||||
|
pnlFont.ResumeLayout(false);
|
||||||
|
pnlFont.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudChar2).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)nudChar1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,5 +457,22 @@
|
|||||||
public System.Windows.Forms.CheckBox cbSingle;
|
public System.Windows.Forms.CheckBox cbSingle;
|
||||||
private System.Windows.Forms.ToolTip toolTip1;
|
private System.Windows.Forms.ToolTip toolTip1;
|
||||||
public System.Windows.Forms.ComboBox cbEncoding;
|
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;
|
||||||
|
public System.Windows.Forms.CheckBox cbDigits;
|
||||||
}
|
}
|
||||||
}
|
}
|
124
McBitFont/New.cs
@@ -3,10 +3,12 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
|
||||||
namespace McBitFont {
|
namespace McBitFont {
|
||||||
public partial class New : Form {
|
public partial class New : Form {
|
||||||
@@ -25,18 +27,13 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private MainForm mainForm;
|
||||||
|
|
||||||
public New() {
|
|
||||||
|
public New(MainForm form) {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
mainForm = form;
|
||||||
|
this.Width = 300; this.Height = 250;
|
||||||
private void cbSingle_CheckedChanged(object sender, EventArgs e) {
|
|
||||||
bool c = !cbSingle.Checked;
|
|
||||||
cbNotPrintable.Enabled = c;
|
|
||||||
cbLatin.Enabled = c;
|
|
||||||
cbExtended.Enabled = c;
|
|
||||||
rbMono.Enabled = c;
|
|
||||||
rbVar.Enabled = c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void New_Load(object sender, EventArgs e) {
|
private void New_Load(object sender, EventArgs e) {
|
||||||
@@ -45,6 +42,7 @@ namespace McBitFont {
|
|||||||
toolTip1.SetToolTip(rbMono, "Monospaced font");
|
toolTip1.SetToolTip(rbMono, "Monospaced font");
|
||||||
toolTip1.SetToolTip(rbVar, "Variable width font");
|
toolTip1.SetToolTip(rbVar, "Variable width font");
|
||||||
toolTip1.SetToolTip(cbSingle, "Create one single frame");
|
toolTip1.SetToolTip(cbSingle, "Create one single frame");
|
||||||
|
toolTip1.SetToolTip(cbDigits, "Only digits characters with codes 48 - 57");
|
||||||
toolTip1.SetToolTip(cbNotPrintable, "Add not printable characters with codes 0 - 31");
|
toolTip1.SetToolTip(cbNotPrintable, "Add not printable characters with codes 0 - 31");
|
||||||
toolTip1.SetToolTip(cbLatin, "Add Latin characters with codes 32 - 127");
|
toolTip1.SetToolTip(cbLatin, "Add Latin characters with codes 32 - 127");
|
||||||
toolTip1.SetToolTip(cbExtended, "Add Extended characters with codes 128 - 255");
|
toolTip1.SetToolTip(cbExtended, "Add Extended characters with codes 128 - 255");
|
||||||
@@ -59,6 +57,78 @@ namespace McBitFont {
|
|||||||
cbEncoding.Items.Add(new EncodingItem(1256, "Arabic"));
|
cbEncoding.Items.Add(new EncodingItem(1256, "Arabic"));
|
||||||
cbEncoding.Items.Add(new EncodingItem(1257, "Baltic"));
|
cbEncoding.Items.Add(new EncodingItem(1257, "Baltic"));
|
||||||
cbEncoding.SelectedIndex = 1;
|
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) {
|
private void btnCancel_Click(object sender, EventArgs e) {
|
||||||
@@ -75,8 +145,38 @@ namespace McBitFont {
|
|||||||
nud.Select(0, nud.Text.Length);
|
nud.Select(0, nud.Text.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbExtended_CheckedChanged(object sender, EventArgs e) {
|
private void btnFont_Click(object sender, EventArgs e) {
|
||||||
cbEncoding.Enabled = cbExtended.Checked;
|
if (dlgFont.ShowDialog() == DialogResult.OK) {
|
||||||
|
lblFont.Text = dlgFont.Font.Name + " " + dlgFont.Font.Size.ToString();
|
||||||
|
updateChars();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nudNewX_ValueChanged(object sender, EventArgs e) {
|
||||||
|
updateChars();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkboxChanged(object sender, EventArgs e) {
|
||||||
|
if (!(sender as CheckBox).Focused) return;
|
||||||
|
|
||||||
|
bool c = !cbSingle.Checked;
|
||||||
|
bool d = !cbDigits.Checked;
|
||||||
|
bool p = cbNotPrintable.Checked;
|
||||||
|
bool x = cbExtended.Checked;
|
||||||
|
bool f = cbFontBased.Checked;
|
||||||
|
|
||||||
|
cbDigits.Enabled = c;
|
||||||
|
cbNotPrintable.Enabled = c && d;
|
||||||
|
cbLatin.Enabled = c && d;
|
||||||
|
cbExtended.Enabled = c && d;
|
||||||
|
cbFontBased.Enabled = c;
|
||||||
|
cbEncoding.Enabled = c && d && x;
|
||||||
|
rbMono.Enabled = c;
|
||||||
|
rbVar.Enabled = c;
|
||||||
|
pnlFont.Visible = c && f;
|
||||||
|
if (p && x) cbLatin.Checked = true;
|
||||||
|
this.Width = c && f ? 500 : 300;
|
||||||
|
btnOK.Enabled = !c || !d || x || p || cbLatin.Checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
@@ -26,36 +26,36 @@
|
|||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
@@ -120,4 +120,7 @@
|
|||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</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>
|
</root>
|
@@ -1,36 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// Общие сведения об этой сборке предоставляются следующим набором
|
|
||||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
|
||||||
// связанных со сборкой.
|
|
||||||
[assembly: AssemblyTitle("McBitFont")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("McBitFont")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
|
|
||||||
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
|
|
||||||
// COM, следует установить атрибут ComVisible в TRUE для этого типа.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
|
||||||
[assembly: Guid("7c01529e-4414-405f-9b57-19fa4af8ed60")]
|
|
||||||
|
|
||||||
// Сведения о версии сборки состоят из указанных ниже четырех значений:
|
|
||||||
//
|
|
||||||
// Основной номер версии
|
|
||||||
// Дополнительный номер версии
|
|
||||||
// Номер сборки
|
|
||||||
// Редакция
|
|
||||||
//
|
|
||||||
// Можно задать все значения или принять номера сборки и редакции по умолчанию
|
|
||||||
// используя "*", как показано ниже:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
440
McBitFont/Properties/Resources.Designer.cs
generated
@@ -1,10 +1,10 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// Этот код создан программой.
|
// This code was generated by a tool.
|
||||||
// Исполняемая версия:4.0.30319.42000
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// повторной генерации кода.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -13,12 +13,12 @@ namespace McBitFont.Properties {
|
|||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// Этот класс создан автоматически классом StronglyTypedResourceBuilder
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
// с помощью такого средства, как ResGen или Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// с параметром /str или перестройте свой проект VS.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
@@ -33,7 +33,7 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
@@ -47,8 +47,8 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Перезаписывает свойство CurrentUICulture текущего потока для всех
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture {
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
@@ -61,67 +61,237 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap action_add {
|
internal static System.Drawing.Bitmap add {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("action_add", resourceCulture);
|
object obj = ResourceManager.GetObject("add", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap action_remove {
|
internal static System.Drawing.Bitmap arrow_inout {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("action_remove", resourceCulture);
|
object obj = ResourceManager.GetObject("arrow_inout", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap arrow_back {
|
internal static System.Drawing.Bitmap arrow_out {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("arrow_back", resourceCulture);
|
object obj = ResourceManager.GetObject("arrow_out", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap arrow_down {
|
internal static System.Drawing.Bitmap arrow_redo {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("arrow_down", resourceCulture);
|
object obj = ResourceManager.GetObject("arrow_redo", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap arrow_next {
|
internal static System.Drawing.Bitmap arrow_turn_left {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("arrow_next", resourceCulture);
|
object obj = ResourceManager.GetObject("arrow_turn_left", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap arrow_top {
|
internal static System.Drawing.Bitmap arrow_turn_right {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("arrow_top", resourceCulture);
|
object obj = ResourceManager.GetObject("arrow_turn_right", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap arrow_undo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("arrow_undo", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap calculator {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("calculator", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Canvas_Clear {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Canvas_Clear", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap Canvas_Fill {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("Canvas_Fill", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap delete {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("delete", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_base {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_base", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_lines {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_lines", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_mid {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_mid", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_rectt {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_rectt", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap fam_top {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("fam_top", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap file {
|
internal static System.Drawing.Bitmap file {
|
||||||
get {
|
get {
|
||||||
@@ -131,7 +301,7 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap folder_open {
|
internal static System.Drawing.Bitmap folder_open {
|
||||||
get {
|
get {
|
||||||
@@ -141,11 +311,211 @@ namespace McBitFont.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static System.Drawing.Bitmap save {
|
internal static System.Drawing.Bitmap folder_table {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("save", resourceCulture);
|
object obj = ResourceManager.GetObject("folder_table", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap font {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("font", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap icon {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("icon", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type 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>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap picture_go {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("picture_go", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap picture_save {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("picture_save", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap text_letterspacing2 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("text_letterspacing2", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_align_center {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_align_center", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_asterisk {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_asterisk", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_contrast {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_contrast", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_down {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_down", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_export {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_export", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_folder_image {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_folder_image", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_left {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_left", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_redo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_redo", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_right {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_right", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_shading {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_shading", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_tick {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_tick", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_undo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_undo", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap z_uo {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("z_uo", resourceCulture);
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,31 +118,142 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="action_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="fam_mid" 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>
|
<value>..\Resources\fam_mid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="action_remove" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_left" 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>
|
<value>..\Resources\arrow_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="arrow_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_export" 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>
|
<value>..\Resources\package_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="arrow_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="z_contrast" 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>
|
<value>..\Resources\contrast.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="arrow_next" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Page-paste.16" 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>
|
<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>
|
||||||
<data name="arrow_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="folder_table" 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>
|
<value>..\Resources\folder_table.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>
|
||||||
<data name="folder_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<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>
|
<value>..\Resources\folder_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Famfamfam-Silk-Page-copy.16" 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>
|
<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="picture_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\picture_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_inout" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_inout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="font" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="picture_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\picture_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\redo.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="z_right" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="calculator" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\calculator.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_asterisk" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\asterisk_orange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\icons\famfamfam\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Canvas_Clear" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Canvas_Clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_uo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_up.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="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="z_align_center" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\shape_align_center.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_shading" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\shading.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_turn_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_turn_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\add.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="fam_lines" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_lines.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_tick" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\tick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="z_redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="fam_base" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_base.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="fam_rectt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_rectt.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="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_turn_right" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_turn_right.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="text_letterspacing2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\text_letterspacing2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="Canvas_Fill" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Canvas_Fill.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="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="z_folder_image" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\folder_image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="arrow_out" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\arrow_out.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>
|
||||||
|
<data name="fam_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\fam_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
10
McBitFont/Properties/Settings.Designer.cs
generated
@@ -9,14 +9,14 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace McBitFont.Properties {
|
namespace McBitFont.Properties {
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
public static Settings Default {
|
public static Settings Default {
|
||||||
get {
|
get {
|
||||||
return defaultInstance;
|
return defaultInstance;
|
||||||
|
BIN
McBitFont/Resources/Canvas_Clear.png
Normal file
After Width: | Height: | Size: 595 B |
BIN
McBitFont/Resources/Canvas_Fill.png
Normal file
After Width: | Height: | Size: 547 B |
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_check.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
McBitFont/Resources/add.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
McBitFont/Resources/arrow_inout.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
McBitFont/Resources/arrow_inout1.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
McBitFont/Resources/arrow_left.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
McBitFont/Resources/arrow_out.png
Normal file
After Width: | Height: | Size: 594 B |
BIN
McBitFont/Resources/arrow_redo.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
McBitFont/Resources/arrow_right.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
McBitFont/Resources/arrow_turn_left.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
McBitFont/Resources/arrow_turn_right.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
McBitFont/Resources/arrow_undo.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
McBitFont/Resources/arrow_up.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
McBitFont/Resources/asterisk_orange.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
McBitFont/Resources/calculator.png
Normal file
After Width: | Height: | Size: 543 B |
BIN
McBitFont/Resources/contrast.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
McBitFont/Resources/delete.png
Normal file
After Width: | Height: | Size: 715 B |
BIN
McBitFont/Resources/fam_base.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
McBitFont/Resources/fam_lines.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
McBitFont/Resources/fam_mid.png
Normal file
After Width: | Height: | Size: 137 B |
BIN
McBitFont/Resources/fam_rectt.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
McBitFont/Resources/fam_top.png
Normal file
After Width: | Height: | Size: 136 B |
BIN
McBitFont/Resources/folder_image.png
Normal file
After Width: | Height: | Size: 677 B |
BIN
McBitFont/Resources/folder_table.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
McBitFont/Resources/font.png
Normal file
After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 2.5 KiB 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/package_go.png
Normal file
After Width: | Height: | Size: 898 B |
BIN
McBitFont/Resources/picture_go.png
Normal file
After Width: | Height: | Size: 758 B |
BIN
McBitFont/Resources/picture_save.png
Normal file
After Width: | Height: | Size: 755 B |
BIN
McBitFont/Resources/redo.png
Normal file
After Width: | Height: | Size: 561 B |
BIN
McBitFont/Resources/shading.png
Normal file
After Width: | Height: | Size: 225 B |
BIN
McBitFont/Resources/shape_align_center.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
McBitFont/Resources/text_letterspacing2.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
McBitFont/Resources/tick.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
McBitFont/Resources/undo.png
Normal file
After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 894 B |
BIN
McBitFont/icon_64.ico
Normal file
After Width: | Height: | Size: 13 KiB |
71
README.md
@@ -1,3 +1,72 @@
|
|||||||
# McBitFont
|
# 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...
|
||||||
|
- Import an image
|
||||||
|
- Save / Load your project for later edits
|
||||||
|
- Export as a C array in different formats
|
||||||
|
- Import from text C array
|
||||||
|
- Export to a PNG image showing all the characters in a table
|
||||||
|
- Test your font in special dialog
|
||||||
|
|
||||||
|
Requires:
|
||||||
|
- Windows 7+
|
||||||
|
- .NET 9
|
||||||
|
|
||||||
|
Some basic hints on the interface:
|
||||||
|
- Mouse 1 to mark a pixel black
|
||||||
|
- Mouse 2 to mark a pixel white
|
||||||
|
- Drag the mouse holding a button to draw pixels
|
||||||
|
- Hold Shift to constrain painting horizontally
|
||||||
|
- Hold Ctrl to constrain painting vertically
|
||||||
|
- Mouse Scroll to scroll up and down
|
||||||
|
- Shift + scroll to scroll left and right
|
||||||
|
- Crtl + scroll to zoom
|
||||||
|
- Alt + Scroll to change painting brush size
|
||||||
|
- When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
|
||||||
|
|
||||||
|
Download in the [Releases](https://gitea.mcflyer.ru/McFLY/McBitFont/releases) section!
|
||||||
|
|
||||||
|
Library example instructions to implement to STM32 code: [mctext](STM32_HAL_Lib/README.md)
|
||||||
|
|
||||||
|
#### Important:
|
||||||
|
**Since v2.0 new save file format is implemented. You can use [McBitFont v1.7](https://gitea.mcflyer.ru/McFLY/McBitFont/releases/tag/v1.7) to convert old saved files to the new format.**
|
||||||
|
|
||||||
|
|
||||||
|
### Screenshots:
|
||||||
|
|
||||||
|
Main window
|
||||||
|
|
||||||
|

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

|
||||||
|
|
||||||
|
Font test dialog
|
||||||
|
|
||||||
|

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

|
||||||
|
|
||||||
|
Import Image dialog
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Code Shift dialog
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Font PNG export example
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Frame screenshot dialog
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
13
STM32_HAL_Lib/README.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# McText Library
|
||||||
|
|
||||||
|
- The library uses "Left to Right, Top to bottom" scan and "LSB Top" for pixels alignment
|
||||||
|
|
||||||
|
#### Instructions
|
||||||
|
|
||||||
|
To use the library you have to have a display driver with a function that paints a single pixel with X and Y coordinates and 0/1 color.<br>
|
||||||
|
Find "SET A FUNCTION NAME HERE!" text in *mctext.c* file and change the function name that suits your driver.<br>
|
||||||
|
**Note:** it is possible that you will have to change parameters in the function to match your driver.
|
||||||
|
|
||||||
|
**Note:** check the "include" in *mctext.h* file to match your HAL. (stm32f1xx_hal.h is fo STM32F1 MCU series)
|
||||||
|
|
||||||
|
Now use **mct_String** function to draw a string of text.
|
113
STM32_HAL_Lib/mctext.c
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* mctext.c
|
||||||
|
*
|
||||||
|
* Created on: May 16, 2025
|
||||||
|
* Author: User
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "mctext.h"
|
||||||
|
#include "ST7565.h"
|
||||||
|
|
||||||
|
//=========================== SET A FUNCTION NAME HERE! ===========================//
|
||||||
|
// A function from display driver to set a pixel (x, y, color)
|
||||||
|
void (*mct_SetPixel)(uint8_t, uint8_t, uint8_t) = ST7565_SetPixel;
|
||||||
|
//=================================================================================//
|
||||||
|
|
||||||
|
|
||||||
|
// Draw a single character. Returns width of drawn character
|
||||||
|
uint8_t mct_CharT(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font, uint8_t transp) {
|
||||||
|
uint8_t pk = font[0]; // Is it a packed font?
|
||||||
|
uint8_t w = font[1]; // Font char width
|
||||||
|
uint8_t h = font[2]; // Font char height
|
||||||
|
uint8_t fc = font[4]; // First char code in the font
|
||||||
|
uint8_t lc = font[5]; // Last char code in the font
|
||||||
|
uint8_t i, j, p, s, b, seg; // i-cur.column, j-cur.row of 8, p-rows of 8, s-height in cur.row of 8, b-cur.bit in cur.row, seg-byte.segment
|
||||||
|
uint8_t bps; // Bytes per symbol for packed fonts
|
||||||
|
uint16_t o; // Current offset
|
||||||
|
|
||||||
|
if (c < fc || c > lc) return 0;
|
||||||
|
if (x > LCDWIDTH) return 0;
|
||||||
|
if (y+h > LCDHEIGHT) return 0;
|
||||||
|
|
||||||
|
// Calc the offset for desired symbol
|
||||||
|
if (pk) { // The font is packed
|
||||||
|
if (w) { // The font is monospaced
|
||||||
|
bps = w*h/8; // Bytes per symbol
|
||||||
|
if ((w*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
o = FONT_HEADER+(c-fc)*bps; // Offset for desired symbol
|
||||||
|
} else { // The font is not monospaced
|
||||||
|
o = FONT_HEADER; // Starting offset
|
||||||
|
for (i=0; i<c-fc; i++) { // Going through every symbol
|
||||||
|
bps = font[o]*h/8; // Bytes per current symbol
|
||||||
|
if ((font[o]*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
o += bps + 1; // Adding symbol's width to the offset (+ width byte)
|
||||||
|
}
|
||||||
|
w = font[o]; // Desired symbol's width
|
||||||
|
o++; // Offset for desired symbol's data
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the packed symbol!
|
||||||
|
bps = w*h/8; // Bytes per current symbol
|
||||||
|
if ((w*h)%8 > 0) bps++; // Correction for the last byte
|
||||||
|
b = 0; // bit indexer in "current" byte
|
||||||
|
for (i=0; i<w; i++) { // Going through columns
|
||||||
|
if (x+i > LCDWIDTH) return i-1; // Check if we're out of display size
|
||||||
|
for (j=0; j<h; j++) { // Going through rows in column [i]
|
||||||
|
if (b == 0) seg = font[o];
|
||||||
|
if ((seg>>b) & 1) mct_SetPixel(x+i, y+j, color); // Paint the pixel
|
||||||
|
if (b < 7) b++; else {b = 0; o++;} // Track bits and bytes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { // The font is not packed
|
||||||
|
p = (h%8 > 0) ? h/8 + 1 : h/8; // Bytes in one column
|
||||||
|
if (w) { // The font is monospaced
|
||||||
|
o = FONT_HEADER+(c-fc)*w*p; // Offset for desired symbol
|
||||||
|
} else { // The font is not monospaced
|
||||||
|
o = FONT_HEADER; // Starting offset
|
||||||
|
for (i=0; i<c-fc; i++) { // Going through every symbol
|
||||||
|
o += font[o]*p + 1; // Adding symbol's width to the offset
|
||||||
|
}
|
||||||
|
w = font[o]; // Desired symbol's width
|
||||||
|
o++; // Offset for desired symbol's data
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the symbol
|
||||||
|
for (i=0; i<w; i++) { // Going through columns
|
||||||
|
if (x+i > LCDWIDTH) return i-1; // Check if we're out of display size
|
||||||
|
for (j=0; j<p; j++) { // Going through bytes in single column
|
||||||
|
s = (h - j*8 >= 8) ? 8 : (h - j*8) % 8; // Clac the amount of pixels in current byte
|
||||||
|
|
||||||
|
seg = font[o];
|
||||||
|
for (b=0; b<s; b++) { // Going through the byte and paint the pixel if the bit is 1
|
||||||
|
if ((seg>>b) & 1) mct_SetPixel(x+i, y+j*8+b, color);
|
||||||
|
else if (!transp) mct_SetPixel(x+i, y+j*8+b, !color);
|
||||||
|
}
|
||||||
|
o++;
|
||||||
|
}
|
||||||
|
//mct_SetPixel(x+i, y, color); // For testing purposes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a single character. Transparent background. Returns width of drawn character
|
||||||
|
uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font) {
|
||||||
|
return mct_CharT(x, y, c, color, font, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a string of characters
|
||||||
|
void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font) {
|
||||||
|
uint8_t w = font[1]; // Font char width
|
||||||
|
uint8_t h = font[2]; // Font char height
|
||||||
|
uint8_t s = font[3]; // Font space between characters
|
||||||
|
|
||||||
|
if (y+h > LCDHEIGHT) return;
|
||||||
|
while (c[0] != 0) {
|
||||||
|
if (x+w > LCDWIDTH) return;
|
||||||
|
w = mct_Char(x, y, (unsigned char)*c, color, font);
|
||||||
|
c++;
|
||||||
|
x += w + s;
|
||||||
|
}
|
||||||
|
}
|
21
STM32_HAL_Lib/mctext.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* mctext.h
|
||||||
|
*
|
||||||
|
* Created on: May 16, 2025
|
||||||
|
* Author: User
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INC_MCTEXT_H_
|
||||||
|
#define INC_MCTEXT_H_
|
||||||
|
|
||||||
|
#include "stm32f1xx_hal.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Draw a single character. Returns width of drawn character
|
||||||
|
uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font);
|
||||||
|
|
||||||
|
// Draw a string of characters
|
||||||
|
void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font);
|
||||||
|
|
||||||
|
#endif /* INC_MCTEXT_H_ */
|
14
TODO.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Application:
|
||||||
|
- Consider migrating to WPF in order to make DPI aware UI
|
||||||
|
V Special cursor to indicate baseline set
|
||||||
|
V Special cursor when dragging canvas with middle mouse button
|
||||||
|
|
||||||
|
Functionality:
|
||||||
|
V Show note field in Export comments
|
||||||
|
V When Rectangle selection tool is active hold Ctrl+Alt to temporary disable it to be able to draw
|
||||||
|
V Frame screenshot can be copied to clipboard with some limitations (no transparency)
|
||||||
|
V Beside Baseline, also make top and mid lines
|
||||||
|
|
||||||
|
Bugs:
|
||||||
|
V Fixed "Frame modified" check. It leaves modified flag if user refused to save changes.
|
||||||
|
V Middle mouse button tries to change selection while dragging canvas with rectSelection tool active
|