├── .gitattributes ├── .gitignore ├── App.config ├── Chatbot_2020_Tutorial.sln ├── Chatbot_2020_Tutorial.vbproj ├── Data ├── MindQA.accdb ├── MindQADataSet.Designer.vb ├── MindQADataSet.xsc ├── MindQADataSet.xsd └── MindQADataSet.xss ├── Forms ├── FormMind_QA.Designer.vb ├── FormMind_QA.resx ├── FormMind_QA.vb ├── FormPluginManager.designer.vb ├── FormPluginManager.resx ├── FormPluginManager.vb ├── FormQA_Mind.Designer.vb ├── FormQA_Mind.resx ├── FormQA_Mind.vb ├── Form_Chat_UI.designer.vb ├── Form_Chat_UI.resx ├── Form_Chat_UI.vb ├── SplashScreen.Designer.vb ├── SplashScreen.resx └── SplashScreen.vb ├── Icon_AI_Brain.ico ├── Icon_SpydazBrain.ico ├── My Project ├── Application.Designer.vb ├── Application.myapp ├── AssemblyInfo.vb ├── Resources.Designer.vb ├── Resources.resx ├── Settings.Designer.vb └── Settings.settings ├── Newtonsoft.Json.dll ├── Plugins ├── AI_Contracts.dll └── SamplePlugin.dll ├── README.md ├── Resources ├── Bar2.PNG ├── BluPrint.png ├── Blue_end_left.gif ├── Blue_end_right.gif ├── Console A.jpg ├── Console_D.jpg ├── Left.jpg ├── Logo_UFP.jpg └── Right.jpg ├── SamplePlugin ├── App.config ├── My Project │ ├── Application.Designer.vb │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Resources.Designer.vb │ ├── Resources.resx │ ├── Settings.Designer.vb │ └── Settings.settings ├── Newtonsoft.Json.dll ├── SamplePlugin.vbproj ├── Sample_Plugin_Chatbot_Tutorial.vb └── packages.config ├── Source ├── AI_AgentModel.vb ├── ApplicationEvents.vb ├── DatabaseManager_QuestionAnswer.vb ├── Emotion_Handler.vb ├── Emotional_StateMachine.vb ├── Emotional_States.vb ├── PluginManager.vb └── SyS.vb ├── _config.yml └── packages.config /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Imports AI_Contracts 20 | 21 | Public Class Sample_Plugin_Chatbot_Tutorial 22 | Implements AI_Contracts.IPlugin 23 | 24 | Public ReadOnly Property Info As String Implements IPlugin.Info 25 | Get 26 | Return "Test Plug-in for Chatbot Tutorial 2000" 27 | End Get 28 | End Property 29 | 30 | Public ReadOnly Property PluginName As String Implements IPlugin.PluginName 31 | Get 32 | Return "Test Plug-In" 33 | End Get 34 | End Property 35 | 36 | Dim mPreviousResponse As String = "" 37 | Public Property PreviousResponse As String Implements IPlugin.PreviousResponse 38 | Get 39 | Return mPreviousResponse 40 | End Get 41 | Set(value As String) 42 | mPreviousResponse = value 43 | End Set 44 | End Property 45 | Dim mPreviousUserinput As String = "" 46 | Public Property PreviousUserinput As String Implements IPlugin.PreviousUserinput 47 | Get 48 | Return mPreviousUserinput 49 | End Get 50 | Set(value As String) 51 | mPreviousUserinput = value 52 | End Set 53 | End Property 54 | Private MResponse As String = "" 55 | Public Property Response As String Implements IPlugin.Response 56 | Get 57 | Return MResponse 58 | End Get 59 | Set(value As String) 60 | MResponse = value 61 | End Set 62 | End Property 63 | 64 | Public Function GetResponse(UserInput As String) As Boolean Implements IPlugin.GetResponse 65 | Dim NewResponse As String = "" 66 | If UCase(UserInput) = "HI" Then NewResponse = "YO BRO" 67 | If NewResponse IsNot Nothing Then 68 | Response = NewResponse 69 | Return True 70 | Else 71 | 72 | End If 73 | Return False 74 | End Function 75 | End Class 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Chatbot_2020_Tutorial.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30128.74 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Chatbot_2020_Tutorial", "Chatbot_2020_Tutorial.vbproj", "{08489345-26CB-442E-8CFB-A31F439E3B2B}" 7 | EndProject 8 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SamplePlugin", "SamplePlugin\SamplePlugin.vbproj", "{06547035-4097-49D3-AE77-9FEC47253CEE}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {08489345-26CB-442E-8CFB-A31F439E3B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {08489345-26CB-442E-8CFB-A31F439E3B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {08489345-26CB-442E-8CFB-A31F439E3B2B}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {08489345-26CB-442E-8CFB-A31F439E3B2B}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {06547035-4097-49D3-AE77-9FEC47253CEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {06547035-4097-49D3-AE77-9FEC47253CEE}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {06547035-4097-49D3-AE77-9FEC47253CEE}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {06547035-4097-49D3-AE77-9FEC47253CEE}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {BA911501-1482-4E51-A871-F2082CC4436C} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Chatbot_2020_Tutorial.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {08489345-26CB-442E-8CFB-A31F439E3B2B} 8 | WinExe 9 | Chatbot_2020_Tutorial.My.MyApplication 10 | Chatbot_2020_Tutorial 11 | Chatbot_2020_Tutorial 12 | 512 13 | WindowsForms 14 | v4.7.2 15 | true 16 | true 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | true 23 | true 24 | bin\Debug\ 25 | Chatbot_2020_Tutorial.xml 26 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | false 32 | true 33 | true 34 | bin\Release\ 35 | Chatbot_2020_Tutorial.xml 36 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 37 | 38 | 39 | On 40 | 41 | 42 | Binary 43 | 44 | 45 | Off 46 | 47 | 48 | On 49 | 50 | 51 | Icon_SpydazBrain.ico 52 | 53 | 54 | 55 | packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\AI_CONTRACTS.dll 56 | True 57 | 58 | 59 | packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\AxInterop.ACTIVEHAPTEKXLib.dll 60 | 61 | 62 | packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\Interop.ACTIVEHAPTEKXLib.dll 63 | True 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 | FormMind_QA.vb 98 | 99 | 100 | Form 101 | 102 | 103 | FormPluginManager.vb 104 | 105 | 106 | Form 107 | 108 | 109 | FormQA_Mind.vb 110 | 111 | 112 | Form 113 | 114 | 115 | Form_Chat_UI.vb 116 | 117 | 118 | Form 119 | 120 | 121 | True 122 | True 123 | MindQADataSet.xsd 124 | 125 | 126 | 127 | 128 | True 129 | Application.myapp 130 | True 131 | 132 | 133 | True 134 | True 135 | Resources.resx 136 | 137 | 138 | True 139 | Settings.settings 140 | True 141 | 142 | 143 | 144 | SplashScreen.vb 145 | 146 | 147 | Form 148 | 149 | 150 | 151 | 152 | 153 | 154 | FormMind_QA.vb 155 | 156 | 157 | FormPluginManager.vb 158 | 159 | 160 | FormQA_Mind.vb 161 | 162 | 163 | Form_Chat_UI.vb 164 | 165 | 166 | VbMyResourcesResXFileCodeGenerator 167 | Resources.Designer.vb 168 | My.Resources 169 | Designer 170 | 171 | 172 | SplashScreen.vb 173 | 174 | 175 | 176 | 177 | MindQADataSet.xsd 178 | 179 | 180 | MSDataSetGenerator 181 | MindQADataSet.Designer.vb 182 | Designer 183 | 184 | 185 | MindQADataSet.xsd 186 | 187 | 188 | MyApplicationCodeGenerator 189 | Application.Designer.vb 190 | 191 | 192 | SettingsSingleFileGenerator 193 | My 194 | Settings.Designer.vb 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | Always 203 | 204 | 205 | 206 | Always 207 | 208 | 209 | Always 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /Data/MindQA.accdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Data/MindQA.accdb -------------------------------------------------------------------------------- /Data/MindQADataSet.xsc: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Data/MindQADataSet.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | DELETE FROM `GeneralQuestions` WHERE ((`ID` = ?)) 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | INSERT INTO `GeneralQuestions` (`Question`) VALUES (?) 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | SELECT ID, Question FROM GeneralQuestions 32 | 33 | 34 | 35 | 36 | 37 | UPDATE `GeneralQuestions` SET `Question` = ? WHERE ((`ID` = ?)) 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | INSERT INTO `MindQA` (`QUESTION`, `Answer`) VALUES (?, ?) 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | SELECT QUESTION, Answer FROM MindQA 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | INSERT INTO `QAMIND` (`QUESTION`, `Answer`) VALUES (?, ?) 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | SELECT QUESTION, Answer FROM QAMIND 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /Data/MindQADataSet.xss: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Forms/FormMind_QA.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FormMind_QA 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.components = New System.ComponentModel.Container() 26 | Dim QUESTIONLabel As System.Windows.Forms.Label 27 | Dim AnswerLabel As System.Windows.Forms.Label 28 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormMind_QA)) 29 | Me.GroupBox1 = New System.Windows.Forms.GroupBox() 30 | Me.MindQADataGridView = New System.Windows.Forms.DataGridView() 31 | Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn() 32 | Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn() 33 | Me.MindQABindingSource = New System.Windows.Forms.BindingSource(Me.components) 34 | Me.MindQADataSet = New Chatbot_2020_Tutorial.MindQADataSet() 35 | Me.MindQATableAdapter = New Chatbot_2020_Tutorial.MindQADataSetTableAdapters.MindQATableAdapter() 36 | Me.TableAdapterManager = New Chatbot_2020_Tutorial.MindQADataSetTableAdapters.TableAdapterManager() 37 | Me.MindQABindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) 38 | Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton() 39 | Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() 40 | Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton() 41 | Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() 42 | Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() 43 | Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator() 44 | Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox() 45 | Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator() 46 | Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() 47 | Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() 48 | Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() 49 | Me.MindQABindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() 50 | Me.QUESTIONTextBox = New System.Windows.Forms.TextBox() 51 | Me.AnswerTextBox = New System.Windows.Forms.TextBox() 52 | QUESTIONLabel = New System.Windows.Forms.Label() 53 | AnswerLabel = New System.Windows.Forms.Label() 54 | Me.GroupBox1.SuspendLayout() 55 | CType(Me.MindQADataGridView, System.ComponentModel.ISupportInitialize).BeginInit() 56 | CType(Me.MindQABindingSource, System.ComponentModel.ISupportInitialize).BeginInit() 57 | CType(Me.MindQADataSet, System.ComponentModel.ISupportInitialize).BeginInit() 58 | CType(Me.MindQABindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() 59 | Me.MindQABindingNavigator.SuspendLayout() 60 | Me.SuspendLayout() 61 | ' 62 | 'QUESTIONLabel 63 | ' 64 | QUESTIONLabel.AutoSize = True 65 | QUESTIONLabel.BackColor = System.Drawing.SystemColors.ActiveCaptionText 66 | QUESTIONLabel.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 67 | QUESTIONLabel.ForeColor = System.Drawing.Color.Snow 68 | QUESTIONLabel.Location = New System.Drawing.Point(13, 70) 69 | QUESTIONLabel.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) 70 | QUESTIONLabel.Name = "QUESTIONLabel" 71 | QUESTIONLabel.Size = New System.Drawing.Size(132, 25) 72 | QUESTIONLabel.TabIndex = 4 73 | QUESTIONLabel.Text = "QUESTION:" 74 | ' 75 | 'AnswerLabel 76 | ' 77 | AnswerLabel.AutoSize = True 78 | AnswerLabel.BackColor = System.Drawing.Color.Black 79 | AnswerLabel.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 80 | AnswerLabel.ForeColor = System.Drawing.Color.Snow 81 | AnswerLabel.Location = New System.Drawing.Point(13, 102) 82 | AnswerLabel.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) 83 | AnswerLabel.Name = "AnswerLabel" 84 | AnswerLabel.Size = New System.Drawing.Size(91, 25) 85 | AnswerLabel.TabIndex = 6 86 | AnswerLabel.Text = "Answer:" 87 | ' 88 | 'GroupBox1 89 | ' 90 | Me.GroupBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText 91 | Me.GroupBox1.Controls.Add(Me.MindQADataGridView) 92 | Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom 93 | Me.GroupBox1.Location = New System.Drawing.Point(0, 165) 94 | Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4) 95 | Me.GroupBox1.Name = "GroupBox1" 96 | Me.GroupBox1.Padding = New System.Windows.Forms.Padding(4) 97 | Me.GroupBox1.Size = New System.Drawing.Size(1179, 447) 98 | Me.GroupBox1.TabIndex = 0 99 | Me.GroupBox1.TabStop = False 100 | ' 101 | 'MindQADataGridView 102 | ' 103 | Me.MindQADataGridView.AutoGenerateColumns = False 104 | Me.MindQADataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 105 | Me.MindQADataGridView.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DataGridViewTextBoxColumn1, Me.DataGridViewTextBoxColumn2}) 106 | Me.MindQADataGridView.DataSource = Me.MindQABindingSource 107 | Me.MindQADataGridView.Dock = System.Windows.Forms.DockStyle.Fill 108 | Me.MindQADataGridView.Location = New System.Drawing.Point(4, 19) 109 | Me.MindQADataGridView.Margin = New System.Windows.Forms.Padding(4) 110 | Me.MindQADataGridView.Name = "MindQADataGridView" 111 | Me.MindQADataGridView.RowHeadersWidth = 51 112 | Me.MindQADataGridView.Size = New System.Drawing.Size(1171, 424) 113 | Me.MindQADataGridView.TabIndex = 0 114 | ' 115 | 'DataGridViewTextBoxColumn1 116 | ' 117 | Me.DataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill 118 | Me.DataGridViewTextBoxColumn1.DataPropertyName = "QUESTION" 119 | Me.DataGridViewTextBoxColumn1.FillWeight = 50.0! 120 | Me.DataGridViewTextBoxColumn1.HeaderText = "QUESTION" 121 | Me.DataGridViewTextBoxColumn1.MinimumWidth = 6 122 | Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1" 123 | ' 124 | 'DataGridViewTextBoxColumn2 125 | ' 126 | Me.DataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill 127 | Me.DataGridViewTextBoxColumn2.DataPropertyName = "Answer" 128 | Me.DataGridViewTextBoxColumn2.FillWeight = 50.0! 129 | Me.DataGridViewTextBoxColumn2.HeaderText = "Answer" 130 | Me.DataGridViewTextBoxColumn2.MinimumWidth = 6 131 | Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" 132 | ' 133 | 'MindQABindingSource 134 | ' 135 | Me.MindQABindingSource.DataMember = "MindQA" 136 | Me.MindQABindingSource.DataSource = Me.MindQADataSet 137 | ' 138 | 'MindQADataSet 139 | ' 140 | Me.MindQADataSet.DataSetName = "MindQADataSet" 141 | Me.MindQADataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema 142 | ' 143 | 'MindQATableAdapter 144 | ' 145 | Me.MindQATableAdapter.ClearBeforeFill = True 146 | ' 147 | 'TableAdapterManager 148 | ' 149 | Me.TableAdapterManager.BackupDataSetBeforeUpdate = False 150 | Me.TableAdapterManager.GeneralQuestionsTableAdapter = Nothing 151 | Me.TableAdapterManager.MindQATableAdapter = Me.MindQATableAdapter 152 | Me.TableAdapterManager.QAMINDTableAdapter = Nothing 153 | Me.TableAdapterManager.UpdateOrder = Chatbot_2020_Tutorial.MindQADataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete 154 | ' 155 | 'MindQABindingNavigator 156 | ' 157 | Me.MindQABindingNavigator.AddNewItem = Me.BindingNavigatorAddNewItem 158 | Me.MindQABindingNavigator.BindingSource = Me.MindQABindingSource 159 | Me.MindQABindingNavigator.CountItem = Me.BindingNavigatorCountItem 160 | Me.MindQABindingNavigator.DeleteItem = Me.BindingNavigatorDeleteItem 161 | Me.MindQABindingNavigator.ImageScalingSize = New System.Drawing.Size(20, 20) 162 | Me.MindQABindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.MindQABindingNavigatorSaveItem}) 163 | Me.MindQABindingNavigator.Location = New System.Drawing.Point(0, 0) 164 | Me.MindQABindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem 165 | Me.MindQABindingNavigator.MoveLastItem = Me.BindingNavigatorMoveLastItem 166 | Me.MindQABindingNavigator.MoveNextItem = Me.BindingNavigatorMoveNextItem 167 | Me.MindQABindingNavigator.MovePreviousItem = Me.BindingNavigatorMovePreviousItem 168 | Me.MindQABindingNavigator.Name = "MindQABindingNavigator" 169 | Me.MindQABindingNavigator.PositionItem = Me.BindingNavigatorPositionItem 170 | Me.MindQABindingNavigator.Size = New System.Drawing.Size(1179, 31) 171 | Me.MindQABindingNavigator.TabIndex = 2 172 | Me.MindQABindingNavigator.Text = "BindingNavigator1" 173 | ' 174 | 'BindingNavigatorAddNewItem 175 | ' 176 | Me.BindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 177 | Me.BindingNavigatorAddNewItem.Image = CType(resources.GetObject("BindingNavigatorAddNewItem.Image"), System.Drawing.Image) 178 | Me.BindingNavigatorAddNewItem.Name = "BindingNavigatorAddNewItem" 179 | Me.BindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = True 180 | Me.BindingNavigatorAddNewItem.Size = New System.Drawing.Size(29, 28) 181 | Me.BindingNavigatorAddNewItem.Text = "Add new" 182 | ' 183 | 'BindingNavigatorCountItem 184 | ' 185 | Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" 186 | Me.BindingNavigatorCountItem.Size = New System.Drawing.Size(56, 28) 187 | Me.BindingNavigatorCountItem.Text = "of {0}" 188 | Me.BindingNavigatorCountItem.ToolTipText = "Total number of items" 189 | ' 190 | 'BindingNavigatorDeleteItem 191 | ' 192 | Me.BindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 193 | Me.BindingNavigatorDeleteItem.Image = CType(resources.GetObject("BindingNavigatorDeleteItem.Image"), System.Drawing.Image) 194 | Me.BindingNavigatorDeleteItem.Name = "BindingNavigatorDeleteItem" 195 | Me.BindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = True 196 | Me.BindingNavigatorDeleteItem.Size = New System.Drawing.Size(29, 28) 197 | Me.BindingNavigatorDeleteItem.Text = "Delete" 198 | ' 199 | 'BindingNavigatorMoveFirstItem 200 | ' 201 | Me.BindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 202 | Me.BindingNavigatorMoveFirstItem.Image = CType(resources.GetObject("BindingNavigatorMoveFirstItem.Image"), System.Drawing.Image) 203 | Me.BindingNavigatorMoveFirstItem.Name = "BindingNavigatorMoveFirstItem" 204 | Me.BindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = True 205 | Me.BindingNavigatorMoveFirstItem.Size = New System.Drawing.Size(29, 28) 206 | Me.BindingNavigatorMoveFirstItem.Text = "Move first" 207 | ' 208 | 'BindingNavigatorMovePreviousItem 209 | ' 210 | Me.BindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 211 | Me.BindingNavigatorMovePreviousItem.Image = CType(resources.GetObject("BindingNavigatorMovePreviousItem.Image"), System.Drawing.Image) 212 | Me.BindingNavigatorMovePreviousItem.Name = "BindingNavigatorMovePreviousItem" 213 | Me.BindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = True 214 | Me.BindingNavigatorMovePreviousItem.Size = New System.Drawing.Size(29, 28) 215 | Me.BindingNavigatorMovePreviousItem.Text = "Move previous" 216 | ' 217 | 'BindingNavigatorSeparator 218 | ' 219 | Me.BindingNavigatorSeparator.Name = "BindingNavigatorSeparator" 220 | Me.BindingNavigatorSeparator.Size = New System.Drawing.Size(6, 31) 221 | ' 222 | 'BindingNavigatorPositionItem 223 | ' 224 | Me.BindingNavigatorPositionItem.AccessibleName = "Position" 225 | Me.BindingNavigatorPositionItem.AutoSize = False 226 | Me.BindingNavigatorPositionItem.Font = New System.Drawing.Font("Segoe UI", 10.8!) 227 | Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem" 228 | Me.BindingNavigatorPositionItem.Size = New System.Drawing.Size(65, 31) 229 | Me.BindingNavigatorPositionItem.Text = "0" 230 | Me.BindingNavigatorPositionItem.ToolTipText = "Current position" 231 | ' 232 | 'BindingNavigatorSeparator1 233 | ' 234 | Me.BindingNavigatorSeparator1.Name = "BindingNavigatorSeparator1" 235 | Me.BindingNavigatorSeparator1.Size = New System.Drawing.Size(6, 31) 236 | ' 237 | 'BindingNavigatorMoveNextItem 238 | ' 239 | Me.BindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 240 | Me.BindingNavigatorMoveNextItem.Image = CType(resources.GetObject("BindingNavigatorMoveNextItem.Image"), System.Drawing.Image) 241 | Me.BindingNavigatorMoveNextItem.Name = "BindingNavigatorMoveNextItem" 242 | Me.BindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = True 243 | Me.BindingNavigatorMoveNextItem.Size = New System.Drawing.Size(29, 28) 244 | Me.BindingNavigatorMoveNextItem.Text = "Move next" 245 | ' 246 | 'BindingNavigatorMoveLastItem 247 | ' 248 | Me.BindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 249 | Me.BindingNavigatorMoveLastItem.Image = CType(resources.GetObject("BindingNavigatorMoveLastItem.Image"), System.Drawing.Image) 250 | Me.BindingNavigatorMoveLastItem.Name = "BindingNavigatorMoveLastItem" 251 | Me.BindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = True 252 | Me.BindingNavigatorMoveLastItem.Size = New System.Drawing.Size(29, 28) 253 | Me.BindingNavigatorMoveLastItem.Text = "Move last" 254 | ' 255 | 'BindingNavigatorSeparator2 256 | ' 257 | Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" 258 | Me.BindingNavigatorSeparator2.Size = New System.Drawing.Size(6, 31) 259 | ' 260 | 'MindQABindingNavigatorSaveItem 261 | ' 262 | Me.MindQABindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 263 | Me.MindQABindingNavigatorSaveItem.Image = CType(resources.GetObject("MindQABindingNavigatorSaveItem.Image"), System.Drawing.Image) 264 | Me.MindQABindingNavigatorSaveItem.Name = "MindQABindingNavigatorSaveItem" 265 | Me.MindQABindingNavigatorSaveItem.Size = New System.Drawing.Size(29, 28) 266 | Me.MindQABindingNavigatorSaveItem.Text = "Save Data" 267 | ' 268 | 'QUESTIONTextBox 269 | ' 270 | Me.QUESTIONTextBox.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 271 | Me.QUESTIONTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.MindQABindingSource, "QUESTION", True)) 272 | Me.QUESTIONTextBox.Location = New System.Drawing.Point(167, 73) 273 | Me.QUESTIONTextBox.Margin = New System.Windows.Forms.Padding(4) 274 | Me.QUESTIONTextBox.Name = "QUESTIONTextBox" 275 | Me.QUESTIONTextBox.Size = New System.Drawing.Size(968, 22) 276 | Me.QUESTIONTextBox.TabIndex = 5 277 | ' 278 | 'AnswerTextBox 279 | ' 280 | Me.AnswerTextBox.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 281 | Me.AnswerTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.MindQABindingSource, "Answer", True)) 282 | Me.AnswerTextBox.Location = New System.Drawing.Point(167, 105) 283 | Me.AnswerTextBox.Margin = New System.Windows.Forms.Padding(4) 284 | Me.AnswerTextBox.Name = "AnswerTextBox" 285 | Me.AnswerTextBox.Size = New System.Drawing.Size(968, 22) 286 | Me.AnswerTextBox.TabIndex = 7 287 | ' 288 | 'FormMind_QA 289 | ' 290 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) 291 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 292 | Me.BackgroundImage = Global.Chatbot_2020_Tutorial.My.Resources.Resources.BluPrint 293 | Me.ClientSize = New System.Drawing.Size(1179, 612) 294 | Me.Controls.Add(QUESTIONLabel) 295 | Me.Controls.Add(Me.QUESTIONTextBox) 296 | Me.Controls.Add(AnswerLabel) 297 | Me.Controls.Add(Me.AnswerTextBox) 298 | Me.Controls.Add(Me.MindQABindingNavigator) 299 | Me.Controls.Add(Me.GroupBox1) 300 | Me.DoubleBuffered = True 301 | Me.Margin = New System.Windows.Forms.Padding(4) 302 | Me.Name = "FormMind_QA" 303 | Me.Text = "Question & Answers MindQA" 304 | Me.GroupBox1.ResumeLayout(False) 305 | CType(Me.MindQADataGridView, System.ComponentModel.ISupportInitialize).EndInit() 306 | CType(Me.MindQABindingSource, System.ComponentModel.ISupportInitialize).EndInit() 307 | CType(Me.MindQADataSet, System.ComponentModel.ISupportInitialize).EndInit() 308 | CType(Me.MindQABindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() 309 | Me.MindQABindingNavigator.ResumeLayout(False) 310 | Me.MindQABindingNavigator.PerformLayout() 311 | Me.ResumeLayout(False) 312 | Me.PerformLayout() 313 | 314 | End Sub 315 | 316 | Friend WithEvents GroupBox1 As GroupBox 317 | Friend WithEvents MindQADataSet As MindQADataSet 318 | Friend WithEvents MindQABindingSource As BindingSource 319 | Friend WithEvents MindQATableAdapter As MindQADataSetTableAdapters.MindQATableAdapter 320 | Friend WithEvents TableAdapterManager As MindQADataSetTableAdapters.TableAdapterManager 321 | Friend WithEvents MindQABindingNavigator As BindingNavigator 322 | Friend WithEvents BindingNavigatorAddNewItem As ToolStripButton 323 | Friend WithEvents BindingNavigatorCountItem As ToolStripLabel 324 | Friend WithEvents BindingNavigatorDeleteItem As ToolStripButton 325 | Friend WithEvents BindingNavigatorMoveFirstItem As ToolStripButton 326 | Friend WithEvents BindingNavigatorMovePreviousItem As ToolStripButton 327 | Friend WithEvents BindingNavigatorSeparator As ToolStripSeparator 328 | Friend WithEvents BindingNavigatorPositionItem As ToolStripTextBox 329 | Friend WithEvents BindingNavigatorSeparator1 As ToolStripSeparator 330 | Friend WithEvents BindingNavigatorMoveNextItem As ToolStripButton 331 | Friend WithEvents BindingNavigatorMoveLastItem As ToolStripButton 332 | Friend WithEvents BindingNavigatorSeparator2 As ToolStripSeparator 333 | Friend WithEvents MindQABindingNavigatorSaveItem As ToolStripButton 334 | Friend WithEvents MindQADataGridView As DataGridView 335 | Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn 336 | Friend WithEvents DataGridViewTextBoxColumn2 As DataGridViewTextBoxColumn 337 | Friend WithEvents QUESTIONTextBox As TextBox 338 | Friend WithEvents AnswerTextBox As TextBox 339 | End Class 340 | -------------------------------------------------------------------------------- /Forms/FormMind_QA.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 | 121 | False 122 | 123 | 124 | False 125 | 126 | 127 | 172, 17 128 | 129 | 130 | 17, 17 131 | 132 | 133 | 369, 17 134 | 135 | 136 | 560, 17 137 | 138 | 139 | 754, 17 140 | 141 | 142 | 143 | 144 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 145 | wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC 146 | pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++ 147 | Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ 148 | /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA 149 | zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/ 150 | IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E 151 | rkJggg== 152 | 153 | 154 | 155 | 156 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 157 | wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC 158 | DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC 159 | rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV 160 | i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG 161 | 86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG 162 | QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX 163 | bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII= 164 | 165 | 166 | 167 | 168 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 169 | wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 170 | wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 171 | v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg 172 | UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA 173 | Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu 174 | lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= 175 | 176 | 177 | 178 | 179 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 180 | wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w 181 | 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f 182 | Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ 183 | 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC 184 | 185 | 186 | 187 | 188 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 189 | wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 190 | n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI 191 | N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f 192 | oAc0QjgAAAAASUVORK5CYII= 193 | 194 | 195 | 196 | 197 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 198 | wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// 199 | h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B 200 | twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA 201 | kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG 202 | WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 203 | 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== 204 | 205 | 206 | 207 | 208 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 209 | wwAADsMBx2+oZAAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo 210 | dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII= 211 | 212 | 213 | -------------------------------------------------------------------------------- /Forms/FormMind_QA.vb: -------------------------------------------------------------------------------- 1 | Public Class FormMind_QA 2 | Private Sub MindQABindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles MindQABindingNavigatorSaveItem.Click 3 | Me.Validate() 4 | Me.MindQABindingSource.EndEdit() 5 | Me.TableAdapterManager.UpdateAll(Me.MindQADataSet) 6 | 7 | End Sub 8 | 9 | Private Sub FormDataEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load 10 | 'TODO: This line of code loads data into the 'MindQADataSet.MindQA' table. You can move, or remove it, as needed. 11 | Me.MindQATableAdapter.Fill(Me.MindQADataSet.MindQA) 12 | 13 | End Sub 14 | End Class -------------------------------------------------------------------------------- /Forms/FormQA_Mind.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class FormQA_Mind 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.components = New System.ComponentModel.Container() 26 | Dim QUESTIONLabel As System.Windows.Forms.Label 27 | Dim AnswerLabel As System.Windows.Forms.Label 28 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FormQA_Mind)) 29 | Me.GroupBox1 = New System.Windows.Forms.GroupBox() 30 | Me.QAMINDDataGridView = New System.Windows.Forms.DataGridView() 31 | Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn() 32 | Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn() 33 | Me.QAMINDBindingSource = New System.Windows.Forms.BindingSource(Me.components) 34 | Me.MindQADataSet = New Chatbot_2020_Tutorial.MindQADataSet() 35 | Me.QAMINDTableAdapter = New Chatbot_2020_Tutorial.MindQADataSetTableAdapters.QAMINDTableAdapter() 36 | Me.TableAdapterManager = New Chatbot_2020_Tutorial.MindQADataSetTableAdapters.TableAdapterManager() 37 | Me.QAMINDBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) 38 | Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton() 39 | Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() 40 | Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton() 41 | Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() 42 | Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() 43 | Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator() 44 | Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox() 45 | Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator() 46 | Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() 47 | Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() 48 | Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() 49 | Me.QAMINDBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() 50 | Me.QUESTIONTextBox = New System.Windows.Forms.TextBox() 51 | Me.AnswerTextBox = New System.Windows.Forms.TextBox() 52 | QUESTIONLabel = New System.Windows.Forms.Label() 53 | AnswerLabel = New System.Windows.Forms.Label() 54 | Me.GroupBox1.SuspendLayout() 55 | CType(Me.QAMINDDataGridView, System.ComponentModel.ISupportInitialize).BeginInit() 56 | CType(Me.QAMINDBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() 57 | CType(Me.MindQADataSet, System.ComponentModel.ISupportInitialize).BeginInit() 58 | CType(Me.QAMINDBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit() 59 | Me.QAMINDBindingNavigator.SuspendLayout() 60 | Me.SuspendLayout() 61 | ' 62 | 'QUESTIONLabel 63 | ' 64 | QUESTIONLabel.AutoSize = True 65 | QUESTIONLabel.BackColor = System.Drawing.SystemColors.ActiveCaptionText 66 | QUESTIONLabel.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 67 | QUESTIONLabel.ForeColor = System.Drawing.Color.White 68 | QUESTIONLabel.Location = New System.Drawing.Point(16, 65) 69 | QUESTIONLabel.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) 70 | QUESTIONLabel.Name = "QUESTIONLabel" 71 | QUESTIONLabel.Size = New System.Drawing.Size(132, 25) 72 | QUESTIONLabel.TabIndex = 2 73 | QUESTIONLabel.Text = "QUESTION:" 74 | ' 75 | 'AnswerLabel 76 | ' 77 | AnswerLabel.AutoSize = True 78 | AnswerLabel.BackColor = System.Drawing.SystemColors.ActiveCaptionText 79 | AnswerLabel.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 80 | AnswerLabel.ForeColor = System.Drawing.Color.White 81 | AnswerLabel.Location = New System.Drawing.Point(16, 97) 82 | AnswerLabel.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) 83 | AnswerLabel.Name = "AnswerLabel" 84 | AnswerLabel.Size = New System.Drawing.Size(91, 25) 85 | AnswerLabel.TabIndex = 4 86 | AnswerLabel.Text = "Answer:" 87 | ' 88 | 'GroupBox1 89 | ' 90 | Me.GroupBox1.BackColor = System.Drawing.Color.Black 91 | Me.GroupBox1.Controls.Add(Me.QAMINDDataGridView) 92 | Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom 93 | Me.GroupBox1.Location = New System.Drawing.Point(0, 149) 94 | Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4) 95 | Me.GroupBox1.Name = "GroupBox1" 96 | Me.GroupBox1.Padding = New System.Windows.Forms.Padding(4) 97 | Me.GroupBox1.Size = New System.Drawing.Size(1067, 400) 98 | Me.GroupBox1.TabIndex = 0 99 | Me.GroupBox1.TabStop = False 100 | ' 101 | 'QAMINDDataGridView 102 | ' 103 | Me.QAMINDDataGridView.AutoGenerateColumns = False 104 | Me.QAMINDDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize 105 | Me.QAMINDDataGridView.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DataGridViewTextBoxColumn1, Me.DataGridViewTextBoxColumn2}) 106 | Me.QAMINDDataGridView.DataSource = Me.QAMINDBindingSource 107 | Me.QAMINDDataGridView.Dock = System.Windows.Forms.DockStyle.Fill 108 | Me.QAMINDDataGridView.Location = New System.Drawing.Point(4, 19) 109 | Me.QAMINDDataGridView.Margin = New System.Windows.Forms.Padding(4) 110 | Me.QAMINDDataGridView.Name = "QAMINDDataGridView" 111 | Me.QAMINDDataGridView.RowHeadersWidth = 51 112 | Me.QAMINDDataGridView.Size = New System.Drawing.Size(1059, 377) 113 | Me.QAMINDDataGridView.TabIndex = 0 114 | ' 115 | 'DataGridViewTextBoxColumn1 116 | ' 117 | Me.DataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill 118 | Me.DataGridViewTextBoxColumn1.DataPropertyName = "QUESTION" 119 | Me.DataGridViewTextBoxColumn1.FillWeight = 50.0! 120 | Me.DataGridViewTextBoxColumn1.HeaderText = "QUESTION" 121 | Me.DataGridViewTextBoxColumn1.MinimumWidth = 6 122 | Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1" 123 | ' 124 | 'DataGridViewTextBoxColumn2 125 | ' 126 | Me.DataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill 127 | Me.DataGridViewTextBoxColumn2.DataPropertyName = "Answer" 128 | Me.DataGridViewTextBoxColumn2.FillWeight = 50.0! 129 | Me.DataGridViewTextBoxColumn2.HeaderText = "Answer" 130 | Me.DataGridViewTextBoxColumn2.MinimumWidth = 6 131 | Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2" 132 | ' 133 | 'QAMINDBindingSource 134 | ' 135 | Me.QAMINDBindingSource.DataMember = "QAMIND" 136 | Me.QAMINDBindingSource.DataSource = Me.MindQADataSet 137 | ' 138 | 'MindQADataSet 139 | ' 140 | Me.MindQADataSet.DataSetName = "MindQADataSet" 141 | Me.MindQADataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema 142 | ' 143 | 'QAMINDTableAdapter 144 | ' 145 | Me.QAMINDTableAdapter.ClearBeforeFill = True 146 | ' 147 | 'TableAdapterManager 148 | ' 149 | Me.TableAdapterManager.BackupDataSetBeforeUpdate = False 150 | Me.TableAdapterManager.GeneralQuestionsTableAdapter = Nothing 151 | Me.TableAdapterManager.MindQATableAdapter = Nothing 152 | Me.TableAdapterManager.QAMINDTableAdapter = Me.QAMINDTableAdapter 153 | Me.TableAdapterManager.UpdateOrder = Chatbot_2020_Tutorial.MindQADataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete 154 | ' 155 | 'QAMINDBindingNavigator 156 | ' 157 | Me.QAMINDBindingNavigator.AddNewItem = Me.BindingNavigatorAddNewItem 158 | Me.QAMINDBindingNavigator.BindingSource = Me.QAMINDBindingSource 159 | Me.QAMINDBindingNavigator.CountItem = Me.BindingNavigatorCountItem 160 | Me.QAMINDBindingNavigator.DeleteItem = Me.BindingNavigatorDeleteItem 161 | Me.QAMINDBindingNavigator.ImageScalingSize = New System.Drawing.Size(20, 20) 162 | Me.QAMINDBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.BindingNavigatorAddNewItem, Me.BindingNavigatorDeleteItem, Me.QAMINDBindingNavigatorSaveItem}) 163 | Me.QAMINDBindingNavigator.Location = New System.Drawing.Point(0, 0) 164 | Me.QAMINDBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem 165 | Me.QAMINDBindingNavigator.MoveLastItem = Me.BindingNavigatorMoveLastItem 166 | Me.QAMINDBindingNavigator.MoveNextItem = Me.BindingNavigatorMoveNextItem 167 | Me.QAMINDBindingNavigator.MovePreviousItem = Me.BindingNavigatorMovePreviousItem 168 | Me.QAMINDBindingNavigator.Name = "QAMINDBindingNavigator" 169 | Me.QAMINDBindingNavigator.PositionItem = Me.BindingNavigatorPositionItem 170 | Me.QAMINDBindingNavigator.Size = New System.Drawing.Size(1067, 31) 171 | Me.QAMINDBindingNavigator.TabIndex = 1 172 | Me.QAMINDBindingNavigator.Text = "BindingNavigator1" 173 | ' 174 | 'BindingNavigatorAddNewItem 175 | ' 176 | Me.BindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 177 | Me.BindingNavigatorAddNewItem.Image = CType(resources.GetObject("BindingNavigatorAddNewItem.Image"), System.Drawing.Image) 178 | Me.BindingNavigatorAddNewItem.Name = "BindingNavigatorAddNewItem" 179 | Me.BindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = True 180 | Me.BindingNavigatorAddNewItem.Size = New System.Drawing.Size(29, 28) 181 | Me.BindingNavigatorAddNewItem.Text = "Add new" 182 | ' 183 | 'BindingNavigatorCountItem 184 | ' 185 | Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" 186 | Me.BindingNavigatorCountItem.Size = New System.Drawing.Size(56, 28) 187 | Me.BindingNavigatorCountItem.Text = "of {0}" 188 | Me.BindingNavigatorCountItem.ToolTipText = "Total number of items" 189 | ' 190 | 'BindingNavigatorDeleteItem 191 | ' 192 | Me.BindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 193 | Me.BindingNavigatorDeleteItem.Image = CType(resources.GetObject("BindingNavigatorDeleteItem.Image"), System.Drawing.Image) 194 | Me.BindingNavigatorDeleteItem.Name = "BindingNavigatorDeleteItem" 195 | Me.BindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = True 196 | Me.BindingNavigatorDeleteItem.Size = New System.Drawing.Size(29, 28) 197 | Me.BindingNavigatorDeleteItem.Text = "Delete" 198 | ' 199 | 'BindingNavigatorMoveFirstItem 200 | ' 201 | Me.BindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 202 | Me.BindingNavigatorMoveFirstItem.Image = CType(resources.GetObject("BindingNavigatorMoveFirstItem.Image"), System.Drawing.Image) 203 | Me.BindingNavigatorMoveFirstItem.Name = "BindingNavigatorMoveFirstItem" 204 | Me.BindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = True 205 | Me.BindingNavigatorMoveFirstItem.Size = New System.Drawing.Size(29, 28) 206 | Me.BindingNavigatorMoveFirstItem.Text = "Move first" 207 | ' 208 | 'BindingNavigatorMovePreviousItem 209 | ' 210 | Me.BindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 211 | Me.BindingNavigatorMovePreviousItem.Image = CType(resources.GetObject("BindingNavigatorMovePreviousItem.Image"), System.Drawing.Image) 212 | Me.BindingNavigatorMovePreviousItem.Name = "BindingNavigatorMovePreviousItem" 213 | Me.BindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = True 214 | Me.BindingNavigatorMovePreviousItem.Size = New System.Drawing.Size(29, 28) 215 | Me.BindingNavigatorMovePreviousItem.Text = "Move previous" 216 | ' 217 | 'BindingNavigatorSeparator 218 | ' 219 | Me.BindingNavigatorSeparator.Name = "BindingNavigatorSeparator" 220 | Me.BindingNavigatorSeparator.Size = New System.Drawing.Size(6, 31) 221 | ' 222 | 'BindingNavigatorPositionItem 223 | ' 224 | Me.BindingNavigatorPositionItem.AccessibleName = "Position" 225 | Me.BindingNavigatorPositionItem.AutoSize = False 226 | Me.BindingNavigatorPositionItem.Font = New System.Drawing.Font("Segoe UI", 10.8!) 227 | Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem" 228 | Me.BindingNavigatorPositionItem.Size = New System.Drawing.Size(65, 31) 229 | Me.BindingNavigatorPositionItem.Text = "0" 230 | Me.BindingNavigatorPositionItem.ToolTipText = "Current position" 231 | ' 232 | 'BindingNavigatorSeparator1 233 | ' 234 | Me.BindingNavigatorSeparator1.Name = "BindingNavigatorSeparator1" 235 | Me.BindingNavigatorSeparator1.Size = New System.Drawing.Size(6, 31) 236 | ' 237 | 'BindingNavigatorMoveNextItem 238 | ' 239 | Me.BindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 240 | Me.BindingNavigatorMoveNextItem.Image = CType(resources.GetObject("BindingNavigatorMoveNextItem.Image"), System.Drawing.Image) 241 | Me.BindingNavigatorMoveNextItem.Name = "BindingNavigatorMoveNextItem" 242 | Me.BindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = True 243 | Me.BindingNavigatorMoveNextItem.Size = New System.Drawing.Size(29, 28) 244 | Me.BindingNavigatorMoveNextItem.Text = "Move next" 245 | ' 246 | 'BindingNavigatorMoveLastItem 247 | ' 248 | Me.BindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 249 | Me.BindingNavigatorMoveLastItem.Image = CType(resources.GetObject("BindingNavigatorMoveLastItem.Image"), System.Drawing.Image) 250 | Me.BindingNavigatorMoveLastItem.Name = "BindingNavigatorMoveLastItem" 251 | Me.BindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = True 252 | Me.BindingNavigatorMoveLastItem.Size = New System.Drawing.Size(29, 28) 253 | Me.BindingNavigatorMoveLastItem.Text = "Move last" 254 | ' 255 | 'BindingNavigatorSeparator2 256 | ' 257 | Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" 258 | Me.BindingNavigatorSeparator2.Size = New System.Drawing.Size(6, 31) 259 | ' 260 | 'QAMINDBindingNavigatorSaveItem 261 | ' 262 | Me.QAMINDBindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image 263 | Me.QAMINDBindingNavigatorSaveItem.Image = CType(resources.GetObject("QAMINDBindingNavigatorSaveItem.Image"), System.Drawing.Image) 264 | Me.QAMINDBindingNavigatorSaveItem.Name = "QAMINDBindingNavigatorSaveItem" 265 | Me.QAMINDBindingNavigatorSaveItem.Size = New System.Drawing.Size(29, 28) 266 | Me.QAMINDBindingNavigatorSaveItem.Text = "Save Data" 267 | ' 268 | 'QUESTIONTextBox 269 | ' 270 | Me.QUESTIONTextBox.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 271 | Me.QUESTIONTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.QAMINDBindingSource, "QUESTION", True)) 272 | Me.QUESTIONTextBox.Location = New System.Drawing.Point(150, 65) 273 | Me.QUESTIONTextBox.Margin = New System.Windows.Forms.Padding(4) 274 | Me.QUESTIONTextBox.Name = "QUESTIONTextBox" 275 | Me.QUESTIONTextBox.Size = New System.Drawing.Size(889, 22) 276 | Me.QUESTIONTextBox.TabIndex = 3 277 | ' 278 | 'AnswerTextBox 279 | ' 280 | Me.AnswerTextBox.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 281 | Me.AnswerTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.QAMINDBindingSource, "Answer", True)) 282 | Me.AnswerTextBox.Location = New System.Drawing.Point(150, 97) 283 | Me.AnswerTextBox.Margin = New System.Windows.Forms.Padding(4) 284 | Me.AnswerTextBox.Name = "AnswerTextBox" 285 | Me.AnswerTextBox.Size = New System.Drawing.Size(889, 22) 286 | Me.AnswerTextBox.TabIndex = 5 287 | ' 288 | 'FormQA_Mind 289 | ' 290 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) 291 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 292 | Me.BackgroundImage = Global.Chatbot_2020_Tutorial.My.Resources.Resources.BluPrint 293 | Me.ClientSize = New System.Drawing.Size(1067, 549) 294 | Me.Controls.Add(QUESTIONLabel) 295 | Me.Controls.Add(Me.QUESTIONTextBox) 296 | Me.Controls.Add(AnswerLabel) 297 | Me.Controls.Add(Me.AnswerTextBox) 298 | Me.Controls.Add(Me.QAMINDBindingNavigator) 299 | Me.Controls.Add(Me.GroupBox1) 300 | Me.Margin = New System.Windows.Forms.Padding(4) 301 | Me.Name = "FormQA_Mind" 302 | Me.Text = "Question & Answers QA_MIND" 303 | Me.GroupBox1.ResumeLayout(False) 304 | CType(Me.QAMINDDataGridView, System.ComponentModel.ISupportInitialize).EndInit() 305 | CType(Me.QAMINDBindingSource, System.ComponentModel.ISupportInitialize).EndInit() 306 | CType(Me.MindQADataSet, System.ComponentModel.ISupportInitialize).EndInit() 307 | CType(Me.QAMINDBindingNavigator, System.ComponentModel.ISupportInitialize).EndInit() 308 | Me.QAMINDBindingNavigator.ResumeLayout(False) 309 | Me.QAMINDBindingNavigator.PerformLayout() 310 | Me.ResumeLayout(False) 311 | Me.PerformLayout() 312 | 313 | End Sub 314 | 315 | Friend WithEvents GroupBox1 As GroupBox 316 | Friend WithEvents MindQADataSet As MindQADataSet 317 | Friend WithEvents QAMINDBindingSource As BindingSource 318 | Friend WithEvents QAMINDTableAdapter As MindQADataSetTableAdapters.QAMINDTableAdapter 319 | Friend WithEvents TableAdapterManager As MindQADataSetTableAdapters.TableAdapterManager 320 | Friend WithEvents QAMINDBindingNavigator As BindingNavigator 321 | Friend WithEvents BindingNavigatorAddNewItem As ToolStripButton 322 | Friend WithEvents BindingNavigatorCountItem As ToolStripLabel 323 | Friend WithEvents BindingNavigatorDeleteItem As ToolStripButton 324 | Friend WithEvents BindingNavigatorMoveFirstItem As ToolStripButton 325 | Friend WithEvents BindingNavigatorMovePreviousItem As ToolStripButton 326 | Friend WithEvents BindingNavigatorSeparator As ToolStripSeparator 327 | Friend WithEvents BindingNavigatorPositionItem As ToolStripTextBox 328 | Friend WithEvents BindingNavigatorSeparator1 As ToolStripSeparator 329 | Friend WithEvents BindingNavigatorMoveNextItem As ToolStripButton 330 | Friend WithEvents BindingNavigatorMoveLastItem As ToolStripButton 331 | Friend WithEvents BindingNavigatorSeparator2 As ToolStripSeparator 332 | Friend WithEvents QAMINDBindingNavigatorSaveItem As ToolStripButton 333 | Friend WithEvents QUESTIONTextBox As TextBox 334 | Friend WithEvents AnswerTextBox As TextBox 335 | Friend WithEvents QAMINDDataGridView As DataGridView 336 | Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn 337 | Friend WithEvents DataGridViewTextBoxColumn2 As DataGridViewTextBoxColumn 338 | End Class 339 | -------------------------------------------------------------------------------- /Forms/FormQA_Mind.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 | 121 | False 122 | 123 | 124 | False 125 | 126 | 127 | 172, 17 128 | 129 | 130 | 17, 17 131 | 132 | 133 | 374, 17 134 | 135 | 136 | 569, 17 137 | 138 | 139 | 763, 17 140 | 141 | 142 | 143 | 144 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 145 | wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC 146 | pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++ 147 | Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ 148 | /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA 149 | zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/ 150 | IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E 151 | rkJggg== 152 | 153 | 154 | 155 | 156 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 157 | wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC 158 | DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC 159 | rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV 160 | i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG 161 | 86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG 162 | QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX 163 | bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII= 164 | 165 | 166 | 167 | 168 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 169 | wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 170 | wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 171 | v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg 172 | UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA 173 | Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu 174 | lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= 175 | 176 | 177 | 178 | 179 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 180 | wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w 181 | 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f 182 | Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ 183 | 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC 184 | 185 | 186 | 187 | 188 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 189 | wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 190 | n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI 191 | N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f 192 | oAc0QjgAAAAASUVORK5CYII= 193 | 194 | 195 | 196 | 197 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 198 | wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// 199 | h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B 200 | twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA 201 | kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG 202 | WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 203 | 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== 204 | 205 | 206 | 207 | 208 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 209 | wwAADsMBx2+oZAAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo 210 | dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII= 211 | 212 | 213 | -------------------------------------------------------------------------------- /Forms/FormQA_Mind.vb: -------------------------------------------------------------------------------- 1 | Public Class FormQA_Mind 2 | Private Sub QAMINDBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles QAMINDBindingNavigatorSaveItem.Click 3 | Me.Validate() 4 | Me.QAMINDBindingSource.EndEdit() 5 | Me.TableAdapterManager.UpdateAll(Me.MindQADataSet) 6 | 7 | End Sub 8 | 9 | Private Sub FormQA_Mind_Load(sender As Object, e As EventArgs) Handles MyBase.Load 10 | 'TODO: This line of code loads data into the 'MindQADataSet.QAMIND' table. You can move, or remove it, as needed. 11 | Me.QAMINDTableAdapter.Fill(Me.MindQADataSet.QAMIND) 12 | 13 | End Sub 14 | End Class -------------------------------------------------------------------------------- /Forms/Form_Chat_UI.designer.vb: -------------------------------------------------------------------------------- 1 | Imports System.Windows.Forms 2 | 3 | 4 | 5 | Partial Class Form_Chat_UI 6 | Inherits System.Windows.Forms.Form 7 | 8 | 'Form overrides dispose to clean up the component list. 9 | 10 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 11 | Try 12 | If disposing AndAlso components IsNot Nothing Then 13 | components.Dispose() 14 | End If 15 | Finally 16 | MyBase.Dispose(disposing) 17 | End Try 18 | End Sub 19 | 20 | 'Required by the Windows Form Designer 21 | Private components As System.ComponentModel.IContainer 22 | 23 | 'NOTE: The following procedure is required by the Windows Form Designer 24 | 'It can be modified using the Windows Form Designer. 25 | 'Do not modify it using the code editor. 26 | 27 | Private Sub InitializeComponent() 28 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form_Chat_UI)) 29 | Me.TextIn = New System.Windows.Forms.TextBox() 30 | Me.TextOut = New System.Windows.Forms.TextBox() 31 | Me.Button_Enter = New System.Windows.Forms.Button() 32 | Me.GroupBox1 = New System.Windows.Forms.GroupBox() 33 | Me.GroupBox2 = New System.Windows.Forms.GroupBox() 34 | Me.ButtonCreatePlugin = New System.Windows.Forms.Button() 35 | Me.ButtonMindQA = New System.Windows.Forms.Button() 36 | Me.ButtonQA_Mind = New System.Windows.Forms.Button() 37 | Me.GroupBox2.SuspendLayout() 38 | Me.SuspendLayout() 39 | ' 40 | 'TextIn 41 | ' 42 | Me.TextIn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ 43 | Or System.Windows.Forms.AnchorStyles.Left) _ 44 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 45 | Me.TextIn.Font = New System.Drawing.Font("Microsoft Sans Serif", 16.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 46 | Me.TextIn.Location = New System.Drawing.Point(17, 242) 47 | Me.TextIn.Margin = New System.Windows.Forms.Padding(3, 2, 3, 2) 48 | Me.TextIn.Name = "TextIn" 49 | Me.TextIn.Size = New System.Drawing.Size(677, 38) 50 | Me.TextIn.TabIndex = 0 51 | ' 52 | 'TextOut 53 | ' 54 | Me.TextOut.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ 55 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 56 | Me.TextOut.BackColor = System.Drawing.SystemColors.Info 57 | Me.TextOut.Font = New System.Drawing.Font("Comic Sans MS", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 58 | Me.TextOut.Location = New System.Drawing.Point(299, 23) 59 | Me.TextOut.Margin = New System.Windows.Forms.Padding(3, 2, 3, 2) 60 | Me.TextOut.Multiline = True 61 | Me.TextOut.Name = "TextOut" 62 | Me.TextOut.ScrollBars = System.Windows.Forms.ScrollBars.Vertical 63 | Me.TextOut.Size = New System.Drawing.Size(513, 197) 64 | Me.TextOut.TabIndex = 1 65 | ' 66 | 'Button_Enter 67 | ' 68 | Me.Button_Enter.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) 69 | Me.Button_Enter.BackColor = System.Drawing.Color.DimGray 70 | Me.Button_Enter.BackgroundImage = CType(resources.GetObject("Button_Enter.BackgroundImage"), System.Drawing.Image) 71 | Me.Button_Enter.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch 72 | Me.Button_Enter.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.8!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 73 | Me.Button_Enter.ForeColor = System.Drawing.SystemColors.ButtonHighlight 74 | Me.Button_Enter.Location = New System.Drawing.Point(713, 236) 75 | Me.Button_Enter.Margin = New System.Windows.Forms.Padding(3, 2, 3, 2) 76 | Me.Button_Enter.Name = "Button_Enter" 77 | Me.Button_Enter.Size = New System.Drawing.Size(100, 34) 78 | Me.Button_Enter.TabIndex = 2 79 | Me.Button_Enter.Text = "Talk" 80 | Me.Button_Enter.UseVisualStyleBackColor = False 81 | ' 82 | 'GroupBox1 83 | ' 84 | Me.GroupBox1.BackColor = System.Drawing.Color.Black 85 | Me.GroupBox1.BackgroundImage = Global.Chatbot_2020_Tutorial.My.Resources.Resources.Logo_UFP 86 | Me.GroupBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch 87 | Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup 88 | Me.GroupBox1.Location = New System.Drawing.Point(13, 14) 89 | Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4) 90 | Me.GroupBox1.Name = "GroupBox1" 91 | Me.GroupBox1.Padding = New System.Windows.Forms.Padding(4) 92 | Me.GroupBox1.Size = New System.Drawing.Size(279, 207) 93 | Me.GroupBox1.TabIndex = 3 94 | Me.GroupBox1.TabStop = False 95 | ' 96 | 'GroupBox2 97 | ' 98 | Me.GroupBox2.BackColor = System.Drawing.Color.Black 99 | Me.GroupBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch 100 | Me.GroupBox2.Controls.Add(Me.ButtonCreatePlugin) 101 | Me.GroupBox2.Controls.Add(Me.ButtonMindQA) 102 | Me.GroupBox2.Controls.Add(Me.ButtonQA_Mind) 103 | Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Bottom 104 | Me.GroupBox2.ForeColor = System.Drawing.Color.White 105 | Me.GroupBox2.Location = New System.Drawing.Point(0, 290) 106 | Me.GroupBox2.Margin = New System.Windows.Forms.Padding(4) 107 | Me.GroupBox2.Name = "GroupBox2" 108 | Me.GroupBox2.Padding = New System.Windows.Forms.Padding(4) 109 | Me.GroupBox2.Size = New System.Drawing.Size(827, 52) 110 | Me.GroupBox2.TabIndex = 4 111 | Me.GroupBox2.TabStop = False 112 | Me.GroupBox2.Text = "Tools" 113 | ' 114 | 'ButtonCreatePlugin 115 | ' 116 | Me.ButtonCreatePlugin.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 117 | Me.ButtonCreatePlugin.ForeColor = System.Drawing.Color.Black 118 | Me.ButtonCreatePlugin.Location = New System.Drawing.Point(17, 17) 119 | Me.ButtonCreatePlugin.Margin = New System.Windows.Forms.Padding(4) 120 | Me.ButtonCreatePlugin.Name = "ButtonCreatePlugin" 121 | Me.ButtonCreatePlugin.Size = New System.Drawing.Size(139, 28) 122 | Me.ButtonCreatePlugin.TabIndex = 8 123 | Me.ButtonCreatePlugin.Text = "Create Plug-in" 124 | Me.ButtonCreatePlugin.UseVisualStyleBackColor = True 125 | ' 126 | 'ButtonMindQA 127 | ' 128 | Me.ButtonMindQA.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 129 | Me.ButtonMindQA.ForeColor = System.Drawing.Color.Black 130 | Me.ButtonMindQA.Location = New System.Drawing.Point(272, 17) 131 | Me.ButtonMindQA.Margin = New System.Windows.Forms.Padding(4) 132 | Me.ButtonMindQA.Name = "ButtonMindQA" 133 | Me.ButtonMindQA.Size = New System.Drawing.Size(100, 28) 134 | Me.ButtonMindQA.TabIndex = 8 135 | Me.ButtonMindQA.Text = "Mind QA" 136 | Me.ButtonMindQA.UseVisualStyleBackColor = True 137 | ' 138 | 'ButtonQA_Mind 139 | ' 140 | Me.ButtonQA_Mind.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 141 | Me.ButtonQA_Mind.ForeColor = System.Drawing.Color.Black 142 | Me.ButtonQA_Mind.Location = New System.Drawing.Point(164, 17) 143 | Me.ButtonQA_Mind.Margin = New System.Windows.Forms.Padding(4) 144 | Me.ButtonQA_Mind.Name = "ButtonQA_Mind" 145 | Me.ButtonQA_Mind.Size = New System.Drawing.Size(100, 28) 146 | Me.ButtonQA_Mind.TabIndex = 8 147 | Me.ButtonQA_Mind.Text = "QA Mind" 148 | Me.ButtonQA_Mind.UseVisualStyleBackColor = True 149 | ' 150 | 'Form_Chat_UI 151 | ' 152 | Me.AcceptButton = Me.Button_Enter 153 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) 154 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 155 | Me.BackColor = System.Drawing.Color.Black 156 | Me.BackgroundImage = Global.Chatbot_2020_Tutorial.My.Resources.Resources.BluPrint 157 | Me.ClientSize = New System.Drawing.Size(827, 342) 158 | Me.Controls.Add(Me.TextIn) 159 | Me.Controls.Add(Me.GroupBox2) 160 | Me.Controls.Add(Me.GroupBox1) 161 | Me.Controls.Add(Me.Button_Enter) 162 | Me.Controls.Add(Me.TextOut) 163 | Me.DoubleBuffered = True 164 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow 165 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) 166 | Me.Margin = New System.Windows.Forms.Padding(3, 2, 3, 2) 167 | Me.MaximizeBox = False 168 | Me.MinimizeBox = False 169 | Me.Name = "Form_Chat_UI" 170 | Me.ShowIcon = False 171 | Me.ShowInTaskbar = False 172 | Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide 173 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 174 | Me.Text = "Form_Chat_UI" 175 | Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer)) 176 | Me.GroupBox2.ResumeLayout(False) 177 | Me.ResumeLayout(False) 178 | Me.PerformLayout() 179 | 180 | End Sub 181 | 182 | Friend WithEvents TextIn As TextBox 183 | Friend WithEvents TextOut As TextBox 184 | Friend WithEvents Button_Enter As Button 185 | Friend WithEvents GroupBox1 As GroupBox 186 | Friend WithEvents GroupBox2 As GroupBox 187 | Friend WithEvents ButtonCreatePlugin As Button 188 | Friend WithEvents ButtonMindQA As Button 189 | Friend WithEvents ButtonQA_Mind As Button 190 | End Class 191 | -------------------------------------------------------------------------------- /Forms/Form_Chat_UI.vb: -------------------------------------------------------------------------------- 1 | Imports System.IO 2 | Imports System.speech 3 | 4 | ''' 5 | ''' This is the Main Communications Center 6 | ''' 7 | Public Class Form_Chat_UI 8 | Private Speechout As New Speech.Synthesis.SpeechSynthesizer 9 | Public Newpoint As New Point 10 | 11 | 'Methods for form positioning 12 | Public x, y As Integer 13 | 14 | Private mInputText As String = "" 15 | 16 | Private mloaded As Boolean = False 17 | 18 | Public Event TEXTRECIEVED(ByVal Text As String) 19 | 20 | Public ReadOnly Property Loaded As Boolean 21 | Get 22 | Return mloaded 23 | End Get 24 | End Property 25 | 26 | Public ReadOnly Property RecievedText As String 27 | Get 28 | Return mInputText 29 | End Get 30 | 31 | End Property 32 | Public Sub EffectActuators(ByRef Text As String) 33 | If Loaded = True Then 34 | 35 | Speechout.Speak(Text) 36 | End If 37 | 38 | End Sub 39 | Public Sub DISPLAYOUTPUT(ByRef NewText As String) 40 | EffectActuators(NewText) 41 | TextOut.Text += "User: " & mInputText & vbNewLine & "AI: " & NewText & vbNewLine 42 | End Sub 43 | 44 | Private Sub Button_Enter_Click(sender As Object, e As EventArgs) Handles Button_Enter.Click 45 | mInputText = TextIn.Text 46 | TextIn.Text = "" 47 | RaiseEvent TEXTRECIEVED(mInputText) 48 | End Sub 49 | 50 | Private Sub Form_Chat_UI_Closed(sender As Object, e As EventArgs) Handles Me.Closed 51 | mloaded = False 52 | End Sub 53 | 54 | Private Sub Form_Chat_UI_DoubleClick(sender As Object, e As EventArgs) Handles Me.DoubleClick 55 | Me.Close() 56 | End Sub 57 | 58 | Private Sub Form_Chat_UI_Load(sender As Object, e As EventArgs) Handles MyBase.Load 59 | GroupBox2.Height = 50 60 | mloaded = True 61 | Me.Height = 383 62 | Me.Width = 907 63 | End Sub 64 | 65 | Private Sub FrmMain_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown 66 | ' Form movement set integers 67 | x = Control.MousePosition.X - Me.Location.X 68 | y = Control.MousePosition.Y - Me.Location.Y 69 | End Sub 70 | 71 | Private Sub FrmMain_MouseMove(sender As Object, e As MouseEventArgs) Handles Me.MouseMove 72 | ' Form movement movement 73 | If e.Button = MouseButtons.Left Then 74 | Newpoint = Control.MousePosition 75 | Newpoint.X -= (x) 76 | Newpoint.Y -= (y) 77 | Me.Location = Newpoint 78 | End If 79 | End Sub 80 | Dim MindQA As New FormMind_QA 81 | 82 | Private Sub ButtonMindQA_Click(sender As Object, e As EventArgs) Handles ButtonMindQA.Click 83 | MindQA.Show() 84 | End Sub 85 | Dim QAMind As New FormQA_Mind 86 | Private Sub ButtonQA_Mind_Click(sender As Object, e As EventArgs) Handles ButtonQA_Mind.Click 87 | QAMind.Show() 88 | End Sub 89 | Dim PM As New FormPluginManager 90 | Private Sub ButtonCreatePlugin_Click(sender As Object, e As EventArgs) Handles ButtonCreatePlugin.Click 91 | PM.Show() 92 | End Sub 93 | 94 | Private Sub GroupBox2_DoubleClick(sender As Object, e As EventArgs) Handles GroupBox2.DoubleClick 95 | GroupBox2.Height = If(GroupBox2.Height <> 20, 20, 50) 96 | End Sub 97 | 98 | End Class -------------------------------------------------------------------------------- /Forms/SplashScreen.Designer.vb: -------------------------------------------------------------------------------- 1 |  2 | Partial Class SplashScreen 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 | Friend WithEvents ApplicationTitle As System.Windows.Forms.Label 17 | Friend WithEvents Version As System.Windows.Forms.Label 18 | Friend WithEvents Copyright As System.Windows.Forms.Label 19 | Friend WithEvents MainLayoutPanel As System.Windows.Forms.TableLayoutPanel 20 | Friend WithEvents DetailsLayoutPanel As System.Windows.Forms.TableLayoutPanel 21 | 22 | 'Required by the Windows Form Designer 23 | Private components As System.ComponentModel.IContainer 24 | 25 | 'NOTE: The following procedure is required by the Windows Form Designer 26 | 'It can be modified using the Windows Form Designer. 27 | 'Do not modify it using the code editor. 28 | 29 | Private Sub InitializeComponent() 30 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SplashScreen)) 31 | Me.MainLayoutPanel = New System.Windows.Forms.TableLayoutPanel() 32 | Me.DetailsLayoutPanel = New System.Windows.Forms.TableLayoutPanel() 33 | Me.Version = New System.Windows.Forms.Label() 34 | Me.Copyright = New System.Windows.Forms.Label() 35 | Me.ApplicationTitle = New System.Windows.Forms.Label() 36 | Me.MainLayoutPanel.SuspendLayout() 37 | Me.DetailsLayoutPanel.SuspendLayout() 38 | Me.SuspendLayout() 39 | ' 40 | 'MainLayoutPanel 41 | ' 42 | Me.MainLayoutPanel.BackgroundImage = CType(resources.GetObject("MainLayoutPanel.BackgroundImage"), System.Drawing.Image) 43 | Me.MainLayoutPanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch 44 | Me.MainLayoutPanel.ColumnCount = 2 45 | Me.MainLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 243.0!)) 46 | Me.MainLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100.0!)) 47 | Me.MainLayoutPanel.Controls.Add(Me.DetailsLayoutPanel, 1, 1) 48 | Me.MainLayoutPanel.Controls.Add(Me.ApplicationTitle, 1, 0) 49 | Me.MainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill 50 | Me.MainLayoutPanel.Location = New System.Drawing.Point(0, 0) 51 | Me.MainLayoutPanel.Name = "MainLayoutPanel" 52 | Me.MainLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 218.0!)) 53 | Me.MainLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38.0!)) 54 | Me.MainLayoutPanel.Size = New System.Drawing.Size(496, 303) 55 | Me.MainLayoutPanel.TabIndex = 0 56 | ' 57 | 'DetailsLayoutPanel 58 | ' 59 | Me.DetailsLayoutPanel.Anchor = System.Windows.Forms.AnchorStyles.None 60 | Me.DetailsLayoutPanel.BackColor = System.Drawing.Color.Transparent 61 | Me.DetailsLayoutPanel.ColumnCount = 1 62 | Me.DetailsLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 247.0!)) 63 | Me.DetailsLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 142.0!)) 64 | Me.DetailsLayoutPanel.Controls.Add(Me.Version, 0, 0) 65 | Me.DetailsLayoutPanel.Controls.Add(Me.Copyright, 0, 1) 66 | Me.DetailsLayoutPanel.Location = New System.Drawing.Point(246, 221) 67 | Me.DetailsLayoutPanel.Name = "DetailsLayoutPanel" 68 | Me.DetailsLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.0!)) 69 | Me.DetailsLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.0!)) 70 | Me.DetailsLayoutPanel.Size = New System.Drawing.Size(247, 79) 71 | Me.DetailsLayoutPanel.TabIndex = 1 72 | ' 73 | 'Version 74 | ' 75 | Me.Version.Anchor = System.Windows.Forms.AnchorStyles.None 76 | Me.Version.BackColor = System.Drawing.Color.Transparent 77 | Me.Version.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 78 | Me.Version.ForeColor = System.Drawing.Color.Aqua 79 | Me.Version.Location = New System.Drawing.Point(3, 9) 80 | Me.Version.Name = "Version" 81 | Me.Version.Size = New System.Drawing.Size(241, 20) 82 | Me.Version.TabIndex = 1 83 | Me.Version.Text = "Version {0}.{1:00}" 84 | ' 85 | 'Copyright 86 | ' 87 | Me.Copyright.Anchor = System.Windows.Forms.AnchorStyles.None 88 | Me.Copyright.BackColor = System.Drawing.Color.Transparent 89 | Me.Copyright.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 90 | Me.Copyright.ForeColor = System.Drawing.Color.Aqua 91 | Me.Copyright.Location = New System.Drawing.Point(3, 39) 92 | Me.Copyright.Name = "Copyright" 93 | Me.Copyright.Size = New System.Drawing.Size(241, 40) 94 | Me.Copyright.TabIndex = 2 95 | Me.Copyright.Text = "Copyright" 96 | ' 97 | 'ApplicationTitle 98 | ' 99 | Me.ApplicationTitle.Anchor = System.Windows.Forms.AnchorStyles.None 100 | Me.ApplicationTitle.BackColor = System.Drawing.Color.Transparent 101 | Me.ApplicationTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 102 | Me.ApplicationTitle.ForeColor = System.Drawing.Color.Aqua 103 | Me.ApplicationTitle.Location = New System.Drawing.Point(246, 3) 104 | Me.ApplicationTitle.Name = "ApplicationTitle" 105 | Me.ApplicationTitle.Size = New System.Drawing.Size(247, 212) 106 | Me.ApplicationTitle.TabIndex = 0 107 | Me.ApplicationTitle.Text = "Chat Bot Tutorial 2000" 108 | Me.ApplicationTitle.TextAlign = System.Drawing.ContentAlignment.BottomLeft 109 | ' 110 | 'SplashScreen 111 | ' 112 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) 113 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 114 | Me.ClientSize = New System.Drawing.Size(496, 303) 115 | Me.ControlBox = False 116 | Me.Controls.Add(Me.MainLayoutPanel) 117 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle 118 | Me.MaximizeBox = False 119 | Me.MinimizeBox = False 120 | Me.Name = "SplashScreen" 121 | Me.ShowInTaskbar = False 122 | Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen 123 | Me.MainLayoutPanel.ResumeLayout(False) 124 | Me.DetailsLayoutPanel.ResumeLayout(False) 125 | Me.ResumeLayout(False) 126 | 127 | End Sub 128 | End Class 129 | -------------------------------------------------------------------------------- /Forms/SplashScreen.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 | 121 | 122 | 123 | iVBORw0KGgoAAAANSUhEUgAAAFQAAABOCAYAAAC+JjE8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS 124 | dAAAEnQB3mYfeAAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIpSURBVHhe7d1X 125 | bxNBGIVhfoBJgcQlbgkgQkhCSHeK6aE3iV4EJPTee2/+2x+zO2NrhW355ki5eVd6tNpz+Wr2eja4x/7X 126 | P3ypaVtvPeWVlvt6GazWWu5O80jQzggqRlCxtkH7tp8z77z1DV9wLsZB+3dc9kauOFctPXLN0juve6M3 127 | YpnRm5YZu+WsOmuWGV+z7Pht545ld931Ju5ZbuK+88Byux86j2IDk4+dJ97UU+eZ89zy05EXzkvLz7wK 128 | Xlth9k3w1gpz74L3seL8B+dj8MmKlcjnWKnyxUoLX51v3uL34IeV65Z+Br+85d/Bn9hgpPo3odaWi9pc 129 | mRPaWYjXSvNI0M4IKkZQMYKKEVSMoGIEFSOoGEHFCCpGUDGCihFUjKBiBBUjqBhBxQgqRlAxgooRVIyg 130 | YgQVI6gYQcUIKkZQMYKKEVSMoGIEFSOoGEHFCCrWNmgqPWmp9JSlMpHpWBQ0lZ2xjdnZYM7LzQcVb2DB 131 | umKLwZJ15SPLQdW6C3V7gr3WXYzsC/bHekoHgoMJh1zIyIqlx1bjd2/5sPUORo4kHPWGIscaNg0d97ac 132 | SDiZcMrbmnTaNjec8bbVnW2Igia/61zU5sqc0M745cUIKkZQMYKKEVSMoGIEFSOoGEHFCCpGUDGCihFU 133 | jKBiBBUjqBhBxQgqRlAxgooRVIygYgQVI6gYQcUIKkZQMYKKEVSMoGIEFSOoGEHFCCpGULG2QbkYQHkx 134 | QM3+AUCss0ufIRxTAAAAAElFTkSuQmCC 135 | 136 | 137 | -------------------------------------------------------------------------------- /Forms/SplashScreen.vb: -------------------------------------------------------------------------------- 1 | Public NotInheritable Class SplashScreen 2 | 3 | 'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab 4 | ' of the Project Designer ("Properties" under the "Project" menu). 5 | 6 | 7 | Private Sub SplashScreen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 8 | 'Set up the dialog text at runtime according to the application's assembly information. 9 | 10 | 11 | 'Application title 12 | If My.Application.Info.Title <> "" Then 13 | ApplicationTitle.Text = My.Application.Info.Title 14 | Else 15 | 'If the application title is missing, use the application name, without the extension 16 | ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName) 17 | End If 18 | 19 | Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor) 20 | 21 | 'Copyright info 22 | Copyright.Text = My.Application.Info.Copyright 23 | Main() 24 | 25 | Me.Close() 26 | 27 | End Sub 28 | 29 | 30 | End Class 31 | -------------------------------------------------------------------------------- /Icon_AI_Brain.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Icon_AI_Brain.ico -------------------------------------------------------------------------------- /Icon_SpydazBrain.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Icon_SpydazBrain.ico -------------------------------------------------------------------------------- /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 = true 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterAllFormsClose 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.Chatbot_2020_Tutorial.SplashScreen 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | SplashScreen 5 | true 6 | 1 7 | true 8 | 0 9 | true 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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("Chatbot_2020_Tutorial.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 | 63 | ''' 64 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 65 | ''' 66 | Friend ReadOnly Property Bar2() As System.Drawing.Bitmap 67 | Get 68 | Dim obj As Object = ResourceManager.GetObject("Bar2", resourceCulture) 69 | Return CType(obj,System.Drawing.Bitmap) 70 | End Get 71 | End Property 72 | 73 | ''' 74 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 75 | ''' 76 | Friend ReadOnly Property Blue_end_left() As System.Drawing.Bitmap 77 | Get 78 | Dim obj As Object = ResourceManager.GetObject("Blue_end_left", resourceCulture) 79 | Return CType(obj,System.Drawing.Bitmap) 80 | End Get 81 | End Property 82 | 83 | ''' 84 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 85 | ''' 86 | Friend ReadOnly Property Blue_end_right() As System.Drawing.Bitmap 87 | Get 88 | Dim obj As Object = ResourceManager.GetObject("Blue_end_right", resourceCulture) 89 | Return CType(obj,System.Drawing.Bitmap) 90 | End Get 91 | End Property 92 | 93 | ''' 94 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 95 | ''' 96 | Friend ReadOnly Property BluPrint() As System.Drawing.Bitmap 97 | Get 98 | Dim obj As Object = ResourceManager.GetObject("BluPrint", resourceCulture) 99 | Return CType(obj,System.Drawing.Bitmap) 100 | End Get 101 | End Property 102 | 103 | ''' 104 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 105 | ''' 106 | Friend ReadOnly Property Console_A() As System.Drawing.Bitmap 107 | Get 108 | Dim obj As Object = ResourceManager.GetObject("Console_A", resourceCulture) 109 | Return CType(obj,System.Drawing.Bitmap) 110 | End Get 111 | End Property 112 | 113 | ''' 114 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 115 | ''' 116 | Friend ReadOnly Property Console_D() As System.Drawing.Bitmap 117 | Get 118 | Dim obj As Object = ResourceManager.GetObject("Console_D", resourceCulture) 119 | Return CType(obj,System.Drawing.Bitmap) 120 | End Get 121 | End Property 122 | 123 | ''' 124 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 125 | ''' 126 | Friend ReadOnly Property Left() As System.Drawing.Bitmap 127 | Get 128 | Dim obj As Object = ResourceManager.GetObject("Left", resourceCulture) 129 | Return CType(obj,System.Drawing.Bitmap) 130 | End Get 131 | End Property 132 | 133 | ''' 134 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 135 | ''' 136 | Friend ReadOnly Property Logo_UFP() As System.Drawing.Bitmap 137 | Get 138 | Dim obj As Object = ResourceManager.GetObject("Logo_UFP", resourceCulture) 139 | Return CType(obj,System.Drawing.Bitmap) 140 | End Get 141 | End Property 142 | 143 | ''' 144 | ''' Looks up a localized resource of type System.Drawing.Bitmap. 145 | ''' 146 | Friend ReadOnly Property Right() As System.Drawing.Bitmap 147 | Get 148 | Dim obj As Object = ResourceManager.GetObject("Right", resourceCulture) 149 | Return CType(obj,System.Drawing.Bitmap) 150 | End Get 151 | End Property 152 | End Module 153 | End Namespace 154 | -------------------------------------------------------------------------------- /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 | 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 | 121 | 122 | ..\Resources\Blue_end_left.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\Blue_end_right.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\Left.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\Right.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\Bar2.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\Console A.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\BluPrint.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\Console_D.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\Logo_UFP.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | -------------------------------------------------------------------------------- /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(sender As Global.System.Object, 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 | 57 | _ 61 | Public ReadOnly Property MindQAConnectionString() As String 62 | Get 63 | Return CType(Me("MindQAConnectionString"),String) 64 | End Get 65 | End Property 66 | 67 | _ 90 | Public ReadOnly Property SamplePlugin() As String 91 | Get 92 | Return CType(Me("SamplePlugin"),String) 93 | End Get 94 | End Property 95 | End Class 96 | End Namespace 97 | 98 | Namespace My 99 | 100 | _ 103 | Friend Module MySettingsProperty 104 | 105 | _ 106 | Friend ReadOnly Property Settings() As Global.Chatbot_2020_Tutorial.My.MySettings 107 | Get 108 | Return Global.Chatbot_2020_Tutorial.My.MySettings.Default 109 | End Get 110 | End Property 111 | End Module 112 | End Namespace 113 | -------------------------------------------------------------------------------- /My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Data\MindQA.accdb</ConnectionString> 9 | <ProviderName>System.Data.OleDb</ProviderName> 10 | </SerializableConnectionString> 11 | Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Data\MindQA.accdb 12 | 13 | 14 | Imports AI_Contracts 15 | 16 | Public Class Sample_Plugin_Chatbot_Tutorial 17 | Implements AI_Contracts.IPlugin 18 | 19 | Public ReadOnly Property Info As String Implements IPlugin.Info 20 | Get 21 | Return "Test Plug-in for Chatbot Tutorial 2000" 22 | End Get 23 | End Property 24 | 25 | Public ReadOnly Property PluginName As String Implements IPlugin.PluginName 26 | Get 27 | Return "Test Plug-In" 28 | End Get 29 | End Property 30 | 31 | Dim mPreviousResponse As String = "" 32 | Public Property PreviousResponse As String Implements IPlugin.PreviousResponse 33 | Get 34 | Return mPreviousResponse 35 | End Get 36 | Set(value As String) 37 | mPreviousResponse = value 38 | End Set 39 | End Property 40 | Dim mPreviousUserinput As String = "" 41 | Public Property PreviousUserinput As String Implements IPlugin.PreviousUserinput 42 | Get 43 | Return mPreviousUserinput 44 | End Get 45 | Set(value As String) 46 | mPreviousUserinput = value 47 | End Set 48 | End Property 49 | Private MResponse As String = "" 50 | Public Property Response As String Implements IPlugin.Response 51 | Get 52 | Return MResponse 53 | End Get 54 | Set(value As String) 55 | MResponse = value 56 | End Set 57 | End Property 58 | 59 | Public Function GetResponse(UserInput As String) As Boolean Implements IPlugin.GetResponse 60 | Dim NewResponse As String = "" 61 | If UCase(UserInput) = "HI" Then NewResponse = "YO BRO" 62 | If NewResponse IsNot Nothing Then 63 | Response = NewResponse 64 | Return True 65 | Else 66 | 67 | End If 68 | Return False 69 | End Function 70 | End Class 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Plugins/AI_Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Plugins/AI_Contracts.dll -------------------------------------------------------------------------------- /Plugins/SamplePlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Plugins/SamplePlugin.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## CHAT BOT CREATION TUTORIAL 2020 2 | 3 | In this model I have created a basic AI Interface with External plugin abilities; An Interface AI_Contracts enables for Intefacing with the AI; Implementing the Interface and placing in the the compiled DLL into the APP\Plugins folder enables for the AI_Interface to discover and call the plugin obtaining a response to be returned to the user; The project was design in 4 stages ; Each stage or milestone enables for the development and extension of the Chatbot to become a enriched product worthy of public release; 4 | 5 | ## STAGE 1 - Designing and building the interface: 6 | 7 | Here the interface is given a basic design for input and output via text; 8 | Maintaining history of the CHAT; this interface enables for the basic testing of the interface; An avatar has not been added; this is also due to the avatar not being essential but cosmetic; The first stage we focus mainly on producing a functional interface; 9 | 10 | ### AI_CONTRACTS: Migrated to Nuget! SpydazWeb.AI.CONTRACTS 3.0 11 | This is the mechanisim where we will enable for the USER to design scripts which can be executed b the AI; In the begining stage; PRoviding the mecanisim is the key focus. the intial Interface used Only provides the structure of the class needed to be implemented; the user function will be called by the main script for all objects of this type found at the specified location. this enables for extensive extenability. Here is also a point of which Extensions and Internal functions or an AI framwork can be provided to the user for use as helper scripts. 12 | 13 | In the first Release of the AI a sample plugin will also be created to enable for testing of the interface. SAMPLE_PLUGIN this will also provide a template for further plugin creation; 14 | ###Note: Small BUG!!!!! 15 | AI_Contracts.Dll needs to be deployed in Plugins Folder Alongside plugin? Relative Refferencing for plugin Seperation. When the plugin was in the same folder as the application the application tried to keep reading itself and crashing so the seperate foler was required; the MAN EXE also needs to acess the AI_Contacts DLL SO... 16 | ### Solution : 17 | Double Deployment!. 18 | 19 | ## STAGE 2 -Creating an internal memory -: 20 | At this stage we create an internal memory function, by providing a Question and Answer database. here Simple Question and Answer style responses can be created giving a starting point for users of the Application. Although there are implementations where each Turn is saved to the database. in this iteration it is chosen to be more focused towards a SUPERVISED Method. A database Editor will need to be provided. Yet this will be provided at a later stage; The Order of execution will be PLUGINS First then Question and Answer Second Allowing for the prioritizing of response discovery. A Fallback response will also be required to handle any time the AI has no response; 21 | 22 | ## STAGE 3 - Designing A State Machine - Handling Emotion: 23 | A state machine can provide a mechanizim to hold Emotional states ; In this iteration an interface has been used to provide a structure for emotional state objects; Each state is loaded in to the Handler; Emotions are detected each turn of the Script adjusting the currently held emotions positivly and negativly allowing for inteisification of emotions. Here a generic Response is given as emotional state is changed. other forms of State can also be carried from turn to turn by using a state machine; Previous programming method often have utilized "traveling vairables" yet often replacing state to state with finite quotient values for emotioanal Skew. IE happy = 0.78 , SAD 0.23 ; this technique does not allow for intensity of emotion ; intensity of emotion is increased ie: happy is increased if happy is detected next turn; but reduced if the next emotion is just simply neutral. until the level of intesity has reduced to the value 0 which can change state to Neutral. 24 | 25 | ## STAGE 4 - Designing and building the interface Compilers/Scripting/Editing: 26 | ### Compiler 27 | The abilty to code and comile the plugin can be provided by the chatbot interface; here i have provided a Tabbed interface for creating plugins, the template we implemented in stage 1 is used to provide a starter example script for the user to edit and expand on. SAVE SCRIPT AND COMPILE SCRIPT are provided; 28 | ### Data Editor 29 | A Data editor to edit the Question and Answer files is also created for each table. 30 | 31 | 32 | ## STAGE 5 - Refactoring Code!: UI Enhancments! 33 | ### Refactoring 34 | Here we will refactor the code arranging and extending the functionality to the UserScripting framework. 35 | The refactoring process and Commenting enables for later editing and refineing of the application; as well as provide understanding to the user; 36 | ### UI 37 | #### Speech 38 | Speech will also be required to provide a Rich UI, Although Speech recognition has improved over time; It will be added mainly for Speech out. 39 | #### Graphics 40 | Some Graphical Improvemnts and themeing will be added to the APP: (Perhaps LCARS _ Star trek Design!) 41 | 42 | ## Stage 6: AI_CONTRACTS to NUGET: 43 | For the deployement and centralized access for the AI_Contracts Component: It was also decided to centralize the Library with NUGET as SpydazWb.AI.Contracts ; This enables for further updates to be centralized for plugin creation and optimal delivery : 44 | At this point The AI_Contracts SourceCode has also been removed from the Project and ADDED as a NUGET refference assemblie; 45 | The AI_Contracts Project can now be developed Seperately from the UI and Plugins; Plugins may also be deployed as Nuget Packages on a centralized source seprately from Nuget; ie Centralized website! 46 | 47 | 48 | -------------------------------------------------------------------------------- /Resources/Bar2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Bar2.PNG -------------------------------------------------------------------------------- /Resources/BluPrint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/BluPrint.png -------------------------------------------------------------------------------- /Resources/Blue_end_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Blue_end_left.gif -------------------------------------------------------------------------------- /Resources/Blue_end_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Blue_end_right.gif -------------------------------------------------------------------------------- /Resources/Console A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Console A.jpg -------------------------------------------------------------------------------- /Resources/Console_D.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Console_D.jpg -------------------------------------------------------------------------------- /Resources/Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Left.jpg -------------------------------------------------------------------------------- /Resources/Logo_UFP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Logo_UFP.jpg -------------------------------------------------------------------------------- /Resources/Right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/Resources/Right.jpg -------------------------------------------------------------------------------- /SamplePlugin/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SamplePlugin/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 | -------------------------------------------------------------------------------- /SamplePlugin/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | Form1 5 | false 6 | 0 7 | true 8 | 0 9 | 0 10 | true 11 | 12 | -------------------------------------------------------------------------------- /SamplePlugin/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 | -------------------------------------------------------------------------------- /SamplePlugin/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("SamplePlugin.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 | -------------------------------------------------------------------------------- /SamplePlugin/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 | -------------------------------------------------------------------------------- /SamplePlugin/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(sender As Global.System.Object, 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.SamplePlugin.My.MySettings 68 | Get 69 | Return Global.SamplePlugin.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /SamplePlugin/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SamplePlugin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spydaz/Chatbot_2020_Tutorial/9c069207098bb6d55d58ba7b302c936d2cb245b2/SamplePlugin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /SamplePlugin/SamplePlugin.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {06547035-4097-49D3-AE77-9FEC47253CEE} 8 | Library 9 | 10 | 11 | SamplePlugin 12 | SamplePlugin 13 | 512 14 | Windows 15 | v4.7.2 16 | true 17 | true 18 | 19 | 20 | AnyCPU 21 | true 22 | full 23 | true 24 | true 25 | bin\Debug\ 26 | SamplePlugin.xml 27 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 28 | 29 | 30 | AnyCPU 31 | pdbonly 32 | false 33 | true 34 | true 35 | bin\Release\ 36 | SamplePlugin.xml 37 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 38 | 39 | 40 | On 41 | 42 | 43 | Binary 44 | 45 | 46 | Off 47 | 48 | 49 | On 50 | 51 | 52 | 53 | ..\packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\AI_CONTRACTS.dll 54 | 55 | 56 | ..\packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\AxInterop.ACTIVEHAPTEKXLib.dll 57 | 58 | 59 | ..\packages\SpydazWeb.AI.CONTRACTS.4.0.0\lib\Interop.ACTIVEHAPTEKXLib.dll 60 | True 61 | 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 | True 91 | Application.myapp 92 | True 93 | 94 | 95 | True 96 | True 97 | Resources.resx 98 | 99 | 100 | True 101 | Settings.settings 102 | True 103 | 104 | 105 | 106 | 107 | VbMyResourcesResXFileCodeGenerator 108 | Resources.Designer.vb 109 | My.Resources 110 | Designer 111 | 112 | 113 | 114 | 115 | MyApplicationCodeGenerator 116 | Application.Designer.vb 117 | 118 | 119 | SettingsSingleFileGenerator 120 | My 121 | Settings.Designer.vb 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /SamplePlugin/Sample_Plugin_Chatbot_Tutorial.vb: -------------------------------------------------------------------------------- 1 | Imports AI_Contracts 2 | 3 | Public Class Sample_Plugin_Chatbot_Tutorial 4 | Implements AI_Contracts.IPlugin 5 | 6 | Public ReadOnly Property Info As String Implements IPlugin.Info 7 | Get 8 | Return "Test Plug-in for Chatbot Tutorial 2000" 9 | End Get 10 | End Property 11 | 12 | Public ReadOnly Property PluginName As String Implements IPlugin.PluginName 13 | Get 14 | Return "Test Plug-In" 15 | End Get 16 | End Property 17 | 18 | Dim mPreviousResponse As String = "" 19 | Public Property PreviousResponse As String Implements IPlugin.PreviousResponse 20 | Get 21 | Return mPreviousResponse 22 | End Get 23 | Set(value As String) 24 | mPreviousResponse = value 25 | End Set 26 | End Property 27 | Dim mPreviousUserinput As String = "" 28 | Public Property PreviousUserinput As String Implements IPlugin.PreviousUserinput 29 | Get 30 | Return mPreviousUserinput 31 | End Get 32 | Set(value As String) 33 | mPreviousUserinput = value 34 | End Set 35 | End Property 36 | Private MResponse As String = "" 37 | Public Property Response As String Implements IPlugin.Response 38 | Get 39 | Return MResponse 40 | End Get 41 | Set(value As String) 42 | MResponse = value 43 | End Set 44 | End Property 45 | 46 | Public Function GetResponse(UserInput As String) As Boolean Implements IPlugin.GetResponse 47 | Dim NewResponse As String = "" 48 | If UCase(UserInput) = "HI" Then NewResponse = "YO BRO" 49 | If NewResponse IsNot Nothing Then 50 | Response = NewResponse 51 | Return True 52 | Else 53 | 54 | End If 55 | Return False 56 | End Function 57 | End Class 58 | -------------------------------------------------------------------------------- /SamplePlugin/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/AI_AgentModel.vb: -------------------------------------------------------------------------------- 1 | Imports System.Runtime.Remoting.Messaging 2 | Imports AI_Contracts 3 | Public Class AI_AgentModel 4 | 'ShortTerm Memory 5 | Private PreviousResponses As New List(Of String) 6 | Private PreviousUserInputs As New List(Of String) 7 | 8 | 'Working Memory 9 | Public PreviousResponse As String 10 | Public PreviousUserInput As String 11 | Public UserInput As String 12 | Public Response As String 13 | 14 | 15 | Public Sentiment As New Emotional_StateMachine 16 | 17 | 'Responses Are Genearated Externally 18 | #Region "Responses" 19 | ''' 20 | ''' Responses will be generated from External Compiled Plugins 21 | ''' 22 | ''' 23 | ''' 24 | Public Function GET_RESPONSE(ByRef UserInput As String) As String 25 | 'Get External Responses 26 | GET_RESPONSE = GetPluginResponse(UserInput, PreviousUserInput, PreviousResponse) 27 | 'IF NO RESPONSE TRY - Question Answer Database 28 | If GET_RESPONSE = "" Then GetQAResponse(UserInput, GET_RESPONSE) 29 | 'TRY EMOTIONAL RESPONSE 30 | If GET_RESPONSE = "" And Sentiment.NewEmotionDetected(UCase(UserInput)) = True Then 31 | GET_RESPONSE = Sentiment.MakeEmotionalResponse() 32 | End If 33 | 34 | 'IF No Response Fallback Response 35 | If GET_RESPONSE = "" Then GET_RESPONSE = "Excuse me? Please, Rephrase?" 36 | 37 | 'MainTain History 38 | PreviousUserInput = UserInput 39 | PreviousResponse = GET_RESPONSE 40 | PreviousUserInputs.Add(PreviousUserInput) 41 | PreviousResponses.Add(PreviousResponse) 42 | End Function 43 | Private Function GetPluginResponse(ByRef UserInput As String, ByRef PrevUSerInput As String, ByRef PrevResponse As String) As String 44 | GetPluginResponse = ExecutePlugins(UserInput, ScanPlugins) 45 | End Function 46 | #End Region 47 | 48 | Public Sub New(ByRef Path As String) 49 | PLUGIN_FOLDER = Path 50 | 51 | End Sub 52 | Public Sub New() 53 | 54 | End Sub 55 | 56 | End Class 57 | -------------------------------------------------------------------------------- /Source/ApplicationEvents.vb: -------------------------------------------------------------------------------- 1 | Namespace My 2 | ' The following events are available for MyApplication: 3 | ' Startup: Raised when the application starts, before the startup form is created. 4 | ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. 5 | ' UnhandledException: Raised if the application encounters an unhandled exception. 6 | ' StartupNextInstance: Raised when launching a single-instance application and the application is already active. 7 | ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. 8 | Partial Friend Class MyApplication 9 | End Class 10 | End Namespace 11 | -------------------------------------------------------------------------------- /Source/DatabaseManager_QuestionAnswer.vb: -------------------------------------------------------------------------------- 1 |  2 | 3 | Module DatabaseManager_QuestionAnswer 4 | ''' 5 | ''' Gets a response From the Question and Answer Database 6 | ''' Checking Both Tables 7 | ''' 8 | ''' 9 | ''' 10 | ''' 11 | Public Function GetQAResponse(ByRef UserInput As String, ByRef Response As String) As Boolean 12 | GetQAResponse = False 13 | If DetectAnswerMindQA(UCase(UserInput), Response) = True Then 14 | Return True 15 | Else 16 | End If 17 | 18 | If DetectAnswerQAMind(UCase(UserInput), Response) = True Then 19 | Return True 20 | Else 21 | End If 22 | 23 | End Function 24 | ''' 25 | ''' Check MIND_QA TABLE - Given Question Answer is determined 26 | ''' 27 | ''' 28 | ''' 29 | ''' If true Answer is populated 30 | Public Function DetectAnswerMindQA(ByRef Question As String, ByRef Answer As String) As Boolean 31 | Dim Knowledge As List(Of TopicQuestion) = GetMindQA() 32 | DetectAnswerMindQA = False 33 | For Each item In Knowledge 34 | If UCase(item.Question) Like UCase(Question) = True Then 35 | Answer = item.Topic 36 | Return True 37 | Else 38 | End If 39 | Next 40 | End Function 41 | ''' 42 | ''' Check MINDQA - Given Question Answer is populated 43 | ''' 44 | ''' 45 | ''' 46 | ''' If True Answer is populated 47 | Public Function DetectAnswerQAMind(ByRef Question As String, ByRef Answer As String) As Boolean 48 | Dim Knowledge As List(Of TopicQuestion) = GetQAMind() 49 | DetectAnswerQAMind = False 50 | For Each item In Knowledge 51 | If UCase(item.Question) Like UCase(Question) = True Then 52 | Answer = item.Topic 53 | Return True 54 | Else 55 | End If 56 | Next 57 | End Function 58 | Private Function GetMindQA() As List(Of TopicQuestion) 59 | Dim DbSubjectLst As New List(Of TopicQuestion) 60 | Const SQL As String = "SELECT * FROM MINDQA" 61 | Using conn = New System.Data.OleDb.OleDbConnection(My.Settings.MindQAConnectionString) 62 | Using cmd = New OleDb.OleDbCommand(SQL, conn) 63 | conn.Open() 64 | Try 65 | Dim dr = cmd.ExecuteReader() 66 | While dr.Read() 67 | Dim NewKnowledge As TopicQuestion 68 | NewKnowledge.Question = dr("QUESTION").ToString() 69 | NewKnowledge.Topic = dr("Answer").ToString() 70 | DbSubjectLst.Add(NewKnowledge) 71 | End While 72 | Catch e As Exception 73 | ' Do some logging or something. 74 | MessageBox.Show("There was an error accessing your data. MINDQA: " & e.ToString()) 75 | End Try 76 | End Using 77 | End Using 78 | Return DbSubjectLst 79 | End Function 80 | ''' 81 | ''' Used to retrive Table from QA TABLES 82 | ''' 83 | Private Structure TopicQuestion 84 | ''' 85 | ''' Question Associated with topic (can be used as a Flat response) or Can be used to 86 | ''' learn new information from multiple sources 87 | ''' 88 | ''' 89 | Public Question As String 90 | ''' 91 | ''' Topic of Associated Question 92 | ''' 93 | ''' 94 | Public Topic As String 95 | End Structure 96 | Private Function GetQAMind() As List(Of TopicQuestion) 97 | Dim DbSubjectLst As New List(Of TopicQuestion) 98 | Const SQL As String = "SELECT * FROM QAMIND" 99 | Using conn = New System.Data.OleDb.OleDbConnection(My.Settings.MindQAConnectionString) 100 | Using cmd = New System.Data.OleDb.OleDbCommand(SQL, conn) 101 | conn.Open() 102 | Try 103 | Dim dr = cmd.ExecuteReader() 104 | While dr.Read() 105 | Dim NewKnowledge As TopicQuestion 106 | NewKnowledge.Question = dr("QUESTION").ToString() 107 | NewKnowledge.Topic = dr("ANSWER").ToString() 108 | DbSubjectLst.Add(NewKnowledge) 109 | End While 110 | Catch e As Exception 111 | ' Do some logging or something. 112 | MessageBox.Show("There was an error accessing your data. QA-MIND: " & e.ToString()) 113 | End Try 114 | End Using 115 | End Using 116 | Return DbSubjectLst 117 | End Function 118 | End Module 119 | -------------------------------------------------------------------------------- /Source/Emotion_Handler.vb: -------------------------------------------------------------------------------- 1 |  2 | 3 | ''' 4 | ''' Loads Emotions: Emotion interface provides a platform for the template of an emotion the the 5 | ''' LoadEmotions; Function in The emotion handler will need to be adjusted for new emotions 6 | ''' designed; the emotion handler loads all the emotions and executes each detector in the 7 | ''' emotion set is a response is detected it is held in the handler. A response can then be 8 | ''' generated as required from the subclass or the handler. the emotion Objects and functions are 9 | ''' encapslated int this emotions Class Library. 10 | ''' 11 | Public Class EmotionHandler 12 | 13 | Private iLoadedEmotions As New List(Of IEmotion) 14 | 15 | Private mDetectedEmotion As EmotionType 16 | 17 | Private mEmotion As String 18 | 19 | Public ReadOnly Property DetectedEmotion As EmotionType 20 | Get 21 | Return mDetectedEmotion 22 | End Get 23 | End Property 24 | 25 | Public ReadOnly Property DetectedEmotionStr As String 26 | Get 27 | Return mEmotion 28 | End Get 29 | 30 | End Property 31 | 32 | Public ReadOnly Property LoadedEmotions As List(Of IEmotion) 33 | Get 34 | Return iLoadedEmotions 35 | End Get 36 | End Property 37 | 38 | Public Sub New() 39 | iLoadedEmotions = LoadEmotions() 40 | End Sub 41 | 42 | Public Sub AddEmotion(ByRef Emo As IEmotion) 43 | iLoadedEmotions.Add(Emo) 44 | End Sub 45 | 46 | Public Function DetectEmotion(ByRef Userinput As String) As Boolean 47 | For Each emo As IEmotion In LoadedEmotions 48 | If emo.Detect(Userinput) = True Then 49 | mDetectedEmotion = emo.Type 50 | mEmotion = emo.Name 51 | Return True 52 | Else 53 | mDetectedEmotion = EmotionType.Neutral 54 | mEmotion = "Neutral" 55 | 56 | End If 57 | 58 | Next 59 | Return False 60 | End Function 61 | 62 | Public Function LoadEmotions() As List(Of IEmotion) 63 | Dim mLoadedEMOTIONs As New List(Of IEmotion) From { 64 | New EmotionAngry, 65 | New EmotionConcerned, 66 | New EmotionCurious, 67 | New EmotionFailure, 68 | New EmotionFear, 69 | New EmotionGreatful, 70 | New EmotionHappy, 71 | New EmotionJealous, 72 | New EmotionJoy, 73 | New EmotionLaughing, 74 | New EmotionLove, 75 | New EmotionSad, 76 | New EmotionSerious, 77 | New EmotionSleepy, 78 | New EmotionSuprised 79 | } 80 | Return mLoadedEMOTIONs 81 | End Function 82 | 83 | End Class 84 | 85 | ''' 86 | ''' The emotion type can be used to catagorize some of the basic emotions the list is just a 87 | ''' basic collection of emotiontypes ; the emotion finder class uses these basic emotion 88 | ''' types to describe the current emotion detected by the class. this type list is no a 89 | ''' complete list. 90 | ''' 91 | Public Enum EmotionType 92 | Joy 93 | Happy 94 | Sad 95 | Love 96 | Laughing 97 | Surprised 98 | Sleepy 99 | Serious 100 | Angry 101 | Jealous 102 | curious 103 | Concerned 104 | Failure 105 | Fear 106 | Greatful 107 | Neutral 108 | End Enum 109 | 110 | -------------------------------------------------------------------------------- /Source/Emotional_StateMachine.vb: -------------------------------------------------------------------------------- 1 | Public Class Emotional_StateMachine 2 | ''' 3 | ''' Current emotion 4 | ''' 5 | Public CurrentState As EmotionType 6 | ''' 7 | ''' Current emotion as STRING 8 | ''' 9 | Public CurrentStateStr As String = "Neutral" 10 | ''' 11 | ''' If state has changed mood has changed 12 | ''' 13 | Private StateChanged As Boolean = False 14 | ''' 15 | ''' Current detected state 16 | ''' 17 | Private DetectedState As EmotionType 18 | ''' 19 | ''' New state has been detected 20 | ''' 21 | Private StateDetected As Boolean = False 22 | ''' 23 | ''' Intensity of emotion increases if emotional state remains the same and is reduced if At JOY 3 and state is detected Neutral is reduced 24 | ''' Intensity can rise and fall eventually becomming neutral - Even neutrality and indifference can be intesified: 25 | ''' Perhaps if neutrality reaches a certain point then BORDEM can SET IN! 26 | ''' 27 | Public CurrentQuotient As Integer = 1 28 | 'PROCESS: PRESERVE VARIABLES 29 | 'EMOTION 30 | ''' 31 | ''' Used to make a Generic Emotional Response 32 | ''' 33 | ''' Provided emotion (HAPPY) 34 | ''' 35 | Public Shared Function MakeEmotionalResponse(ByVal FoundEmotion As String) As String 36 | MakeEmotionalResponse = "" 37 | Randomize() 38 | Dim C As Short = Int(Rnd() * 6 + 1) 39 | Select Case C 40 | Case 1 41 | MakeEmotionalResponse = "I detect emotion in your tone, you are feeling " & LCase(FoundEmotion) & " perhaps" 42 | Case 2 43 | MakeEmotionalResponse = "Are you feeling " & LCase(FoundEmotion) & " ?" 44 | Case 3 45 | MakeEmotionalResponse = "Perhaps ? you can tell me more about why you are feeling ? " & LCase(FoundEmotion) 46 | Case 4 47 | MakeEmotionalResponse = "Detecting " & LCase(FoundEmotion) & " maybe?" 48 | Case 5 49 | MakeEmotionalResponse = "feeling a bit " & LCase(FoundEmotion) & " ?" 50 | Case 6 51 | MakeEmotionalResponse = "" & LCase(FoundEmotion) & " " 52 | End Select 53 | End Function 54 | ''' 55 | ''' Used to make a Emotional response fromt he currently held Emotion 56 | ''' 57 | ''' 58 | Public Function MakeEmotionalResponse() As String 59 | Dim FoundEmotion As String = CurrentStateStr 60 | MakeEmotionalResponse = "" 61 | Randomize() 62 | Dim C As Short = Int(Rnd() * 6 + 1) 63 | Select Case C 64 | Case 1 65 | MakeEmotionalResponse = "I detect emotion in your tone, you are feeling " & LCase(FoundEmotion) & " perhaps" 66 | Case 2 67 | MakeEmotionalResponse = "Are you feeling " & LCase(FoundEmotion) & " ?" 68 | Case 3 69 | MakeEmotionalResponse = "Perhaps ? you can tell me more about why you are feeling ? " & LCase(FoundEmotion) 70 | Case 4 71 | MakeEmotionalResponse = "Detecting " & LCase(FoundEmotion) & " maybe?" 72 | Case 5 73 | MakeEmotionalResponse = "feeling a bit " & LCase(FoundEmotion) & " ?" 74 | Case 6 75 | MakeEmotionalResponse = "" & LCase(FoundEmotion) & " " 76 | End Select 77 | End Function 78 | ''' 79 | ''' Resets Indicator values for determining state change 80 | ''' 81 | Private Sub ResetStateCounters() 82 | 'Reset Counters 83 | StateChanged = False 84 | DetectedState = EmotionType.Neutral 85 | StateDetected = False 86 | End Sub 87 | ''' 88 | ''' Increases or Decreases current intensity of emotion held 89 | ''' 90 | Private Sub SetCurrentQuotient() 91 | 'Check if neutral - Then reduce current Quotient 92 | If Handler.DetectedEmotion = EmotionType.Neutral Then 93 | CurrentQuotient -= 1 94 | If CurrentQuotient = 0 Then 95 | 'Reset State 96 | CurrentState = EmotionType.Neutral 97 | CurrentStateStr = "Neutral" 98 | StateChanged = True 99 | Else 100 | End If 101 | End If 102 | End Sub 103 | ''' 104 | ''' Shared between functions holding the currently detected emotions and Created intefaces(STATES) 105 | ''' 106 | Private Handler As New EmotionHandler 107 | ''' 108 | ''' Determines and sets the current state and intensity of state: 109 | ''' The Quotient value can be used to determine how much of a particular emotion is experienced, 110 | ''' the value is increased as emotion is repeatly detected. 111 | ''' as the conversation returns to neutrality if another emotion is ot detected the Qujotient is decreased 112 | ''' At point of 0 intensity the state is returned to Neutral 113 | ''' 114 | ''' 115 | Private Sub SetEmotionState(ByRef UserInput As String) 116 | 'Reset the indicators for Detected ans State Change 117 | ResetStateCounters() 118 | 119 | 'Start - Emotion Test 120 | If Handler.DetectEmotion(UserInput) = True Then 121 | 'Updates Quotient If No Changes have been Detected +/- (intensity of emotion) 122 | SetCurrentQuotient() 123 | 124 | 'Get State 125 | DetectedState = Handler.DetectedEmotion 126 | StateDetected = True 127 | 128 | 'IF State is the same Increase Intensity 129 | If DetectedState = CurrentState Then 130 | CurrentQuotient += 1 131 | 'Update State "DATA" 132 | CurrentStateStr = Handler.DetectedEmotionStr 133 | CurrentState = DetectedState 134 | Else 135 | 'IF State is the differnt then change (Update State Data) 136 | CurrentStateStr = Handler.DetectedEmotionStr 137 | CurrentState = DetectedState 138 | StateChanged = True 139 | 'Reset Intensity 140 | CurrentQuotient = 1 141 | End If 142 | End If 143 | End Sub 144 | ''' 145 | ''' Used to See if an emotion has been detected 146 | ''' 147 | ''' 148 | ''' 149 | Public Function NewEmotionDetected(ByRef Userinput As String) As Boolean 150 | SetEmotionState(Userinput) 151 | If StateChanged = True Then 152 | Return True 153 | Else 154 | Return False 155 | End If 156 | End Function 157 | End Class 158 | -------------------------------------------------------------------------------- /Source/PluginManager.vb: -------------------------------------------------------------------------------- 1 | Imports AI_Contracts 2 | 3 | Module PluginManager 4 | #Region "Plugins" 5 | Public PLUGIN_FOLDER As String = Application.StartupPath & "\Plugins" 6 | 7 | ''' 8 | ''' Scans and Loads Plugins 9 | ''' 10 | Public Function ScanPlugins() As ICollection(Of IPlugin) 11 | Return GET_PLUGINS(PLUGIN_FOLDER) 12 | End Function 13 | ''' 14 | ''' Resets the plugin folder and reloads plugins found 15 | ''' 16 | ''' 17 | Public Sub SET_PLUGIN_FOLDER(ByRef Path As String) 18 | PLUGIN_FOLDER = Path 19 | ScanPlugins() 20 | End Sub 21 | ''' 22 | ''' This populates the Plugins Responses Variable with all the responses and Plugins names 23 | ''' 24 | ''' 25 | ''' 26 | Public Function ExecutePlugins(ByVal _userInput As String, ByRef Plugins As ICollection(Of IPlugin)) As String 27 | Dim Str As String = "" 28 | 29 | 'Plugins 30 | If Plugins IsNot Nothing Then 31 | For Each NewPlugin In Plugins 32 | NewPlugin.GetResponse(_userInput) 33 | If IsNotTest(NewPlugin.Response) = True Then 34 | If NewPlugin.Response <> "" Or NewPlugin.Response <> " " Then 35 | Str &= LCase(RTrim(LTrim(Str)) & NewPlugin.Response) 36 | End If 37 | Else 38 | End If 39 | Next 40 | End If 41 | 42 | Return Str 43 | End Function 44 | Private Function IsNotTest(ByVal _Response As String) As Boolean 45 | If LCase(_Response).Contains(LCase("plugintest")) = False Then 46 | Return True 47 | Else 48 | Return False 49 | End If 50 | End Function 51 | ''' 52 | ''' Loads the plugins into the class 53 | ''' 54 | ''' Pathname directory which contains files of type 55 | ''' 56 | ''' 57 | Private Function GET_PLUGINS(path As String) As ICollection(Of IPlugin) 58 | On Error Resume Next 59 | Dim dllFileNames As String() 60 | If IO.Directory.Exists(path) Then 61 | dllFileNames = IO.Directory.GetFiles(path, "*.dll") 62 | Dim assemblies As ICollection(Of Reflection.Assembly) = New List(Of Reflection.Assembly)(dllFileNames.Length) 63 | For Each dllFile As String In dllFileNames 64 | Dim an As Reflection.AssemblyName = Reflection.AssemblyName.GetAssemblyName(dllFile) 65 | Dim assembly As Reflection.Assembly = Reflection.Assembly.Load(an) 66 | assemblies.Add(assembly) 67 | Next 68 | Dim pluginType As Type = GetType(IPlugin) 69 | Dim pluginTypes As ICollection(Of Type) = New List(Of Type) 70 | For Each assembly As Reflection.Assembly In assemblies 71 | If assembly <> Nothing Then 72 | Dim types As Type() = assembly.GetTypes() 73 | For Each type As Type In types 74 | If type.IsInterface Or type.IsAbstract Then 75 | Continue For 76 | Else 77 | If type.GetInterface(pluginType.FullName) <> Nothing Then 78 | pluginTypes.Add(type) 79 | End If 80 | End If 81 | Next 82 | End If 83 | Next 84 | Dim plugins As ICollection(Of IPlugin) = New List(Of IPlugin)(pluginTypes.Count) 85 | For Each type As Type In pluginTypes 86 | Dim plugin As IPlugin = Activator.CreateInstance(type) 87 | plugins.Add(plugin) 88 | Next 89 | Return plugins 90 | End If 91 | Return Nothing 92 | End Function 93 | #End Region 94 | End Module 95 | -------------------------------------------------------------------------------- /Source/SyS.vb: -------------------------------------------------------------------------------- 1 | Module SyS 2 | '1 - Create Instance Of AI BRAIN 3 | Public Chatbot As New AI_AgentModel 4 | 'Here we will load the Main AI 5 | 6 | 7 | ''' 8 | ''' Used as Start point to hand;e events centrally 9 | ''' 10 | Sub Main() 11 | 12 | LoadUI() 13 | End Sub 14 | 15 | #Region "UI" 16 | ''' 17 | ''' Text IN >>> Get Response From Brain 18 | ''' 19 | Public WithEvents ChatbotUI As New Form_Chat_UI 20 | ''' 21 | ''' TEXT OUT >>> Pass Response To UI TextOut 22 | ''' 23 | ''' 24 | Private Sub UI_TEXT_RECIEVED(ByVal Text As String) Handles ChatbotUI.TEXTRECIEVED 25 | 'Get Response 26 | ChatbotUI.DISPLAYOUTPUT(Chatbot.GET_RESPONSE(Text)) 27 | End Sub 28 | ''' 29 | ''' The Load Function Enables for external instansation of form 30 | ''' 31 | Public Sub LoadUI() 32 | 33 | ChatbotUI.Show() 34 | End Sub 35 | #End Region 36 | End Module 37 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-dinky -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------