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
Showing
13 changed files
with
5,177 additions
and
0 deletions.
There are no files selected for viewing
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,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
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,64 @@ | ||
using System; | ||
using System.Diagnostics; | ||
namespace WhatsappSender | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
|
||
Console.WriteLine("enter number phone"); | ||
string phoneNumber = Console.ReadLine(); | ||
|
||
if (phoneNumber.Contains('-') && phoneNumber.Substring(0, 1) == "0") | ||
{ | ||
for (int i = 0; i < phoneNumber.Count(); i++) | ||
{ | ||
if(phoneNumber.Contains('-')) | ||
{ | ||
int y = phoneNumber.IndexOf('-'); | ||
phoneNumber = phoneNumber.Remove(y, 1); | ||
} | ||
|
||
} | ||
|
||
phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
Console.WriteLine(phoneNumber); | ||
|
||
} | ||
else if (!phoneNumber.Contains('-') && phoneNumber.Substring(0, 2) == "05") | ||
{ | ||
phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
Console.WriteLine(phoneNumber); | ||
|
||
} | ||
|
||
//if (phoneNumber.Substring(3, 1) == "-" && phoneNumber.Substring(0, 1) == "0") | ||
//{ | ||
// phoneNumber = phoneNumber.Remove(3, 1); | ||
// phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
// Console.WriteLine(phoneNumber); | ||
|
||
//} | ||
//else if (!phoneNumber.Contains('-') && phoneNumber.Substring(0,2) == "05") | ||
//{ | ||
// phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
// Console.WriteLine(phoneNumber); | ||
|
||
//} | ||
|
||
|
||
|
||
|
||
//if (phoneNumber?.Substring(0, 1) == "0") | ||
//{ | ||
// phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
// var ps = new ProcessStartInfo($"https://web.whatsapp.com/send?phone= + {phoneNumber}"); | ||
// ps.UseShellExecute = true; | ||
// Process.Start(ps); | ||
|
||
|
||
//} | ||
} | ||
} | ||
} |
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 17 | ||
VisualStudioVersion = 17.1.32210.238 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WhatsappSender", "WhatsappSender\WhatsappSender.csproj", "{2F8A5A91-445F-4CE6-A570-11768FE20778}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{2F8A5A91-445F-4CE6-A570-11768FE20778}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2F8A5A91-445F-4CE6-A570-11768FE20778}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2F8A5A91-445F-4CE6-A570-11768FE20778}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2F8A5A91-445F-4CE6-A570-11768FE20778}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {E53DA417-C102-4411-A815-05B10FE7193B} | ||
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,102 @@ | ||
using System.Diagnostics; | ||
namespace WhatsappSender | ||
{ | ||
public partial class Form1 : Form | ||
{ | ||
public string phoneNumber; | ||
public Form1() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void numberTxb_TextChanged(object sender, EventArgs e) | ||
{ | ||
phoneNumber = numberTxb.Text; | ||
} | ||
|
||
private void browserBtn_Click(object sender, EventArgs e) | ||
{ | ||
try | ||
{ | ||
if (phoneNumber.Contains('-') && phoneNumber.Substring(0, 1) == "0") | ||
{ | ||
for (int i = 0; i < phoneNumber.Count(); i++) | ||
{ | ||
if (phoneNumber.Contains('-')) | ||
{ | ||
int y = phoneNumber.IndexOf('-'); | ||
phoneNumber = phoneNumber.Remove(y, 1); | ||
} | ||
|
||
} | ||
|
||
phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
Console.WriteLine(phoneNumber); | ||
|
||
} | ||
else if (!phoneNumber.Contains('-') && phoneNumber.Substring(0, 2) == "05") | ||
{ | ||
phoneNumber = "+972" + phoneNumber.Substring(1, 9); | ||
Console.WriteLine(phoneNumber); | ||
|
||
} | ||
|
||
var ps = new ProcessStartInfo($"https://web.whatsapp.com/send?phone= + {phoneNumber}"); | ||
ps.UseShellExecute = true; | ||
Process.Start(ps); | ||
numberTxb.Text = ""; | ||
|
||
|
||
} | ||
catch (Exception) | ||
{ | ||
|
||
|
||
} | ||
} | ||
|
||
private void appBtn_Click(object sender, EventArgs e) | ||
{ | ||
try | ||
{ | ||
if (phoneNumber.Contains('-') && phoneNumber.Substring(0, 1) == "0") | ||
{ | ||
for (int i = 0; i < phoneNumber.Count(); i++) | ||
{ | ||
if (phoneNumber.Contains('-')) | ||
{ | ||
int y = phoneNumber.IndexOf('-'); | ||
phoneNumber = phoneNumber.Remove(y, 1); | ||
} | ||
|
||
} | ||
|
||
phoneNumber = "972" + phoneNumber.Substring(1, 9); | ||
|
||
|
||
} | ||
else if (!phoneNumber.Contains('-') && phoneNumber.Substring(0, 2) == "05") | ||
{ | ||
phoneNumber = "972" + phoneNumber.Substring(1, 9); | ||
|
||
|
||
} | ||
|
||
|
||
var ps1 = new ProcessStartInfo($"https://api.whatsapp.com/send?phone={phoneNumber}"); | ||
ps1.UseShellExecute = true; | ||
Process.Start(ps1); | ||
numberTxb.Text = ""; | ||
|
||
|
||
} | ||
catch (Exception) | ||
{ | ||
|
||
|
||
} | ||
} | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.