├── libs
└── WaitCursor.dll
├── src
├── nuget.config
├── DemoWhatsAppNETAPICSharp
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── App.config
│ ├── packages.config
│ ├── CrossThreadExtensions.cs
│ ├── Program.cs
│ ├── Helper.cs
│ ├── FrmPilihGroup.cs
│ ├── FrmStartUp.cs
│ ├── FrmSetStatus.cs
│ ├── FrmPilihGroup.Designer.cs
│ ├── FrmContactOrGroup.Designer.cs
│ ├── FrmStartUp.Designer.cs
│ ├── FrmContactOrGroup.cs
│ ├── FrmMain.resx
│ ├── FrmPilihGroup.resx
│ ├── FrmSetStatus.resx
│ ├── FrmStartUp.resx
│ ├── FrmContactOrGroup.resx
│ ├── DemoWhatsAppNETAPICSharp.csproj
│ └── FrmSetStatus.Designer.cs
├── DemoWhatsAppNETAPIVBNET
│ ├── My Project
│ │ ├── Settings.settings
│ │ ├── Application.myapp
│ │ ├── AssemblyInfo.vb
│ │ ├── Application.Designer.vb
│ │ ├── Resources.Designer.vb
│ │ ├── Settings.Designer.vb
│ │ └── Resources.resx
│ ├── App.config
│ ├── packages.config
│ ├── Helper.vb
│ ├── CrossThreadExtensions.vb
│ ├── FrmPilihGroup.vb
│ ├── FrmStartUp.vb
│ ├── FrmSetStatus.vb
│ ├── FrmPilihGroup.Designer.vb
│ ├── FrmContactOrGroup.Designer.vb
│ ├── FrmStartUp.Designer.vb
│ ├── FrmContactOrGroup.vb
│ ├── FrmMain.resx
│ ├── FrmPilihGroup.resx
│ ├── FrmSetStatus.resx
│ ├── FrmStartUp.resx
│ ├── FrmContactOrGroup.resx
│ ├── DemoWhatsAppNETAPIVBNET.vbproj
│ └── FrmSetStatus.Designer.vb
└── WhatsAppNETAPI.sln
├── .gitignore
└── README.md
/libs/WaitCursor.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WhatsAppNETClient/WhatsAppNETClient2/HEAD/libs/WaitCursor.dll
--------------------------------------------------------------------------------
/src/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Application.myapp:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | FrmMain
5 | false
6 | 0
7 | true
8 | 0
9 | true
10 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DemoWhatsAppNETAPICSharp.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/Helper.vb:
--------------------------------------------------------------------------------
1 | Module Helper
2 |
3 | Public Function ShowDialogOpen(ByVal title As String, Optional ByVal fileImageOnly As Boolean = False) As String
4 |
5 | Dim fileName As String = String.Empty
6 |
7 | Using dlgOpen As New OpenFileDialog
8 |
9 | If fileImageOnly Then
10 | dlgOpen.Filter = "File gambar (*.bmp, *.jpg, *.jpeg, *.png)|*.bmp;*.jpg;*.jpeg;*.png"
11 | Else
12 | dlgOpen.Filter = "File dokumen (*.*)|*.*"
13 | End If
14 |
15 | dlgOpen.Title = title
16 |
17 | Dim result = dlgOpen.ShowDialog()
18 | If (result = DialogResult.OK) Then fileName = dlgOpen.FileName
19 |
20 | End Using
21 |
22 | Return fileName
23 | End Function
24 |
25 | Public Function ShowDialogOpenFolder() As String
26 |
27 | Dim folderName As String = String.Empty
28 |
29 | Using dlgOpen As New FolderBrowserDialog
30 |
31 | Dim result = dlgOpen.ShowDialog()
32 |
33 | If result = DialogResult.OK AndAlso (Not String.IsNullOrWhiteSpace(dlgOpen.SelectedPath)) Then
34 | folderName = dlgOpen.SelectedPath
35 | End If
36 | End Using
37 |
38 | Return folderName
39 |
40 | End Function
41 |
42 | End Module
43 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/CrossThreadExtensions.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System;
20 | using System.Windows.Forms;
21 |
22 | namespace DemoWhatsAppNETAPICSharp
23 | {
24 | public static class CrossThreadExtensions
25 | {
26 | public static void Invoke(this Control target, Action action)
27 | {
28 | if (target.InvokeRequired)
29 | {
30 | target.Invoke(action);
31 | }
32 | else
33 | {
34 | action();
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Program.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System;
20 | using System.Windows.Forms;
21 |
22 | namespace DemoWhatsAppNETAPICSharp
23 | {
24 | static class Program
25 | {
26 | ///
27 | /// The main entry point for the application.
28 | ///
29 | [STAThread]
30 | static void Main()
31 | {
32 | Application.EnableVisualStyles();
33 | Application.SetCompatibleTextRenderingDefault(false);
34 | Application.Run(new FrmMain());
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System
2 | Imports System.Reflection
3 | Imports System.Runtime.InteropServices
4 |
5 | ' General Information about an assembly is controlled through the following
6 | ' set of attributes. Change these attribute values to modify the information
7 | ' associated with an assembly.
8 |
9 | ' Review the values of the assembly attributes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM
21 |
22 |
23 | ' Version information for an assembly consists of the following four values:
24 | '
25 | ' Major Version
26 | ' Minor Version
27 | ' Build Number
28 | ' Revision
29 | '
30 | ' You can specify all the values or you can default the Build and Revision Numbers
31 | ' by using the '*' as shown below:
32 | '
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/CrossThreadExtensions.vb:
--------------------------------------------------------------------------------
1 | '*********************************************************************************************************
2 | ' Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | '
4 | ' Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | ' use this file except in compliance with the License. You may obtain a copy of
6 | ' the License at
7 | '
8 | ' http://www.apache.org/licenses/LICENSE-2.0
9 | '
10 | ' Unless required by applicable law or agreed to in writing, software
11 | ' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | ' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | ' License for the specific language governing permissions and limitations under
14 | ' the License.
15 | '
16 | ' The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | '*********************************************************************************************************
18 |
19 | Module CrossThreadExtensions
20 |
21 |
22 | Public Sub Invoke(ByVal control As Control, ByVal action As Action)
23 | If control.InvokeRequired Then
24 | control.Invoke(New MethodInvoker(Sub() action()), Nothing)
25 | Else
26 | action.Invoke()
27 | End If
28 | End Sub
29 |
30 | End Module
31 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Helper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace DemoWhatsAppNETAPICSharp
9 | {
10 | public class Helper
11 | {
12 | public static string ShowDialogOpen(string title, bool fileImageOnly = false)
13 | {
14 | var fileName = string.Empty;
15 |
16 | using (var dlgOpen = new OpenFileDialog())
17 | {
18 | dlgOpen.Filter = fileImageOnly ? "File gambar (*.bmp, *.jpg, *.jpeg, *.png)|*.bmp;*.jpg;*.jpeg;*.png;*.mp3;*.mp4"
19 | : "File dokumen (*.*)|*.*";
20 | dlgOpen.Title = title;
21 |
22 | var result = dlgOpen.ShowDialog();
23 | if (result == DialogResult.OK) fileName = dlgOpen.FileName;
24 | }
25 |
26 | return fileName;
27 | }
28 |
29 | public static string ShowDialogOpenFolder()
30 | {
31 | var folderName = string.Empty;
32 |
33 | using (var dlgOpen = new FolderBrowserDialog())
34 | {
35 | var result = dlgOpen.ShowDialog();
36 |
37 | if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(dlgOpen.SelectedPath))
38 | {
39 | folderName = dlgOpen.SelectedPath;
40 | }
41 | }
42 |
43 | return folderName;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Application.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My
16 |
17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
18 | ' or if you encounter build errors in this file, go to the Project Designer
19 | ' (go to Project Properties or double-click the My Project node in
20 | ' Solution Explorer), and make changes on the Application tab.
21 | '
22 | Partial Friend Class MyApplication
23 |
24 | _
25 | Public Sub New()
26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
27 | Me.IsSingleInstance = false
28 | Me.EnableVisualStyles = true
29 | Me.SaveMySettingsOnExit = true
30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
31 | End Sub
32 |
33 | _
34 | Protected Overrides Sub OnCreateMainForm()
35 | Me.MainForm = Global.DemoWhatsAppNETAPIVBNET.FrmMain
36 | End Sub
37 | End Class
38 | End Namespace
39 |
--------------------------------------------------------------------------------
/src/WhatsAppNETAPI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoWhatsAppNETAPICSharp", "DemoWhatsAppNETAPICSharp\DemoWhatsAppNETAPICSharp.csproj", "{3A2FA778-E918-4051-8780-B740567963CB}"
7 | EndProject
8 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DemoWhatsAppNETAPIVBNET", "DemoWhatsAppNETAPIVBNET\DemoWhatsAppNETAPIVBNET.vbproj", "{4E4A94A9-8736-4A58-87C8-6AF2F070267B}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4BB5024D-A071-4F9A-AABC-BF71B7DE512D}"
11 | ProjectSection(SolutionItems) = preProject
12 | nuget.config = nuget.config
13 | EndProjectSection
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Release|Any CPU = Release|Any CPU
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {3A2FA778-E918-4051-8780-B740567963CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {3A2FA778-E918-4051-8780-B740567963CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {3A2FA778-E918-4051-8780-B740567963CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {3A2FA778-E918-4051-8780-B740567963CB}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {4E4A94A9-8736-4A58-87C8-6AF2F070267B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {4E4A94A9-8736-4A58-87C8-6AF2F070267B}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {4E4A94A9-8736-4A58-87C8-6AF2F070267B}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {4E4A94A9-8736-4A58-87C8-6AF2F070267B}.Release|Any CPU.Build.0 = Release|Any CPU
29 | EndGlobalSection
30 | GlobalSection(SolutionProperties) = preSolution
31 | HideSolutionNode = FALSE
32 | EndGlobalSection
33 | EndGlobal
34 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System.Reflection;
20 | using System.Runtime.InteropServices;
21 |
22 | // General Information about an assembly is controlled through the following
23 | // set of attributes. Change these attribute values to modify the information
24 | // associated with an assembly.
25 | [assembly: AssemblyTitle("DemoWhatsAppNETAPICSharp")]
26 | [assembly: AssemblyDescription("")]
27 | [assembly: AssemblyConfiguration("")]
28 | [assembly: AssemblyCompany("KR Software")]
29 | [assembly: AssemblyProduct("DemoWhatsAppNETAPICSharp")]
30 | [assembly: AssemblyCopyright("Copyright © 2020-2021. Kamarudin")]
31 | [assembly: AssemblyTrademark("")]
32 | [assembly: AssemblyCulture("")]
33 |
34 | // Setting ComVisible to false makes the types in this assembly not visible
35 | // to COM components. If you need to access a type in this assembly from
36 | // COM, set the ComVisible attribute to true on that type.
37 | [assembly: ComVisible(false)]
38 |
39 | // The following GUID is for the ID of the typelib if this project is exposed to COM
40 | [assembly: Guid("4ab7b509-ed2e-449a-9562-f7856ac59ac1")]
41 |
42 | // Version information for an assembly consists of the following four values:
43 | //
44 | // Major Version
45 | // Minor Version
46 | // Build Number
47 | // Revision
48 | //
49 | // You can specify all the values or you can default the Build and Revision Numbers
50 | // by using the '*' as shown below:
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("1.0.0.0")]
53 | [assembly: AssemblyFileVersion("1.0.0.0")]
54 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmPilihGroup.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Windows.Forms;
22 |
23 | using WhatsAppNETAPI;
24 |
25 | namespace DemoWhatsAppNETAPICSharp
26 | {
27 | public partial class FrmPilihGroup : Form
28 | {
29 | private int noUrut = 1;
30 |
31 | private IList _listOfGroup = new List();
32 |
33 | public Group Group
34 | {
35 | get
36 | {
37 | return lstGroup.SelectedIndex < 0 ? null : _listOfGroup[lstGroup.SelectedIndex];
38 | }
39 | }
40 |
41 | public FrmPilihGroup(string title)
42 | {
43 | InitializeComponent();
44 | this.Text = title;
45 | }
46 |
47 | public void OnReceiveGroupsHandler(IList groups, string sessionId)
48 | {
49 | // update UI dari thread yang berbeda
50 | lstGroup.Invoke(() =>
51 | {
52 | foreach (var group in groups)
53 | {
54 | if (!(group.id == "status@broadcast"))
55 | {
56 | _listOfGroup.Add(group);
57 |
58 | lstGroup.Items.Add(string.Format("{0}. {1} - {2}",
59 | noUrut, group.id, group.name));
60 |
61 | noUrut++;
62 | }
63 | }
64 | });
65 | }
66 |
67 | private void btnPilih_Click(object sender, EventArgs e)
68 | {
69 | this.DialogResult = DialogResult.OK;
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmPilihGroup.vb:
--------------------------------------------------------------------------------
1 | '*********************************************************************************************************
2 | ' Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | '
4 | ' Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | ' use this file except in compliance with the License. You may obtain a copy of
6 | ' the License at
7 | '
8 | ' http://www.apache.org/licenses/LICENSE-2.0
9 | '
10 | ' Unless required by applicable law or agreed to in writing, software
11 | ' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | ' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | ' License for the specific language governing permissions and limitations under
14 | ' the License.
15 | '
16 | ' The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | '*********************************************************************************************************
18 |
19 | Imports WhatsAppNETAPI
20 |
21 | Public Class FrmPilihGroup
22 |
23 | Dim noUrut = 1
24 | Dim _listOfGroup As New List(Of Group)
25 |
26 | Private _group As Group
27 | Public ReadOnly Property Group() As Group
28 | Get
29 | Return IIf(lstGroup.SelectedIndex < 0, Nothing, _listOfGroup(lstGroup.SelectedIndex))
30 | End Get
31 | End Property
32 |
33 | Public Sub New(ByVal title As String)
34 |
35 | ' This call is required by the designer.
36 | InitializeComponent()
37 |
38 | ' Add any initialization after the InitializeComponent() call.
39 | Me.Text = title
40 | End Sub
41 |
42 | Public Sub OnReceiveGroupsHandler(groups As IList(Of Group), ByVal sessionId As String)
43 | ' update UI dari thread yang berbeda
44 | lstGroup.Invoke(
45 | Sub()
46 | For Each group As Group In groups
47 | If Not (group.id = "status@broadcast") Then
48 |
49 | _listOfGroup.Add(group)
50 |
51 | lstGroup.Items.Add(String.Format("{0}. {1} - {2}",
52 | noUrut, group.id, group.name))
53 |
54 | noUrut = noUrut + 1
55 | End If
56 | Next
57 | End Sub
58 | )
59 | End Sub
60 |
61 | Private Sub btnPilih_Click(sender As Object, e As EventArgs) Handles btnPilih.Click
62 | Me.DialogResult = DialogResult.OK
63 | End Sub
64 |
65 | End Class
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmStartUp.vb:
--------------------------------------------------------------------------------
1 | '*********************************************************************************************************
2 | ' Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | '
4 | ' Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | ' use this file except in compliance with the License. You may obtain a copy of
6 | ' the License at
7 | '
8 | ' http://www.apache.org/licenses/LICENSE-2.0
9 | '
10 | ' Unless required by applicable law or agreed to in writing, software
11 | ' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | ' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | ' License for the specific language governing permissions and limitations under
14 | ' the License.
15 | '
16 | ' The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | '*********************************************************************************************************
18 |
19 | Imports System.IO
20 |
21 | Public Class FrmStartUp
22 |
23 | Public Sub OnScanMeHandler(ByVal qrcodePath As String, ByVal sessionId As String)
24 |
25 | Try
26 |
27 | If File.Exists(qrcodePath) Then
28 |
29 | Dim qrCode As Image
30 |
31 | Using originalImage As New Bitmap(qrcodePath)
32 | qrCode = New Bitmap(originalImage)
33 | End Using
34 |
35 | ' update UI dari thread yang berbeda
36 | picQRCode.Invoke(
37 | Sub()
38 | picQRCode.Visible = True
39 | picQRCode.Image = qrCode
40 | End Sub
41 | )
42 | End If
43 |
44 | Catch ex As Exception
45 |
46 | End Try
47 |
48 | End Sub
49 |
50 | Public Sub OnStartupHandler(ByVal message As String, ByVal sessionId As String)
51 |
52 | If message.IndexOf("Ready") >= 0 OrElse message.IndexOf("Failure") >= 0 _
53 | OrElse message.IndexOf("Timeout") >= 0 OrElse message.IndexOf("ERR_NAME") >= 0 _
54 | OrElse message.IndexOf("ERR_CONNECTION") >= 0 Then
55 |
56 | If Me.IsHandleCreated Then Me.Invoke(Sub() Me.Close())
57 |
58 | Else
59 | ' update UI dari thread yang berbeda
60 | lstLog.Invoke(
61 | Sub()
62 | lstLog.Items.Add(message)
63 | lstLog.SelectedIndex = lstLog.Items.Count - 1
64 | End Sub
65 | )
66 | End If
67 |
68 | End Sub
69 |
70 | End Class
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Resources.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 | Imports System
15 |
16 | Namespace My.Resources
17 |
18 | 'This class was auto-generated by the StronglyTypedResourceBuilder
19 | 'class via a tool like ResGen or Visual Studio.
20 | 'To add or remove a member, edit your .ResX file then rerun ResGen
21 | 'with the /str option, or rebuild your VS project.
22 | '''
23 | ''' A strongly-typed resource class, for looking up localized strings, etc.
24 | '''
25 | _
29 | Friend Module Resources
30 |
31 | Private resourceMan As Global.System.Resources.ResourceManager
32 |
33 | Private resourceCulture As Global.System.Globalization.CultureInfo
34 |
35 | '''
36 | ''' Returns the cached ResourceManager instance used by this class.
37 | '''
38 | _
39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
40 | Get
41 | If Object.ReferenceEquals(resourceMan, Nothing) Then
42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DemoWhatsAppNETAPIVBNET.Resources", GetType(Resources).Assembly)
43 | resourceMan = temp
44 | End If
45 | Return resourceMan
46 | End Get
47 | End Property
48 |
49 | '''
50 | ''' Overrides the current thread's CurrentUICulture property for all
51 | ''' resource lookups using this strongly typed resource class.
52 | '''
53 | _
54 | Friend Property Culture() As Global.System.Globalization.CultureInfo
55 | Get
56 | Return resourceCulture
57 | End Get
58 | Set
59 | resourceCulture = value
60 | End Set
61 | End Property
62 | End Module
63 | End Namespace
64 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmStartUp.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System.IO;
20 | using System.Drawing;
21 | using System.Windows.Forms;
22 |
23 | namespace DemoWhatsAppNETAPICSharp
24 | {
25 | public partial class FrmStartUp : Form
26 | {
27 | public FrmStartUp()
28 | {
29 | InitializeComponent();
30 | }
31 |
32 | public void OnScanMeHandler(string qrcodePath, string sessionId)
33 | {
34 | try
35 | {
36 |
37 | if (File.Exists(qrcodePath))
38 | {
39 | Image qrCode = null;
40 |
41 | // https://stackoverflow.com/questions/13625637/c-sharp-image-from-file-close-connection
42 | using (var originalImage = new Bitmap(qrcodePath))
43 | {
44 | qrCode = new Bitmap(originalImage);
45 | }
46 |
47 | // update UI dari thread yang berbeda
48 | picQRCode.Invoke(new MethodInvoker(() =>
49 | {
50 | picQRCode.Visible = true;
51 | picQRCode.Image = qrCode;
52 | }));
53 | }
54 | }
55 | catch
56 | {
57 |
58 | }
59 | }
60 |
61 | public void OnStartupHandler(string message, string sessionId)
62 | {
63 | if (message.IndexOf("Ready") >= 0 || message.IndexOf("Failure") >= 0
64 | || message.IndexOf("Timeout") >= 0 || message.IndexOf("ERR_NAME") >= 0
65 | || message.IndexOf("ERR_CONNECTION") >= 0 || message.IndexOf("close") >= 0)
66 | {
67 | if (this.IsHandleCreated)
68 | this.Invoke(new MethodInvoker(() => this.Close()));
69 | }
70 | else
71 | {
72 | // update UI dari thread yang berbeda
73 | lstLog.Invoke(new MethodInvoker(() =>
74 | {
75 | lstLog.Items.Add(message);
76 | lstLog.SelectedIndex = lstLog.Items.Count - 1;
77 | }
78 | ));
79 | }
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DemoWhatsAppNETAPICSharp.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DemoWhatsAppNETAPICSharp.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Settings.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My
16 |
17 | _
20 | Partial Friend NotInheritable Class MySettings
21 | Inherits Global.System.Configuration.ApplicationSettingsBase
22 |
23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
24 |
25 | #Region "My.Settings Auto-Save Functionality"
26 | #If _MyType = "WindowsForms" Then
27 | Private Shared addedHandler As Boolean
28 |
29 | Private Shared addedHandlerLockObject As New Object
30 |
31 | _
32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
33 | If My.Application.SaveMySettingsOnExit Then
34 | My.Settings.Save()
35 | End If
36 | End Sub
37 | #End If
38 | #End Region
39 |
40 | Public Shared ReadOnly Property [Default]() As MySettings
41 | Get
42 |
43 | #If _MyType = "WindowsForms" Then
44 | If Not addedHandler Then
45 | SyncLock addedHandlerLockObject
46 | If Not addedHandler Then
47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48 | addedHandler = True
49 | End If
50 | End SyncLock
51 | End If
52 | #End If
53 | Return defaultInstance
54 | End Get
55 | End Property
56 | End Class
57 | End Namespace
58 |
59 | Namespace My
60 |
61 | _
64 | Friend Module MySettingsProperty
65 |
66 | _
67 | Friend ReadOnly Property Settings() As Global.DemoWhatsAppNETAPIVBNET.My.MySettings
68 | Get
69 | Return Global.DemoWhatsAppNETAPIVBNET.My.MySettings.Default
70 | End Get
71 | End Property
72 | End Module
73 | End Namespace
74 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmSetStatus.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Windows.Forms;
22 |
23 | using WhatsAppNETAPI;
24 |
25 | namespace DemoWhatsAppNETAPICSharp
26 | {
27 | public partial class FrmSetStatus : Form
28 | {
29 | private IWhatsAppNETAPI _wa;
30 |
31 | public FrmSetStatus(string title, IWhatsAppNETAPI wa)
32 | {
33 | InitializeComponent();
34 | _wa = wa;
35 | this.Text = title;
36 | }
37 |
38 | private void btnSetStatus_Click(object sender, EventArgs e)
39 | {
40 | StatusArgs status = null;
41 |
42 | if (string.IsNullOrEmpty(txtStatus.Text))
43 | {
44 | MessageBox.Show("Status belum diisi", "Peringatan",
45 | MessageBoxButtons.OK, MessageBoxIcon.Information);
46 | txtStatus.Focus();
47 | return;
48 | }
49 |
50 | if (chkGambar.Checked)
51 | {
52 | if (string.IsNullOrEmpty(txtFileGambar.Text))
53 | status = new StatusArgs(txtStatus.Text);
54 | else
55 | status = new StatusArgs(txtStatus.Text, MsgArgsType.Image, txtFileGambar.Text);
56 | }
57 | else if (chkUrl.Checked)
58 | status = new StatusArgs(txtStatus.Text, MsgArgsType.Url, txtUrl.Text);
59 | else
60 | status = new StatusArgs(txtStatus.Text);
61 |
62 | _wa.SetStatus(status);
63 |
64 | this.Close();
65 | }
66 |
67 | private void btnCariGambar_Click(object sender, EventArgs e)
68 | {
69 | var fileName = Helper.ShowDialogOpen("Lokasi file gambar", true);
70 | if (!string.IsNullOrEmpty(fileName)) txtFileGambar.Text = fileName;
71 | }
72 |
73 | private void chkGambar_CheckedChanged(object sender, EventArgs e)
74 | {
75 | btnCariGambar.Enabled = chkGambar.Checked;
76 | if (chkGambar.Checked)
77 | {
78 | chkUrl.Checked = false;
79 | }
80 | else
81 | txtFileGambar.Clear();
82 | }
83 |
84 | private void chkUrl_CheckedChanged(object sender, EventArgs e)
85 | {
86 | if (chkUrl.Checked)
87 | {
88 | chkGambar.Checked = false;
89 | }
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmSetStatus.vb:
--------------------------------------------------------------------------------
1 | '*********************************************************************************************************
2 | ' Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | '
4 | ' Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | ' use this file except in compliance with the License. You may obtain a copy of
6 | ' the License at
7 | '
8 | ' http://www.apache.org/licenses/LICENSE-2.0
9 | '
10 | ' Unless required by applicable law or agreed to in writing, software
11 | ' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | ' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | ' License for the specific language governing permissions and limitations under
14 | ' the License.
15 | '
16 | ' The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | '*********************************************************************************************************
18 |
19 | Imports WhatsAppNETAPI
20 |
21 | Public Class FrmSetStatus
22 |
23 | Dim wa As IWhatsAppNETAPI
24 |
25 | Public Sub New(ByVal title As String, ByVal wa As IWhatsAppNETAPI)
26 |
27 | ' This call is required by the designer.
28 | InitializeComponent()
29 | Me.wa = wa
30 |
31 | ' Add any initialization after the InitializeComponent() call.
32 | Me.Text = title
33 | End Sub
34 |
35 | Private Sub btnSetStatus_Click(sender As Object, e As EventArgs) Handles btnSetStatus.Click
36 | Dim status As StatusArgs
37 |
38 | If String.IsNullOrEmpty(txtStatus.Text) Then
39 |
40 | MessageBox.Show("Status belum diisi", "Peringatan",
41 | MessageBoxButtons.OK, MessageBoxIcon.Information)
42 | txtStatus.Focus()
43 |
44 | Return
45 | End If
46 |
47 | If chkGambar.Checked Then
48 | If String.IsNullOrEmpty(txtFileGambar.Text) Then
49 | status = New StatusArgs(txtStatus.Text)
50 | Else
51 | status = New StatusArgs(txtStatus.Text, MsgArgsType.Image, txtFileGambar.Text)
52 | End If
53 |
54 | ElseIf chkUrl.Checked Then
55 | status = New StatusArgs(txtStatus.Text, MsgArgsType.Url, txtUrl.Text)
56 | Else
57 | status = New StatusArgs(txtStatus.Text)
58 | End If
59 |
60 | wa.SetStatus(status)
61 | Me.Close()
62 | End Sub
63 |
64 | Private Sub btnCariGambar_Click(sender As Object, e As EventArgs) Handles btnCariGambar.Click
65 | Dim fileName = ShowDialogOpen("Lokasi file gambar", True)
66 |
67 | If Not String.IsNullOrEmpty(fileName) Then txtFileGambar.Text = fileName
68 | End Sub
69 |
70 | Private Sub chkGambar_CheckedChanged(sender As Object, e As EventArgs) Handles chkGambar.CheckedChanged
71 | btnCariGambar.Enabled = chkGambar.Checked
72 |
73 | If chkGambar.Checked Then
74 | chkUrl.Checked = False
75 | Else
76 | txtFileGambar.Clear()
77 | End If
78 | End Sub
79 |
80 | Private Sub chkUrl_CheckedChanged(sender As Object, e As EventArgs) Handles chkUrl.CheckedChanged
81 | If chkUrl.Checked Then
82 | chkGambar.Checked = False
83 | End If
84 | End Sub
85 | End Class
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmPilihGroup.Designer.vb:
--------------------------------------------------------------------------------
1 |
2 | Partial Class FrmPilihGroup
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 |
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 |
24 | Private Sub InitializeComponent()
25 | Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
26 | Me.btnPilih = New System.Windows.Forms.Button()
27 | Me.lstGroup = New System.Windows.Forms.ListBox()
28 | Me.tableLayoutPanel1.SuspendLayout()
29 | Me.SuspendLayout()
30 | '
31 | 'tableLayoutPanel1
32 | '
33 | Me.tableLayoutPanel1.ColumnCount = 1
34 | Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
35 | Me.tableLayoutPanel1.Controls.Add(Me.btnPilih, 0, 1)
36 | Me.tableLayoutPanel1.Controls.Add(Me.lstGroup, 0, 0)
37 | Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
38 | Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
39 | Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
40 | Me.tableLayoutPanel1.RowCount = 2
41 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
42 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
43 | Me.tableLayoutPanel1.Size = New System.Drawing.Size(393, 424)
44 | Me.tableLayoutPanel1.TabIndex = 1
45 | '
46 | 'btnPilih
47 | '
48 | Me.btnPilih.Dock = System.Windows.Forms.DockStyle.Fill
49 | Me.btnPilih.Location = New System.Drawing.Point(3, 397)
50 | Me.btnPilih.Name = "btnPilih"
51 | Me.btnPilih.Size = New System.Drawing.Size(387, 24)
52 | Me.btnPilih.TabIndex = 1
53 | Me.btnPilih.Text = "Pilih"
54 | Me.btnPilih.UseVisualStyleBackColor = True
55 | '
56 | 'lstGroup
57 | '
58 | Me.lstGroup.Dock = System.Windows.Forms.DockStyle.Fill
59 | Me.lstGroup.FormattingEnabled = True
60 | Me.lstGroup.Location = New System.Drawing.Point(3, 3)
61 | Me.lstGroup.Name = "lstGroup"
62 | Me.lstGroup.Size = New System.Drawing.Size(387, 388)
63 | Me.lstGroup.TabIndex = 0
64 | '
65 | 'FrmPilihGroup
66 | '
67 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
68 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
69 | Me.ClientSize = New System.Drawing.Size(393, 424)
70 | Me.Controls.Add(Me.tableLayoutPanel1)
71 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
72 | Me.MaximizeBox = False
73 | Me.MinimizeBox = False
74 | Me.Name = "FrmPilihGroup"
75 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
76 | Me.Text = "Pilih Group"
77 | Me.tableLayoutPanel1.ResumeLayout(False)
78 | Me.ResumeLayout(False)
79 |
80 | End Sub
81 |
82 | Private WithEvents tableLayoutPanel1 As TableLayoutPanel
83 | Private WithEvents btnPilih As Button
84 | Private WithEvents lstGroup As ListBox
85 | End Class
86 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmContactOrGroup.Designer.vb:
--------------------------------------------------------------------------------
1 | _
2 | Partial Class FrmContactOrGroup
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 | _
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 | _
24 | Private Sub InitializeComponent()
25 | Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
26 | Me.btnClose = New System.Windows.Forms.Button()
27 | Me.lstContactOrGroup = New System.Windows.Forms.ListBox()
28 | Me.tableLayoutPanel1.SuspendLayout()
29 | Me.SuspendLayout()
30 | '
31 | 'tableLayoutPanel1
32 | '
33 | Me.tableLayoutPanel1.ColumnCount = 1
34 | Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
35 | Me.tableLayoutPanel1.Controls.Add(Me.btnClose, 0, 1)
36 | Me.tableLayoutPanel1.Controls.Add(Me.lstContactOrGroup, 0, 0)
37 | Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
38 | Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
39 | Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
40 | Me.tableLayoutPanel1.RowCount = 2
41 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
42 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
43 | Me.tableLayoutPanel1.Size = New System.Drawing.Size(393, 424)
44 | Me.tableLayoutPanel1.TabIndex = 1
45 | '
46 | 'btnClose
47 | '
48 | Me.btnClose.Dock = System.Windows.Forms.DockStyle.Fill
49 | Me.btnClose.Location = New System.Drawing.Point(3, 397)
50 | Me.btnClose.Name = "btnClose"
51 | Me.btnClose.Size = New System.Drawing.Size(387, 24)
52 | Me.btnClose.TabIndex = 1
53 | Me.btnClose.Text = "Close"
54 | Me.btnClose.UseVisualStyleBackColor = True
55 | '
56 | 'lstContactOrGroup
57 | '
58 | Me.lstContactOrGroup.Dock = System.Windows.Forms.DockStyle.Fill
59 | Me.lstContactOrGroup.FormattingEnabled = True
60 | Me.lstContactOrGroup.Location = New System.Drawing.Point(3, 3)
61 | Me.lstContactOrGroup.Name = "lstContactOrGroup"
62 | Me.lstContactOrGroup.Size = New System.Drawing.Size(387, 388)
63 | Me.lstContactOrGroup.TabIndex = 0
64 | '
65 | 'FrmContactOrGroup
66 | '
67 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
68 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
69 | Me.ClientSize = New System.Drawing.Size(393, 424)
70 | Me.Controls.Add(Me.tableLayoutPanel1)
71 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
72 | Me.MaximizeBox = False
73 | Me.MinimizeBox = False
74 | Me.Name = "FrmContactOrGroup"
75 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
76 | Me.Text = "FrmContact"
77 | Me.tableLayoutPanel1.ResumeLayout(False)
78 | Me.ResumeLayout(False)
79 |
80 | End Sub
81 |
82 | Private WithEvents tableLayoutPanel1 As TableLayoutPanel
83 | Private WithEvents btnClose As Button
84 | Private WithEvents lstContactOrGroup As ListBox
85 | End Class
86 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmPilihGroup.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoWhatsAppNETAPICSharp
2 | {
3 | partial class FrmPilihGroup
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
32 | this.btnPilih = new System.Windows.Forms.Button();
33 | this.lstGroup = new System.Windows.Forms.ListBox();
34 | this.tableLayoutPanel1.SuspendLayout();
35 | this.SuspendLayout();
36 | //
37 | // tableLayoutPanel1
38 | //
39 | this.tableLayoutPanel1.ColumnCount = 1;
40 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
41 | this.tableLayoutPanel1.Controls.Add(this.btnPilih, 0, 1);
42 | this.tableLayoutPanel1.Controls.Add(this.lstGroup, 0, 0);
43 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
44 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
45 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
46 | this.tableLayoutPanel1.RowCount = 2;
47 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
48 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
49 | this.tableLayoutPanel1.Size = new System.Drawing.Size(393, 424);
50 | this.tableLayoutPanel1.TabIndex = 0;
51 | //
52 | // btnPilih
53 | //
54 | this.btnPilih.Dock = System.Windows.Forms.DockStyle.Fill;
55 | this.btnPilih.Location = new System.Drawing.Point(3, 397);
56 | this.btnPilih.Name = "btnPilih";
57 | this.btnPilih.Size = new System.Drawing.Size(387, 24);
58 | this.btnPilih.TabIndex = 1;
59 | this.btnPilih.Text = "Pilih";
60 | this.btnPilih.UseVisualStyleBackColor = true;
61 | this.btnPilih.Click += new System.EventHandler(this.btnPilih_Click);
62 | //
63 | // lstGroup
64 | //
65 | this.lstGroup.Dock = System.Windows.Forms.DockStyle.Fill;
66 | this.lstGroup.FormattingEnabled = true;
67 | this.lstGroup.Location = new System.Drawing.Point(3, 3);
68 | this.lstGroup.Name = "lstGroup";
69 | this.lstGroup.Size = new System.Drawing.Size(387, 388);
70 | this.lstGroup.TabIndex = 0;
71 | //
72 | // FrmPilihGroup
73 | //
74 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
75 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
76 | this.ClientSize = new System.Drawing.Size(393, 424);
77 | this.Controls.Add(this.tableLayoutPanel1);
78 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
79 | this.MaximizeBox = false;
80 | this.MinimizeBox = false;
81 | this.Name = "FrmPilihGroup";
82 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
83 | this.Text = "Pilih Group";
84 | this.tableLayoutPanel1.ResumeLayout(false);
85 | this.ResumeLayout(false);
86 |
87 | }
88 |
89 | #endregion
90 |
91 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
92 | private System.Windows.Forms.Button btnPilih;
93 | private System.Windows.Forms.ListBox lstGroup;
94 | }
95 | }
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmStartUp.Designer.vb:
--------------------------------------------------------------------------------
1 | _
2 | Partial Class FrmStartUp
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 | _
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 | _
24 | Private Sub InitializeComponent()
25 | Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
26 | Me.lstLog = New System.Windows.Forms.ListBox()
27 | Me.picQRCode = New System.Windows.Forms.PictureBox()
28 | Me.tableLayoutPanel1.SuspendLayout()
29 | CType(Me.picQRCode, System.ComponentModel.ISupportInitialize).BeginInit()
30 | Me.SuspendLayout()
31 | '
32 | 'tableLayoutPanel1
33 | '
34 | Me.tableLayoutPanel1.ColumnCount = 2
35 | Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
36 | Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle())
37 | Me.tableLayoutPanel1.Controls.Add(Me.lstLog, 0, 0)
38 | Me.tableLayoutPanel1.Controls.Add(Me.picQRCode, 1, 0)
39 | Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
40 | Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
41 | Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
42 | Me.tableLayoutPanel1.RowCount = 1
43 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
44 | Me.tableLayoutPanel1.Size = New System.Drawing.Size(563, 305)
45 | Me.tableLayoutPanel1.TabIndex = 1
46 | '
47 | 'lstLog
48 | '
49 | Me.lstLog.Dock = System.Windows.Forms.DockStyle.Fill
50 | Me.lstLog.FormattingEnabled = True
51 | Me.lstLog.Items.AddRange(New Object() {"- Wait ..."})
52 | Me.lstLog.Location = New System.Drawing.Point(10, 10)
53 | Me.lstLog.Margin = New System.Windows.Forms.Padding(10)
54 | Me.lstLog.Name = "lstLog"
55 | Me.lstLog.Size = New System.Drawing.Size(236, 285)
56 | Me.lstLog.TabIndex = 0
57 | '
58 | 'picQRCode
59 | '
60 | Me.picQRCode.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
61 | Me.picQRCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
62 | Me.picQRCode.Dock = System.Windows.Forms.DockStyle.Fill
63 | Me.picQRCode.Location = New System.Drawing.Point(266, 10)
64 | Me.picQRCode.Margin = New System.Windows.Forms.Padding(10)
65 | Me.picQRCode.Name = "picQRCode"
66 | Me.picQRCode.Size = New System.Drawing.Size(287, 285)
67 | Me.picQRCode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
68 | Me.picQRCode.TabIndex = 1
69 | Me.picQRCode.TabStop = False
70 | Me.picQRCode.Visible = False
71 | '
72 | 'FrmStartUp
73 | '
74 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
75 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
76 | Me.BackColor = System.Drawing.Color.White
77 | Me.ClientSize = New System.Drawing.Size(563, 305)
78 | Me.Controls.Add(Me.tableLayoutPanel1)
79 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
80 | Me.MaximizeBox = False
81 | Me.MinimizeBox = False
82 | Me.Name = "FrmStartUp"
83 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
84 | Me.Text = "FrmStartUp"
85 | Me.tableLayoutPanel1.ResumeLayout(False)
86 | CType(Me.picQRCode, System.ComponentModel.ISupportInitialize).EndInit()
87 | Me.ResumeLayout(False)
88 |
89 | End Sub
90 |
91 | Private WithEvents tableLayoutPanel1 As TableLayoutPanel
92 | Private WithEvents lstLog As ListBox
93 | Private WithEvents picQRCode As PictureBox
94 | End Class
95 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmContactOrGroup.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoWhatsAppNETAPICSharp
2 | {
3 | partial class FrmContactOrGroup
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
32 | this.btnClose = new System.Windows.Forms.Button();
33 | this.lstContactOrGroup = new System.Windows.Forms.ListBox();
34 | this.tableLayoutPanel1.SuspendLayout();
35 | this.SuspendLayout();
36 | //
37 | // tableLayoutPanel1
38 | //
39 | this.tableLayoutPanel1.ColumnCount = 1;
40 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
41 | this.tableLayoutPanel1.Controls.Add(this.btnClose, 0, 1);
42 | this.tableLayoutPanel1.Controls.Add(this.lstContactOrGroup, 0, 0);
43 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
44 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
45 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
46 | this.tableLayoutPanel1.RowCount = 2;
47 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
48 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
49 | this.tableLayoutPanel1.Size = new System.Drawing.Size(393, 424);
50 | this.tableLayoutPanel1.TabIndex = 0;
51 | //
52 | // btnClose
53 | //
54 | this.btnClose.Dock = System.Windows.Forms.DockStyle.Fill;
55 | this.btnClose.Location = new System.Drawing.Point(3, 397);
56 | this.btnClose.Name = "btnClose";
57 | this.btnClose.Size = new System.Drawing.Size(387, 24);
58 | this.btnClose.TabIndex = 1;
59 | this.btnClose.Text = "Close";
60 | this.btnClose.UseVisualStyleBackColor = true;
61 | this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
62 | //
63 | // lstContactOrGroup
64 | //
65 | this.lstContactOrGroup.Dock = System.Windows.Forms.DockStyle.Fill;
66 | this.lstContactOrGroup.FormattingEnabled = true;
67 | this.lstContactOrGroup.Location = new System.Drawing.Point(3, 3);
68 | this.lstContactOrGroup.Name = "lstContactOrGroup";
69 | this.lstContactOrGroup.Size = new System.Drawing.Size(387, 388);
70 | this.lstContactOrGroup.TabIndex = 0;
71 | //
72 | // FrmContactOrGroup
73 | //
74 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
75 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
76 | this.ClientSize = new System.Drawing.Size(393, 424);
77 | this.Controls.Add(this.tableLayoutPanel1);
78 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
79 | this.MaximizeBox = false;
80 | this.MinimizeBox = false;
81 | this.Name = "FrmContactOrGroup";
82 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
83 | this.Text = "Contacts";
84 | this.Load += new System.EventHandler(this.FrmContactOrGroup_Load);
85 | this.tableLayoutPanel1.ResumeLayout(false);
86 | this.ResumeLayout(false);
87 |
88 | }
89 |
90 | #endregion
91 |
92 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
93 | private System.Windows.Forms.Button btnClose;
94 | private System.Windows.Forms.ListBox lstContactOrGroup;
95 | }
96 | }
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmContactOrGroup.vb:
--------------------------------------------------------------------------------
1 | '*********************************************************************************************************
2 | ' Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | '
4 | ' Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | ' use this file except in compliance with the License. You may obtain a copy of
6 | ' the License at
7 | '
8 | ' http://www.apache.org/licenses/LICENSE-2.0
9 | '
10 | ' Unless required by applicable law or agreed to in writing, software
11 | ' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | ' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | ' License for the specific language governing permissions and limitations under
14 | ' the License.
15 | '
16 | ' The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | '*********************************************************************************************************
18 |
19 | Imports WhatsAppNETAPI
20 |
21 | Public Class FrmContactOrGroup
22 |
23 | Dim noUrut = 1
24 |
25 | Public Sub New(ByVal title As String)
26 |
27 | ' This call is required by the designer.
28 | InitializeComponent()
29 |
30 | ' Add any initialization after the InitializeComponent() call.
31 | Me.Text = title
32 | End Sub
33 |
34 | Private Sub FrmContactOrGroup_Load(sender As Object, e As EventArgs) Handles MyBase.Load
35 | Me.UseWaitCursor = True
36 | End Sub
37 |
38 | Public Sub OnReceiveContactsHandler(contacts As IList(Of Contact), ByVal sessionId As String)
39 | ' update UI dari thread yang berbeda
40 | lstContactOrGroup.Invoke(
41 | Sub()
42 | For Each contact As Contact In contacts
43 |
44 | If Not (contact.id = "status@broadcast") Then
45 | lstContactOrGroup.Items.Add(String.Format("{0}. {1} - {2}, {3}",
46 | noUrut, contact.id, contact.name, contact.pushname))
47 |
48 | noUrut = noUrut + 1
49 |
50 | Else ' status@broadcast -> dummy contact, penanda load data contact selesai
51 | If Me.IsHandleCreated Then Me.Invoke(Sub() Me.UseWaitCursor = False)
52 | End If
53 | Next
54 | End Sub
55 | )
56 | End Sub
57 |
58 | Public Sub OnReceiveBusinessProfilesHandler(profiles As IList(Of BusinessProfile), ByVal sessionId As String)
59 | ' update UI dari thread yang berbeda
60 | lstContactOrGroup.Invoke(
61 | Sub()
62 | For Each profile As BusinessProfile In profiles
63 |
64 | If Not (profile.id = "status@broadcast") Then
65 | Dim website As String = String.Empty
66 |
67 | If profile.website.Length > 0 Then
68 | website = profile.website(0)
69 | End If
70 |
71 | lstContactOrGroup.Items.Add(String.Format("{0}. {1} - {2}, {3}",
72 | noUrut, profile.email, profile.category, website))
73 |
74 | noUrut = noUrut + 1
75 |
76 | Else ' status@broadcast -> dummy id, penanda load data business profile selesai
77 | If Me.IsHandleCreated Then Me.Invoke(Sub() Me.UseWaitCursor = False)
78 | End If
79 | Next
80 | End Sub
81 | )
82 | End Sub
83 |
84 | Public Sub OnReceiveGroupsHandler(groups As IList(Of Group), ByVal sessionId As String)
85 | ' update UI dari thread yang berbeda
86 | lstContactOrGroup.Invoke(
87 | Sub()
88 | For Each group As Group In groups
89 | If Not (group.id = "status@broadcast") Then
90 | lstContactOrGroup.Items.Add(String.Format("{0}. {1} - {2}",
91 | noUrut, group.id, group.name))
92 |
93 | noUrut = noUrut + 1
94 |
95 | Dim noUrutMember = 1
96 |
97 | For Each member As Contact In group.members
98 | lstContactOrGroup.Items.Add(String.Format("---> {0}. {1} - {2}",
99 | noUrutMember, member.id, member.name))
100 | noUrutMember = noUrutMember + 1
101 | Next
102 |
103 | Else ' status@broadcast -> dummy group, penanda load data group selesai
104 | If Me.IsHandleCreated Then Me.Invoke(Sub() Me.UseWaitCursor = False)
105 | End If
106 | Next
107 | End Sub
108 | )
109 | End Sub
110 |
111 | Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
112 | Me.Close()
113 | End Sub
114 |
115 | End Class
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmStartUp.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoWhatsAppNETAPICSharp
2 | {
3 | partial class FrmStartUp
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
32 | this.lstLog = new System.Windows.Forms.ListBox();
33 | this.picQRCode = new System.Windows.Forms.PictureBox();
34 | this.tableLayoutPanel1.SuspendLayout();
35 | ((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
36 | this.SuspendLayout();
37 | //
38 | // tableLayoutPanel1
39 | //
40 | this.tableLayoutPanel1.ColumnCount = 2;
41 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
42 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
43 | this.tableLayoutPanel1.Controls.Add(this.lstLog, 0, 0);
44 | this.tableLayoutPanel1.Controls.Add(this.picQRCode, 1, 0);
45 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
46 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
47 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
48 | this.tableLayoutPanel1.RowCount = 1;
49 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
50 | this.tableLayoutPanel1.Size = new System.Drawing.Size(563, 305);
51 | this.tableLayoutPanel1.TabIndex = 0;
52 | //
53 | // lstLog
54 | //
55 | this.lstLog.Dock = System.Windows.Forms.DockStyle.Fill;
56 | this.lstLog.FormattingEnabled = true;
57 | this.lstLog.Items.AddRange(new object[] {
58 | "- Wait ..."});
59 | this.lstLog.Location = new System.Drawing.Point(10, 10);
60 | this.lstLog.Margin = new System.Windows.Forms.Padding(10);
61 | this.lstLog.Name = "lstLog";
62 | this.lstLog.Size = new System.Drawing.Size(236, 285);
63 | this.lstLog.TabIndex = 0;
64 | //
65 | // picQRCode
66 | //
67 | this.picQRCode.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
68 | this.picQRCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
69 | this.picQRCode.Dock = System.Windows.Forms.DockStyle.Fill;
70 | this.picQRCode.Location = new System.Drawing.Point(266, 10);
71 | this.picQRCode.Margin = new System.Windows.Forms.Padding(10);
72 | this.picQRCode.Name = "picQRCode";
73 | this.picQRCode.Size = new System.Drawing.Size(287, 285);
74 | this.picQRCode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
75 | this.picQRCode.TabIndex = 1;
76 | this.picQRCode.TabStop = false;
77 | this.picQRCode.Visible = false;
78 | //
79 | // FrmStartUp
80 | //
81 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
82 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
83 | this.BackColor = System.Drawing.Color.White;
84 | this.ClientSize = new System.Drawing.Size(563, 305);
85 | this.Controls.Add(this.tableLayoutPanel1);
86 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
87 | this.MaximizeBox = false;
88 | this.MinimizeBox = false;
89 | this.Name = "FrmStartUp";
90 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
91 | this.Text = "StartUp";
92 | this.tableLayoutPanel1.ResumeLayout(false);
93 | ((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
94 | this.ResumeLayout(false);
95 |
96 | }
97 |
98 | #endregion
99 |
100 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
101 | private System.Windows.Forms.ListBox lstLog;
102 | private System.Windows.Forms.PictureBox picQRCode;
103 | }
104 | }
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmContactOrGroup.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (C) 2021 Kamarudin (http://wa-net.coding4ever.net/)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | *
16 | * The latest version of this file can be found at https://github.com/WhatsAppNETClient/WhatsAppNETClient2
17 | */
18 |
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Windows.Forms;
22 |
23 | using WhatsAppNETAPI;
24 |
25 | namespace DemoWhatsAppNETAPICSharp
26 | {
27 | public partial class FrmContactOrGroup : Form
28 | {
29 | private int noUrut = 1;
30 |
31 | public FrmContactOrGroup(string title)
32 | {
33 | InitializeComponent();
34 | this.Text = title;
35 | }
36 |
37 | private void FrmContactOrGroup_Load(object sender, EventArgs e)
38 | {
39 | this.UseWaitCursor = true;
40 | }
41 |
42 | public void OnReceiveContactsHandler(IList contacts, string sessionId)
43 | {
44 | // update UI dari thread yang berbeda
45 | lstContactOrGroup.Invoke(() =>
46 | {
47 | foreach (var contact in contacts)
48 | {
49 | if (!(contact.id == "status@broadcast"))
50 | {
51 | lstContactOrGroup.Items.Add(string.Format("{0}. {1} - {2}",
52 | noUrut, contact.id, contact.name));
53 |
54 | noUrut++;
55 | }
56 | else // status@broadcast -> dummy contact, penanda load data contact selesai
57 | {
58 | if (this.IsHandleCreated)
59 | this.Invoke(new MethodInvoker(() => this.UseWaitCursor = false));
60 | }
61 |
62 | }
63 | });
64 | }
65 |
66 | public void OnReceiveGroupsHandler(IList groups, string sessionId)
67 | {
68 | // update UI dari thread yang berbeda
69 | lstContactOrGroup.Invoke(() =>
70 | {
71 | foreach (var group in groups)
72 | {
73 | if (!(group.id == "status@broadcast"))
74 | {
75 | lstContactOrGroup.Items.Add(string.Format("{0}. {1} - {2}",
76 | noUrut, group.id, group.name));
77 |
78 | noUrut++;
79 |
80 | var noUrutMember = 1;
81 | foreach (var member in group.members)
82 | {
83 | lstContactOrGroup.Items.Add(string.Format("---> {0}. {1} - {2}",
84 | noUrutMember, member.id, member.name));
85 |
86 | noUrutMember++;
87 | }
88 | }
89 | else // status@broadcast -> dummy group, penanda load data group selesai
90 | {
91 | if (this.IsHandleCreated)
92 | this.Invoke(new MethodInvoker(() => this.UseWaitCursor = false));
93 | }
94 | }
95 | });
96 | }
97 |
98 | public void OnReceiveBusinessProfilesHandler(IList profiles, string sessionId)
99 | {
100 | // update UI dari thread yang berbeda
101 | lstContactOrGroup.Invoke(() =>
102 | {
103 | foreach (var profile in profiles)
104 | {
105 | if (!(profile.id == "status@broadcast"))
106 | {
107 | var website = string.Empty;
108 | if (profile.website.Length > 0)
109 | website = profile.website[0];
110 |
111 | lstContactOrGroup.Items.Add(string.Format("{0}. {1} - {2} - {3}",
112 | noUrut, profile.email, profile.category, website));
113 |
114 | noUrut++;
115 | }
116 | else // status@broadcast -> dummy id, penanda load data business profile selesai
117 | {
118 | if (this.IsHandleCreated)
119 | this.Invoke(new MethodInvoker(() => this.UseWaitCursor = false));
120 | }
121 | }
122 | });
123 | }
124 |
125 | private void btnClose_Click(object sender, EventArgs e)
126 | {
127 | this.Close();
128 | }
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/My Project/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmMain.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmMain.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmPilihGroup.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmSetStatus.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmStartUp.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmPilihGroup.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmSetStatus.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmStartUp.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmContactOrGroup.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmContactOrGroup.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/DemoWhatsAppNETAPICSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {3A2FA778-E918-4051-8780-B740567963CB}
8 | WinExe
9 | Properties
10 | DemoWhatsAppNETAPICSharp
11 | DemoWhatsAppNETAPICSharp
12 | v4.5
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 | False
37 | ..\..\libs\WhatsAppNETAPI.3.0.0\lib\net45\JamesWright.SimpleHttp.dll
38 | True
39 |
40 |
41 | ..\..\libs\Microsoft.AspNet.SignalR.Client.2.4.2\lib\net45\Microsoft.AspNet.SignalR.Client.dll
42 | True
43 |
44 |
45 | ..\..\libs\Microsoft.AspNet.SignalR.Core.2.4.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll
46 | True
47 |
48 |
49 | ..\..\libs\Microsoft.Owin.4.2.0\lib\net45\Microsoft.Owin.dll
50 | True
51 |
52 |
53 | ..\..\libs\Microsoft.Owin.Cors.4.2.0\lib\net45\Microsoft.Owin.Cors.dll
54 | True
55 |
56 |
57 | ..\..\libs\Microsoft.Owin.Diagnostics.2.1.0\lib\net40\Microsoft.Owin.Diagnostics.dll
58 | True
59 |
60 |
61 | ..\..\libs\Microsoft.Owin.Host.HttpListener.2.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll
62 | True
63 |
64 |
65 | ..\..\libs\Microsoft.Owin.Hosting.4.2.0\lib\net45\Microsoft.Owin.Hosting.dll
66 | True
67 |
68 |
69 | ..\..\libs\Microsoft.Owin.Security.2.1.0\lib\net45\Microsoft.Owin.Security.dll
70 | True
71 |
72 |
73 | ..\..\libs\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
74 | True
75 |
76 |
77 | ..\..\libs\Owin.1.0\lib\net40\Owin.dll
78 | True
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | ..\..\libs\Microsoft.AspNet.Cors.5.0.0\lib\net45\System.Web.Cors.dll
87 | True
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | ..\..\libs\WaitCursor.dll
99 |
100 |
101 | False
102 | ..\..\libs\WhatsAppNETAPI.3.0.0\lib\net45\WhatsAppNETAPI.dll
103 | True
104 |
105 |
106 |
107 |
108 |
109 | Form
110 |
111 |
112 | FrmPilihGroup.cs
113 |
114 |
115 | Form
116 |
117 |
118 | FrmContactOrGroup.cs
119 |
120 |
121 | Form
122 |
123 |
124 | FrmMain.cs
125 |
126 |
127 | Form
128 |
129 |
130 | FrmStartUp.cs
131 |
132 |
133 |
134 |
135 |
136 | FrmPilihGroup.cs
137 |
138 |
139 | FrmContactOrGroup.cs
140 |
141 |
142 | FrmMain.cs
143 |
144 |
145 | FrmStartUp.cs
146 |
147 |
148 | ResXFileCodeGenerator
149 | Resources.Designer.cs
150 | Designer
151 |
152 |
153 | True
154 | Resources.resx
155 |
156 |
157 |
158 | SettingsSingleFileGenerator
159 | Settings.Designer.cs
160 |
161 |
162 | True
163 | Settings.settings
164 | True
165 |
166 |
167 |
168 |
169 |
170 |
171 |
178 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/DemoWhatsAppNETAPIVBNET.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {4E4A94A9-8736-4A58-87C8-6AF2F070267B}
8 | WinExe
9 | DemoWhatsAppNETAPIVBNET.My.MyApplication
10 | DemoWhatsAppNETAPIVBNET
11 | DemoWhatsAppNETAPIVBNET
12 | 512
13 | WindowsForms
14 | v4.5
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | true
21 | true
22 | bin\Debug\
23 | DemoWhatsAppNETAPIVBNET.xml
24 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | false
30 | true
31 | true
32 | bin\Release\
33 | DemoWhatsAppNETAPIVBNET.xml
34 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
35 |
36 |
37 | On
38 |
39 |
40 | Binary
41 |
42 |
43 | Off
44 |
45 |
46 | On
47 |
48 |
49 |
50 | False
51 | ..\..\libs\WhatsAppNETAPI.3.0.0\lib\net45\JamesWright.SimpleHttp.dll
52 | True
53 |
54 |
55 | ..\..\libs\Microsoft.AspNet.SignalR.Client.2.4.2\lib\net45\Microsoft.AspNet.SignalR.Client.dll
56 | True
57 |
58 |
59 | ..\..\libs\Microsoft.AspNet.SignalR.Core.2.4.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll
60 | True
61 |
62 |
63 |
64 | ..\..\libs\Microsoft.Owin.4.2.0\lib\net45\Microsoft.Owin.dll
65 | True
66 |
67 |
68 | ..\..\libs\Microsoft.Owin.Cors.4.2.0\lib\net45\Microsoft.Owin.Cors.dll
69 | True
70 |
71 |
72 | ..\..\libs\Microsoft.Owin.Diagnostics.2.1.0\lib\net40\Microsoft.Owin.Diagnostics.dll
73 | True
74 |
75 |
76 | ..\..\libs\Microsoft.Owin.Host.HttpListener.2.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll
77 | True
78 |
79 |
80 | ..\..\libs\Microsoft.Owin.Hosting.4.2.0\lib\net45\Microsoft.Owin.Hosting.dll
81 | True
82 |
83 |
84 | ..\..\libs\Microsoft.Owin.Security.2.1.0\lib\net45\Microsoft.Owin.Security.dll
85 | True
86 |
87 |
88 | ..\..\libs\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
89 | True
90 |
91 |
92 | ..\..\libs\Owin.1.0\lib\net40\Owin.dll
93 | True
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | ..\..\libs\Microsoft.AspNet.Cors.5.0.0\lib\net45\System.Web.Cors.dll
104 | True
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | ..\..\libs\WaitCursor.dll
113 |
114 |
115 | False
116 | ..\..\libs\WhatsAppNETAPI.3.0.0\lib\net45\WhatsAppNETAPI.dll
117 | True
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | FrmPilihGroup.vb
137 |
138 |
139 | Form
140 |
141 |
142 | FrmContactOrGroup.vb
143 |
144 |
145 | Form
146 |
147 |
148 | FrmMain.vb
149 |
150 |
151 | Form
152 |
153 |
154 | FrmStartUp.vb
155 |
156 |
157 | Form
158 |
159 |
160 |
161 |
162 | True
163 | Application.myapp
164 |
165 |
166 | True
167 | True
168 | Resources.resx
169 |
170 |
171 | True
172 | Settings.settings
173 | True
174 |
175 |
176 |
177 |
178 | FrmPilihGroup.vb
179 |
180 |
181 | FrmContactOrGroup.vb
182 |
183 |
184 | FrmMain.vb
185 |
186 |
187 | FrmStartUp.vb
188 |
189 |
190 | VbMyResourcesResXFileCodeGenerator
191 | Resources.Designer.vb
192 | My.Resources
193 | Designer
194 |
195 |
196 |
197 |
198 | MyApplicationCodeGenerator
199 | Application.Designer.vb
200 |
201 |
202 | SettingsSingleFileGenerator
203 | My
204 | Settings.Designer.vb
205 |
206 |
207 |
208 |
209 |
210 |
217 |
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPIVBNET/FrmSetStatus.Designer.vb:
--------------------------------------------------------------------------------
1 |
2 | Partial Class FrmSetStatus
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 |
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 |
24 | Private Sub InitializeComponent()
25 | Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
26 | Me.btnSetStatus = New System.Windows.Forms.Button()
27 | Me.tableLayoutPanel2 = New System.Windows.Forms.TableLayoutPanel()
28 | Me.tableLayoutPanel3 = New System.Windows.Forms.TableLayoutPanel()
29 | Me.label1 = New System.Windows.Forms.Label()
30 | Me.txtStatus = New System.Windows.Forms.TextBox()
31 | Me.groupBox1 = New System.Windows.Forms.GroupBox()
32 | Me.chkUrl = New System.Windows.Forms.CheckBox()
33 | Me.chkGambar = New System.Windows.Forms.CheckBox()
34 | Me.btnCariGambar = New System.Windows.Forms.Button()
35 | Me.txtUrl = New System.Windows.Forms.TextBox()
36 | Me.txtFileGambar = New System.Windows.Forms.TextBox()
37 | Me.tableLayoutPanel1.SuspendLayout()
38 | Me.tableLayoutPanel2.SuspendLayout()
39 | Me.tableLayoutPanel3.SuspendLayout()
40 | Me.groupBox1.SuspendLayout()
41 | Me.SuspendLayout()
42 | '
43 | 'tableLayoutPanel1
44 | '
45 | Me.tableLayoutPanel1.ColumnCount = 1
46 | Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
47 | Me.tableLayoutPanel1.Controls.Add(Me.btnSetStatus, 0, 1)
48 | Me.tableLayoutPanel1.Controls.Add(Me.tableLayoutPanel2, 0, 0)
49 | Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
50 | Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
51 | Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
52 | Me.tableLayoutPanel1.RowCount = 2
53 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
54 | Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
55 | Me.tableLayoutPanel1.Size = New System.Drawing.Size(411, 146)
56 | Me.tableLayoutPanel1.TabIndex = 1
57 | '
58 | 'btnSetStatus
59 | '
60 | Me.btnSetStatus.Dock = System.Windows.Forms.DockStyle.Fill
61 | Me.btnSetStatus.Location = New System.Drawing.Point(3, 119)
62 | Me.btnSetStatus.Name = "btnSetStatus"
63 | Me.btnSetStatus.Size = New System.Drawing.Size(405, 24)
64 | Me.btnSetStatus.TabIndex = 1
65 | Me.btnSetStatus.Text = "Set Status"
66 | Me.btnSetStatus.UseVisualStyleBackColor = True
67 | '
68 | 'tableLayoutPanel2
69 | '
70 | Me.tableLayoutPanel2.ColumnCount = 1
71 | Me.tableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
72 | Me.tableLayoutPanel2.Controls.Add(Me.tableLayoutPanel3, 0, 0)
73 | Me.tableLayoutPanel2.Controls.Add(Me.groupBox1, 0, 1)
74 | Me.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill
75 | Me.tableLayoutPanel2.Location = New System.Drawing.Point(3, 3)
76 | Me.tableLayoutPanel2.Name = "tableLayoutPanel2"
77 | Me.tableLayoutPanel2.RowCount = 2
78 | Me.tableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35.0!))
79 | Me.tableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 49.0!))
80 | Me.tableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
81 | Me.tableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
82 | Me.tableLayoutPanel2.Size = New System.Drawing.Size(405, 110)
83 | Me.tableLayoutPanel2.TabIndex = 2
84 | '
85 | 'tableLayoutPanel3
86 | '
87 | Me.tableLayoutPanel3.ColumnCount = 2
88 | Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle())
89 | Me.tableLayoutPanel3.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
90 | Me.tableLayoutPanel3.Controls.Add(Me.label1, 0, 0)
91 | Me.tableLayoutPanel3.Controls.Add(Me.txtStatus, 1, 0)
92 | Me.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill
93 | Me.tableLayoutPanel3.Location = New System.Drawing.Point(3, 3)
94 | Me.tableLayoutPanel3.Name = "tableLayoutPanel3"
95 | Me.tableLayoutPanel3.RowCount = 2
96 | Me.tableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
97 | Me.tableLayoutPanel3.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!))
98 | Me.tableLayoutPanel3.Size = New System.Drawing.Size(399, 29)
99 | Me.tableLayoutPanel3.TabIndex = 0
100 | '
101 | 'label1
102 | '
103 | Me.label1.AutoSize = True
104 | Me.label1.Dock = System.Windows.Forms.DockStyle.Fill
105 | Me.label1.Location = New System.Drawing.Point(3, 0)
106 | Me.label1.Name = "label1"
107 | Me.label1.Size = New System.Drawing.Size(37, 25)
108 | Me.label1.TabIndex = 0
109 | Me.label1.Text = "Status"
110 | Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
111 | '
112 | 'txtStatus
113 | '
114 | Me.txtStatus.Dock = System.Windows.Forms.DockStyle.Fill
115 | Me.txtStatus.Location = New System.Drawing.Point(46, 3)
116 | Me.txtStatus.Name = "txtStatus"
117 | Me.txtStatus.Size = New System.Drawing.Size(350, 20)
118 | Me.txtStatus.TabIndex = 1
119 | '
120 | 'groupBox1
121 | '
122 | Me.groupBox1.Controls.Add(Me.chkUrl)
123 | Me.groupBox1.Controls.Add(Me.chkGambar)
124 | Me.groupBox1.Controls.Add(Me.btnCariGambar)
125 | Me.groupBox1.Controls.Add(Me.txtUrl)
126 | Me.groupBox1.Controls.Add(Me.txtFileGambar)
127 | Me.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill
128 | Me.groupBox1.Location = New System.Drawing.Point(3, 38)
129 | Me.groupBox1.Name = "groupBox1"
130 | Me.groupBox1.Size = New System.Drawing.Size(399, 69)
131 | Me.groupBox1.TabIndex = 0
132 | Me.groupBox1.TabStop = False
133 | Me.groupBox1.Text = " [ Status dengan gambar ] "
134 | '
135 | 'chkUrl
136 | '
137 | Me.chkUrl.AutoSize = True
138 | Me.chkUrl.Location = New System.Drawing.Point(6, 44)
139 | Me.chkUrl.Name = "chkUrl"
140 | Me.chkUrl.Size = New System.Drawing.Size(97, 17)
141 | Me.chkUrl.TabIndex = 3
142 | Me.chkUrl.Text = "Gambar dari url"
143 | Me.chkUrl.UseVisualStyleBackColor = True
144 | '
145 | 'chkGambar
146 | '
147 | Me.chkGambar.AutoSize = True
148 | Me.chkGambar.Location = New System.Drawing.Point(6, 22)
149 | Me.chkGambar.Name = "chkGambar"
150 | Me.chkGambar.Size = New System.Drawing.Size(63, 17)
151 | Me.chkGambar.TabIndex = 3
152 | Me.chkGambar.Text = "Gambar"
153 | Me.chkGambar.UseVisualStyleBackColor = True
154 | '
155 | 'btnCariGambar
156 | '
157 | Me.btnCariGambar.Enabled = False
158 | Me.btnCariGambar.Location = New System.Drawing.Point(356, 18)
159 | Me.btnCariGambar.Name = "btnCariGambar"
160 | Me.btnCariGambar.Size = New System.Drawing.Size(34, 23)
161 | Me.btnCariGambar.TabIndex = 1
162 | Me.btnCariGambar.Text = "..."
163 | Me.btnCariGambar.UseVisualStyleBackColor = True
164 | '
165 | 'txtUrl
166 | '
167 | Me.txtUrl.Location = New System.Drawing.Point(109, 42)
168 | Me.txtUrl.Name = "txtUrl"
169 | Me.txtUrl.Size = New System.Drawing.Size(281, 20)
170 | Me.txtUrl.TabIndex = 2
171 | Me.txtUrl.Text = "http://coding4ever.net/assets/images/avatar.png"
172 | '
173 | 'txtFileGambar
174 | '
175 | Me.txtFileGambar.Location = New System.Drawing.Point(109, 20)
176 | Me.txtFileGambar.Name = "txtFileGambar"
177 | Me.txtFileGambar.Size = New System.Drawing.Size(241, 20)
178 | Me.txtFileGambar.TabIndex = 0
179 | '
180 | 'FrmSetStatus
181 | '
182 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
183 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
184 | Me.ClientSize = New System.Drawing.Size(411, 146)
185 | Me.Controls.Add(Me.tableLayoutPanel1)
186 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
187 | Me.MaximizeBox = False
188 | Me.MinimizeBox = False
189 | Me.Name = "FrmSetStatus"
190 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
191 | Me.Text = "FrmContact"
192 | Me.tableLayoutPanel1.ResumeLayout(False)
193 | Me.tableLayoutPanel2.ResumeLayout(False)
194 | Me.tableLayoutPanel3.ResumeLayout(False)
195 | Me.tableLayoutPanel3.PerformLayout()
196 | Me.groupBox1.ResumeLayout(False)
197 | Me.groupBox1.PerformLayout()
198 | Me.ResumeLayout(False)
199 |
200 | End Sub
201 |
202 | Private WithEvents tableLayoutPanel1 As TableLayoutPanel
203 | Private WithEvents btnSetStatus As Button
204 | Private WithEvents tableLayoutPanel2 As TableLayoutPanel
205 | Private WithEvents tableLayoutPanel3 As TableLayoutPanel
206 | Private WithEvents label1 As Label
207 | Private WithEvents txtStatus As TextBox
208 | Private WithEvents groupBox1 As GroupBox
209 | Private WithEvents chkUrl As CheckBox
210 | Private WithEvents chkGambar As CheckBox
211 | Private WithEvents btnCariGambar As Button
212 | Private WithEvents txtUrl As TextBox
213 | Private WithEvents txtFileGambar As TextBox
214 | End Class
215 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/csharp,visualstudio
2 | # Edit at https://www.gitignore.io/?templates=csharp,visualstudio
3 |
4 | ### Csharp ###
5 | ## Ignore Visual Studio temporary files, build results, and
6 | ## files generated by popular Visual Studio add-ons.
7 | ##
8 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
9 |
10 | # User-specific folders
11 | bin/
12 | libs/
13 |
14 | # User-specific files
15 | *.rsuser
16 | *.suo
17 | *.user
18 | *.userosscache
19 | *.sln.docstates
20 |
21 | # User-specific files (MonoDevelop/Xamarin Studio)
22 | *.userprefs
23 |
24 | # Mono auto generated files
25 | mono_crash.*
26 |
27 | # Build results
28 | [Dd]ebug/
29 | [Dd]ebugPublic/
30 | [Rr]elease/
31 | [Rr]eleases/
32 | x64/
33 | x86/
34 | [Aa][Rr][Mm]/
35 | [Aa][Rr][Mm]64/
36 | bld/
37 | [Bb]in/
38 | [Oo]bj/
39 | [Ll]og/
40 |
41 | # Visual Studio 2015/2017 cache/options directory
42 | .vs/
43 | # Uncomment if you have tasks that create the project's static files in wwwroot
44 | #wwwroot/
45 |
46 | # Visual Studio 2017 auto generated files
47 | Generated\ Files/
48 |
49 | # MSTest test Results
50 | [Tt]est[Rr]esult*/
51 | [Bb]uild[Ll]og.*
52 |
53 | # NUnit
54 | *.VisualState.xml
55 | TestResult.xml
56 | nunit-*.xml
57 |
58 | # Build Results of an ATL Project
59 | [Dd]ebugPS/
60 | [Rr]eleasePS/
61 | dlldata.c
62 |
63 | # Benchmark Results
64 | BenchmarkDotNet.Artifacts/
65 |
66 | # .NET Core
67 | project.lock.json
68 | project.fragment.lock.json
69 | artifacts/
70 |
71 | # StyleCop
72 | StyleCopReport.xml
73 |
74 | # Files built by Visual Studio
75 | *_i.c
76 | *_p.c
77 | *_h.h
78 | *.ilk
79 | *.meta
80 | *.obj
81 | *.iobj
82 | *.pch
83 | *.pdb
84 | *.ipdb
85 | *.pgc
86 | *.pgd
87 | *.rsp
88 | *.sbr
89 | *.tlb
90 | *.tli
91 | *.tlh
92 | *.tmp
93 | *.tmp_proj
94 | *_wpftmp.csproj
95 | *.log
96 | *.vspscc
97 | *.vssscc
98 | .builds
99 | *.pidb
100 | *.svclog
101 | *.scc
102 |
103 | # Chutzpah Test files
104 | _Chutzpah*
105 |
106 | # Visual C++ cache files
107 | ipch/
108 | *.aps
109 | *.ncb
110 | *.opendb
111 | *.opensdf
112 | *.sdf
113 | *.cachefile
114 | *.VC.db
115 | *.VC.VC.opendb
116 |
117 | # Visual Studio profiler
118 | *.psess
119 | *.vsp
120 | *.vspx
121 | *.sap
122 |
123 | # Visual Studio Trace Files
124 | *.e2e
125 |
126 | # TFS 2012 Local Workspace
127 | $tf/
128 |
129 | # Guidance Automation Toolkit
130 | *.gpState
131 |
132 | # ReSharper is a .NET coding add-in
133 | _ReSharper*/
134 | *.[Rr]e[Ss]harper
135 | *.DotSettings.user
136 |
137 | # JustCode is a .NET coding add-in
138 | .JustCode
139 |
140 | # TeamCity is a build add-in
141 | _TeamCity*
142 |
143 | # DotCover is a Code Coverage Tool
144 | *.dotCover
145 |
146 | # AxoCover is a Code Coverage Tool
147 | .axoCover/*
148 | !.axoCover/settings.json
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | ### VisualStudio ###
360 |
361 | # User-specific files
362 |
363 | # User-specific files (MonoDevelop/Xamarin Studio)
364 |
365 | # Mono auto generated files
366 |
367 | # Build results
368 |
369 | # Visual Studio 2015/2017 cache/options directory
370 | # Uncomment if you have tasks that create the project's static files in wwwroot
371 |
372 | # Visual Studio 2017 auto generated files
373 |
374 | # MSTest test Results
375 |
376 | # NUnit
377 |
378 | # Build Results of an ATL Project
379 |
380 | # Benchmark Results
381 |
382 | # .NET Core
383 |
384 | # StyleCop
385 |
386 | # Files built by Visual Studio
387 |
388 | # Chutzpah Test files
389 |
390 | # Visual C++ cache files
391 |
392 | # Visual Studio profiler
393 |
394 | # Visual Studio Trace Files
395 |
396 | # TFS 2012 Local Workspace
397 |
398 | # Guidance Automation Toolkit
399 |
400 | # ReSharper is a .NET coding add-in
401 |
402 | # JustCode is a .NET coding add-in
403 |
404 | # TeamCity is a build add-in
405 |
406 | # DotCover is a Code Coverage Tool
407 |
408 | # AxoCover is a Code Coverage Tool
409 |
410 | # Visual Studio code coverage results
411 |
412 | # NCrunch
413 |
414 | # MightyMoose
415 |
416 | # Web workbench (sass)
417 |
418 | # Installshield output folder
419 |
420 | # DocProject is a documentation generator add-in
421 |
422 | # Click-Once directory
423 |
424 | # Publish Web Output
425 | # Note: Comment the next line if you want to checkin your web deploy settings,
426 | # but database connection strings (with potential passwords) will be unencrypted
427 |
428 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
429 | # checkin your Azure Web App publish settings, but sensitive information contained
430 | # in these scripts will be unencrypted
431 |
432 | # NuGet Packages
433 | # NuGet Symbol Packages
434 | # The packages folder can be ignored because of Package Restore
435 | # except build/, which is used as an MSBuild target.
436 | # Uncomment if necessary however generally it will be regenerated when needed
437 | # NuGet v3's project.json files produces more ignorable files
438 |
439 | # Microsoft Azure Build Output
440 |
441 | # Microsoft Azure Emulator
442 |
443 | # Windows Store app package directories and files
444 |
445 | # Visual Studio cache files
446 | # files ending in .cache can be ignored
447 | # but keep track of directories ending in .cache
448 |
449 | # Others
450 |
451 | # Including strong name files can present a security risk
452 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
453 |
454 | # Since there are multiple workflows, uncomment next line to ignore bower_components
455 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
456 |
457 | # RIA/Silverlight projects
458 |
459 | # Backup & report files from converting an old project file
460 | # to a newer Visual Studio version. Backup files are not needed,
461 | # because we have git ;-)
462 |
463 | # SQL Server files
464 |
465 | # Business Intelligence projects
466 |
467 | # Microsoft Fakes
468 |
469 | # GhostDoc plugin setting file
470 |
471 | # Node.js Tools for Visual Studio
472 |
473 | # Visual Studio 6 build log
474 |
475 | # Visual Studio 6 workspace options file
476 |
477 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
478 |
479 | # Visual Studio LightSwitch build output
480 |
481 | # Paket dependency manager
482 |
483 | # FAKE - F# Make
484 |
485 | # CodeRush personal settings
486 |
487 | # Python Tools for Visual Studio (PTVS)
488 |
489 | # Cake - Uncomment if you are using it
490 | # tools/**
491 | # !tools/packages.config
492 |
493 | # Tabs Studio
494 |
495 | # Telerik's JustMock configuration file
496 |
497 | # BizTalk build output
498 |
499 | # OpenCover UI analysis results
500 |
501 | # Azure Stream Analytics local run output
502 |
503 | # MSBuild Binary and Structured Log
504 |
505 | # NVidia Nsight GPU debugger configuration file
506 |
507 | # MFractors (Xamarin productivity tool) working folder
508 |
509 | # Local History for Visual Studio
510 |
511 | # BeatPulse healthcheck temp database
512 |
513 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
514 |
515 | # End of https://www.gitignore.io/api/csharp,visualstudio
--------------------------------------------------------------------------------
/src/DemoWhatsAppNETAPICSharp/FrmSetStatus.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DemoWhatsAppNETAPICSharp
2 | {
3 | partial class FrmSetStatus
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
32 | this.btnSetStatus = new System.Windows.Forms.Button();
33 | this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
34 | this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
35 | this.label1 = new System.Windows.Forms.Label();
36 | this.txtStatus = new System.Windows.Forms.TextBox();
37 | this.groupBox1 = new System.Windows.Forms.GroupBox();
38 | this.chkUrl = new System.Windows.Forms.CheckBox();
39 | this.chkGambar = new System.Windows.Forms.CheckBox();
40 | this.btnCariGambar = new System.Windows.Forms.Button();
41 | this.txtUrl = new System.Windows.Forms.TextBox();
42 | this.txtFileGambar = new System.Windows.Forms.TextBox();
43 | this.tableLayoutPanel1.SuspendLayout();
44 | this.tableLayoutPanel2.SuspendLayout();
45 | this.tableLayoutPanel3.SuspendLayout();
46 | this.groupBox1.SuspendLayout();
47 | this.SuspendLayout();
48 | //
49 | // tableLayoutPanel1
50 | //
51 | this.tableLayoutPanel1.ColumnCount = 1;
52 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
53 | this.tableLayoutPanel1.Controls.Add(this.btnSetStatus, 0, 1);
54 | this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
55 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
56 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
57 | this.tableLayoutPanel1.Name = "tableLayoutPanel1";
58 | this.tableLayoutPanel1.RowCount = 2;
59 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
60 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
61 | this.tableLayoutPanel1.Size = new System.Drawing.Size(411, 146);
62 | this.tableLayoutPanel1.TabIndex = 0;
63 | //
64 | // btnSetStatus
65 | //
66 | this.btnSetStatus.Dock = System.Windows.Forms.DockStyle.Fill;
67 | this.btnSetStatus.Location = new System.Drawing.Point(3, 119);
68 | this.btnSetStatus.Name = "btnSetStatus";
69 | this.btnSetStatus.Size = new System.Drawing.Size(405, 24);
70 | this.btnSetStatus.TabIndex = 1;
71 | this.btnSetStatus.Text = "Set Status";
72 | this.btnSetStatus.UseVisualStyleBackColor = true;
73 | this.btnSetStatus.Click += new System.EventHandler(this.btnSetStatus_Click);
74 | //
75 | // tableLayoutPanel2
76 | //
77 | this.tableLayoutPanel2.ColumnCount = 1;
78 | this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
79 | this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 0);
80 | this.tableLayoutPanel2.Controls.Add(this.groupBox1, 0, 1);
81 | this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
82 | this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
83 | this.tableLayoutPanel2.Name = "tableLayoutPanel2";
84 | this.tableLayoutPanel2.RowCount = 2;
85 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
86 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 49F));
87 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
88 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
89 | this.tableLayoutPanel2.Size = new System.Drawing.Size(405, 110);
90 | this.tableLayoutPanel2.TabIndex = 2;
91 | //
92 | // tableLayoutPanel3
93 | //
94 | this.tableLayoutPanel3.ColumnCount = 2;
95 | this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
96 | this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
97 | this.tableLayoutPanel3.Controls.Add(this.label1, 0, 0);
98 | this.tableLayoutPanel3.Controls.Add(this.txtStatus, 1, 0);
99 | this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
100 | this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 3);
101 | this.tableLayoutPanel3.Name = "tableLayoutPanel3";
102 | this.tableLayoutPanel3.RowCount = 2;
103 | this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
104 | this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
105 | this.tableLayoutPanel3.Size = new System.Drawing.Size(399, 29);
106 | this.tableLayoutPanel3.TabIndex = 0;
107 | //
108 | // label1
109 | //
110 | this.label1.AutoSize = true;
111 | this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
112 | this.label1.Location = new System.Drawing.Point(3, 0);
113 | this.label1.Name = "label1";
114 | this.label1.Size = new System.Drawing.Size(37, 25);
115 | this.label1.TabIndex = 0;
116 | this.label1.Text = "Status";
117 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
118 | //
119 | // txtStatus
120 | //
121 | this.txtStatus.Dock = System.Windows.Forms.DockStyle.Fill;
122 | this.txtStatus.Location = new System.Drawing.Point(46, 3);
123 | this.txtStatus.Name = "txtStatus";
124 | this.txtStatus.Size = new System.Drawing.Size(350, 20);
125 | this.txtStatus.TabIndex = 0;
126 | //
127 | // groupBox1
128 | //
129 | this.groupBox1.Controls.Add(this.chkUrl);
130 | this.groupBox1.Controls.Add(this.chkGambar);
131 | this.groupBox1.Controls.Add(this.btnCariGambar);
132 | this.groupBox1.Controls.Add(this.txtUrl);
133 | this.groupBox1.Controls.Add(this.txtFileGambar);
134 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
135 | this.groupBox1.Location = new System.Drawing.Point(3, 38);
136 | this.groupBox1.Name = "groupBox1";
137 | this.groupBox1.Size = new System.Drawing.Size(399, 69);
138 | this.groupBox1.TabIndex = 1;
139 | this.groupBox1.TabStop = false;
140 | this.groupBox1.Text = " [ Status dengan gambar ] ";
141 | //
142 | // chkUrl
143 | //
144 | this.chkUrl.AutoSize = true;
145 | this.chkUrl.Location = new System.Drawing.Point(6, 44);
146 | this.chkUrl.Name = "chkUrl";
147 | this.chkUrl.Size = new System.Drawing.Size(97, 17);
148 | this.chkUrl.TabIndex = 3;
149 | this.chkUrl.Text = "Gambar dari url";
150 | this.chkUrl.UseVisualStyleBackColor = true;
151 | this.chkUrl.CheckedChanged += new System.EventHandler(this.chkUrl_CheckedChanged);
152 | //
153 | // chkGambar
154 | //
155 | this.chkGambar.AutoSize = true;
156 | this.chkGambar.Location = new System.Drawing.Point(6, 22);
157 | this.chkGambar.Name = "chkGambar";
158 | this.chkGambar.Size = new System.Drawing.Size(63, 17);
159 | this.chkGambar.TabIndex = 3;
160 | this.chkGambar.Text = "Gambar";
161 | this.chkGambar.UseVisualStyleBackColor = true;
162 | this.chkGambar.CheckedChanged += new System.EventHandler(this.chkGambar_CheckedChanged);
163 | //
164 | // btnCariGambar
165 | //
166 | this.btnCariGambar.Enabled = false;
167 | this.btnCariGambar.Location = new System.Drawing.Point(356, 18);
168 | this.btnCariGambar.Name = "btnCariGambar";
169 | this.btnCariGambar.Size = new System.Drawing.Size(34, 23);
170 | this.btnCariGambar.TabIndex = 1;
171 | this.btnCariGambar.Text = "...";
172 | this.btnCariGambar.UseVisualStyleBackColor = true;
173 | this.btnCariGambar.Click += new System.EventHandler(this.btnCariGambar_Click);
174 | //
175 | // txtUrl
176 | //
177 | this.txtUrl.Location = new System.Drawing.Point(109, 42);
178 | this.txtUrl.Name = "txtUrl";
179 | this.txtUrl.Size = new System.Drawing.Size(281, 20);
180 | this.txtUrl.TabIndex = 2;
181 | this.txtUrl.Text = "http://coding4ever.net/assets/images/avatar.png";
182 | //
183 | // txtFileGambar
184 | //
185 | this.txtFileGambar.Location = new System.Drawing.Point(109, 20);
186 | this.txtFileGambar.Name = "txtFileGambar";
187 | this.txtFileGambar.Size = new System.Drawing.Size(241, 20);
188 | this.txtFileGambar.TabIndex = 0;
189 | //
190 | // FrmSetStatus
191 | //
192 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
193 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
194 | this.ClientSize = new System.Drawing.Size(411, 146);
195 | this.Controls.Add(this.tableLayoutPanel1);
196 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
197 | this.MaximizeBox = false;
198 | this.MinimizeBox = false;
199 | this.Name = "FrmSetStatus";
200 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
201 | this.Text = "Status";
202 | this.tableLayoutPanel1.ResumeLayout(false);
203 | this.tableLayoutPanel2.ResumeLayout(false);
204 | this.tableLayoutPanel3.ResumeLayout(false);
205 | this.tableLayoutPanel3.PerformLayout();
206 | this.groupBox1.ResumeLayout(false);
207 | this.groupBox1.PerformLayout();
208 | this.ResumeLayout(false);
209 |
210 | }
211 |
212 | #endregion
213 |
214 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
215 | private System.Windows.Forms.Button btnSetStatus;
216 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
217 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
218 | private System.Windows.Forms.Label label1;
219 | private System.Windows.Forms.TextBox txtStatus;
220 | private System.Windows.Forms.GroupBox groupBox1;
221 | private System.Windows.Forms.TextBox txtUrl;
222 | private System.Windows.Forms.TextBox txtFileGambar;
223 | private System.Windows.Forms.Button btnCariGambar;
224 | private System.Windows.Forms.CheckBox chkUrl;
225 | private System.Windows.Forms.CheckBox chkGambar;
226 | }
227 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WhatsApp Client Library for .NET Developer
2 |
3 | WhatsApp NET Client adalah library gratis untuk .NET Developer yang digunakan untuk mengembangkan aplikasi WhatsApp klien berbasis desktop. Library ini dikembangkan di atas teknologi .NET dengan menggunakan bahasa pemrograman C#, sehingga bisa juga digunakan untuk semua bahasa pemrograman .NET selain C# seperti VB.NET, F#, C++ dan bahasa .NET lainnya.
4 |
5 | Dalam pengembangannya WhatsApp NET Client menggunakan [Baileys - WhatsApp Web API ](https://github.com/adiwajshing/Baileys/) sebagai engine/library untuk berkomunikasi secara langsung dengan WhatsApp server dengan menggunakan websocket.
6 |
7 | ## Info Rilis dan Petunjuk Instalasi
8 |
9 | Bisa Anda cek di http://wa-net.coding4ever.net/
10 |
11 | ## Persyaratan Sistem
12 |
13 | * Windows 8, 10 dan windows versi terbaru
14 | * .NET Framework 4.5 dan .NET versi terbaru
15 | * Node.js versi 14.16.x atau versi terbaru
16 | * [Software git](https://git-scm.com/downloads) (version control)
17 |
18 | ## Fitur
19 |
20 | | Feature | Status |
21 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------:|
22 | | Headless/no window | ✅ |
23 | | Otomatis menyimpan sesi login (jadi scan qr code WAnya cukup sekali saja) | ✅ |
24 | | Mendukung penggunaan [multi account WA](https://github.com/WhatsAppNETClient/WhatsAppNETClientMultiAccount), untuk contohnya bisa Anda lihat di [https://github.com/WhatsAppNETClient/WhatsAppNETClientMultiAccount](https://github.com/WhatsAppNETClient/WhatsAppNETClientMultiAccount) | ✅ |
25 | | Grab contacts untuk membaca kontak WA sehingga hasilnya bisa disimpan ke database | ✅ |
26 | | Grab groups dan members untuk membaca data group beserta anggotanya sehingga hasilnya juga bisa disimpan ke database | ✅ |
27 | | Mengirim pesan personal atau group | ✅ |
28 | | Mengirim banyak pesan (broadcast) | ✅ |
29 | | Mengirim pesan dengan gambar, audio, video, stiker, gif dan semua jenis dokumen | ✅ |
30 | | Mengirim pesan dengan gambar, audio, video, dan semua jenis dokumen via URL | ✅ |
31 | | Mengirim pesan dengan tipe `list`, `button` dan `CTA button` | ✅ |
32 | | Bisa juga menambahkan gambar di pesan dengan tipe `button` | ✅ |
33 | | ReplyMessage (quoted message) | ✅ |
34 | | Mention user | ✅ |
35 | | Bisa menyimpan gambar, audio, video, semua jenis dokumen termasuk vcard dari pesan yang masuk | ✅ |
36 | | Bisa juga mengirim dan membaca pesan dengan tipe `vcard`, `location`, `live location` | ✅ |
37 | | Bisa membuat group, menambahkan/menghapus member group (syaratnya nomor WA harus sebagai admin) | ✅ |
38 | | Bisa membaca pesan dari group dan mendapatkan informasi pengirimnya | ✅ |
39 | | Bisa menghapus pesan yang ada di group | ✅ |
40 | | Bisa mendapatkan nomor WA yang digunakan untuk scan QRCode | ✅ |
41 | | Cek histori pesan berdasarkan nomor WA, jumlah pesan yang ditampilkan bisa diatur lewat parameter `limit` | ✅ |
42 | | Subscribe event `ChangeState` untuk memonitoring perubahan status koneksi | ✅ |
43 | | Subscribe event `OnUnreadMessage` untuk memonitoring pesan yang belum terbaca | ✅ |
44 | | Subscribe event `OnCreatedGroupStatus` untuk memonitoring status pembuatan group | ✅ |
45 | | Subscribe event `GroupJoin` untuk memonitoring user yang join ke group | ✅ |
46 | | Subscribe event `GroupLeave` untuk memonitoring user keluar dari group | ✅ |
47 | | Subscribe event `OnReceiveBusinessProfiles` untuk memonitoring hasil pengecekan profil bisnis | ✅ |
48 | | Subscribe event `ReceiveMessage`, untuk memonitoring pesan masuk | ✅ |
49 | | Subscribe event `ReceiveMessageStatus` untuk memonitoring status pesan yang dikirim berhasil atau gagal. | ✅ |
50 | | Subscribe event `MessageAck` untuk memonitoring status pesan setelah di kirim (pending, sudah diterima/baca, dll) | ✅ |
51 | | Tersedia fitur untuk verifikasi valid atau tidaknya nomor WA. Fitur ini cocok untuk mengirimkan broadcast ke nomor-nomor yang belum ada di daftar kontak atau nomor-nomor hasil generate. | ✅ |
52 | | Tersedia fitur untuk mengecek profil bisnis | ✅ |
53 | | Tersedia juga fitur `REST API`, sehingga semua fitur library WhatsApp NET Client juga bisa diakses via `REST API` baik secara local maupun remote. Untuk contoh penggunaannya bisa Anda lihat di [https://github.com/WhatsAppNETClient/WhatsAppNETAPIRestApi](https://github.com/WhatsAppNETClient/WhatsAppNETAPIRestApi) | ✅ |
54 | | Archive chat (semua atau berdasarkan nomor WA) | ✅ |
55 | | Delete chat (semua atau berdasarkan nomor WA) | ✅ |
56 | | Pengesetan status online/offline | ✅ |
57 | | Logout | ✅ |
58 | | Bisa dengan mudah diintegrasikan dengan semua jenis database | ✅ |
59 |
60 | ## Melaporkan Bug atau Error
61 |
62 | Secara teknis dalam pengembangan sebuah aplikasi jelas tidak mungkin 100% bebas dari bug. Nah jika Anda menemukan bug atau error pada saat menggunakan library WhatsApp NET Client ini, silahkan Anda laporkan di halaman https://github.com/WhatsAppNETClient/WhatsAppNETClient2/issues
--------------------------------------------------------------------------------