Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
3166c08893 | ||
unknown | 9cd6678114 | |
unknown | 3fe467c5ff | |
unknown | a6c6f34080 |
Binary file not shown.
|
@ -173,7 +173,6 @@
|
|||
<EmbeddedResource Include="..\src\ScriptManager.resx">
|
||||
<DependentUpon>ScriptManager.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ilmerge" version="2.13.0307" targetFramework="net45" />
|
||||
</packages>
|
|
@ -463,6 +463,10 @@ namespace FileWatcher
|
|||
{
|
||||
return;
|
||||
}
|
||||
catch (DirectoryNotFoundException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Timer.Enabled == false || Settings.restartDelayCB.Checked)
|
||||
{
|
||||
|
@ -562,18 +566,18 @@ namespace FileWatcher
|
|||
m_TickCounter.Enabled = false;
|
||||
|
||||
|
||||
Form1.Instance.notifyIcon1.ShowBalloonTip(1000, "Script Running", "Running '" + ScriptPath + "'", ToolTipIcon.Info);
|
||||
//Form1.Instance.notifyIcon1.ShowBalloonTip(500, "Script Running", "Running '" + ScriptPath + "'", ToolTipIcon.Info);
|
||||
|
||||
//scriptWorker.RunWorkerAsync(m_UpdatedFiles);
|
||||
|
||||
// run script in separate thread
|
||||
Func<List<string>, bool> updated = pyScope.GetVariable<Func<List<string>, bool>>("process_updated_files");
|
||||
|
||||
try
|
||||
{
|
||||
var updateFiles = m_UpdatedFiles;
|
||||
var updateFiles = m_UpdatedFiles.ToList();
|
||||
m_UpdatedFiles.Clear();
|
||||
|
||||
// run script in separate thread
|
||||
Func<List<string>, bool> updated = pyScope.GetVariable<Func<List<string>, bool>>("process_updated_files");
|
||||
|
||||
updated(updateFiles);
|
||||
|
||||
Logger.Log("Just finished running '" + ScriptPath + "'");
|
||||
|
@ -602,6 +606,11 @@ namespace FileWatcher
|
|||
{
|
||||
Logger.Log("Directory not found exception in '" + ScriptPath + "':" + ex.Message + Environment.NewLine + ex.StackTrace + Environment.NewLine + ex.TargetSite);
|
||||
}
|
||||
else if (ex is System.IO.IOException)
|
||||
{
|
||||
Logger.Log("IOException in '" + ScriptPath + "':" + ex.Message + Environment.NewLine + ex.StackTrace + Environment.NewLine + ex.TargetSite);
|
||||
Logger.Log("Your script had an IO exception, you should alter your script to catch individual file errors so you can try to process them all even when an exception happens. You may also want to alter your file IO in case you can get around this error.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Log("Error running '" + ScriptPath + "':" + ex.Message + Environment.NewLine + ex.StackTrace);
|
||||
|
|
|
@ -43,7 +43,10 @@ namespace FileWatcher
|
|||
private void createButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(textBox3.Text));
|
||||
using (var fileStream = File.Open(textBox3.Text, FileMode.OpenOrCreate, FileAccess.ReadWrite));
|
||||
using (var fileStream = File.Open(textBox3.Text, FileMode.OpenOrCreate, FileAccess.ReadWrite))
|
||||
{
|
||||
// don't do anything, just create the file.
|
||||
};
|
||||
}
|
||||
|
||||
private void textBox3_KeyPress(object sender, KeyPressEventArgs e)
|
||||
|
|
|
@ -137,6 +137,8 @@ namespace FileWatcher
|
|||
}
|
||||
}
|
||||
|
||||
defaultPrograms.RemoveAll(str => !programs.ContainsKey(str) || !File.Exists(programs[str].Path));
|
||||
|
||||
UnboundBindingList = new BindingList<string>(defaultPrograms);
|
||||
foreach (string str in programs.Keys)
|
||||
{
|
||||
|
@ -210,8 +212,12 @@ namespace FileWatcher
|
|||
{
|
||||
if (listBox1.SelectedValue != null)
|
||||
{
|
||||
string path = programs[(string)listBox1.SelectedValue].Path;
|
||||
textBox1.Text = path;
|
||||
string selectedValue = (string)listBox1.SelectedValue;
|
||||
if (programs.ContainsKey(selectedValue))
|
||||
{
|
||||
string path = programs[(string)listBox1.SelectedValue].Path;
|
||||
textBox1.Text = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,14 +26,14 @@ namespace FileWatcher
|
|||
{
|
||||
}
|
||||
|
||||
public void Start()
|
||||
public new void Start()
|
||||
{
|
||||
m_Running = true;
|
||||
m_Start = DateTime.Now;
|
||||
base.Start();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public new void Stop()
|
||||
{
|
||||
m_End = DateTime.Now;
|
||||
m_Running = false;
|
||||
|
|
Loading…
Reference in New Issue