Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Parajulibkrm committed Oct 21, 2021
0 parents commit 5eeb628
Show file tree
Hide file tree
Showing 33 changed files with 918 additions and 0 deletions.
Binary file added .vs/WindowsFormsApp1/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 changes: 25 additions & 0 deletions WindowsFormsApp1.sln
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 15
VisualStudioVersion = 15.0.28307.1705
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1\WindowsFormsApp1.csproj", "{6B54F634-F9F1-4A5B-ADB7-AAEDA7B295FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6B54F634-F9F1-4A5B-ADB7-AAEDA7B295FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B54F634-F9F1-4A5B-ADB7-AAEDA7B295FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B54F634-F9F1-4A5B-ADB7-AAEDA7B295FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B54F634-F9F1-4A5B-ADB7-AAEDA7B295FF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {52A0F3E7-7E99-4FB3-9E50-22E546D7E137}
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions WindowsFormsApp1/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="WindowsFormsApp1.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<userSettings>
<WindowsFormsApp1.Settings1>
<setting name="Path_to_adb" serializeAs="String">
<value />
</setting>
<setting name="ip_port" serializeAs="String">
<value>127.0.0.1:58526</value>
</setting>
</WindowsFormsApp1.Settings1>
</userSettings>
</configuration>
191 changes: 191 additions & 0 deletions WindowsFormsApp1/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 71 additions & 0 deletions WindowsFormsApp1/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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 WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
textBox3.Text = Settings1.Default.Path_to_adb;
textBox2.Text = Settings1.Default.ip_port;
}
OpenFileDialog odf = new OpenFileDialog();
FolderBrowserDialog odf2 = new FolderBrowserDialog();
private void button1_Click(object sender, EventArgs e)
{
odf.Filter = "APK|*.apk";
if(odf.ShowDialog() == DialogResult.OK)
{
textBox1.Text = odf.FileName;

}
}

private void button2_Click(object sender, EventArgs e)
{

System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.FileName = "CMD.exe";
startInfo.Arguments = "/c cd " + textBox3.Text + "& adb connect" + textBox2.Text + "& adb -s \"" + textBox2.Text +"\" install " + textBox1.Text;
process.StartInfo = startInfo;
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
richTextBox1.Text = output;
}

private void button3_Click(object sender, EventArgs e)
{
if (odf2.ShowDialog() == DialogResult.OK)
{
textBox3.Text = odf2.SelectedPath;
Settings1.Default.Path_to_adb = odf2.SelectedPath;
Settings1.Default.Save();
}
}

private void textBox2_TextChanged(object sender, EventArgs e)
{
Settings1.Default.ip_port = textBox2.Text;
Settings1.Default.Save();
}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("www.github.com/parajulibkrm");
}
}

}
Loading

0 comments on commit 5eeb628

Please sign in to comment.