mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-22 07:29:13 +00:00
Add Cue type/notes to selectedCueGrid
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
//NEEDS migrated to QSelectedCueGrid
|
||||||
|
using System;
|
||||||
using Acr.UserDialogs;
|
using Acr.UserDialogs;
|
||||||
using qController.QItems;
|
using qController.QItems;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
using Xamarin.Forms;
|
||||||
|
|
||||||
|
namespace qController.UI
|
||||||
|
{
|
||||||
|
public class QSelectedCueGrid : Grid
|
||||||
|
{
|
||||||
|
public QSelectedCueGrid()
|
||||||
|
{
|
||||||
|
RowSpacing = 0;
|
||||||
|
ColumnSpacing = 0;
|
||||||
|
BackgroundColor = Color.FromHex("#D8D8D8");
|
||||||
|
|
||||||
|
RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||||
|
RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||||
|
RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||||
|
|
||||||
|
ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
|
||||||
|
ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
|
||||||
|
ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
|
||||||
|
ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
|
||||||
|
ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
|
||||||
|
|
||||||
|
Frame border = new Frame
|
||||||
|
{
|
||||||
|
BorderColor = Color.Black,
|
||||||
|
BackgroundColor = Color.Transparent
|
||||||
|
};
|
||||||
|
|
||||||
|
Children.Add(border);
|
||||||
|
|
||||||
|
SetRowSpan(border, 3);
|
||||||
|
SetColumnSpan(border, 5);
|
||||||
|
|
||||||
|
Label number = new Label
|
||||||
|
{
|
||||||
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
HorizontalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
HorizontalTextAlignment = TextAlignment.Center,
|
||||||
|
Margin = 0,
|
||||||
|
Padding = 0,
|
||||||
|
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||||
|
};
|
||||||
|
number.SetBinding(Label.TextProperty, "number", BindingMode.OneWay);
|
||||||
|
Children.Add(number,0,0);
|
||||||
|
|
||||||
|
Label type = new Label
|
||||||
|
{
|
||||||
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
HorizontalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
|
HorizontalTextAlignment = TextAlignment.Center,
|
||||||
|
Margin = 0,
|
||||||
|
Padding = 0,
|
||||||
|
FontSize = App.HeightUnit * 4,
|
||||||
|
FontFamily = App.QFont
|
||||||
|
};
|
||||||
|
type.SetBinding(Label.TextProperty, "type", BindingMode.OneWay);
|
||||||
|
Children.Add(type, 4, 0);
|
||||||
|
|
||||||
|
|
||||||
|
Label name = new Label
|
||||||
|
{
|
||||||
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
HorizontalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label))
|
||||||
|
};
|
||||||
|
name.SetBinding(Label.TextProperty, "name", BindingMode.OneWay);
|
||||||
|
Children.Add(name, 0, 1);
|
||||||
|
SetColumnSpan(name, 5);
|
||||||
|
|
||||||
|
|
||||||
|
Label notes = new Label
|
||||||
|
{
|
||||||
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
HorizontalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||||
|
};
|
||||||
|
notes.SetBinding(Label.TextProperty, "notes", BindingMode.OneWay);
|
||||||
|
Children.Add(notes, 0, 2);
|
||||||
|
SetColumnSpan(notes, 5);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
|
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:qui="clr-namespace:qController.UI"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:Class="qController.WorkspacePage">
|
x:Class="qController.WorkspacePage">
|
||||||
<Grid RowSpacing="0">
|
<Grid RowSpacing="0">
|
||||||
@@ -12,10 +13,11 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
<qui:QSelectedCueGrid x:Name="selectedCueGrid"
|
||||||
|
Grid.Row="0"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Grid x:Name="selectedCueGrid"
|
<!--<Grid x:Name="selectedCueGrid2"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
RowSpacing="0"
|
RowSpacing="0"
|
||||||
BackgroundColor="#D8D8D8">
|
BackgroundColor="#D8D8D8">
|
||||||
@@ -34,7 +36,6 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Frame Grid.RowSpan="3" Grid.ColumnSpan="5" BorderColor="Black" BackgroundColor="Transparent"/>
|
<Frame Grid.RowSpan="3" Grid.ColumnSpan="5" BorderColor="Black" BackgroundColor="Transparent"/>
|
||||||
<ActivityIndicator x:Name="workspaceLoadingIndicator" Grid.Row="1" HeightRequest="20"/>
|
|
||||||
|
|
||||||
<Label Grid.Row ="0"
|
<Label Grid.Row ="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
VerticalOptions="CenterAndExpand"
|
VerticalOptions="CenterAndExpand"
|
||||||
HorizontalOptions="CenterAndExpand"
|
HorizontalOptions="CenterAndExpand"
|
||||||
FontSize="Large"/>
|
FontSize="Large"/>
|
||||||
</Grid>
|
</Grid>-->
|
||||||
|
|
||||||
<ScrollView x:Name="cueListScrollView"
|
<ScrollView x:Name="cueListScrollView"
|
||||||
Grid.Row="1">
|
Grid.Row="1">
|
||||||
|
|||||||
@@ -61,8 +61,9 @@ namespace qController
|
|||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
selectedCueGrid.BindingContext = new QCueViewModel(connectedWorkspace.cueWithID(args.cueID), false);
|
QCue selectedCue = connectedWorkspace.cueWithID(args.cueID);
|
||||||
|
connectedWorkspace.fetchDefaultPropertiesForCue(selectedCue);
|
||||||
|
selectedCueGrid.BindingContext = new QCueViewModel(selectedCue, false);
|
||||||
if (cueGridDict.ContainsKey(args.cueID))
|
if (cueGridDict.ContainsKey(args.cueID))
|
||||||
{
|
{
|
||||||
var cueGrid = cueGridDict[args.cueID]; //element to scroll to
|
var cueGrid = cueGridDict[args.cueID]; //element to scroll to
|
||||||
|
|||||||
@@ -27,11 +27,18 @@ namespace qController.ViewModels
|
|||||||
{
|
{
|
||||||
foreach (var property in args.properties)
|
foreach (var property in args.properties)
|
||||||
{
|
{
|
||||||
Log.Debug($"[cueviewmodel] property <{property}> has been updated.");
|
|
||||||
if (property.Equals(QOSCKey.Name))
|
if (property.Equals(QOSCKey.Name))
|
||||||
{
|
{
|
||||||
OnPropertyChanged("name");
|
OnPropertyChanged("name");
|
||||||
}
|
}
|
||||||
|
else if (property.Equals(QOSCKey.Number))
|
||||||
|
{
|
||||||
|
OnPropertyChanged("number");
|
||||||
|
}
|
||||||
|
else if (property.Equals(QOSCKey.Notes))
|
||||||
|
{
|
||||||
|
OnPropertyChanged("notes");
|
||||||
|
}
|
||||||
else if (property.Equals(QOSCKey.ColorName))
|
else if (property.Equals(QOSCKey.ColorName))
|
||||||
{
|
{
|
||||||
OnPropertyChanged("color");
|
OnPropertyChanged("color");
|
||||||
@@ -53,7 +60,7 @@ namespace qController.ViewModels
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return cue.displayName;
|
return cue.listName;
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -62,6 +69,14 @@ namespace qController.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string type
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return QIcon.GetIconFromType(cue.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string number
|
public string number
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -75,6 +90,19 @@ namespace qController.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string notes
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return cue.notes;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
cue.notes = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Color color
|
public Color color
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
<Folder Include="Classes\Settings\" />
|
<Folder Include="Classes\Settings\" />
|
||||||
<Folder Include="Classes\Dialogs\" />
|
<Folder Include="Classes\Dialogs\" />
|
||||||
<Folder Include="Classes\Buttons\" />
|
<Folder Include="Classes\Buttons\" />
|
||||||
|
<Folder Include="Classes\UI\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Remove="Pages\RootPageMaster.xaml" />
|
<EmbeddedResource Remove="Pages\RootPageMaster.xaml" />
|
||||||
|
|||||||
Reference in New Issue
Block a user