Skip to content

Commit

Permalink
Дамп сохраняется непосредственно в указанную папку, а не через переме…
Browse files Browse the repository at this point in the history
…щение из папки установки программы.
  • Loading branch information
hoplik committed Aug 21, 2024
1 parent 9a02244 commit d50c383
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion FirehoseFinder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>24.8.18.0</ApplicationVersion>
<ApplicationVersion>24.8.21.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
21 changes: 13 additions & 8 deletions Forms/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1276,15 +1276,15 @@ private void BackgroundWorker_dump_DoWork(object sender, DoWorkEventArgs e)
count++;
}
e.Result = output_FH;
Thread.Sleep(1);
Thread.Sleep(5);
}

private void BackgroundWorker_dump_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
string newfilename = e.UserState.ToString();
progressBar_phone.Value = e.ProgressPercentage;
textBox_soft_term.AppendText(LocRes.GetString("tb_save") + '\u0020' + newfilename + " ... ");
if (File.Exists(newfilename))
/*if (File.Exists(newfilename))
{
try
{
Expand All @@ -1296,7 +1296,7 @@ private void BackgroundWorker_dump_ProgressChanged(object sender, ProgressChange
textBox_soft_term.AppendText(ex.Message + Environment.NewLine);
SendErrorInChat();
}
}
}*/
textBox_soft_term.AppendText(LocRes.GetString("done") + Environment.NewLine);
}

Expand Down Expand Up @@ -2786,6 +2786,8 @@ private void DumpBySectors(bool ByBlocks, int StartSector, int NumSectors)
StringBuilder fh_all_args = new StringBuilder("--port=\\\\.\\" + serialPort1.PortName);
List<string> argsfordump = new List<string>(); //Необходимые данные для параллельного потока
int lun_int = 0;
//Указали путь для вывода
fh_all_args.Append(" --mainoutputdir=" + folderBrowserDialog1.SelectedPath);
fh_all_args.Append(" --convertprogram2read");
if (comboBox_lun_count.SelectedIndex != -1) lun_int = comboBox_lun_count.SelectedIndex;
fh_all_args.Append(" --lun=" + lun_int);
Expand Down Expand Up @@ -2948,7 +2950,9 @@ private void СохранитьВыбранныйРазделToolStripMenuItem_C
listView_GPT.CheckedItems[0].SubItems[1].Text);
//Создаём аргументы для лоадера
StringBuilder Argstoxml = new StringBuilder("--port=\\\\.\\" + serialPort1.PortName);
Argstoxml.Append(" --sendxml=p_r.xml --noprompt --search_path=" + loadpath);
//Путь вывода
Argstoxml.Append(" --mainoutputdir=" + loadpath);//--search_path=" + loadpath
Argstoxml.Append(" --sendxml=p_r.xml --noprompt");
switch (comboBox_log.SelectedIndex)
{
case 0:
Expand Down Expand Up @@ -3048,20 +3052,21 @@ private void BackgroundWorker_xml_RunWorkerCompleted(object sender, RunWorkerCom
if (e.Error != null) textBox_soft_term.AppendText(e.Error.Message + Environment.NewLine);
else
{
string newfilename = "dump_" + listView_GPT.CheckedItems[0].SubItems[2].Text + ".bin";
/*string newfilename = "dump_" + listView_GPT.CheckedItems[0].SubItems[2].Text + ".bin";
if (File.Exists(newfilename))
{
try
{
if (File.Exists(folderBrowserDialog1.SelectedPath + "\\" + newfilename)) File.Delete(folderBrowserDialog1.SelectedPath + "\\" + newfilename);
File.Move(newfilename, folderBrowserDialog1.SelectedPath + "\\" + newfilename);
string newfullfile = Path.Combine(folderBrowserDialog1.SelectedPath, newfilename);
if (File.Exists(newfullfile)) File.Delete(newfullfile);
File.Move(newfilename, newfullfile);
}
catch (Exception ex)
{
textBox_soft_term.AppendText(ex.Message + Environment.NewLine);
SendErrorInChat();
}
}
}*/
textBox_soft_term.AppendText(e.Result.ToString() + Environment.NewLine +
LocRes.GetString("tb_loader_com") + Environment.NewLine);
}
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("24.8.18.0")]
[assembly: AssemblyFileVersion("24.8.18.0")]
[assembly: AssemblyVersion("24.8.21.0")]
[assembly: AssemblyFileVersion("24.8.21.0")]
[assembly: NeutralResourcesLanguage("ru-RU")]

0 comments on commit d50c383

Please sign in to comment.