This repository has been archived by the owner on Apr 22, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added place holders for each gui element with basic button navigation
- Loading branch information
Eric Helin
committed
Mar 10, 2018
1 parent
c6f668d
commit 829ddfc
Showing
25 changed files
with
399 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,53 @@ | ||
using System.Windows; | ||
using Shared.Interfaces; | ||
using CommonServiceCode; | ||
using TgimbaWpfClient; | ||
|
||
namespace TgimbaWpfClient | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public static MainWindow Instance; | ||
|
||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
//Test(); | ||
Instance = this; | ||
} | ||
public static MainWindow Instance; | ||
|
||
private void Test() | ||
{ | ||
ITgimbaService service = new TgimbaService(); | ||
var result = service.GetDashboard(); | ||
int test = 1; | ||
var tesft = ucBucketList.ActualHeight; | ||
} | ||
|
||
public void SetCurrentPanel(UseControls userControl) | ||
{ | ||
HideAllUserControls(); | ||
|
||
if (userControl == UseControls.Login) | ||
{ | ||
ucLogin.Visibility = Visibility.Visible; | ||
} | ||
else if (userControl == UseControls.BucketList) | ||
{ | ||
ucBucketList.Visibility = Visibility.Visible; | ||
switch (userControl) { | ||
case UseControls.AddEdit: | ||
ucAditEdit.Visibility = Visibility.Visible; | ||
break; | ||
case UseControls.BucketList: | ||
ucBucketList.Visibility = Visibility.Visible; | ||
break; | ||
case UseControls.Menu: | ||
ucMenu.Visibility = Visibility.Visible; | ||
break; | ||
case UseControls.Registration: | ||
ucRegistration.Visibility = Visibility.Visible; | ||
break; | ||
case UseControls.SearchEntry: | ||
ucSearchEntry.Visibility = Visibility.Visible; | ||
break; | ||
case UseControls.SeachResults: | ||
ucSearchResults.Visibility = Visibility.Visible; | ||
break; | ||
default: | ||
ucLogin.Visibility = Visibility.Visible; | ||
break; | ||
} | ||
} | ||
|
||
private void HideAllUserControls() { | ||
ucLogin.Visibility = Visibility.Hidden; | ||
ucAditEdit.Visibility = Visibility.Hidden; | ||
ucBucketList.Visibility = Visibility.Hidden; | ||
ucLogin.Visibility = Visibility.Hidden; | ||
ucMenu.Visibility = Visibility.Hidden; | ||
ucRegistration.Visibility = Visibility.Hidden; | ||
ucSearchEntry.Visibility = Visibility.Hidden; | ||
ucSearchResults.Visibility = Visibility.Hidden; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace TgimbaWpfClient | ||
{ | ||
public enum UseControls { Login, BucketList }; | ||
public enum UseControls { AddEdit, BucketList, Login, Menu, Registration, SearchEntry, SeachResults }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TgimbaWpfClient.ViewModels | ||
{ | ||
class AddEditModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TgimbaWpfClient.ViewModels | ||
{ | ||
class MenuModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TgimbaWpfClient.ViewModels | ||
{ | ||
class RegistrationModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TgimbaWpfClient.ViewModels | ||
{ | ||
class SearchEntryModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TgimbaWpfClient.ViewModels | ||
{ | ||
class SearchResultsModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<UserControl x:Class="TgimbaWpfClient.Views.AddEditView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:TgimbaWpfClient.Views" | ||
> | ||
<Grid> | ||
<TextBlock x:Name="textBlock" | ||
Height="46" Margin="40,10,50,134" TextWrapping="Wrap" Text="AddEdit View" Width="96" TextAlignment="Center"/> | ||
<Button x:Name="btnSubmit" Content="Submit" Margin="51,89,60,77" | ||
Height="24" Width="75" Click="btnSubmit_Click"/> | ||
<Button x:Name="btnCancel" Content="Cancel" Margin="51,127,60,39" | ||
Height="24" Width="75" Click="btnCancel_Click"/> | ||
|
||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace TgimbaWpfClient.Views | ||
{ | ||
/// <summary> | ||
/// Interaction logic for AddEdit.xaml | ||
/// </summary> | ||
public partial class AddEditView : UserControl | ||
{ | ||
public AddEditView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void btnSubmit_Click(object sender, System.Windows.RoutedEventArgs e) | ||
{ | ||
MainWindow.Instance.SetCurrentPanel(UseControls.BucketList); | ||
} | ||
|
||
private void btnCancel_Click(object sender, System.Windows.RoutedEventArgs e) | ||
{ | ||
MainWindow.Instance.SetCurrentPanel(UseControls.BucketList); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using TgimbaWpfClient; | ||
|
||
namespace TgimbaWpfClient.Views | ||
{ | ||
/// <summary> | ||
/// Interaction logic for LoginView.xaml | ||
/// </summary> | ||
public partial class LoginView : UserControl | ||
{ | ||
public LoginView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void button_Click(object sender, RoutedEventArgs e) | ||
private void btnLogin_Click(object sender, RoutedEventArgs e) | ||
{ | ||
MainWindow.Instance.SetCurrentPanel(UseControls.BucketList); | ||
} | ||
|
||
private void btnRegister_Click(object sender, RoutedEventArgs e) | ||
{ | ||
MainWindow.Instance.SetCurrentPanel(UseControls.Registration); | ||
} | ||
} | ||
} |
Oops, something went wrong.