mirror of
https://github.com/chylex/Brotli-Builder.git
synced 2025-05-09 14:34:10 +02:00
Add the main Form w/ layout, menu, status bar, and basic logic
This commit is contained in:
parent
2c140680b3
commit
05650e66ff
@ -45,6 +45,12 @@
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FormMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormMain.Designer.cs">
|
||||
<DependentUpon>FormMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utils\AsyncWorker.cs" />
|
||||
@ -75,5 +81,10 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FormMain.resx">
|
||||
<DependentUpon>FormMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
237
BrotliBuilder/FormMain.Designer.cs
generated
Normal file
237
BrotliBuilder/FormMain.Designer.cs
generated
Normal file
@ -0,0 +1,237 @@
|
||||
namespace BrotliBuilder {
|
||||
partial class FormMain {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) {
|
||||
if (disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.mainMenu = new System.Windows.Forms.MainMenu(this.components);
|
||||
this.menuItemFile = new System.Windows.Forms.MenuItem();
|
||||
this.menuItemOpen = new System.Windows.Forms.MenuItem();
|
||||
this.menuItemSave = new System.Windows.Forms.MenuItem();
|
||||
this.menuItemExit = new System.Windows.Forms.MenuItem();
|
||||
this.flowPanelBlocks = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.textBoxBitStream = new System.Windows.Forms.RichTextBox();
|
||||
this.labelBitStream = new System.Windows.Forms.Label();
|
||||
this.labelDecompressedOutput = new System.Windows.Forms.Label();
|
||||
this.textBoxDecompressedOutput = new System.Windows.Forms.RichTextBox();
|
||||
this.statusBar = new System.Windows.Forms.StatusBar();
|
||||
this.statusBarPanelPadding1 = new System.Windows.Forms.StatusBarPanel();
|
||||
this.statusBarPanelTimeBits = new System.Windows.Forms.StatusBarPanel();
|
||||
this.statusBarPanelPadding2 = new System.Windows.Forms.StatusBarPanel();
|
||||
this.statusBarPanelTimeOutput = new System.Windows.Forms.StatusBarPanel();
|
||||
this.timerRegenerationDelay = new System.Windows.Forms.Timer(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelPadding1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelTimeBits)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelPadding2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelTimeOutput)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainMenu
|
||||
//
|
||||
this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
|
||||
this.menuItemFile});
|
||||
//
|
||||
// menuItemFile
|
||||
//
|
||||
this.menuItemFile.Index = 0;
|
||||
this.menuItemFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
|
||||
this.menuItemOpen,
|
||||
this.menuItemSave,
|
||||
this.menuItemExit});
|
||||
this.menuItemFile.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
|
||||
this.menuItemFile.Text = "&File";
|
||||
//
|
||||
// menuItemOpen
|
||||
//
|
||||
this.menuItemOpen.Index = 0;
|
||||
this.menuItemOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
|
||||
this.menuItemOpen.Text = "Open";
|
||||
this.menuItemOpen.Click += new System.EventHandler(this.menuItemOpen_Click);
|
||||
//
|
||||
// menuItemSave
|
||||
//
|
||||
this.menuItemSave.Index = 1;
|
||||
this.menuItemSave.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
|
||||
this.menuItemSave.Text = "Save";
|
||||
this.menuItemSave.Click += new System.EventHandler(this.menuItemSave_Click);
|
||||
//
|
||||
// menuItemExit
|
||||
//
|
||||
this.menuItemExit.Index = 2;
|
||||
this.menuItemExit.Text = "Exit";
|
||||
this.menuItemExit.Click += new System.EventHandler(this.menuItemExit_Click);
|
||||
//
|
||||
// flowPanelBlocks
|
||||
//
|
||||
this.flowPanelBlocks.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.flowPanelBlocks.AutoScroll = true;
|
||||
this.flowPanelBlocks.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.flowPanelBlocks.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowPanelBlocks.Margin = new System.Windows.Forms.Padding(0, 0, 0, 12);
|
||||
this.flowPanelBlocks.Name = "flowPanelBlocks";
|
||||
this.flowPanelBlocks.Size = new System.Drawing.Size(1008, 424);
|
||||
this.flowPanelBlocks.TabIndex = 0;
|
||||
this.flowPanelBlocks.WrapContents = false;
|
||||
//
|
||||
// textBoxBitStream
|
||||
//
|
||||
this.textBoxBitStream.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxBitStream.DetectUrls = false;
|
||||
this.textBoxBitStream.Font = new System.Drawing.Font("Consolas", 9.75F);
|
||||
this.textBoxBitStream.Location = new System.Drawing.Point(12, 458);
|
||||
this.textBoxBitStream.Margin = new System.Windows.Forms.Padding(3, 3, 3, 9);
|
||||
this.textBoxBitStream.Name = "textBoxBitStream";
|
||||
this.textBoxBitStream.ReadOnly = true;
|
||||
this.textBoxBitStream.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.textBoxBitStream.Size = new System.Drawing.Size(984, 96);
|
||||
this.textBoxBitStream.TabIndex = 2;
|
||||
this.textBoxBitStream.Text = "";
|
||||
//
|
||||
// labelBitStream
|
||||
//
|
||||
this.labelBitStream.AutoSize = true;
|
||||
this.labelBitStream.Location = new System.Drawing.Point(9, 440);
|
||||
this.labelBitStream.Name = "labelBitStream";
|
||||
this.labelBitStream.Size = new System.Drawing.Size(61, 15);
|
||||
this.labelBitStream.TabIndex = 1;
|
||||
this.labelBitStream.Text = "Bit Stream";
|
||||
//
|
||||
// labelDecompressedOutput
|
||||
//
|
||||
this.labelDecompressedOutput.AutoSize = true;
|
||||
this.labelDecompressedOutput.Location = new System.Drawing.Point(9, 563);
|
||||
this.labelDecompressedOutput.Name = "labelDecompressedOutput";
|
||||
this.labelDecompressedOutput.Size = new System.Drawing.Size(126, 15);
|
||||
this.labelDecompressedOutput.TabIndex = 3;
|
||||
this.labelDecompressedOutput.Text = "Decompressed Output";
|
||||
//
|
||||
// textBoxDecompressedOutput
|
||||
//
|
||||
this.textBoxDecompressedOutput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxDecompressedOutput.DetectUrls = false;
|
||||
this.textBoxDecompressedOutput.Font = new System.Drawing.Font("Consolas", 9.75F);
|
||||
this.textBoxDecompressedOutput.Location = new System.Drawing.Point(12, 581);
|
||||
this.textBoxDecompressedOutput.Margin = new System.Windows.Forms.Padding(3, 3, 3, 12);
|
||||
this.textBoxDecompressedOutput.Name = "textBoxDecompressedOutput";
|
||||
this.textBoxDecompressedOutput.ReadOnly = true;
|
||||
this.textBoxDecompressedOutput.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.textBoxDecompressedOutput.Size = new System.Drawing.Size(984, 96);
|
||||
this.textBoxDecompressedOutput.TabIndex = 4;
|
||||
this.textBoxDecompressedOutput.Text = "";
|
||||
//
|
||||
// statusBar
|
||||
//
|
||||
this.statusBar.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.statusBar.Location = new System.Drawing.Point(0, 687);
|
||||
this.statusBar.Name = "statusBar";
|
||||
this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
|
||||
this.statusBarPanelPadding1,
|
||||
this.statusBarPanelTimeBits,
|
||||
this.statusBarPanelPadding2,
|
||||
this.statusBarPanelTimeOutput});
|
||||
this.statusBar.ShowPanels = true;
|
||||
this.statusBar.Size = new System.Drawing.Size(1008, 22);
|
||||
this.statusBar.SizingGrip = false;
|
||||
this.statusBar.TabIndex = 5;
|
||||
//
|
||||
// statusBarPanelPadding1
|
||||
//
|
||||
this.statusBarPanelPadding1.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
|
||||
this.statusBarPanelPadding1.MinWidth = 12;
|
||||
this.statusBarPanelPadding1.Name = "statusBarPanelPadding1";
|
||||
this.statusBarPanelPadding1.Width = 12;
|
||||
//
|
||||
// statusBarPanelTimeBits
|
||||
//
|
||||
this.statusBarPanelTimeBits.Name = "statusBarPanelTimeBits";
|
||||
this.statusBarPanelTimeBits.Width = 200;
|
||||
//
|
||||
// statusBarPanelPadding2
|
||||
//
|
||||
this.statusBarPanelPadding2.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
|
||||
this.statusBarPanelPadding2.MinWidth = 9;
|
||||
this.statusBarPanelPadding2.Name = "statusBarPanelPadding2";
|
||||
this.statusBarPanelPadding2.Width = 9;
|
||||
//
|
||||
// statusBarPanelTimeOutput
|
||||
//
|
||||
this.statusBarPanelTimeOutput.Name = "statusBarPanelTimeOutput";
|
||||
this.statusBarPanelTimeOutput.Width = 200;
|
||||
//
|
||||
// timerRegenerationDelay
|
||||
//
|
||||
this.timerRegenerationDelay.Interval = 300;
|
||||
this.timerRegenerationDelay.Tick += new System.EventHandler(this.timerRegenerationDelay_Tick);
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.ClientSize = new System.Drawing.Size(1008, 709);
|
||||
this.Controls.Add(this.statusBar);
|
||||
this.Controls.Add(this.textBoxDecompressedOutput);
|
||||
this.Controls.Add(this.labelDecompressedOutput);
|
||||
this.Controls.Add(this.labelBitStream);
|
||||
this.Controls.Add(this.textBoxBitStream);
|
||||
this.Controls.Add(this.flowPanelBlocks);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Menu = this.mainMenu;
|
||||
this.Name = "FormMain";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Brotli Builder";
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelPadding1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelTimeBits)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelPadding2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.statusBarPanelTimeOutput)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.MainMenu mainMenu;
|
||||
private System.Windows.Forms.MenuItem menuItemFile;
|
||||
private System.Windows.Forms.MenuItem menuItemExit;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowPanelBlocks;
|
||||
private System.Windows.Forms.RichTextBox textBoxBitStream;
|
||||
private System.Windows.Forms.MenuItem menuItemSave;
|
||||
private System.Windows.Forms.Label labelBitStream;
|
||||
private System.Windows.Forms.MenuItem menuItemOpen;
|
||||
private System.Windows.Forms.Label labelDecompressedOutput;
|
||||
private System.Windows.Forms.RichTextBox textBoxDecompressedOutput;
|
||||
private System.Windows.Forms.StatusBar statusBar;
|
||||
private System.Windows.Forms.StatusBarPanel statusBarPanelTimeBits;
|
||||
private System.Windows.Forms.StatusBarPanel statusBarPanelTimeOutput;
|
||||
private System.Windows.Forms.StatusBarPanel statusBarPanelPadding1;
|
||||
private System.Windows.Forms.StatusBarPanel statusBarPanelPadding2;
|
||||
private System.Windows.Forms.Timer timerRegenerationDelay;
|
||||
}
|
||||
}
|
126
BrotliBuilder/FormMain.cs
Normal file
126
BrotliBuilder/FormMain.cs
Normal file
@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using BrotliBuilder.Utils;
|
||||
using BrotliLib.Brotli;
|
||||
|
||||
namespace BrotliBuilder{
|
||||
partial class FormMain : Form{
|
||||
|
||||
// Instance
|
||||
|
||||
private BrotliFileStructure brotliFile = BrotliFileStructure.NewEmpty();
|
||||
private string lastFileName = "compressed";
|
||||
|
||||
private readonly AsyncWorker<string> workerStream;
|
||||
private readonly AsyncWorker<string> workerOutput;
|
||||
|
||||
public FormMain(){
|
||||
InitializeComponent();
|
||||
|
||||
textBoxBitStream.SetPlainTextMode();
|
||||
textBoxDecompressedOutput.SetPlainTextMode();
|
||||
|
||||
workerStream = new AsyncWorker<string>("GenBits");
|
||||
workerOutput = new AsyncWorker<string>("GenOutput");
|
||||
|
||||
SetupWorker(
|
||||
workerStream,
|
||||
textBoxBitStream,
|
||||
statusBarPanelTimeBits,
|
||||
ms => "Generated bit stream in " + ms + " ms.",
|
||||
() => "Error generating bit stream."
|
||||
);
|
||||
|
||||
SetupWorker(
|
||||
workerOutput,
|
||||
textBoxDecompressedOutput,
|
||||
statusBarPanelTimeOutput,
|
||||
ms => "Generated output in " + ms + " ms.",
|
||||
() => "Error generating output."
|
||||
);
|
||||
|
||||
OnNewBrotliFile();
|
||||
}
|
||||
|
||||
private void OnNewBrotliFile(){
|
||||
flowPanelBlocks.Controls.Clear();
|
||||
RegenerateBrotliStream();
|
||||
}
|
||||
|
||||
// Output generation
|
||||
|
||||
private void SetupWorker(AsyncWorker<string> worker, RichTextBox tb, StatusBarPanel status, Func<long, string> funcStatusTextSuccess, Func<string> funcStatusTextFailure){
|
||||
worker.WorkFinished += (sender, args) => {
|
||||
tb.ForeColor = SystemColors.WindowText;
|
||||
tb.Text = args.Result;
|
||||
status.Text = funcStatusTextSuccess(args.Stopwatch.ElapsedMilliseconds);
|
||||
};
|
||||
|
||||
worker.WorkCrashed += (sender, args) => {
|
||||
tb.ForeColor = Color.Red;
|
||||
tb.Text = Regex.Replace(args.Exception.ToString(), " in (.*):", " : ");
|
||||
status.Text = funcStatusTextFailure();
|
||||
};
|
||||
}
|
||||
|
||||
private void timerRegenerationDelay_Tick(object sender, EventArgs e){
|
||||
timerRegenerationDelay.Stop();
|
||||
|
||||
statusBarPanelTimeBits.Text = "Generating...";
|
||||
statusBarPanelTimeOutput.Text = "Generating...";
|
||||
|
||||
workerStream.Start(() => brotliFile.Serialize().ToString());
|
||||
workerOutput.Start(() => brotliFile.GetDecompressionState().OutputAsUTF8);
|
||||
}
|
||||
|
||||
private void RegenerateBrotliStream(){
|
||||
timerRegenerationDelay.Stop();
|
||||
timerRegenerationDelay.Start();
|
||||
}
|
||||
|
||||
// Menu events
|
||||
|
||||
private void menuItemOpen_Click(object sender, EventArgs e){
|
||||
using(OpenFileDialog dialog = new OpenFileDialog{
|
||||
Title = "Open Compressed File",
|
||||
Filter = "Brotli (*.br)|*.br|All Files (*.*)|*.*",
|
||||
FileName = lastFileName,
|
||||
DefaultExt = "br"
|
||||
}){
|
||||
if (dialog.ShowDialog() == DialogResult.OK){
|
||||
lastFileName = dialog.FileName;
|
||||
|
||||
try{
|
||||
brotliFile = BrotliFileStructure.FromBytes(File.ReadAllBytes(lastFileName));
|
||||
OnNewBrotliFile();
|
||||
}catch(Exception ex){
|
||||
Debug.WriteLine(ex.ToString());
|
||||
MessageBox.Show(ex.Message, "File Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void menuItemSave_Click(object sender, EventArgs e){
|
||||
using(SaveFileDialog dialog = new SaveFileDialog{
|
||||
Title = "Save Compressed File",
|
||||
Filter = "Brotli (*.br)|*.br|All Files (*.*)|*.*",
|
||||
FileName = lastFileName,
|
||||
DefaultExt = "br"
|
||||
}){
|
||||
if (dialog.ShowDialog() == DialogResult.OK){
|
||||
lastFileName = dialog.FileName;
|
||||
File.WriteAllBytes(lastFileName, brotliFile.Serialize().ToByteArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void menuItemExit_Click(object sender, EventArgs e){
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
126
BrotliBuilder/FormMain.resx
Normal file
126
BrotliBuilder/FormMain.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="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerRegenerationDelay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>127, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -1,12 +1,18 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BrotliBuilder{
|
||||
static class Program{
|
||||
[STAThread]
|
||||
private static void Main(){
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new FormMain());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user