Generated files saves and registers

This commit is contained in:
2015-07-17 15:19:11 +02:00
parent 83237693df
commit 691cbf23e3
9 changed files with 487 additions and 14 deletions

View File

@ -70,6 +70,12 @@
<Compile Include="qualifieldhlp.cs" /> <Compile Include="qualifieldhlp.cs" />
<Compile Include="RowWord.cs" /> <Compile Include="RowWord.cs" />
<Compile Include="S.cs" /> <Compile Include="S.cs" />
<Compile Include="SaveRegCopyFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SaveRegCopyFile.Designer.cs">
<DependentUpon>SaveRegCopyFile.cs</DependentUpon>
</Compile>
<Compile Include="SaverListener.cs" /> <Compile Include="SaverListener.cs" />
<Compile Include="ShowCode.cs"> <Compile Include="ShowCode.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@ -93,6 +99,9 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<EmbeddedResource Include="SaveRegCopyFile.resx">
<DependentUpon>SaveRegCopyFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ShowCode.resx"> <EmbeddedResource Include="ShowCode.resx">
<DependentUpon>ShowCode.cs</DependentUpon> <DependentUpon>ShowCode.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -98,6 +98,10 @@ namespace CobXmlSupport
tmpGS.SetSettings(); tmpGS.SetSettings();
setLocalValues(); setLocalValues();
} }
else
{
S.ettingList = null;
}
runXMLgen(); runXMLgen();
} }
@ -822,6 +826,13 @@ namespace CobXmlSupport
genCode = new ShowCode(); genCode = new ShowCode();
genCode.Parent = this; genCode.Parent = this;
genCode.Labeltext = "Creating Initialization Code"; genCode.Labeltext = "Creating Initialization Code";
savedFile SF = new savedFile();
SF.idConnect = "A472C801-2A7A-4A09-B432-8F16504964C3";
SF.usageName = "Usage007.cpy";
genCode.SavedFile = SF;
string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1); string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1);
CreateComment(genCode.CodeShower, "Initializer", S.ettingUserName, S.ettingCompany, inFile); CreateComment(genCode.CodeShower, "Initializer", S.ettingUserName, S.ettingCompany, inFile);
foreach (CobRow cr in rowList) foreach (CobRow cr in rowList)
@ -871,6 +882,12 @@ namespace CobXmlSupport
genCode = new ShowCode(); genCode = new ShowCode();
genCode.Parent = this; genCode.Parent = this;
genCode.Labeltext = "Creating Initialization Code"; genCode.Labeltext = "Creating Initialization Code";
savedFile SF = new savedFile();
SF.idConnect = "15E1040B-2206-4F02-8212-FE9DF6B209B8";
SF.usageName = "Usage008.cpy";
genCode.SavedFile = SF;
string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1); string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1);
CreateComment(genCode.CodeShower, "Initializer", S.ettingUserName, S.ettingCompany, inFile); CreateComment(genCode.CodeShower, "Initializer", S.ettingUserName, S.ettingCompany, inFile);
genCode.CodeShower.Text += "\r\n"; genCode.CodeShower.Text += "\r\n";
@ -1408,6 +1425,12 @@ namespace CobXmlSupport
genExtMoves = new ShowCode(); genExtMoves = new ShowCode();
genExtMoves.Parent = this; genExtMoves.Parent = this;
genExtMoves.Labeltext = "Creating \"move to (with loop)\" Code"; genExtMoves.Labeltext = "Creating \"move to (with loop)\" Code";
savedFile SF = new savedFile();
SF.idConnect = "6EFF8B31-7F88-4A81-B94E-41D54A3D3197";
SF.usageName = "Usage001.cpy";
genExtMoves.SavedFile = SF;
bool adj = false; bool adj = false;
int prfNiv = 0; int prfNiv = 0;
@ -1646,6 +1669,12 @@ namespace CobXmlSupport
fromMoves = new ShowCode(); fromMoves = new ShowCode();
fromMoves.Parent = this; fromMoves.Parent = this;
fromMoves.Labeltext = "Creating \"move from\" Code"; fromMoves.Labeltext = "Creating \"move from\" Code";
savedFile SF = new savedFile();
SF.idConnect = "9C3E8CC7-FA20-4E11-8E81-73BE8D2E9CFB";
SF.usageName = "Usage002.cpy";
fromMoves.SavedFile = SF;
bool adj = false; bool adj = false;
foreach (CobRow cr in rowList) foreach (CobRow cr in rowList)
@ -1817,6 +1846,12 @@ namespace CobXmlSupport
fromToMoves = new ShowCode(); fromToMoves = new ShowCode();
fromToMoves.Parent = this; fromToMoves.Parent = this;
fromToMoves.Labeltext = "Creating \"move From - To\" Code"; fromToMoves.Labeltext = "Creating \"move From - To\" Code";
savedFile SF = new savedFile();
SF.idConnect = "0A975654-75C6-4A8C-8534-AA16F46BC740";
SF.usageName = "Usage003.cpy";
fromMoves.SavedFile = SF;
bool adj = false; bool adj = false;
bool valueSwitch = false; bool valueSwitch = false;
@ -2067,6 +2102,12 @@ namespace CobXmlSupport
fromToMoves.Parent = this; fromToMoves.Parent = this;
fromToMoves.Labeltext = "Created \"move From \" Code"; fromToMoves.Labeltext = "Created \"move From \" Code";
savedFile SF = new savedFile();
SF.idConnect = "598A5F20-9A8A-415D-81B2-BBFE04465381";
SF.usageName = "Usage004.cpy";
fromToMoves.SavedFile = SF;
//Dictionary for indexes, init IndexState class and list for qualifiedHelper class //Dictionary for indexes, init IndexState class and list for qualifiedHelper class
Dictionary<string, string> testIndexes = new Dictionary<string, string>(); Dictionary<string, string> testIndexes = new Dictionary<string, string>();
IndexState lIs = new IndexState(testIndexes, rowList); IndexState lIs = new IndexState(testIndexes, rowList);
@ -2201,6 +2242,11 @@ namespace CobXmlSupport
fromToMoves.Parent = this; fromToMoves.Parent = this;
fromToMoves.Labeltext = "Cobol \"reserved\" Words"; fromToMoves.Labeltext = "Cobol \"reserved\" Words";
savedFile SF = new savedFile();
SF.idConnect = "DD5A8C24-C322-4901-85B5-776DD6E21FB9";
SF.usageName = "Usage005.cpy";
fromToMoves.SavedFile = SF;
foreach (string str in CobResWords.ToArray()) foreach (string str in CobResWords.ToArray())
{ {
if (fromToMoves.CodeShower.Text == "") { } if (fromToMoves.CodeShower.Text == "") { }
@ -2210,6 +2256,7 @@ namespace CobXmlSupport
fromToMoves.Show(); fromToMoves.Show();
//createXMLMoveCode(); //createXMLMoveCode();
func_exit:;
} }
private void loadResWords() private void loadResWords()
@ -2234,6 +2281,11 @@ namespace CobXmlSupport
fromToMoves.BSynch = true; fromToMoves.BSynch = true;
fromToMoves.Labeltext = "Cobol \"CrossRef\" List"; fromToMoves.Labeltext = "Cobol \"CrossRef\" List";
savedFile SF = new savedFile();
SF.idConnect = "1C1FAE9D-39DD-4A24-A6C2-8696EAE3CB32";
SF.usageName = "Usage006.cpy";
fromToMoves.SavedFile = SF;
foreach (CobRow cr in rowList) foreach (CobRow cr in rowList)
{ {
if (cr.CobLevel < 2) if (cr.CobLevel < 2)

View File

@ -34,6 +34,7 @@ namespace CobXmlSupport
public bool Values { get; set; } public bool Values { get; set; }
public bool Wrap { get; set; } public bool Wrap { get; set; }
public bool ShowTestbtns { get; set; } public bool ShowTestbtns { get; set; }
public savedFile[] fileList { get; set; }
public void GetSettings() public void GetSettings()
{ {
@ -59,6 +60,7 @@ namespace CobXmlSupport
this.Values = S.ettingValues; this.Values = S.ettingValues;
this.Wrap = S.ettingWrap; this.Wrap = S.ettingWrap;
this.ShowTestbtns = S.ettingShowTestbtns; this.ShowTestbtns = S.ettingShowTestbtns;
this.fileList = S.ettingList==null?null:S.ettingList.ToArray();
if (evSave != null) if (evSave != null)
{ {
@ -91,7 +93,14 @@ namespace CobXmlSupport
S.ettingValues = this.Values; S.ettingValues = this.Values;
S.ettingWrap = this.Wrap; S.ettingWrap = this.Wrap;
S.ettingShowTestbtns = this.ShowTestbtns; S.ettingShowTestbtns = this.ShowTestbtns;
if (this.fileList != null)
{
foreach (savedFile locSF in this.fileList)
{
S.ettingListAdd(locSF);
}
}
else S.ettingList = null;
} }
public object Clone() public object Clone()

View File

@ -9,27 +9,68 @@ namespace CobXmlSupport
{ {
public static class S public static class S
{ {
public static string ettingActualFile;
public static bool ettingAnaTag; public static bool ettingAnaTag;
public static string ettingCompany;
public static bool ettingCountVars; public static bool ettingCountVars;
public static bool ettingDisplays; public static bool ettingDisplays;
public static bool ettingMvToDisp;
public static bool ettingNoNsRef;
public static bool ettingPerform;
public static bool ettingShowTestbtns;
public static bool ettingUnique;
public static bool ettingUniqueAttrVars;
public static bool ettingUniqueVars;
public static bool ettingUserCodeBcup;
public static bool ettingValues;
public static bool ettingWrap;
public static string ettingActualFile;
public static string ettingCompany;
public static string ettingExpPrefix; public static string ettingExpPrefix;
public static string ettingFilePath; public static string ettingFilePath;
public static string ettingLogSectName; public static string ettingLogSectName;
public static string ettingLogVarName; public static string ettingLogVarName;
public static string ettingMaxOcc; public static string ettingMaxOcc;
public static bool ettingMvToDisp;
public static bool ettingNoNsRef;
public static bool ettingPerform;
public static string ettingPrefix; public static string ettingPrefix;
public static bool ettingUnique;
public static bool ettingUniqueAttrVars;
public static bool ettingUniqueVars;
public static bool ettingUserCodeBcup;
public static string ettingUserName; public static string ettingUserName;
public static bool ettingValues; public static List<savedFile> ettingList;
public static bool ettingWrap;
public static bool ettingShowTestbtns; public static void ettingListAdd(savedFile f)
{
bool upd = false;
if (S.ettingList == null)
{
S.ettingList = new List<savedFile>();
S.ettingList.Add(f);
upd = true;
} }
else
{
for (int i = 0; i < S.ettingList.Count; i++)
{
if (S.ettingList.ToArray()[i].idConnect == f.idConnect)
{
S.ettingList[i] = f;
upd = true;
}
}
}
if (!upd) S.ettingList.Add(f);
}
}
public class savedFile : ICloneable
{
public string idConnect;
public string usageName;
public string directorySaved;
public string fNameSaved;
public object Clone()
{
savedFile tmpSF = new savedFile();
tmpSF = (savedFile)this.MemberwiseClone();
return tmpSF;
}
}
} }

147
CobXmlSupport/SaveRegCopyFile.Designer.cs generated Normal file
View File

@ -0,0 +1,147 @@
namespace CobXmlSupport
{
partial class SaveRegCopyFile
{
/// <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.label1 = new System.Windows.Forms.Label();
this.txtUsageName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnChooseFnameAndPlace = new System.Windows.Forms.Button();
this.txtChosenDirectory = new System.Windows.Forms.TextBox();
this.txtFileName = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(29, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(134, 20);
this.label1.TabIndex = 0;
this.label1.Text = "Spara aktuell fil";
//
// txtUsageName
//
this.txtUsageName.Location = new System.Drawing.Point(167, 68);
this.txtUsageName.Name = "txtUsageName";
this.txtUsageName.Size = new System.Drawing.Size(308, 20);
this.txtUsageName.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(30, 71);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(95, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Användningsnamn";
//
// btnChooseFnameAndPlace
//
this.btnChooseFnameAndPlace.Location = new System.Drawing.Point(33, 104);
this.btnChooseFnameAndPlace.Name = "btnChooseFnameAndPlace";
this.btnChooseFnameAndPlace.Size = new System.Drawing.Size(92, 23);
this.btnChooseFnameAndPlace.TabIndex = 3;
this.btnChooseFnameAndPlace.Text = "Välj sparplats";
this.btnChooseFnameAndPlace.UseVisualStyleBackColor = true;
this.btnChooseFnameAndPlace.Click += new System.EventHandler(this.btnChooseFnameAndPlace_Click);
//
// txtChosenDirectory
//
this.txtChosenDirectory.Location = new System.Drawing.Point(167, 104);
this.txtChosenDirectory.Name = "txtChosenDirectory";
this.txtChosenDirectory.ReadOnly = true;
this.txtChosenDirectory.Size = new System.Drawing.Size(308, 20);
this.txtChosenDirectory.TabIndex = 4;
//
// txtFileName
//
this.txtFileName.Location = new System.Drawing.Point(167, 142);
this.txtFileName.Name = "txtFileName";
this.txtFileName.ReadOnly = true;
this.txtFileName.Size = new System.Drawing.Size(308, 20);
this.txtFileName.TabIndex = 5;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(400, 183);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 23);
this.btnSave.TabIndex = 6;
this.btnSave.Text = "Spara";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(319, 183);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 7;
this.btnCancel.Text = "Avbryt";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// SaveRegCopyFile
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(503, 233);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.txtFileName);
this.Controls.Add(this.txtChosenDirectory);
this.Controls.Add(this.btnChooseFnameAndPlace);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtUsageName);
this.Controls.Add(this.label1);
this.Name = "SaveRegCopyFile";
this.Text = "Spara och Registrera skapad fil";
this.Load += new System.EventHandler(this.SaveRegCopyFile_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtUsageName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnChooseFnameAndPlace;
private System.Windows.Forms.TextBox txtChosenDirectory;
private System.Windows.Forms.TextBox txtFileName;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.SaveFileDialog saveFileDialog;
}
}

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace CobXmlSupport
{
public partial class SaveRegCopyFile : Form
{
public savedFile SavedFile { get; set; }
public string FileData { get; set; }
public SaveRegCopyFile()
{
InitializeComponent();
}
private void btnChooseFnameAndPlace_Click(object sender, EventArgs e)
{
saveFileDialog.Title = "Välj plats för den aktuella filen !";
saveFileDialog.Filter = "Copy files (*.cpy)|*.cpy|Text Files (*.txt)|*.txt|All files (*.*)|*.*";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
SavedFile.fNameSaved = txtFileName.Text = saveFileDialog.FileName.Substring(saveFileDialog.FileName.LastIndexOf("\\") + 1); ;
SavedFile.directorySaved = txtChosenDirectory.Text = saveFileDialog.FileName.Substring(0, saveFileDialog.FileName.LastIndexOf("\\"));
if (SavedFile.idConnect.Length > 0)
{
btnSave.Enabled = true;
}
else MessageBox.Show("idConnect för filtypen saknas !");
}
}
private void btnSave_Click(object sender, EventArgs e)
{
try
{
File.WriteAllText(saveFileDialog.FileName, FileData);
savedFile tmpSF = new savedFile();
tmpSF = (savedFile)SavedFile.Clone();
S.ettingListAdd(tmpSF);
this.Close();
}
catch (Exception ex)
{
MessageBox.Show("Problem att spara :\r\n" + ex.Message);
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void SaveRegCopyFile_Load(object sender, EventArgs e)
{
txtUsageName.Text = SavedFile.usageName;
txtChosenDirectory.Text = "";
txtFileName.Text = "";
btnSave.Enabled = false;
}
}
}

View 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="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -34,6 +34,7 @@
this.lblCodeType = new System.Windows.Forms.Label(); this.lblCodeType = new System.Windows.Forms.Label();
this.btnSynch = new System.Windows.Forms.Button(); this.btnSynch = new System.Windows.Forms.Button();
this.btnSynchOut = new System.Windows.Forms.Button(); this.btnSynchOut = new System.Windows.Forms.Button();
this.btnSaveAktualText = new System.Windows.Forms.Button();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnClose // btnClose
@ -99,11 +100,22 @@
this.btnSynchOut.Visible = false; this.btnSynchOut.Visible = false;
this.btnSynchOut.Click += new System.EventHandler(this.btnSynchOut_Click); this.btnSynchOut.Click += new System.EventHandler(this.btnSynchOut_Click);
// //
// btnSaveAktualText
//
this.btnSaveAktualText.Location = new System.Drawing.Point(12, 642);
this.btnSaveAktualText.Name = "btnSaveAktualText";
this.btnSaveAktualText.Size = new System.Drawing.Size(83, 23);
this.btnSaveAktualText.TabIndex = 5;
this.btnSaveAktualText.Text = "Spara Copy";
this.btnSaveAktualText.UseVisualStyleBackColor = true;
this.btnSaveAktualText.Click += new System.EventHandler(this.btnSaveAktualText_Click);
//
// ShowCode // ShowCode
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(670, 674); this.ClientSize = new System.Drawing.Size(670, 674);
this.Controls.Add(this.btnSaveAktualText);
this.Controls.Add(this.btnSynchOut); this.Controls.Add(this.btnSynchOut);
this.Controls.Add(this.btnSynch); this.Controls.Add(this.btnSynch);
this.Controls.Add(this.lblCodeType); this.Controls.Add(this.lblCodeType);
@ -125,5 +137,6 @@
private System.Windows.Forms.Label lblCodeType; private System.Windows.Forms.Label lblCodeType;
private System.Windows.Forms.Button btnSynch; private System.Windows.Forms.Button btnSynch;
private System.Windows.Forms.Button btnSynchOut; private System.Windows.Forms.Button btnSynchOut;
private System.Windows.Forms.Button btnSaveAktualText;
} }
} }

View File

@ -24,6 +24,8 @@ namespace CobXmlSupport
string oldTxt; string oldTxt;
bool bSynch; bool bSynch;
public savedFile SavedFile { get; set; }
public ShowCode() public ShowCode()
{ {
InitializeComponent(); InitializeComponent();
@ -328,5 +330,13 @@ namespace CobXmlSupport
this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileOutId + "\r\n codePath = " + Cc.PathId + Cc.CcFileOutId + "\r\n -------------- \r\n" + this.CodeShower.Text; this.CodeShower.Text = " InPath = " + Cc.PathId + "\r\n InFile = " + Cc.FileId + "\r\n codeFile = " + Cc.CcFileOutId + "\r\n codePath = " + Cc.PathId + Cc.CcFileOutId + "\r\n -------------- \r\n" + this.CodeShower.Text;
} }
private void btnSaveAktualText_Click(object sender, EventArgs e)
{
SaveRegCopyFile saveWin = new SaveRegCopyFile();
saveWin.SavedFile = this.SavedFile;
saveWin.FileData = this.txtCode.Text;
saveWin.ShowDialog();
}
} }
} }