Skip to content

Commit ddd9e17

Browse files
committed
Initial Release
1 parent 57a64d2 commit ddd9e17

17 files changed

Lines changed: 722 additions & 2 deletions

App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
5+
</startup>
6+
</configuration>

App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="Keep_Asleep.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:Keep_Asleep"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace Keep_Asleep
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

Keep Asleep.csproj

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{1F5DAEB4-234A-48A4-9587-8300E7ACF030}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>Keep_Asleep</RootNamespace>
10+
<AssemblyName>Keep Asleep</AssemblyName>
11+
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
<IsWebBootstrapper>false</IsWebBootstrapper>
18+
<PublishUrl>publish\</PublishUrl>
19+
<Install>true</Install>
20+
<InstallFrom>Disk</InstallFrom>
21+
<UpdateEnabled>false</UpdateEnabled>
22+
<UpdateMode>Foreground</UpdateMode>
23+
<UpdateInterval>7</UpdateInterval>
24+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
25+
<UpdatePeriodically>false</UpdatePeriodically>
26+
<UpdateRequired>false</UpdateRequired>
27+
<MapFileExtensions>true</MapFileExtensions>
28+
<ApplicationRevision>1</ApplicationRevision>
29+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
30+
<UseApplicationTrust>false</UseApplicationTrust>
31+
<PublishWizardCompleted>true</PublishWizardCompleted>
32+
<BootstrapperEnabled>true</BootstrapperEnabled>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
35+
<PlatformTarget>AnyCPU</PlatformTarget>
36+
<DebugSymbols>true</DebugSymbols>
37+
<DebugType>full</DebugType>
38+
<Optimize>false</Optimize>
39+
<OutputPath>bin\Debug\</OutputPath>
40+
<DefineConstants>DEBUG;TRACE</DefineConstants>
41+
<ErrorReport>prompt</ErrorReport>
42+
<WarningLevel>4</WarningLevel>
43+
</PropertyGroup>
44+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
45+
<PlatformTarget>AnyCPU</PlatformTarget>
46+
<DebugType>pdbonly</DebugType>
47+
<Optimize>true</Optimize>
48+
<OutputPath>bin\Release\</OutputPath>
49+
<DefineConstants>TRACE</DefineConstants>
50+
<ErrorReport>prompt</ErrorReport>
51+
<WarningLevel>4</WarningLevel>
52+
</PropertyGroup>
53+
<PropertyGroup>
54+
<ManifestCertificateThumbprint>EC358E7E7722D6675E9586C86FE071E0196B2F30</ManifestCertificateThumbprint>
55+
</PropertyGroup>
56+
<PropertyGroup>
57+
<ManifestKeyFile>Keep Asleep_TemporaryKey.pfx</ManifestKeyFile>
58+
</PropertyGroup>
59+
<PropertyGroup>
60+
<GenerateManifests>true</GenerateManifests>
61+
</PropertyGroup>
62+
<PropertyGroup>
63+
<SignManifests>true</SignManifests>
64+
</PropertyGroup>
65+
<PropertyGroup>
66+
<ApplicationIcon>tray.ico</ApplicationIcon>
67+
</PropertyGroup>
68+
<ItemGroup>
69+
<Reference Include="Hardcodet.NotifyIcon.Wpf, Version=1.1.0.0, Culture=neutral, PublicKeyToken=682384a853a08aad, processorArchitecture=MSIL">
70+
<HintPath>packages\Hardcodet.NotifyIcon.Wpf.1.1.0\lib\net462\Hardcodet.NotifyIcon.Wpf.dll</HintPath>
71+
</Reference>
72+
<Reference Include="System" />
73+
<Reference Include="System.Data" />
74+
<Reference Include="System.Drawing" />
75+
<Reference Include="System.Xml" />
76+
<Reference Include="Microsoft.CSharp" />
77+
<Reference Include="System.Core" />
78+
<Reference Include="System.Xml.Linq" />
79+
<Reference Include="System.Data.DataSetExtensions" />
80+
<Reference Include="System.Net.Http" />
81+
<Reference Include="System.Xaml">
82+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
83+
</Reference>
84+
<Reference Include="WindowsBase" />
85+
<Reference Include="PresentationCore" />
86+
<Reference Include="PresentationFramework" />
87+
</ItemGroup>
88+
<ItemGroup>
89+
<ApplicationDefinition Include="App.xaml">
90+
<Generator>MSBuild:Compile</Generator>
91+
<SubType>Designer</SubType>
92+
</ApplicationDefinition>
93+
<Page Include="MainWindow.xaml">
94+
<Generator>MSBuild:Compile</Generator>
95+
<SubType>Designer</SubType>
96+
</Page>
97+
<Compile Include="App.xaml.cs">
98+
<DependentUpon>App.xaml</DependentUpon>
99+
<SubType>Code</SubType>
100+
</Compile>
101+
<Compile Include="MainWindow.xaml.cs">
102+
<DependentUpon>MainWindow.xaml</DependentUpon>
103+
<SubType>Code</SubType>
104+
</Compile>
105+
</ItemGroup>
106+
<ItemGroup>
107+
<Compile Include="Properties\AssemblyInfo.cs">
108+
<SubType>Code</SubType>
109+
</Compile>
110+
<Compile Include="Properties\Resources.Designer.cs">
111+
<AutoGen>True</AutoGen>
112+
<DesignTime>True</DesignTime>
113+
<DependentUpon>Resources.resx</DependentUpon>
114+
</Compile>
115+
<Compile Include="Properties\Settings.Designer.cs">
116+
<AutoGen>True</AutoGen>
117+
<DependentUpon>Settings.settings</DependentUpon>
118+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
119+
</Compile>
120+
<EmbeddedResource Include="Properties\Resources.resx">
121+
<Generator>ResXFileCodeGenerator</Generator>
122+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
123+
</EmbeddedResource>
124+
<None Include="Keep Asleep_TemporaryKey.pfx" />
125+
<None Include="packages.config" />
126+
<None Include="Properties\Settings.settings">
127+
<Generator>SettingsSingleFileGenerator</Generator>
128+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
129+
</None>
130+
</ItemGroup>
131+
<ItemGroup>
132+
<None Include="App.config" />
133+
</ItemGroup>
134+
<ItemGroup>
135+
<Resource Include="icons\tray.ico" />
136+
</ItemGroup>
137+
<ItemGroup>
138+
<None Include="Resources\Icon1.ico" />
139+
</ItemGroup>
140+
<ItemGroup>
141+
<BootstrapperPackage Include=".NETFramework,Version=v4.7">
142+
<Visible>False</Visible>
143+
<ProductName>Microsoft .NET Framework 4.7 %28x86 and x64%29</ProductName>
144+
<Install>true</Install>
145+
</BootstrapperPackage>
146+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
147+
<Visible>False</Visible>
148+
<ProductName>.NET Framework 3.5 SP1</ProductName>
149+
<Install>false</Install>
150+
</BootstrapperPackage>
151+
</ItemGroup>
152+
<ItemGroup>
153+
<Resource Include="tray.ico" />
154+
</ItemGroup>
155+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
156+
<PropertyGroup>
157+
<PreBuildEvent>taskkill /f /fi "imagename eq $(TargetFileName)"</PreBuildEvent>
158+
</PropertyGroup>
159+
</Project>

Keep Asleep.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.10.35027.167
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Keep Asleep", "Keep Asleep.csproj", "{1F5DAEB4-234A-48A4-9587-8300E7ACF030}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{1F5DAEB4-234A-48A4-9587-8300E7ACF030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{1F5DAEB4-234A-48A4-9587-8300E7ACF030}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{1F5DAEB4-234A-48A4-9587-8300E7ACF030}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{1F5DAEB4-234A-48A4-9587-8300E7ACF030}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {CCBA7330-2A73-406A-A646-9820066ABC78}
24+
EndGlobalSection
25+
EndGlobal

MainWindow.xaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<Window x:Class="Keep_Asleep.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:tb="http://www.hardcodet.net/taskbar"
7+
xmlns:local="clr-namespace:Keep_Asleep"
8+
mc:Ignorable="d"
9+
Icon="icons\tray.ico"
10+
Title="MainWindow" Height="350" Width="525">
11+
<Grid>
12+
<tb:TaskbarIcon
13+
14+
PopupActivation="All"
15+
IconSource="/icons/tray.ico"
16+
ToolTipText="">
17+
<tb:TaskbarIcon.TrayToolTip>
18+
<Border
19+
Padding="0.10 0 0 0"
20+
Background="Black"
21+
BorderBrush="DarkGray"
22+
BorderThickness="2"
23+
CornerRadius="2"
24+
Opacity="0.7"
25+
Width="150"
26+
Height="60">
27+
<TextBlock
28+
Name="TBIconTBox"
29+
Foreground="White"
30+
Text="Keep Asleep&#10;Running"
31+
HorizontalAlignment="Center"
32+
VerticalAlignment="Center"
33+
/>
34+
</Border>
35+
</tb:TaskbarIcon.TrayToolTip>
36+
<tb:TaskbarIcon.TrayPopup>
37+
<Border
38+
Background="Black"
39+
BorderBrush="DarkGray"
40+
BorderThickness="2"
41+
CornerRadius="2"
42+
Width="120"
43+
Height="40">
44+
<Button
45+
Click="ExitBtn_Clicked"
46+
Content=" Exit Keep Asleep "
47+
HorizontalAlignment="Center"
48+
VerticalAlignment="Center" />
49+
</Border>
50+
</tb:TaskbarIcon.TrayPopup>
51+
</tb:TaskbarIcon>
52+
</Grid>
53+
</Window>

0 commit comments

Comments
 (0)