Updated to use new nc_settings dll, started color table with known values

Branch_1.5.0
Nathan Crawford 2007-09-11 02:55:53 +00:00
rodzic 4549ec00fe
commit 5bc71cd0ed
13 zmienionych plików z 32 dodań i 19 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -202,7 +202,7 @@ namespace embroideryReader
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(75, 23);
this.button6.TabIndex = 9;
this.button6.Text = "button6";
this.button6.Text = "debug";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//

Wyświetl plik

@ -16,7 +16,7 @@ namespace embroideryReader
public Pen drawPen = Pens.Black;
public Bitmap DrawArea;
public PesFile design;
private SettingsTester.nc_Settings settings = new SettingsTester.nc_Settings("embroideryreader.ini");
private nc_settings.IniFile settings = new nc_settings.IniFile("embroideryreader.ini");
//private PesFile design;
//private long bytesRead = 0;
//System.IO.BinaryReader fileIn;
@ -273,9 +273,9 @@ namespace embroideryReader
private void Form1_Load(object sender, EventArgs e)
{
string temp;
temp = settings.getValue("update location");
if (temp == null || temp == "")
string updateLoc;
updateLoc = settings.getValue("update location");
if (updateLoc == null || updateLoc == "")
{
settings.setValue("update location", "http://www.njcrawford.com/embreader/");
}
@ -283,11 +283,13 @@ namespace embroideryReader
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
this.Text = "Embroidery Reader";
//MessageBox.Show(args.Length.ToString());
if (args.Length > 1)
{
openFile(args[1]);
}
}
private void openFile(string filename)
{
@ -298,6 +300,7 @@ namespace embroideryReader
//_form2 = new Form2();
//_form2.design = new PesFile(filename);
design = new PesFile(filename);
this.Text = System.IO.Path.GetFileName(filename) + " - Embroidery Reader";
//_form2.DrawArea = new Bitmap(_form2.design.GetWidth(), _form2.design.GetHeight());
DrawArea = new Bitmap(design.GetWidth(), design.GetHeight());
setPanelSize(design.GetWidth(), design.GetHeight());

Wyświetl plik

@ -306,21 +306,26 @@ namespace embroideryReader
{
case 4:
name = "base x";
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString());
break;
case 5:
name = "base y";
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString() + " (" + (csewsegHeader[i] + imageHeight).ToString() + ")");
break;
case 6:
name = "start x";
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString());
break;
case 7:
name = "start y";
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString() + " (" + (csewsegHeader[i] + imageHeight).ToString() + ")");
break;
default:
name = (i + 1).ToString();
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString());
break;
}
outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString());
//outfile.WriteLine(name + "\t" + csewsegHeader[i].ToString());
}
outfile.WriteLine("stitches start: " + startStitches.ToString());
outfile.WriteLine("block info");

Wyświetl plik

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.440")]
[assembly: AssemblyFileVersion("1.0.0.440")]
[assembly: AssemblyVersion("1.0.0.447")]
[assembly: AssemblyFileVersion("1.0.0.447")]

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -28,6 +28,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nc_settings, Version=1.0.0.10, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\nc_settings.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
@ -48,7 +52,6 @@
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="nc_Settings.cs" />
<Compile Include="nc_Update.cs" />
<Compile Include="PesFile.cs" />
<Compile Include="Program.cs" />

Wyświetl plik

@ -9,27 +9,27 @@ namespace UpdateTester
public class nc_Update
{
System.Net.WebClient downloader = new System.Net.WebClient();
SettingsTester.nc_Settings updateInfo;
nc_settings.IniFile updateInfo;
System.Uri updateURI;
string lastError = "";
public nc_Update(string updateLocation)
{
if (!Directory.Exists(Path.Combine(SettingsTester.nc_Settings.appPath(), "update")))
if (!Directory.Exists(Path.Combine(nc_settings.IniFile.appPath(), "update")))
{
Directory.CreateDirectory(Path.Combine(SettingsTester.nc_Settings.appPath(), "update"));
Directory.CreateDirectory(Path.Combine(nc_settings.IniFile.appPath(), "update"));
}
try
{
updateURI = new Uri(updateLocation);
downloader.DownloadFile(new Uri(updateURI, "update.ini"), Path.Combine(Path.Combine(SettingsTester.nc_Settings.appPath(), "update"), "update.ini"));
downloader.DownloadFile(new Uri(updateURI, "update.ini"), Path.Combine(Path.Combine(nc_settings.IniFile.appPath(), "update"), "update.ini"));
}
catch (Exception ex)
{
//don't complain
lastError = ex.Message;
}
updateInfo = new SettingsTester.nc_Settings(Path.Combine(Path.Combine(SettingsTester.nc_Settings.appPath(), "update"), "update.ini"));
updateInfo = new nc_settings.IniFile (Path.Combine(Path.Combine(nc_settings.IniFile .appPath(), "update"), "update.ini"));
}
public string VersionAvailable()
@ -76,21 +76,21 @@ namespace UpdateTester
}
int numFiles = Convert.ToInt32(updateInfo.getValue("files", "number of files"));
string filename = "";
if (!Directory.Exists(Path.Combine(SettingsTester.nc_Settings.appPath(), "update")))
if (!Directory.Exists(Path.Combine(nc_settings.IniFile.appPath(), "update")))
{
Directory.CreateDirectory(Path.Combine(SettingsTester.nc_Settings.appPath(), "update"));
Directory.CreateDirectory(Path.Combine(nc_settings.IniFile.appPath(), "update"));
}
for (int i = 1; i <= numFiles; i++)
{
filename = updateInfo.getValue("files", "file" + i.ToString());
downloader.DownloadFile(new Uri(updateURI, filename), Path.Combine(Path.Combine(SettingsTester.nc_Settings.appPath(), "update"), filename));
downloader.DownloadFile(new Uri(updateURI, filename), Path.Combine(Path.Combine(nc_settings.IniFile.appPath(), "update"), filename));
}
if (!System.IO.File.Exists(System.IO.Path.Combine(SettingsTester.nc_Settings.appPath(), "UpdateInstaller.exe")))
if (!System.IO.File.Exists(System.IO.Path.Combine(nc_settings.IniFile.appPath(), "UpdateInstaller.exe")))
{
lastError = "UpdateInstaller.exe not found";
return false;
}
System.Diagnostics.Process.Start(System.IO.Path.Combine(SettingsTester.nc_Settings.appPath(), "UpdateInstaller.exe"), System.Diagnostics.Process.GetCurrentProcess().Id.ToString());
System.Diagnostics.Process.Start(System.IO.Path.Combine(nc_settings.IniFile.appPath(), "UpdateInstaller.exe"), System.Diagnostics.Process.GetCurrentProcess().Id.ToString());
}
catch (Exception ex)
{

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -44,6 +44,7 @@ Section "Embroidery Reader (required)"
;File "example2.nsi"
File "embroideryReader.exe"
File "UpdateInstaller.exe"
File "nc_settings.dll"
; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\Embroidery Reader" "Install_Dir" "$INSTDIR"
@ -122,6 +123,7 @@ Section "Uninstall"
Delete $INSTDIR\embroideryReader.exe
Delete $INSTDIR\UpdateInstaller.exe
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\nc_settings.dll
; Remove shortcuts, if any
Delete "$SMPROGRAMS\Embroidery Reader\*.*"