Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
ada3000 committed Aug 8, 2014
1 parent 73f9661 commit fd0fcdb
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
1 change: 0 additions & 1 deletion HealthGuard/Form1.Designer.cs

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

2 changes: 1 addition & 1 deletion HealthGuard/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private void pbRabbit_Click(object sender, EventArgs e)

private void Form1_Load(object sender, EventArgs e)
{

this.BackgroundImage = Program.MainBGImage;
}
}
}
12 changes: 12 additions & 0 deletions HealthGuard/HealthGuard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@
<None Include="images\fon.jpg" />
</ItemGroup>
<ItemGroup>
<None Include="fons\fon2.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="fons\fon1.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="fons\fon3.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="fons\fon4.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="icon.ico" />
<None Include="Resources\fon.jpg" />
<None Include="Resources\only-eyes.png" />
Expand Down
16 changes: 16 additions & 0 deletions HealthGuard/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Threading;

Expand Down Expand Up @@ -43,11 +47,14 @@ static class Program
[STAThread]
static void Main()
{

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

CurDelay = BigDelay;

LoadDayImage();

mthMain = new Thread(Worker);
mthMain.IsBackground = true;
mthMain.Start();
Expand All @@ -63,6 +70,13 @@ static void Main()
FMAIN = new frmStart();
Application.Run(FMAIN);
}
private static void LoadDayImage()
{
var files = Directory.GetFiles(@".\fons").OrderBy(s=>s).ToArray();

string img = files[DateTime.Now.DayOfYear % files.Length];
MainBGImage = new Bitmap(img);
}
static void Worker()
{
while (true)
Expand Down Expand Up @@ -110,5 +124,7 @@ public static void StartDelay(int Delay)
CurDelay = Delay;
mEventStart.Set();
}

public static Image MainBGImage { get; private set; }
}
}
22 changes: 1 addition & 21 deletions HealthGuard/Properties/Resources.Designer.cs

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

7 changes: 0 additions & 7 deletions HealthGuard/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="fon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\fon.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fon2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fon.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added HealthGuard/fons/fon1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HealthGuard/fons/fon2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HealthGuard/fons/fon3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HealthGuard/fons/fon4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd0fcdb

Please sign in to comment.