Skip to content

Commit 42525ad

Browse files
authored
Merge pull request #5 from Steam-Chat-Bot/gh-pages
Fix triggers not adding correctly, clickonce!
2 parents a485d26 + 1c0ae84 commit 42525ad

12 files changed

Lines changed: 381 additions & 20 deletions

SteamChatBot/MainWindow.xaml.cs

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
238238
TriggerNumbers tn = new TriggerNumbers();
239239
AntiSpamTriggerOptions asto = new AntiSpamTriggerOptions();
240240
DiscordOptions _do = new DiscordOptions(); // "do" is a keyword
241+
TriggerOptionsBase tob = new TriggerOptionsBase();
241242

242243
if (selected == "isUpTrigger" || selected == "leaveChatTrigger" || selected == "kickTrigger"
243244
|| selected == "banTrigger" || selected == "unbanTrigger" || selected == "lockTrigger"
@@ -250,9 +251,14 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
250251
{
251252
ChatCommand ccw_cc = ccw.CC;
252253
cc = GetChatCommandOptions(ccw_cc);
254+
253255
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
254256
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", cc.Name, type.ToString()));
255-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cc.Name, cc);
257+
258+
tob.ChatCommand = cc;
259+
tob.Name = cc.Name;
260+
tob.Type = type;
261+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cc.Name, tob);
256262
Bot.triggers.Add(trigger);
257263
}
258264
}
@@ -265,8 +271,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
265271
ChatReply crw_cr = crw.CR;
266272
cr = GetChatReplyOptions(crw_cr);
267273
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
274+
275+
tob.ChatReply = cr;
276+
tob.Name = cr.Name;
277+
tob.Type = type;
268278
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", cr.Name, type.ToString()));
269-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cr.Name, cr);
279+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cr.Name, tob);
270280
Bot.triggers.Add(trigger);
271281
}
272282
}
@@ -279,8 +289,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
279289
NoCommand ncw_nc = ncw.NC;
280290
nc = GetNoCommandOptions(ncw_nc);
281291
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
292+
293+
tob.NoCommand = nc;
294+
tob.Name = nc.Name;
295+
tob.Type = type;
282296
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", nc.Name, type.ToString()));
283-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, nc.Name, nc);
297+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, nc.Name, tob);
284298
Bot.triggers.Add(trigger);
285299
}
286300
}
@@ -293,8 +307,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
293307
ChatCommandApi ccaw_cca = ccaw.CCA;
294308
cca = GetChatCommandApiOptions(ccaw_cca);
295309
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
310+
311+
tob.ChatCommandApi = cca;
312+
tob.Name = cca.Name;
313+
tob.Type = type;
296314
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", cca.Name, type.ToString()));
297-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cca.Name, cca);
315+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, cca.Name, tob);
298316
Bot.triggers.Add(trigger);
299317
}
300318
}
@@ -307,8 +325,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
307325
TriggerLists tlw_tl = tlw.TL;
308326
tl = GetTriggerListOptions(tlw_tl);
309327
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
328+
329+
tob.TriggerLists = tl;
330+
tob.Name = tl.Name;
331+
tob.Type = type;
310332
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", tl.Name, type));
311-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, tl.Name, tl);
333+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, tl.Name, tob);
312334
Bot.triggers.Add(trigger);
313335
}
314336
}
@@ -322,8 +344,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
322344
NoCommand astow_nc = astow.NC;
323345
asto = GetAntispamTriggerOptions(astow_asto);
324346
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
347+
348+
tob.AntiSpamTriggerOptions = asto;
349+
tob.Name = asto.Name;
350+
tob.Type = type;
325351
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", asto.Name, type));
326-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, asto.Name, asto);
352+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, asto.Name, tob);
327353
Bot.triggers.Add(trigger);
328354

329355
}
@@ -338,8 +364,12 @@ private void plusTriggerButton_Click(object sender, RoutedEventArgs e)
338364
NoCommand dtow_nc = dtow.NC;
339365
_do = GetDiscordOptions(dtow_do);
340366
type = (TriggerType)Enum.Parse(typeof(TriggerType), char.ToUpper(selected[0]) + selected.Substring(1));
367+
368+
tob.DiscordOptions = _do;
369+
tob.Name = _do.Name;
370+
tob.Type = type;
341371
addedTriggersListBox.Items.Add(string.Format("{0} - {1}", _do.Name, type));
342-
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, _do.Name, _do);
372+
BaseTrigger trigger = (BaseTrigger)Activator.CreateInstance(Type.GetType("SteamChatBot.Triggers." + type.ToString()), type, _do.Name, tob);
343373
Bot.triggers.Add(trigger);
344374
}
345375
}

SteamChatBot/SteamChatBot.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<NuGetPackageImportStamp>
1818
</NuGetPackageImportStamp>
1919
<IsWebBootstrapper>true</IsWebBootstrapper>
20-
<PublishUrl>C:\Users\Daniel\Source\Repos\SteamChatBot\gh-pages\publish\</PublishUrl>
20+
<PublishUrl>C:\Users\Kyle\Documents\GitHub\SteamChatBot\publish\</PublishUrl>
2121
<Install>true</Install>
2222
<InstallFrom>Web</InstallFrom>
2323
<UpdateEnabled>true</UpdateEnabled>
@@ -38,7 +38,7 @@
3838
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
3939
<WebPage>publish.htm</WebPage>
4040
<ApplicationRevision>0</ApplicationRevision>
41-
<ApplicationVersion>0.3.1.%2a</ApplicationVersion>
41+
<ApplicationVersion>0.3.2.%2a</ApplicationVersion>
4242
<UseApplicationTrust>true</UseApplicationTrust>
4343
<CreateDesktopShortcut>true</CreateDesktopShortcut>
4444
<PublishWizardCompleted>true</PublishWizardCompleted>

publish/Application Files/SteamChatBot_0_3_1_0/SteamChatBot.application

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
<framework targetVersion="4.5.2" profile="Full" supportedRuntime="4.0.30319" />
1515
</compatibleFrameworks>
1616
<dependency>
17-
<dependentAssembly dependencyType="install" codebase="Application Files\SteamChatBot_0_3_1_0\SteamChatBot.exe.manifest" size="16301">
17+
<dependentAssembly dependencyType="install" codebase="Application Files\SteamChatBot_0_3_1_0\SteamChatBot.exe.manifest" size="16300">
1818
<assemblyIdentity name="SteamChatBot.exe" version="0.3.1.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
1919
<hash>
2020
<dsig:Transforms>
2121
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
2222
</dsig:Transforms>
2323
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
24-
<dsig:DigestValue>dVtPw8GHrXIQgmJL9SF5EvWWhLQJLQkKha/TK2Rv8rY=</dsig:DigestValue>
24+
<dsig:DigestValue>nw6nApDJfM5XDsUjpmKdmDhzrRO7+YKFzUiDT9oBCCw=</dsig:DigestValue>
2525
</hash>
2626
</dependentAssembly>
2727
</dependency>
512 Bytes
Binary file not shown.

publish/Application Files/SteamChatBot_0_3_1_0/SteamChatBot.exe.manifest

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@
9292
</dependentAssembly>
9393
</dependency>
9494
<dependency>
95-
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" size="100784">
95+
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" size="90760">
9696
<assemblyIdentity name="Microsoft.VisualStudio.QualityTools.UnitTestFramework" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
9797
<hash>
9898
<dsig:Transforms>
9999
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
100100
</dsig:Transforms>
101101
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
102-
<dsig:DigestValue>ZCnU7U4fB5Xig+EEo29KqJRWp1narjqE5eDvVgkpe3I=</dsig:DigestValue>
102+
<dsig:DigestValue>FIejoPwAkh37U+PyGnjL7Zcj1bsM7xscXMebrwd1+qo=</dsig:DigestValue>
103103
</hash>
104104
</dependentAssembly>
105105
</dependency>
@@ -188,14 +188,14 @@
188188
</dependentAssembly>
189189
</dependency>
190190
<dependency>
191-
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="SteamChatBot.exe" size="169984">
191+
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="SteamChatBot.exe" size="170496">
192192
<assemblyIdentity name="SteamChatBot" version="0.0.1.0" language="neutral" processorArchitecture="msil" />
193193
<hash>
194194
<dsig:Transforms>
195195
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
196196
</dsig:Transforms>
197197
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
198-
<dsig:DigestValue>XRMoua2P+SHLcTOQL8tDRBtkPfiZ0ZaTAUjHhxE9GYM=</dsig:DigestValue>
198+
<dsig:DigestValue>II5DreWH9IYpBYW9lAbDggp5BNpA83DvP4bEWrDDn6g=</dsig:DigestValue>
199199
</hash>
200200
</dependentAssembly>
201201
</dependency>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
3+
<assemblyIdentity name="SteamChatBot.application" version="0.3.2.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
4+
<description asmv2:publisher="Steam-Chat-Bot" co.v1:suiteName="SteamChatBot" asmv2:product="Steam Chat Bot" asmv2:supportUrl="https://github.com/Steam-Chat-Bot/SteamChatBot/issues" co.v1:errorReportUrl="https://github.com/Steam-Chat-Bot/SteamChatBot/issues" xmlns="urn:schemas-microsoft-com:asm.v1" />
5+
<deployment install="true" minimumRequiredVersion="0.3.1.0" co.v1:createDesktopShortcut="true">
6+
<subscription>
7+
<update>
8+
<beforeApplicationStartup />
9+
</update>
10+
</subscription>
11+
<deploymentProvider codebase="http://steam-chat-bot.github.io/SteamChatBot/publish/SteamChatBot.application" />
12+
</deployment>
13+
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
14+
<framework targetVersion="4.5.2" profile="Full" supportedRuntime="4.0.30319" />
15+
</compatibleFrameworks>
16+
<dependency>
17+
<dependentAssembly dependencyType="install" codebase="Application Files\SteamChatBot_0_3_2_0\SteamChatBot.exe.manifest" size="16300">
18+
<assemblyIdentity name="SteamChatBot.exe" version="0.3.2.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
19+
<hash>
20+
<dsig:Transforms>
21+
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
22+
</dsig:Transforms>
23+
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
24+
<dsig:DigestValue>eRfoPA1LLJkckORsJ71Whs+kw412hq8jI18cydlySME=</dsig:DigestValue>
25+
</hash>
26+
</dependentAssembly>
27+
</dependency>
28+
</asmv1:assembly>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5+
</startup>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<dependentAssembly>
9+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
10+
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
11+
</dependentAssembly>
12+
<dependentAssembly>
13+
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
14+
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" />
15+
</dependentAssembly>
16+
</assemblyBinding>
17+
</runtime>
18+
</configuration>

0 commit comments

Comments
 (0)