Skip to content

Commit

Permalink
added refresh label
Browse files Browse the repository at this point in the history
  • Loading branch information
zezba9000 committed Apr 27, 2017
1 parent d2935b8 commit d71140f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion GitItGUI/MainContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<gititgui:SettingsPage/>
</TabItem>
</TabControl>
</Grid>
</Grid>

<TextBlock Name="refreshTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Margin="0,0,0,0">Refreshing...</TextBlock>
</Grid>

</UserControl>
6 changes: 5 additions & 1 deletion GitItGUI/MainContent.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MainContent : UserControl, NavigationPage
public static MainContent singleton;
public event MainContentPageNavigateMethod MainContentPageNavigatedTo, MainContentPageNavigateFrom;

private TextBlock repoName;
private TextBlock repoName, refreshTextBlock;
private Button closeRepoButton;
private TabControl tabControl;
public int tabControlNavigateIndex = -1;
Expand All @@ -30,6 +30,8 @@ public MainContent()
repoName = this.Find<TextBlock>("repoName");
closeRepoButton = this.Find<Button>("closeRepoButton");
tabControl = this.Find<TabControl>("tabControl");
refreshTextBlock = this.Find<TextBlock>("refreshTextBlock");
refreshTextBlock.IsVisible = false;

closeRepoButton.Click += CloseRepoButton_Click;
RepoManager.RepoRefreshedCallback += RepoManager_RepoRefreshedCallback;
Expand Down Expand Up @@ -119,6 +121,7 @@ private void RepoManager_RepoRefreshingCallback(bool start)
repoName.IsVisible = !start;
closeRepoButton.IsVisible = !start;
tabControl.IsVisible = !start;
refreshTextBlock.IsVisible = start;
}
else
{
Expand All @@ -127,6 +130,7 @@ private void RepoManager_RepoRefreshingCallback(bool start)
repoName.IsVisible = !start;
closeRepoButton.IsVisible = !start;
tabControl.IsVisible = !start;
refreshTextBlock.IsVisible = start;
});
}
}
Expand Down

0 comments on commit d71140f

Please sign in to comment.