Many minor bugs. Project files upgraded to Visual Studio 2008 format now.
This commit is contained in:
parent
ec8485d582
commit
46f50aabc3
9 changed files with 582 additions and 324 deletions
721
scheduler/DeviceScheduler/DataStorage.Designer.cs
generated
721
scheduler/DeviceScheduler/DataStorage.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{8B613D91-8906-4A60-BAF7-328DA437DF01}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
|
@ -10,6 +10,27 @@
|
|||
<RootNamespace>DeviceScheduler</RootNamespace>
|
||||
<AssemblyName>DeviceScheduler</AssemblyName>
|
||||
<ApplicationIcon>Alarm.ico</ApplicationIcon>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -30,7 +51,13 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
|
@ -38,7 +65,7 @@
|
|||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TaskScheduler, Version=1.1.2826.33653, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>References\TaskScheduler.dll</HintPath>
|
||||
<HintPath>..\..\TellScheduler\TaskScheduler.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -231,6 +258,38 @@
|
|||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
@ -117,6 +117,10 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="couldnotbefoundprobablygone" xml:space="preserve">
|
||||
<value>could not be found in the system and has probably been removed manually.</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
<data name="FailedToNameSchedule" xml:space="preserve">
|
||||
<value>You have to name the schedule.</value>
|
||||
</data>
|
||||
|
@ -135,10 +139,22 @@
|
|||
<data name="msg3" xml:space="preserve">
|
||||
<value>Do you want to remove the selected unit from the list?</value>
|
||||
</data>
|
||||
<data name="nounitsexists" xml:space="preserve">
|
||||
<value>No devices exists. Add them first by clicking "Configure unit(s)".</value>
|
||||
</data>
|
||||
<data name="thescheduledtask" xml:space="preserve">
|
||||
<value>The scheduled task</value>
|
||||
<comment>SP
|
||||
</comment>
|
||||
</data>
|
||||
<data name="unitoff" xml:space="preserve">
|
||||
<value>Off</value>
|
||||
</data>
|
||||
<data name="uniton" xml:space="preserve">
|
||||
<value>On</value>
|
||||
</data>
|
||||
<data name="telldusscheduler" xml:space="preserve">
|
||||
<value>Telldus Scheduler</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
</root>
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="couldnotbefoundprobablygone" xml:space="preserve">
|
||||
<value>kunde inte hittas i systemet och har förmodligen tagits bort manuellt.</value>
|
||||
</data>
|
||||
<data name="FailedToNameSchedule" xml:space="preserve">
|
||||
<value>Du måste ge schemaläggningen ett namn.</value>
|
||||
</data>
|
||||
|
@ -135,10 +138,22 @@
|
|||
<data name="msg3" xml:space="preserve">
|
||||
<value>Vill du ta bort markerad enhet?</value>
|
||||
</data>
|
||||
<data name="nounitsexists" xml:space="preserve">
|
||||
<value>Inga enheter finns. Lägg först till enheter genom att klicka på "Konfigurera enheter".</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
<data name="thescheduledtask" xml:space="preserve">
|
||||
<value>Den schemalagda uppgiften</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
<data name="unitoff" xml:space="preserve">
|
||||
<value>Av</value>
|
||||
</data>
|
||||
<data name="uniton" xml:space="preserve">
|
||||
<value>På</value>
|
||||
</data>
|
||||
<data name="telldusscheduler" xml:space="preserve">
|
||||
<value>Telldus Schemaläggare</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
</root>
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="couldnotbefoundprobablygone" xml:space="preserve">
|
||||
<value>kunde inte hittas i systemet och har förmodligen tagits bort manuellt.</value>
|
||||
</data>
|
||||
<data name="FailedToNameSchedule" xml:space="preserve">
|
||||
<value>Du måste ge schemaläggningen ett namn.</value>
|
||||
</data>
|
||||
|
@ -135,10 +138,22 @@
|
|||
<data name="msg3" xml:space="preserve">
|
||||
<value>Vill du ta bort markerad enhet?</value>
|
||||
</data>
|
||||
<data name="nounitsexists" xml:space="preserve">
|
||||
<value>Inga enheter finns. Lägg först till enheter genom att klicka på "Konfigurera enheter".</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
<data name="thescheduledtask" xml:space="preserve">
|
||||
<value>Den schemalagda uppgiften</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
<data name="unitoff" xml:space="preserve">
|
||||
<value>Av</value>
|
||||
</data>
|
||||
<data name="uniton" xml:space="preserve">
|
||||
<value>På</value>
|
||||
</data>
|
||||
<data name="telldusscheduler" xml:space="preserve">
|
||||
<value>Telldus Schemaläggare</value>
|
||||
<comment>SP</comment>
|
||||
</data>
|
||||
</root>
|
|
@ -35,7 +35,7 @@ namespace DeviceScheduler
|
|||
|
||||
private void SaveCheckbox()
|
||||
{
|
||||
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Telldus\Scheduler\Settings",true);
|
||||
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"Software\Telldus\Scheduler\Settings");
|
||||
key.SetValue("AskSecurityPolicy", !chkHide.Checked);
|
||||
key.Close();
|
||||
}
|
||||
|
|
|
@ -78,19 +78,32 @@ namespace DeviceScheduler
|
|||
|
||||
private bool ShowAskSecurityPolicy()
|
||||
{
|
||||
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Telldus\Scheduler\Settings");
|
||||
|
||||
if (key != null)
|
||||
RegistryKey key = null;
|
||||
bool blnReturn = true;
|
||||
try
|
||||
{
|
||||
if (key.GetValue("AskSecurityPolicy") != null)
|
||||
key = Registry.CurrentUser.CreateSubKey(@"Software\Telldus\Scheduler\Settings");
|
||||
if (key != null)
|
||||
{
|
||||
return Convert.ToBoolean(key.GetValue("AskSecurityPolicy"));
|
||||
key.Close();
|
||||
if (key.GetValue("AskSecurityPolicy") != null)
|
||||
{
|
||||
blnReturn = Convert.ToBoolean(key.GetValue("AskSecurityPolicy"));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (key != null)
|
||||
key.Close();
|
||||
}
|
||||
|
||||
return true;
|
||||
return blnReturn;
|
||||
}
|
||||
|
||||
|
||||
//private void DisablePasswordPolicy()
|
||||
//{
|
||||
|
@ -230,17 +243,26 @@ namespace DeviceScheduler
|
|||
{
|
||||
DataStorage.JobRow job = m_Data.Job.FindByID(Convert.ToInt32(task.Parameters));
|
||||
|
||||
ListViewItem lvwItem = lvwTasks.Items.Add(task.Name, 3);
|
||||
lvwItem.SubItems.Add(job.StartTime.ToString());
|
||||
lvwItem.SubItems.Add(task.Triggers[0].BeginDate.ToShortDateString());
|
||||
lvwItem.Tag = task;
|
||||
|
||||
if (job != null)
|
||||
{
|
||||
ListViewItem lvwItem = lvwTasks.Items.Add(task.Name, 3);
|
||||
lvwItem.SubItems.Add(Convert.ToDateTime(job.StartTime).ToShortTimeString());
|
||||
lvwItem.SubItems.Add(task.Triggers[0].BeginDate.ToShortDateString());
|
||||
lvwItem.SubItems.Add(task.Comment);
|
||||
lvwItem.Tag = task;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Den schemalagda uppgiften / kunde inte hittas i systemet och har förmodligen tagits bort manuellt.
|
||||
MessageBox.Show(Localization.GetString("thescheduledtask") + " " + task.Name + " " + Localization.GetString("couldnotbefoundprobablygone"), Localization.GetString("telldusscheduler"), MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
m_Tasks.DeleteTask(task.Name);
|
||||
}
|
||||
}
|
||||
task.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void toolNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
CreateSchedule();
|
||||
|
@ -275,8 +297,8 @@ namespace DeviceScheduler
|
|||
if (lvwTasks.SelectedItems.Count == 0) { return; }
|
||||
|
||||
//"Vill du ta bort markerad schemaläggning?"
|
||||
DialogResult result = MessageBox.Show(Localization.GetString("msg2"),
|
||||
Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
DialogResult result = MessageBox.Show(Localization.GetString("msg2"),
|
||||
Localization.GetString("telldusscheduler"), MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
|
|
|
@ -183,14 +183,14 @@ namespace DeviceScheduler
|
|||
|
||||
if (lvwDevices.Items.Count == 0)
|
||||
{
|
||||
MessageBox.Show(Localization.GetString("FailedToSelectUnits"), "",
|
||||
MessageBox.Show(Localization.GetString("FailedToSelectUnits"), Localization.GetString("telldusscheduler"),
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (txtName.Text.Length == 0)
|
||||
{
|
||||
MessageBox.Show(Localization.GetString("FailedToNameSchedule"), "",
|
||||
MessageBox.Show(Localization.GetString("FailedToNameSchedule"), Localization.GetString("telldusscheduler"),
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,20 @@ namespace DeviceScheduler
|
|||
FillCombo();
|
||||
|
||||
//Preselect device and action
|
||||
cboDevices.SelectedIndex = 0;
|
||||
cboAction.SelectedIndex = 0;
|
||||
if (cboDevices.Items.Count > 0)
|
||||
{
|
||||
cboDevices.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//"Inga enheter finns. Lägg först till enheter genom att klicka på \"configure unit(s)\"."
|
||||
MessageBox.Show(Localization.GetString("nounitsexists"), Localization.GetString("telldusscheduler"), MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
this.Close();
|
||||
}
|
||||
if (cboAction.Items.Count > 0)
|
||||
{
|
||||
cboAction.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void FillCombo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue