* QControlsBlock.cs: Make Background Transparent

* QSelectedCueCell.cs: Add edit abilities for name and number

* ControlPage.xaml:
* ControlPage.xaml.cs: Begin switch to AbsoluteLayout
This commit is contained in:
2019-07-15 16:37:23 -05:00
parent a39c1d43ff
commit 071ce36821
4 changed files with 123 additions and 47 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.ControlPage">
<ContentPage.Content>
<StackLayout x:Name="sLayout">
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand">
<AbsoluteLayout x:Name="sLayout">
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand" AbsoluteLayout.LayoutBounds="0,0,1,.09" AbsoluteLayout.LayoutFlags="All">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
@@ -13,6 +13,6 @@
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25"/>
<Label x:Name = "instanceName" HorizontalTextAlignment="Center" HorizontalOptions = "CenterAndExpand" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="1"/>
</Grid>
</StackLayout>
</AbsoluteLayout>
</ContentPage.Content>
</ContentPage>
+36 -10
View File
@@ -99,15 +99,18 @@ namespace qController
qCell = new QSelectedCueCell();
qCell.SelectedCueEdited += OnSelectedCueEdited;
AbsoluteLayout.SetLayoutBounds(qCell, new Rectangle(0, 0.13, 1, 0.30));
AbsoluteLayout.SetLayoutFlags(qCell, AbsoluteLayoutFlags.All);
sLayout.Children.Add(qCell);
}
private void OnSelectedCueEdited(object source, CueEditArgs args)
{
string address = "/workspace/" + qController.qWorkspace.workspace_id + "/cue_id/" + args.CueID + "/" + args.Property
string address = "/workspace/" + qController.qWorkspace.workspace_id + "/cue_id/" + args.CueID + "/" + args.Property;
qController.qClient.sendArgsUDP(address, args.NewValue);
}
void FinishUI()
@@ -130,8 +133,22 @@ namespace qController
};
qControlsBlock = new QControlsBlock(qController);
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.53, 1, 0.25));
AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All);
sLayout.Children.Add(qControlsBlock);
Button b = new Button{
Text = "L",
TextColor = Color.Black,
HeightRequest = App.HeightUnit * 10,
WidthRequest = App.HeightUnit * 10,
CornerRadius = (int)(App.HeightUnit * 5),
BackgroundColor = Color.Blue
};
AbsoluteLayout.SetLayoutBounds(b, new Rectangle(0.99, 0.99, App.HeightUnit * 10, App.HeightUnit * 10));
AbsoluteLayout.SetLayoutFlags(b, AbsoluteLayoutFlags.PositionProportional);
//sLayout.Children.Add(b);
}
void ShowMenu(object sender, EventArgs e)
@@ -143,7 +160,10 @@ namespace qController
void Back()
{
qController.Disconnect();
App.rootPage.MenuPage.ChangeToHome();
Device.BeginInvokeOnMainThread(() =>
{
App.rootPage.MenuPage.ChangeToHome();
});
App.NavigationPage.Navigation.PopAsync();
}
@@ -156,7 +176,10 @@ namespace qController
if (qController.qWorkspace.IsPopulated)
{
App.rootPage.MenuPage.ChangeToWorkspace(e.UpdatedWorkspace);
Device.BeginInvokeOnMainThread(() =>
{
App.rootPage.MenuPage.ChangeToWorkspace(e.UpdatedWorkspace);
});
if (qCell.activeCue == null)
{
Device.BeginInvokeOnMainThread(() => {
@@ -181,20 +204,23 @@ namespace qController
QCue cue = qController.qWorkspace.GetCue(qController.playbackPosition);
if(cue != null)
{
Device.BeginInvokeOnMainThread(() => {
/*Device.BeginInvokeOnMainThread(() => {
if (cue.type.Equals("Audio"))
sLayout.Children.Add(qSelectedCueOptions);
else
sLayout.Children.Remove(qSelectedCueOptions);
qCell.UpdateSelectedCue(cue);
});
});*/
}
}
public void OnCueUpdateReceived(object sender, CueEventArgs args)
{
qController.qWorkspace.UpdateCue(args.Cue);
App.rootPage.MenuPage.ChangeCueName(args.Cue.uniqueID, args.Cue.listName);
Device.BeginInvokeOnMainThread(() =>
{
App.rootPage.MenuPage.ChangeCueName(args.Cue.uniqueID, args.Cue.listName);
});
if (qController.playbackPosition == null)
{
qController.playbackPosition = args.Cue.uniqueID;
@@ -205,10 +231,10 @@ namespace qController
Device.BeginInvokeOnMainThread(() =>
{
Console.WriteLine("Refreshing Currently Displayed Cue");
if (args.Cue.levels != null)
/*if (args.Cue.levels != null)
sLayout.Children.Add(qSelectedCueOptions);
else
sLayout.Children.Remove(qSelectedCueOptions);
sLayout.Children.Remove(qSelectedCueOptions);*/
qCell.UpdateSelectedCue(args.Cue);
//if (!mainG.IsVisible)
// mainG.IsVisible = true;