Commit 5b90a83e authored by Alexander Dietsch's avatar Alexander Dietsch

loopwhile language:

Added 'preprocessor' commands:
-#LOOP/#WHILE to indicate what type of program it is
-#MAXREG to indicate how many registers will be needed at most

Mainsimulator:
-Added ability to only execute program for x steps
-Attempts to load/save options in a local file, so they stay the same over
multiple runs
-Minor fixes to register handling

GUI:
-Nearly everything does, what it is supposed to do now
-No fixes for the linux issues yet

Console Version:
-This version allows to start GUI by console and displays help
parent 4036a92b
......@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LWSimulatorGUI", "LWSimulat
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MainLWSimulator", "MainLWSimulator\MainLWSimulator.csproj", "{EDB87D7D-56A9-40FA-912F-F2DFC530FA38}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LWSimulatorCons", "LWSimulatorCons\LWSimulatorCons.csproj", "{6E4E1071-0802-4610-9178-09D3C57F755D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -91,6 +93,38 @@ Global
{EDB87D7D-56A9-40FA-912F-F2DFC530FA38}.Release|Net40.Build.0 = Release|Any CPU
{EDB87D7D-56A9-40FA-912F-F2DFC530FA38}.Release|WithNRefactory.ActiveCfg = Release|Any CPU
{EDB87D7D-56A9-40FA-912F-F2DFC530FA38}.Release|WithNRefactory.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Net35.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Net35.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Net40.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|Net40.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|WithNRefactory.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Debug|WithNRefactory.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Net35.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Net35.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Net40.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|Net40.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|WithNRefactory.ActiveCfg = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Debug|WithNRefactory.Build.0 = Debug|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Any CPU.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Any CPU.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Net35.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Net35.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Net40.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|Net40.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|WithNRefactory.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.net_4_5_Release|WithNRefactory.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Any CPU.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Net35.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Net35.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Net40.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|Net40.Build.0 = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|WithNRefactory.ActiveCfg = Release|Any CPU
{6E4E1071-0802-4610-9178-09D3C57F755D}.Release|WithNRefactory.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6E4E1071-0802-4610-9178-09D3C57F755D}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LWSimulatorCons</RootNamespace>
<AssemblyName>LWSimulator</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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>
<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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NDesk.Options;
using System.Diagnostics;
using System.IO;
namespace LWSimulatorCons
{
class Program
{
private const int amInputErrors = 4;
static void Main(string[] args)
{
bool show_help = false;
bool gui = false;
long limitRegisters = long.MaxValue;
long limitSteps = 0;
bool errorInd = false;
bool[] errors = new bool[amInputErrors];
OptionSet opt = new OptionSet() {
{
"G|GUI", "start the simulator in a GUI and ignore all other options",
v => gui = v != null },
{
"R|limit-registers=", "limit the number of registers that any program is allowed to use at most; default is 100",
v => {
if (!tryParseValue(v,out limitRegisters))
{
errorInd = true;
errors[0] = true;
}
} },
{
"S|limit-steps=", "limit the number of steps that any program is allowed to do before being interrupted at most; default is 0 (off)",
v => {
if (!tryParseValue(v,out limitSteps))
{
errorInd = true;
errors[2] = true;
}
} },
{
"h|help", "show this message and exit",
v => show_help = v != null },
};
List<string> extra;
try
{
extra = opt.Parse(args);
}
catch (OptionException e)
{
Console.Write("LWSimulator: ");
Console.WriteLine(e.Message);
printUsage();
return;
}
if (gui)
{
string path = AppDomain.CurrentDomain.BaseDirectory + "LWSimulatorGUI.exe";
if (!File.Exists(path))
{
Console.WriteLine(path);
Console.WriteLine("Unable to locate GUI.");
}
else
Process.Start(new ProcessStartInfo(
path,
"")
{ UseShellExecute = false });
#if (DEBUG)
Console.ReadLine();
#endif
return;
}
if (limitRegisters <= 0 && !errors[0])
{
errorInd = true;
errors[1] = true;
}
else
{
}
if(limitSteps < 0 && !errors[2])
{
errorInd = true;
errors[3] = true;
}
else
{
}
if(errorInd)
{
Console.WriteLine("LWSimulator: Following errors occured:");
if (errors[0])
Console.WriteLine("\t-Couldn't parse the maximum number of registers");
if (errors[1])
Console.WriteLine("\t-Invalid number for maximum amount of registers");
if (errors[2])
Console.WriteLine("\t-Couldn't parse the maximum number of steps");
if (errors[3])
Console.WriteLine("\t-Invalid number for maximum amount of steps");
#if (DEBUG)
Console.ReadLine();
#endif
return;
}
if (show_help)
{
showHelp(opt);
#if (DEBUG)
Console.ReadLine();
#endif
return;
}
#if (DEBUG)
Console.ReadLine();
#endif
}
static void printUsage()
{
Console.WriteLine("Usage: lwsimulator.exe [OPTIONS]+");
Console.WriteLine("Starts the Loop-While-Simulator with specific options");
}
static void showHelp(OptionSet p)
{
printUsage();
Console.WriteLine();
Console.WriteLine("Options:");
p.WriteOptionDescriptions(Console.Out);
}
static bool tryParseValue(string s, out long value)
{
value = -1;
if (!long.TryParse(s, out value))
return false;
return true;
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LWSimulatorCons")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LWSimulatorCons")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("6e4e1071-0802-4610-9178-09d3c57f755d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
namespace LWSimulatorGUI
{
partial class InsertRegisters
{
/// <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.lInsert = new System.Windows.Forms.Label();
this.nUDRegisterAm = new System.Windows.Forms.NumericUpDown();
this.lRegisters = new System.Windows.Forms.Label();
this.rBToEnd = new System.Windows.Forms.RadioButton();
this.rBBeforeReg = new System.Windows.Forms.RadioButton();
this.nUDRegister = new System.Windows.Forms.NumericUpDown();
this.bPrefOK = new System.Windows.Forms.Button();
this.bPrefCancel = new System.Windows.Forms.Button();
this.nUDValue = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.nUDRegisterAm)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDRegister)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDValue)).BeginInit();
this.SuspendLayout();
//
// lInsert
//
this.lInsert.AutoSize = true;
this.lInsert.Location = new System.Drawing.Point(9, 25);
this.lInsert.Name = "lInsert";
this.lInsert.Size = new System.Drawing.Size(33, 13);
this.lInsert.TabIndex = 0;
this.lInsert.Text = "Insert";
//
// nUDRegisterAm
//
this.nUDRegisterAm.Location = new System.Drawing.Point(41, 23);
this.nUDRegisterAm.Name = "nUDRegisterAm";
this.nUDRegisterAm.Size = new System.Drawing.Size(59, 20);
this.nUDRegisterAm.TabIndex = 1;
//
// lRegisters
//
this.lRegisters.AutoSize = true;
this.lRegisters.Location = new System.Drawing.Point(106, 25);
this.lRegisters.Name = "lRegisters";
this.lRegisters.Size = new System.Drawing.Size(115, 13);
this.lRegisters.TabIndex = 2;
this.lRegisters.Text = "registers with the value";
//
// rBToEnd
//
this.rBToEnd.AutoSize = true;
this.rBToEnd.Location = new System.Drawing.Point(12, 93);
this.rBToEnd.Name = "rBToEnd";
this.rBToEnd.Size = new System.Drawing.Size(102, 17);
this.rBToEnd.TabIndex = 3;
this.rBToEnd.TabStop = true;
this.rBToEnd.Text = "after last register";
this.rBToEnd.UseVisualStyleBackColor = true;
//
// rBBeforeReg
//
this.rBBeforeReg.AutoSize = true;
this.rBBeforeReg.Checked = true;
this.rBBeforeReg.Location = new System.Drawing.Point(12, 58);
this.rBBeforeReg.Name = "rBBeforeReg";
this.rBBeforeReg.Size = new System.Drawing.Size(100, 17);
this.rBBeforeReg.TabIndex = 4;
this.rBBeforeReg.TabStop = true;
this.rBBeforeReg.Text = "before register x";
this.rBBeforeReg.UseVisualStyleBackColor = true;
this.rBBeforeReg.CheckedChanged += new System.EventHandler(this.rBBeforeReg_CheckedChanged);
//
// nUDRegister
//
this.nUDRegister.Location = new System.Drawing.Point(109, 58);
this.nUDRegister.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.nUDRegister.Name = "nUDRegister";
this.nUDRegister.Size = new System.Drawing.Size(54, 20);
this.nUDRegister.TabIndex = 5;
//
// bPrefOK
//
this.bPrefOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bPrefOK.Location = new System.Drawing.Point(180, 140);
this.bPrefOK.Name = "bPrefOK";
this.bPrefOK.Size = new System.Drawing.Size(75, 23);
this.bPrefOK.TabIndex = 6;
this.bPrefOK.Text = "OK";
this.bPrefOK.UseVisualStyleBackColor = true;
this.bPrefOK.Click += new System.EventHandler(this.bPrefOK_Click);
//
// bPrefCancel
//
this.bPrefCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.bPrefCancel.Location = new System.Drawing.Point(261, 140);
this.bPrefCancel.Name = "bPrefCancel";
this.bPrefCancel.Size = new System.Drawing.Size(75, 23);
this.bPrefCancel.TabIndex = 7;
this.bPrefCancel.Text = "Cancel";
this.bPrefCancel.UseVisualStyleBackColor = true;
this.bPrefCancel.Click += new System.EventHandler(this.bPrefCancel_Click);
//
// nUDValue
//
this.nUDValue.Location = new System.Drawing.Point(227, 23);
this.nUDValue.Maximum = new decimal(new int[] {
276447231,
23283,
0,
0});
this.nUDValue.Name = "nUDValue";
this.nUDValue.Size = new System.Drawing.Size(106, 20);
this.nUDValue.TabIndex = 8;
//
// InsertRegisters
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(348, 175);
this.Controls.Add(this.nUDValue);
this.Controls.Add(this.bPrefCancel);
this.Controls.Add(this.bPrefOK);
this.Controls.Add(this.nUDRegister);
this.Controls.Add(this.rBBeforeReg);
this.Controls.Add(this.rBToEnd);
this.Controls.Add(this.lRegisters);
this.Controls.Add(this.nUDRegisterAm);
this.Controls.Add(this.lInsert);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "InsertRegisters";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Insert Registers";
((System.ComponentModel.ISupportInitialize)(this.nUDRegisterAm)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDRegister)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDValue)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lInsert;
private System.Windows.Forms.NumericUpDown nUDRegisterAm;
private System.Windows.Forms.Label lRegisters;
private System.Windows.Forms.RadioButton rBToEnd;
private System.Windows.Forms.RadioButton rBBeforeReg;
private System.Windows.Forms.NumericUpDown nUDRegister;
private System.Windows.Forms.Button bPrefOK;
private System.Windows.Forms.Button bPrefCancel;
private System.Windows.Forms.NumericUpDown nUDValue;
}
}
\ No newline at end of file
using MainLWSimulator;
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 LWSimulatorGUI
{
public partial class InsertRegisters : Form
{
LWCoordinator simul;
public InsertRegisters(LWCoordinator coord)
{
InitializeComponent();
simul = coord;
nUDValue.Value = simul.getOptionVal("defRegVal");
}
private void rBBeforeReg_CheckedChanged(object sender, EventArgs e)
{
nUDRegister.Enabled = rBBeforeReg.Checked;
}
private void bPrefOK_Click(object sender, EventArgs e)
{
if (rBBeforeReg.Checked)
simul.insertRegisters((int)nUDRegister.Value,(int)nUDRegisterAm.Value,(long)nUDValue.Value);
else
simul.insertRegisters(simul.getRegisterAmount(), (int)nUDRegisterAm.Value, (long)nUDValue.Value);
this.Close();
}
private void bPrefCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
<?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.