Skip to content

Commit 3a3246a

Browse files
committed
Added check for wrong path, Google Drive warning in setup, added languages to build
1 parent 9df31c8 commit 3a3246a

15 files changed

+86
-14
lines changed

AssistantComputerControl/AssistantComputerControl.csproj

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProjectGuid>{404B42F4-E135-4D2F-8FD0-20A590814930}</ProjectGuid>
8-
<OutputType>WinExe</OutputType>
8+
<OutputType>Exe</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>AssistantComputerControl</RootNamespace>
1111
<AssemblyName>AssistantComputerControl</AssemblyName>
@@ -233,13 +233,21 @@
233233
<None Include="Translations\English.json">
234234
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
235235
</None>
236-
<None Include="Translations\Portuguese_-_Brasil.json" />
237-
<None Include="Translations\Spanish.json" />
236+
<None Include="Translations\Portuguese - Brasil.json">
237+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
238+
</None>
239+
<None Include="Translations\Spanish.json">
240+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
241+
</None>
238242
<None Include="Translations\Francais.json">
239243
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
240244
</None>
241-
<None Include="Translations\Italian.json" />
242-
<None Include="Translations\Turkce.json" />
245+
<None Include="Translations\Italian.json">
246+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
247+
</None>
248+
<None Include="Translations\Turkce.json">
249+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
250+
</None>
243251
</ItemGroup>
244252
<ItemGroup>
245253
<None Include="Resources\logo_white.ico" />

AssistantComputerControl/GettingStarted.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public class WebBrowserHandler {
4343
private static string customSetPath = String.Empty;
4444

4545
private bool CheckSetPath(string chosenService) {
46+
bool t = false;
47+
4648
if (customSetPath != String.Empty) {
4749
if (Directory.Exists(customSetPath)) {
4850
if (!customSetPath.Contains("AssistantComputerControl") && !customSetPath.Contains("assistantcomputercontrol")) {
@@ -57,7 +59,7 @@ private bool CheckSetPath(string chosenService) {
5759
Properties.Settings.Default.Save();
5860

5961
MainProgram.SetupListener();
60-
return true;
62+
t = true;
6163
}
6264
} else {
6365
string checkPath = CloudServiceFunctions.GetCloudServicePath(chosenService);
@@ -76,11 +78,16 @@ private bool CheckSetPath(string chosenService) {
7678
Properties.Settings.Default.Save();
7779

7880
MainProgram.SetupListener();
79-
return true;
81+
t = true;
8082
}
8183
}
8284
}
83-
return false;
85+
86+
if (Properties.Settings.Default.ActionFilePath == MainProgram.currentLocation) {
87+
MainProgram.DefaultPathIssue();
88+
}
89+
90+
return t;
8491
}
8592

8693
public void SetPath(string chosenService) {
@@ -565,7 +572,6 @@ private void pickFolderBtn_Click(object sender, EventArgs e) {
565572

566573
private void expertDoneButton_Click(object sender, EventArgs e) {
567574
var theUrl = "https://assistantcomputercontrol.com/integrated_action_grid.php?lang=" + Properties.Settings.Default.ActiveLanguage + "&max_version_number=" + MainProgram.softwareVersion + "&cloud_service=none";
568-
MainProgram.DoDebug(theUrl);
569575
theDoneActionViewBrowser.Url = new Uri(theUrl);
570576

571577
thisForm.Size = new Size(thisForm.Size.Width, thisForm.Size.Height + 150);

AssistantComputerControl/MainProgram.cs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class MainProgram {
3030
releaseDate = "2020-12-12 14:55:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
3131
appName = "AssistantComputerControl",
3232

33-
//sentryToken = "super_secret";
34-
sentryToken = "https://[email protected]/1287269"; //Remove on git push
33+
sentryToken = "super_secret";
3534

3635
static public bool debug = true,
3736
unmuteVolumeChange = true,
@@ -720,6 +719,24 @@ private static bool PathIsFile(string path) {
720719
return string.IsNullOrWhiteSpace(Path.GetExtension(path));
721720
}
722721

722+
public static void DefaultPathIssue() {
723+
//Path is program root - most likely an error, alert user
724+
//new Thread(() => {
725+
DialogResult dialogResult = MessageBox.Show("It seems the path to the cloud service wasn't set correctly. Choose \"Yes\" to go through the setup again. If this doesn't work, try restarting the ACC software.", "Whoops, problem!", MessageBoxButtons.YesNo);
726+
if (dialogResult == DialogResult.Yes) {
727+
Properties.Settings.Default.HasCompletedTutorial = false;
728+
Properties.Settings.Default.ActionFilePath = "";
729+
Properties.Settings.Default.Save();
730+
731+
if (gettingStarted != null) {
732+
gettingStarted.Close();
733+
}
734+
735+
ShowGettingStarted();
736+
}
737+
//}).Start();
738+
}
739+
723740
public static string CheckPath() {
724741
string path = currentLocation;
725742

@@ -730,7 +747,7 @@ public static string CheckPath() {
730747
}
731748
} else {
732749
if ((Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain)) {
733-
//Dropbox not found & no custom filepath, go through setup again?
750+
//Cloud service path not found & no custom filepath, go through setup again?
734751
hasAskedForSetupAgain = true;
735752
var msgBox = MessageBox.Show(Translator.__("no_cloudservice_chosen", "general"), "[ERROR] No folder specified | AssistantComputerControl", MessageBoxButtons.YesNo);
736753
if (msgBox == DialogResult.Yes) {
@@ -739,6 +756,11 @@ public static string CheckPath() {
739756
}
740757
}
741758

759+
if (gettingStarted is null && path == currentLocation && !hasAskedForSetupAgain) {
760+
hasAskedForSetupAgain = true;
761+
DefaultPathIssue();
762+
}
763+
742764
return Path.HasExtension(path) ? Path.GetDirectoryName(path) : path;
743765
}
744766

AssistantComputerControl/Translations/Danish.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595

9696
"welcome_title": "Velkommen til AssistantComputerControl!",
9797
"welcome_description": "Dette software har brug for en cloud-service. Vi understøtter Dropbox, Google Drive og OneDrive.", //This should only be ONE line - no line breaks
98+
"gdrive_warning": "<b class='text-danger'>Google Drive virker ikke særlig godt</b> og vil tit resultere i at ACC ikke virker. Hvis muligt; <b>brug Dropbox</b> eller OneDrive. Klik på checkbox'en hvis du vil fortsætte med Google Drive.",
9899
"click_me": "Klik på mig!",
99100
"recommended": "Anbefalet",
100101
"expert_setup_short_desc": "Vælg mig hvis du vil have frihed (brugerdefineret setup, ingen hjælp)",
@@ -166,6 +167,7 @@
166167
/* IFTTT specific */
167168
"set_up_ifttt_acc": "Set din IFTTT konto op",
168169
"set_up_ifttt_extra": "Med AssistantComputerControl's applets",
170+
"ifttt_pro_disclaimer": "<code>IFTTT Pro</code> <b>er <u>ikke</u> påkrævet!</b></span>",
169171
"ifttt_join": "Lav en IFTTT konto",
170172
"ifttt_join_extra": "(det er smart at oprette dig med din Google konto hvis du bruger Google Assistant)",
171173
"ifttt_enable_shutdown_applet": "<b>Aktivér de applets du vil have.</b> Lad os starte med <code>shutdown</code> \"handlingen\" <i>(action</i>)<small>(som slukker din computer)</small>.",

AssistantComputerControl/Translations/English.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797

9898
"welcome_title": "Welcome to AssistantComputerControl!",
9999
"welcome_description": "This software needs a cloud service to function. We natively support Dropbox, Google Drive and OneDrive.", //This should only be ONE line - no line breaks
100+
"gdrive_warning": "<b class='text-danger'>Google Drive doesn't work very well</b> and will often result in ACC not working. If possible; <b>use Dropbox</b> or OneDrive. Click the checkbox if you wish to proceed anyways and try to get it working.",
100101
"click_me": "Click me!",
101102
"recommended": "Recommended",
102103
"expert_setup_short_desc": "Choose me if you want more freedom (custom setup, no help)",
@@ -168,6 +169,7 @@
168169
/* IFTTT specific */
169170
"set_up_ifttt_acc": "Set up your IFTTT account",
170171
"set_up_ifttt_extra": "With the AssistantComputerControl applets",
172+
"ifttt_pro_disclaimer": "<code>IFTTT Pro</code> <b>is <u>not</u> required!</b></span>",
171173
"ifttt_join": "Sign up for IFTTT",
172174
"ifttt_join_extra": "(it's smart to sign up with your Google account if you're using Google Assistant)",
173175
"ifttt_enable_shutdown_applet": "<b>Enable the applets you want.</b> Let's start with the <code>shutdown</code> action <small>(which shuts down your computer)</small>.",

AssistantComputerControl/Translations/Portuguese_-_Brasil.json renamed to AssistantComputerControl/Translations/Portuguese - Brasil.json

File renamed without changes.

AssistantComputerControl/WebFiles/GettingStarted.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ <h2 data-translation-key="welcome_title">Welcome to AssistantComputerControl!</h
2525
<p data-translation-key="welcome_description">
2626
This software needs a cloud service to function. We natively support Dropbox, Google Drive and OneDrive.
2727
</p>
28+
29+
<label id="gdrive_warning" style="display:none;">
30+
<input id="knows_gdrive_sucks" type="checkbox" />
31+
<span data-translation-key="gdrive_warning">
32+
<b class="text-danger">Google Drive doesn't work very well</b> and will often result in ACC not working. If possible; <b>use Dropbox</b> or OneDrive.
33+
Click the checkbox if you wish to proceed anyways and try to get it working.
34+
</span>
35+
</label>
2836
</div>
2937

3038
<div class="col-md-12">
@@ -203,6 +211,7 @@ <h3 style="margin-top:8px;">
203211
<span data-translation-key="set_up_ifttt_acc">Set up your IFTTT account</span>
204212
<br>
205213
<small><i><span data-translation-key="set_up_ifttt_extra">With the AssistantComputerControl applets</span></i></small>
214+
<br /><small><span data-translation-key="ifttt_pro_disclaimer"><code>IFTTT Pro</code> <b>is <u>not</u> required!</b></span></small>
206215
</h3>
207216

208217
<ol style="text-align:left;margin-left:20px;margin-right:20px;">
@@ -271,7 +280,6 @@ <h3 data-translation-key="time_to_try_heading"></h3>
271280
</div>
272281
<!-- END -->
273282

274-
275283
</div>
276284
<div class="col-8">
277285
<!-- "Waiting for an action..." -->
@@ -445,6 +453,8 @@ <h5 data-translation-key="problem_introduction_title">What's problem are you exp
445453
</li>
446454
<li data-translation-key="tbs_assistant_solution_three">
447455
<b>If you're using Alexa;</b> IFTTT requires you to say <i>Alexa, <b>trigger</b> x</i> before the actual trigger, and would always respond <i>"OK. Sending that to IFTTT.</i>
456+
<br />
457+
Furthermore, it often <b>only works with english commands</b>. This is a limitation Alexa has on IFTTT for some countries, sadly.
448458
</li>
449459
<li data-translation-key="tbs_assistant_solution_four">
450460
<b>If you're using Google Assistant;</b>
@@ -489,7 +499,9 @@ <h5 data-translation-key="problem_introduction_title">What's problem are you exp
489499
<p data-translation-key="tbs_still_not_resolved_desc">If all solutions above have failed, please refer to the <a target="_blank" href="https://acc.readme.io/docs/troubleshooting#section-still-not-solved-">troubleshooting guide</a> <i>(specifically the "Still not solved?" section)</i></p>
490500
<hr />
491501
<p data-translation-key="tbs_still_not_resolved_community_help">
492-
If it's <b>still</b> not working, come join our <a href="https://discord.gg/B9YGPNF" target="_blank"><i>Discord server</i></a>. With over 550 members, you're sure to get help quickly <i>(and the developer often answers within a few hours)</i>
502+
If it's <b>still</b> not working, come join our <a href="https://discord.gg/B9YGPNF" target="_blank"><i>Discord server</i></a>. With over 1000 members, you're sure to get help quickly <i>(and the developer often answers within a few hours)</i>.<br />
503+
When joining, <b>make sure to read the rules and guidelines on how to help us help you</b> once you have gone through the troubleshooting guide. Ask for help in the <code>#help</code> channel.
504+
493505
<br />
494506
In case you believe you have found a bug, you can open an <a target="_blank" href="https://github.com/AlbertMN/AssistantComputerControl/issues">issue on GitHub</a> and describe the issue.
495507
</p>

AssistantComputerControl/WebFiles/assets/js/getting_started_scripts.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,22 @@ $(".card.cloud_service_card").on("click", function () {
208208
} else {
209209
$("#multipleOneDrive").hide();
210210
}
211+
212+
if (chosenCloudServiceNum == "3") {
213+
//Google Drive
214+
$("#gdrive_warning").show();
215+
$("#pick_btn").prop("disabled", true);
216+
} else {
217+
$("#gdrive_warning").hide();
218+
}
219+
});
220+
221+
$("#knows_gdrive_sucks").on("change", function () {
222+
if ($(this).is(":checked")) {
223+
$("#gdrive_warning").hide();
224+
$("#pick_btn").prop("disabled", false);
225+
$(this).prop("checked", false);
226+
}
211227
});
212228

213229
$("#pick_btn").on("click", function () {
0 Bytes
Binary file not shown.

AssistantComputerControl/obj/Debug/AssistantComputerControl.csproj.FileListAbsolute.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,7 @@ C:\Users\almn\Dropbox\Programmering\C#\AssistantComputerControl\AssistantCompute
158158
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\Translations\Francais.json
159159
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\ExtraCleanupper.ps1
160160
C:\Users\almn\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\ExtraCleanupper.ps1
161+
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\Translations\Spanish.json
162+
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\Translations\Italian.json
163+
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\Translations\Turkce.json
164+
C:\Users\alber\Dropbox\Programmering\C#\AssistantComputerControl\AssistantComputerControl\bin\Debug\Translations\Portuguese - Brasil.json

0 commit comments

Comments
 (0)