WIP: a step to migrate (working on saves)
This commit is contained in:
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.5.33530.505
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "McBitFont", "McBitFont\McBitFont.csproj", "{7C01529E-4414-405F-9B57-19FA4AF8ED60}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SavedFontsConverter", "SavedFontsConverter\SavedFontsConverter.csproj", "{3FBF35B9-8A24-422B-A825-8628FDD2EA86}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -15,6 +17,10 @@ Global
|
||||
{7C01529E-4414-405F-9B57-19FA4AF8ED60}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7C01529E-4414-405F-9B57-19FA4AF8ED60}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7C01529E-4414-405F-9B57-19FA4AF8ED60}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3FBF35B9-8A24-422B-A825-8628FDD2EA86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3FBF35B9-8A24-422B-A825-8628FDD2EA86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3FBF35B9-8A24-422B-A825-8628FDD2EA86}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3FBF35B9-8A24-422B-A825-8628FDD2EA86}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -1,17 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7C01529E-4414-405F-9B57-19FA4AF8ED60}</ProjectGuid>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>McBitFont</RootNamespace>
|
||||
<AssemblyName>McBitFont</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -27,170 +17,15 @@
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<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 Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
<ApplicationIcon>icon_64.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="About.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="About.Designer.cs">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export.Designer.cs">
|
||||
<DependentUpon>Export.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="New.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="New.Designer.cs">
|
||||
<DependentUpon>New.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="About.resx">
|
||||
<DependentUpon>About.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export.resx">
|
||||
<DependentUpon>Export.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="New.resx">
|
||||
<DependentUpon>New.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</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>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_check.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Shape-flip-vertical.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Shape-flip-horizontal.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-paste.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-copy.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Door-out.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Disk.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Page-white.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Folder-page.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Famfamfam-Silk-Folder.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Ionic-Ionicons-Invert-mode-outline.16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="icon_64.ico" />
|
||||
<None Include="Resources\icon_64.png" />
|
||||
<None Include="Resources\icon_32.png" />
|
||||
<None Include="Resources\icon.png" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
@@ -204,5 +39,4 @@
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Общие сведения об этой сборке предоставляются следующим набором
|
||||
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
|
||||
// связанных со сборкой.
|
||||
[assembly: AssemblyTitle("McBitFont")]
|
||||
[assembly: AssemblyDescription("McFLY's Bit Font and Image Editor")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("McBitFont")]
|
||||
[assembly: AssemblyCopyright("© Anton Mukhin, 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.6.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0.0")]
|
147
SavedFontsConverter/Form1.Designer.cs
generated
Normal file
147
SavedFontsConverter/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,147 @@
|
||||
namespace SavedFontsConverter
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <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() {
|
||||
dlgOpen = new OpenFileDialog();
|
||||
dlgSave = new SaveFileDialog();
|
||||
btnOpen = new Button();
|
||||
btnConvert = new Button();
|
||||
lblPathOriginal = new Label();
|
||||
tbPathNew = new TextBox();
|
||||
btnPath = new Button();
|
||||
tbInfo = new TextBox();
|
||||
lblInfo = new Label();
|
||||
SuspendLayout();
|
||||
//
|
||||
// dlgOpen
|
||||
//
|
||||
dlgOpen.FileName = "font.mbf";
|
||||
//
|
||||
// btnOpen
|
||||
//
|
||||
btnOpen.Font = new Font("Segoe UI Semibold", 11.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
|
||||
btnOpen.Location = new Point(10, 10);
|
||||
btnOpen.Name = "btnOpen";
|
||||
btnOpen.Size = new Size(100, 30);
|
||||
btnOpen.TabIndex = 0;
|
||||
btnOpen.Text = "Load File";
|
||||
btnOpen.UseVisualStyleBackColor = true;
|
||||
btnOpen.Click += btnOpen_Click;
|
||||
//
|
||||
// btnConvert
|
||||
//
|
||||
btnConvert.Font = new Font("Segoe UI Semibold", 11.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
|
||||
btnConvert.Location = new Point(10, 132);
|
||||
btnConvert.Name = "btnConvert";
|
||||
btnConvert.Size = new Size(100, 30);
|
||||
btnConvert.TabIndex = 1;
|
||||
btnConvert.Text = "Convert!";
|
||||
btnConvert.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblPathOriginal
|
||||
//
|
||||
lblPathOriginal.AutoSize = true;
|
||||
lblPathOriginal.Location = new Point(116, 19);
|
||||
lblPathOriginal.Name = "lblPathOriginal";
|
||||
lblPathOriginal.Size = new Size(32, 15);
|
||||
lblPathOriginal.TabIndex = 2;
|
||||
lblPathOriginal.Text = "<...>";
|
||||
//
|
||||
// tbPathNew
|
||||
//
|
||||
tbPathNew.Location = new Point(10, 168);
|
||||
tbPathNew.Name = "tbPathNew";
|
||||
tbPathNew.Size = new Size(439, 23);
|
||||
tbPathNew.TabIndex = 3;
|
||||
//
|
||||
// btnPath
|
||||
//
|
||||
btnPath.Location = new Point(455, 167);
|
||||
btnPath.Name = "btnPath";
|
||||
btnPath.Size = new Size(28, 23);
|
||||
btnPath.TabIndex = 4;
|
||||
btnPath.Text = "...";
|
||||
btnPath.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tbInfo
|
||||
//
|
||||
tbInfo.BorderStyle = BorderStyle.FixedSingle;
|
||||
tbInfo.Location = new Point(116, 43);
|
||||
tbInfo.Multiline = true;
|
||||
tbInfo.Name = "tbInfo";
|
||||
tbInfo.ReadOnly = true;
|
||||
tbInfo.Size = new Size(200, 82);
|
||||
tbInfo.TabIndex = 5;
|
||||
tbInfo.TabStop = false;
|
||||
tbInfo.Text = "Mospaced / Variable width\r\nFrames number / Single\r\nCodepage";
|
||||
//
|
||||
// lblInfo
|
||||
//
|
||||
lblInfo.AutoSize = true;
|
||||
lblInfo.Location = new Point(58, 43);
|
||||
lblInfo.Name = "lblInfo";
|
||||
lblInfo.Size = new Size(52, 15);
|
||||
lblInfo.TabIndex = 6;
|
||||
lblInfo.Text = "File Info:";
|
||||
lblInfo.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(96F, 96F);
|
||||
AutoScaleMode = AutoScaleMode.Dpi;
|
||||
ClientSize = new Size(490, 207);
|
||||
Controls.Add(lblInfo);
|
||||
Controls.Add(tbInfo);
|
||||
Controls.Add(btnPath);
|
||||
Controls.Add(tbPathNew);
|
||||
Controls.Add(lblPathOriginal);
|
||||
Controls.Add(btnConvert);
|
||||
Controls.Add(btnOpen);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
Name = "Form1";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "McBitFont: Saved Font Converter";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private OpenFileDialog dlgOpen;
|
||||
private SaveFileDialog dlgSave;
|
||||
private Button btnOpen;
|
||||
private Button btnConvert;
|
||||
private Label lblPathOriginal;
|
||||
private TextBox tbPathNew;
|
||||
private Button btnPath;
|
||||
private TextBox tbInfo;
|
||||
private Label lblInfo;
|
||||
}
|
||||
}
|
96
SavedFontsConverter/Form1.cs
Normal file
96
SavedFontsConverter/Form1.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace SavedFontsConverter
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
//sealed class PreMergeToMergedDeserializationBinder : SerializationBinder {
|
||||
// public override Type BindToType(string assemblyName, string typeName) {
|
||||
// Type typeToDeserialize = null;
|
||||
|
||||
// // For each assemblyName/typeName that you want to deserialize to
|
||||
// // a different type, set typeToDeserialize to the desired type.
|
||||
// //String exeAssembly = Assembly.GetExecutingAssembly().FullName;
|
||||
// String exeAssembly = "McBitFont, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null";
|
||||
// //MessageBox.Show(exeAssembly);
|
||||
|
||||
// // The following line of code returns the type.
|
||||
// typeToDeserialize = Type.GetType(String.Format("{0}, {1}", typeName, exeAssembly));
|
||||
|
||||
// return typeToDeserialize;
|
||||
// }
|
||||
//}
|
||||
|
||||
public class CustomSerializationBinder : SerializationBinder {
|
||||
public override Type BindToType(string assemblyName, string typeName) {
|
||||
Assembly.GetExecutingAssembly().GetType(typeName)
|
||||
return Assembly.GetExecutingAssembly().GetType(typeName);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct FrameMiniature
|
||||
{
|
||||
public FrameMiniature(int cc, int ww, int hh)
|
||||
{
|
||||
code = cc;
|
||||
width = ww;
|
||||
height = hh;
|
||||
data = new bool[ww, hh];
|
||||
}
|
||||
public int code;
|
||||
public int width;
|
||||
public int height;
|
||||
public bool[,] data;
|
||||
};
|
||||
|
||||
[Serializable]
|
||||
public struct SaveBlock
|
||||
{
|
||||
public bool monospaced;
|
||||
public int codepage;
|
||||
public int baseline;
|
||||
public List<FrameMiniature> frames;
|
||||
}
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void oldLoad(string filename)
|
||||
{
|
||||
// Disable the warning.
|
||||
#pragma warning disable SYSLIB0011
|
||||
|
||||
SaveBlock sav;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
formatter.Binder = new CustomSerializationBinder();
|
||||
|
||||
using (FileStream fs = File.Open(filename, FileMode.Open)) {
|
||||
sav = (SaveBlock)formatter.Deserialize(fs);
|
||||
fs.Close();
|
||||
}
|
||||
tbInfo.Clear();
|
||||
tbInfo.AppendText("Monospaced: " + sav.monospaced.ToString() + "\n");
|
||||
tbInfo.AppendText("Codepage: " + sav.codepage.ToString() + "\n");
|
||||
tbInfo.AppendText("Frames: " + sav.frames.Count.ToString() + "\n");
|
||||
// Re-enable the warning.
|
||||
#pragma warning restore SYSLIB0011
|
||||
}
|
||||
|
||||
private void btnOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dlgOpen.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
lblPathOriginal.Text = dlgOpen.FileName;
|
||||
oldLoad(dlgOpen.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
126
SavedFontsConverter/Form1.resx
Normal file
126
SavedFontsConverter/Form1.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="dlgOpen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dlgSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>156, 17</value>
|
||||
</metadata>
|
||||
</root>
|
17
SavedFontsConverter/Program.cs
Normal file
17
SavedFontsConverter/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace SavedFontsConverter
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
12
SavedFontsConverter/SavedFontsConverter.csproj
Normal file
12
SavedFontsConverter/SavedFontsConverter.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
3
TODO.txt
3
TODO.txt
@@ -1,5 +1,8 @@
|
||||
Application:
|
||||
v Implement "Save" menu
|
||||
- Migrate to .NET
|
||||
- Migrate saves to MessagePack/protobuf-net
|
||||
https://learn.microsoft.com/en-us/dotnet/standard/serialization/binaryformatter-migration-guide/choose-a-serializer
|
||||
|
||||
Functionality:
|
||||
- Context menu in symbol navigator
|
||||
|
Reference in New Issue
Block a user