* AppDelegate.cs:

* packages.config:
* packages.config:
* qController.iOS.csproj:
* qController.Droid.csproj:
* qController.csproj: Update Packages

* App.xaml: Add some static styles

* App.xaml.cs: Trying out Sharpnado Stuff

* QCueGrid.cs: Move QCueGrid Recursive stuff inside class

* QBrowserViewModel.cs: Hook into new ServerFound/Lost Methods

* QCueViewModel.cs: Start work on cue children updating

* QServerViewModel.cs: Hook into WorkspaceAdded/Removed methods

* MenuPage.xaml.cs: Remove Add from side menu

* QBrowserPage.xaml: Further work on front page design

* QBrowserPage.xaml.cs: Add Manually add button to main page

* QWorkspacePage.xaml.cs: Move recursive stuff out of Page code behind
This commit is contained in:
2021-01-08 23:31:55 -06:00
parent 12ec5905f1
commit 9cf241f9c8
16 changed files with 309 additions and 165 deletions
@@ -110,12 +110,6 @@ namespace qController
Command = "scan"
});
items.Add(new MenuPageItem
{
Title = "Add Manually",
Icon = "\uE801",
Command = "add"
});
items.Add(new MenuPageItem
{
Title = "Send Feedback",
Icon = QIcon.MAIL,
+97 -81
View File
@@ -4,6 +4,7 @@
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:materialFrame="clr-namespace:Sharpnado.MaterialFrame;assembly=Sharpnado.MaterialFrame"
xmlns:qui="clr-namespace:qController.UI"
mc:Ignorable="d"
x:Class="qController.Pages.QBrowserPage"
@@ -37,101 +38,116 @@
<!--Beginning of new style of "server" view-->
<Frame BackgroundColor="{DynamicResource PageBackgroundColor}"
CornerRadius="0"
HasShadow="False"
Margin="0"
Padding="0"
Grid.Row="3">
<!--Need to try and remove the group spacing caused by ios:GroupHeaderStyle-->
<ListView x:Name="serverListView"
ios:ListView.GroupHeaderStyle="Grouped"
GroupDisplayBinding="{Binding name}"
IsGroupingEnabled="True"
d:IsGroupingEnabled="False"
BackgroundColor="Transparent"
SeparatorVisibility="None"
ItemsSource="{Binding ServersGrouped}"
Margin="0">
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell>
<Frame BackgroundColor="{DynamicResource ServerCellBackgroundColor}"
Margin="0,0,0,0"
Padding="10,0,10,0"
CornerRadius="0">
<Grid BackgroundColor="Transparent" VerticalOptions="FillAndExpand"
RowSpacing="0"
ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackLayout Spacing="0" BackgroundColor="Transparent">
<Label Margin="0,10,0,10"
Padding="0"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
FontSize="Header"
Text="Discovered QLab Instances" />
<!--Need to try and remove the group spacing caused by ios:GroupHeaderStyle-->
<ListView x:Name="serverListView"
ios:ListView.GroupHeaderStyle="Grouped"
GroupDisplayBinding="{Binding name}"
IsGroupingEnabled="True"
d:IsGroupingEnabled="False"
BackgroundColor="Transparent"
SeparatorVisibility="None"
ItemsSource="{Binding ServersGrouped}"
Margin="0">
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell>
<Frame BackgroundColor="{DynamicResource ServerCellBackgroundColor}"
Margin="0,0,0,0"
Padding="10,0,10,0"
CornerRadius="0">
<Grid BackgroundColor="Transparent" VerticalOptions="FillAndExpand"
RowSpacing="0"
ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0"
Text="{Binding GroupName}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Start"
StyleClass="PrimaryText"/>
<Label Grid.Column="1"
Text="{Binding version}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="End"
StyleClass="PrimaryText"/>
</Grid>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame BackgroundColor="{DynamicResource WorkspaceCellBackgroundColor}"
BorderColor="Black"
Margin="5,0,5,0"
Padding="10,0,10,0"
CornerRadius="0"
HasShadow="False">
<Grid Margin="0"
BackgroundColor="Transparent"
RowSpacing="0"
ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}"
<Label Grid.Column="0"
Text="{Binding GroupName}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Start"
StyleClass="PrimaryText"/>
<Label Grid.Column="1" Text="&#xf1184;"
FontFamily="{StaticResource MaterialFontFamily}"
FontSize="Large"
IsVisible="{Binding HasPasscode}"
<Label Grid.Column="1"
Text="{Binding version}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="End"
StyleClass="PrimaryText"/>
</Grid>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame BackgroundColor="{DynamicResource WorkspaceCellBackgroundColor}"
BorderColor="Black"
Margin="5,0,5,0"
Padding="10,0,10,0"
CornerRadius="0"
HasShadow="False">
<Grid Margin="0"
BackgroundColor="Transparent"
RowSpacing="0"
ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Start"
StyleClass="PrimaryText"/>
<Label Grid.Column="1" Text="&#xf1184;"
FontFamily="{StaticResource MaterialFontFamily}"
FontSize="Large"
IsVisible="{Binding HasPasscode}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
HorizontalTextAlignment="End"
StyleClass="PrimaryText"/>
</Grid>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Button Text="Manually Add..."
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"
Clicked="AddInstance"
BackgroundColor="White"
StyleClass="PrimaryButton"/>
</StackLayout>
</Frame>
<qui:QNavBar x:Name="qNavBar"
@@ -84,11 +84,7 @@ namespace qController.Pages
private void OnMenuItemSelected(object source, MenuEventArgs args)
{
if (args.Command == "add")
{
AddWorkspace();
}
else if (args.Command == "feedback")
if (args.Command == "feedback")
{
Launcher.OpenAsync(new Uri("mailto:feedback@jwetzell.com?subject=qController%20feedback"));
}
@@ -97,6 +93,11 @@ namespace qController.Pages
UserDialogs.Instance.Confirm(new DonatePrompt());
}
}
private void AddInstance(object sender, EventArgs args)
{
AddWorkspace();
}
}
@@ -95,6 +95,7 @@ namespace qController
if (cueGridDict.ContainsKey(args.cueID))
{
var cueGrid = cueGridDict[args.cueID]; //element to scroll to
//TODO: FIX THIS
cueListScrollView.ScrollToAsync(cueGrid, ScrollToPosition.Center, true);
}
}
@@ -112,7 +113,7 @@ namespace qController
{
if(aCue.cues.Count > 0)
{
QCueGrid cueGrid = cueToGrid(aCue);
QCueGrid cueGrid = new QCueGrid(aCue);
cueGridDict.Add(aCue.uid, cueGrid);
@@ -141,25 +142,6 @@ namespace qController
}
QCueGrid cueToGrid(QCue cue)
{
QCueGrid cueGrid = new QCueGrid(cue);
if (cue.cues.Count > 0)
{
foreach (var aCue in cue.cues)
{
cueGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
var aCueGrid = cueToGrid(aCue);
cueGridDict.Add(aCue.uid, aCueGrid);
aCueGrid.Margin = new Thickness(0, 0, 0, 0);
cueGrid.Children.Add(aCueGrid, 0, aCue.sortIndex + 1);
Grid.SetColumnSpan(aCueGrid,cueGrid.ColumnDefinitions.Count);
}
}
return cueGrid;
}
void Back()
{