Skip to content

Commit

Permalink
display directory
Browse files Browse the repository at this point in the history
  • Loading branch information
NobodysNightmare committed Apr 4, 2013
1 parent 35b8df5 commit a8a6deb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions DriveKeepAlive/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Drive Keep-alive" Height="115.672" Width="525" Closed="Window_Closed_1" ResizeMode="CanMinimize">
<Grid>
<TextBlock x:Name="WriteCountLabel" TextWrapping="Wrap" Text="Text" Margin="10,10,383,53"/>
<TextBlock x:Name="IdleCountLabel" TextWrapping="Wrap" Text="Text" Width="120" Margin="10,43,389,10"/>
<Grid.RowDefinitions>
<RowDefinition Height="41*"/>
<RowDefinition Height="46*"/>
</Grid.RowDefinitions>
<TextBlock x:Name="WriteCountLabel" Grid.Row="0" Margin="10,10,332,10" ><Run Text="write cycles"/></TextBlock>
<TextBlock x:Name="IdleCountLabel" Text="idle cycles" Grid.Row="1" Margin="10" />
<TextBlock x:Name="PathLabel" Text="Directory" HorizontalAlignment="Right" Margin="0,10,9,10" />

</Grid>
</Window>
4 changes: 3 additions & 1 deletion DriveKeepAlive/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public partial class MainWindow : Window
public MainWindow()
{
InitializeComponent();
FileStream = File.OpenWrite(Path.Combine(Config.FileDirectory, Config.FileName));
var path = Path.Combine(Config.FileDirectory, Config.FileName);
PathLabel.Text = path;
FileStream = File.OpenWrite(path);
var t = new Thread(KeepAliveCycle);
t.IsBackground = true;
t.Start();
Expand Down

0 comments on commit a8a6deb

Please sign in to comment.