Skip to content

Commit 87775bc

Browse files
committed
Fix-commit
1 parent e53c3fc commit 87775bc

19 files changed

+201
-203
lines changed

AssistantComputerControl/AdvancedSettings.Designer.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AssistantComputerControl/AssistantComputerControl.csproj

Lines changed: 7 additions & 7 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>
@@ -163,10 +163,10 @@
163163
</Compile>
164164
<Compile Include="MainProgram.cs" />
165165
<Compile Include="MyPanel.cs" />
166-
<Compile Include="AboutVersionWeb\NewVersion.cs">
166+
<Compile Include="WebFiles\NewVersion.cs">
167167
<SubType>Form</SubType>
168168
</Compile>
169-
<Compile Include="AboutVersionWeb\NewVersion.Designer.cs">
169+
<Compile Include="WebFiles\NewVersion.Designer.cs">
170170
<DependentUpon>NewVersion.cs</DependentUpon>
171171
</Compile>
172172
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -206,13 +206,13 @@
206206
<None Include="App.config" />
207207
</ItemGroup>
208208
<ItemGroup>
209-
<Content Include="AboutVersionWeb\assets\acc_logo.png">
209+
<Content Include="WebFiles\assets\acc_logo.png">
210210
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
211211
</Content>
212-
<Content Include="AboutVersionWeb\assets\bootstrap.min.css">
212+
<Content Include="WebFiles\assets\bootstrap.min.css">
213213
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
214214
</Content>
215-
<Content Include="AboutVersionWeb\index.html">
215+
<Content Include="WebFiles\index.html">
216216
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
217217
</Content>
218218
<Content Include="FodyWeavers.xml" />
@@ -242,7 +242,7 @@
242242
<EmbeddedResource Include="InstallerClass.resx">
243243
<DependentUpon>InstallerClass.cs</DependentUpon>
244244
</EmbeddedResource>
245-
<EmbeddedResource Include="AboutVersionWeb\NewVersion.resx">
245+
<EmbeddedResource Include="WebFiles\NewVersion.resx">
246246
<DependentUpon>NewVersion.cs</DependentUpon>
247247
</EmbeddedResource>
248248
<EmbeddedResource Include="Properties\Resources.resx">

AssistantComputerControl/GettingStarted.Designer.cs

Lines changed: 132 additions & 150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AssistantComputerControl/GettingStarted.resx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<data name="label17.Text" xml:space="preserve">
124+
<value>This software needs a cloud service to function. We natively support Dropbox, Google Drive and OneDrive.
125+
If you want the easy and recommended install, pick one of the supporter cloud services. Otherwise, choose "expert setup"</value>
126+
</data>
123127
<data name="customSetupInfo.Text" xml:space="preserve">
124128
<value>This setup is for those who wish more freedom over AssistantComputerControl.
125129
As you may (or may not) know, ACC uses a cloud-software like Dropbox to communicate with IFTTT, which handles the assistant command &amp; response.

AssistantComputerControl/MainProgram.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
using System;
1+
/*
2+
* AssistantComputerControl
3+
* Made by Albert MN.
4+
* Updated: v1.1.4, 15-11-2018
5+
*
6+
* Use:
7+
* - Main class. Starts everything.
8+
*/
9+
10+
using System;
211
using System.IO;
312
using System.Diagnostics;
413
using System.Reflection;
@@ -14,8 +23,8 @@
1423

1524
namespace AssistantComputerControl {
1625
class MainProgram {
17-
public const string softwareVersion = "1.1.3",
18-
releaseDate = "2018-11-12 20:30:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
26+
public const string softwareVersion = "1.1.4",
27+
releaseDate = "2018-12-13 20:30:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
1928
appName = "AssistantComputerControl";
2029
static public bool debug = true,
2130
unmuteVolumeChange = true,
@@ -113,6 +122,8 @@ void ActualMain() {
113122
}
114123
}
115124

125+
Application.EnableVisualStyles();
126+
116127
DoDebug("[ACC begun (v" + softwareVersion + ")]");
117128
AnalyticsSettings.SetupAnalytics();
118129

@@ -167,7 +178,6 @@ void ActualMain() {
167178

168179
DoDebug("\n[" + messageBoxTitle + "] Initiated. \nListening in: \"" + CheckPath() + "\" for \"." + Properties.Settings.Default.ActionFileExtension + "\" extensions");
169180

170-
Application.EnableVisualStyles();
171181
sysIcon.TrayIcon.Icon = Properties.Resources.ACC_icon;
172182

173183
RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", true);

AssistantComputerControl/SettingsForm.Designer.cs

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AssistantComputerControl/SettingsForm.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
using System;
1+
/*
2+
* AssistantComputerControl
3+
* Made by Albert MN.
4+
* Updated: v1.1.4, 13-12-2018
5+
*
6+
* Use:
7+
* - Settings Form
8+
*/
9+
10+
using System;
211
using System.Diagnostics;
312
using System.Threading;
413
using System.Windows.Forms;
@@ -10,6 +19,7 @@ public partial class SettingsForm : Form {
1019

1120
public SettingsForm() {
1221
InitializeComponent();
22+
1323
versionInfo.Text = "Version " + MainProgram.softwareVersion;
1424

1525
computerName.KeyDown += new KeyEventHandler(FreakingStopDingSound);

AssistantComputerControl/actionChecker.cs

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
using System;
1+
/*
2+
* AssistantComputerControl
3+
* Made by Albert MN.
4+
* Updated: v1.1.3, 15-11-2018
5+
*
6+
* Use:
7+
* - Checks and execute action files
8+
*/
9+
10+
using System;
211
using System.IO;
312
using System.Diagnostics;
413
using System.Runtime.InteropServices;
@@ -10,7 +19,6 @@
1019
namespace AssistantComputerControl {
1120
class ActionChecker {
1221
private static string successMessage = "";
13-
private static List<string> inProgressFileNames = new List<string>();
1422

1523
//Logout
1624
[DllImport("user32.dll", SetLastError = true)]
@@ -85,7 +93,7 @@ static public void FileFound(object source, FileSystemEventArgs e) {
8593
static public void ProcessFile(string file) {
8694
string originalFileName = file;
8795

88-
if (!File.Exists(file)/* || inProgressFileNames.Contains(file) || file.Contains("in_progress")*/) {
96+
if (!File.Exists(file)) {
8997
return;
9098
}
9199
DateTime lastModified = File.GetCreationTime(file);
@@ -103,51 +111,21 @@ static public void ProcessFile(string file) {
103111
MainProgram.DoDebug("Local time: " + DateTime.Now.ToString());
104112
return;
105113
}
106-
inProgressFileNames.Add(originalFileName);
107114

108115
MainProgram.DoDebug("\n[ -- DOING ACTION(S) -- ]");
109116
MainProgram.DoDebug(" - " + file);
110117
MainProgram.DoDebug(" - File exists, checking the content...");
111118

112119
try {
113-
Thread.Sleep(200);
120+
//Thread.Sleep(200);
114121
File.SetAttributes(file, FileAttributes.Hidden);
115122
} catch {
116123
//
117124
}
118125

119-
/*while (FileInUse(file));
120-
string newFileName = Path.Combine(MainProgram.CheckPath(), "in_progress_" + Guid.NewGuid().ToString("n").Substring(0, 8) + "." + Properties.Settings.Default.ActionFileExtension);
121-
inProgressFileNames.Add(newFileName);
122-
try {
123-
File.Move(file, newFileName);
124-
MainProgram.DoDebug(" - File moved");
125-
} catch {
126-
//File in use
127-
inProgressFileNames.Remove(file);
128-
inProgressFileNames.Remove(originalFileName);
129-
MainProgram.DoDebug(" - Can't move file - used by another process, ignoring");
130-
131-
try {
132-
Thread.Sleep(200);
133-
File.SetAttributes(file, FileAttributes.Hidden);
134-
} catch {
135-
//
136-
}
137-
138-
return;
139-
}
140-
file = newFileName;
141-
while (File.Exists(originalFileName));
142-
while (!File.Exists(file)) ;*/
143-
144126
if (new FileInfo(file).Length != 0) {
145-
//string line = Regex.Replace(File.ReadAllText(file), @"\t|\n|\r", "");
146127
string fullContent = Regex.Replace(File.ReadAllText(file), @"\t|\r", "");
147128
MainProgram.DoDebug(" - Read complete, content: " + fullContent);
148-
149-
//MainProgram.ClearFile(file);
150-
//while (File.Exists(file)) ;
151129
File.SetAttributes(file, FileAttributes.Hidden);
152130

153131
using (StringReader reader = new StringReader(fullContent)) {
@@ -172,8 +150,6 @@ static public void ProcessFile(string file) {
172150

173151

174152
MainProgram.DoDebug("[ -- DONE -- ]");
175-
inProgressFileNames.Remove(file);
176-
inProgressFileNames.Remove(originalFileName);
177153

178154
if (MainProgram.errorMessage.Length != 0) {
179155
MessageBox.Show(MainProgram.errorMessage, "Error | " + MainProgram.messageBoxTitle);
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)