-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fb38443
Showing
46 changed files
with
3,732 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.28922.388 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WSMerge", "WSMerge\WSMerge.csproj", "{A1ABFEEF-FE5C-467B-9962-E10DD2D7B17D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A1ABFEEF-FE5C-467B-9962-E10DD2D7B17D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A1ABFEEF-FE5C-467B-9962-E10DD2D7B17D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A1ABFEEF-FE5C-467B-9962-E10DD2D7B17D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A1ABFEEF-FE5C-467B-9962-E10DD2D7B17D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {336B56C9-A9E2-40F1-B9FD-5CC3E2CEDD87} | ||
EndGlobalSection | ||
EndGlobal |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
using System.Diagnostics; | ||
using System.IO; | ||
|
||
namespace WSMerge | ||
{ | ||
public partial class Form1 : Form | ||
{ | ||
public Form1() | ||
{ | ||
InitializeComponent(); | ||
txtBxMergecap.Text = Properties.Settings.Default.wspath; | ||
if (!File.Exists(txtBxMergecap.Text)) | ||
{ | ||
MessageBox.Show("Programa \"mergecap.exe\" não encontrado", "Erro"); | ||
if (openFileDialFindWS.ShowDialog() == DialogResult.OK) | ||
{ | ||
txtBxMergecap.Text = openFileDialFindWS.FileName; | ||
Properties.Settings.Default.wspath = openFileDialFindWS.FileName; | ||
Properties.Settings.Default.Save(); | ||
} | ||
} | ||
} | ||
|
||
private void Button1_Click(object sender, EventArgs e) | ||
{ | ||
if (openFileDlgSource.ShowDialog() == DialogResult.OK) | ||
{ | ||
foreach(string fname in openFileDlgSource.FileNames) | ||
{ | ||
listViewSourceFiles.Items.Add(fname); | ||
} | ||
} | ||
} | ||
|
||
private void Btn_clear_Click(object sender, EventArgs e) | ||
{ | ||
listViewSourceFiles.Items.Clear(); | ||
} | ||
|
||
private void OpenFileDlgSource_FileOk(object sender, CancelEventArgs e) | ||
{ | ||
|
||
} | ||
|
||
private void BtnMerge_Click(object sender, EventArgs e) | ||
{ | ||
if(listViewSourceFiles.Items.Count < 1) | ||
{ | ||
MessageBox.Show("Nenhum arquivo selecionado","Erro"); | ||
return; | ||
} | ||
else if(listViewSourceFiles.Items.Count == 1) | ||
{ | ||
MessageBox.Show("Por favor, selecione mais de um arquivo para merge", "Selecione mais de um arquivo"); | ||
return; | ||
} | ||
|
||
if(!File.Exists(txtBxMergecap.Text)) | ||
{ | ||
MessageBox.Show("Programa \"mergecap.exe\" não encontrado", "Erro"); | ||
return; | ||
} | ||
|
||
if (saveFileDialMerged.ShowDialog() == DialogResult.OK) | ||
{ | ||
string fileout = saveFileDialMerged.FileName; | ||
string filein = ""; | ||
for (int i = 0; i < listViewSourceFiles.Items.Count; i++) | ||
{ | ||
filein += "\"" + listViewSourceFiles.Items[i].Text + "\" "; | ||
} | ||
Process p = new Process(); | ||
p.StartInfo.FileName = txtBxMergecap.Text; | ||
p.StartInfo.Arguments = "-v -w " + fileout + " " + filein; | ||
p.StartInfo.UseShellExecute = false; | ||
p.StartInfo.RedirectStandardOutput = true; | ||
p.Start(); | ||
|
||
string output = p.StandardOutput.ReadToEnd(); | ||
p.WaitForExit(); | ||
MessageBox.Show("Merge concluído", "Concluído"); | ||
if (File.Exists(fileout)) | ||
{ | ||
Process.Start("explorer.exe", "/select, " + fileout); | ||
} | ||
|
||
//Console.WriteLine(filein); | ||
} | ||
} | ||
|
||
private void BrnSelMergecap_Click(object sender, EventArgs e) | ||
{ | ||
if (openFileDialFindWS.ShowDialog() == DialogResult.OK) | ||
{ | ||
txtBxMergecap.Text = openFileDialFindWS.FileName; | ||
Properties.Settings.Default.wspath = openFileDialFindWS.FileName; | ||
Properties.Settings.Default.Save(); | ||
} | ||
} | ||
|
||
private void Form1_Load(object sender, EventArgs e) | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.