Skip to content

Commit

Permalink
Changed target framework to .NET 3.5 Client Profile (was .NET 4 CP)
Browse files Browse the repository at this point in the history
Modified stopwatch; .NET 3.5 dose not have `.Restart()`
  • Loading branch information
BobVul committed Jun 22, 2012
1 parent 5dfabf2 commit a704279
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 29 deletions.
21 changes: 19 additions & 2 deletions IdleShutdown/IdleShutdown.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IdleShutdown</RootNamespace>
<AssemblyName>IdleShutdown</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand All @@ -33,12 +33,28 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == '.NET 3.5|x86'">
<OutputPath>bin\x86\.NET 3.5\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\IdleShutdown.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
Expand All @@ -65,6 +81,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand Down
6 changes: 4 additions & 2 deletions IdleShutdown/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ private void StartShutdownTimer()
postponed = false;
waittime = DefaultWaitTime;
progressBarTime.Maximum = (int)waittime.TotalSeconds;
stopwatch.Restart();
stopwatch.Reset();
stopwatch.Start();
this.Show();
}

Expand Down Expand Up @@ -71,7 +72,8 @@ private void buttonPostpone_Click(object sender, EventArgs e)
notifyIcon.ShowBalloonTip(5000, "Idle Shutdown timer postponed for " + numericUpDownPostponeMinutes.Value + " minutes.", " ", ToolTipIcon.Info);
postponed = true;
waittime = TimeSpan.FromMinutes((double)numericUpDownPostponeMinutes.Value);
stopwatch.Restart();
stopwatch.Reset();
stopwatch.Start();
this.Hide();
}

Expand Down
42 changes: 17 additions & 25 deletions IdleShutdown/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a704279

Please sign in to comment.