mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-17 21:24:20 +00:00
* qfont.ttf:
* qfont.ttf: Add Dollar and Mail Icon * QButton.cs: Increase Default Font Size * QControlsBlock.cs: * QSelectedCueCell.cs: Cleanup * QInstanceCell.cs: Cleanup Properties * QLevelsCell.cs: Rename QSelectedCueOptionsCell * QIcon.cs: Add Dollar and Mail Icons * ControlPage.xaml: * qConnectionPage.xaml: Move some properties to XAML * ControlPage.xaml.cs: Audio level adjustments in popup "window" * MenuPage.xaml.cs: * qConnectionPage.xaml.cs: Add Support and Feedback menu items
This commit is contained in:
Regular → Executable
BIN
Binary file not shown.
Regular → Executable
BIN
Binary file not shown.
@@ -15,7 +15,7 @@ namespace qController
|
|||||||
qCommand = command;
|
qCommand = command;
|
||||||
Text = qCommand.text;
|
Text = qCommand.text;
|
||||||
TextColor = Color.Black;
|
TextColor = Color.Black;
|
||||||
|
FontSize = App.HeightUnit * 2.5;
|
||||||
if (qCommand.osc.Contains("go"))
|
if (qCommand.osc.Contains("go"))
|
||||||
{
|
{
|
||||||
BackgroundColor = Color.SeaGreen;
|
BackgroundColor = Color.SeaGreen;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace qController
|
|||||||
|
|
||||||
BackgroundColor = Color.Transparent;
|
BackgroundColor = Color.Transparent;
|
||||||
//highlight Button Grid
|
//highlight Button Grid
|
||||||
BackgroundColor = Color.FromHex("FF0000");
|
//BackgroundColor = Color.FromHex("FF0000");
|
||||||
|
|
||||||
List<QCommand> commands = new List<QCommand>();
|
List<QCommand> commands = new List<QCommand>();
|
||||||
commands.Add(QCommands.PREVIOUS);
|
commands.Add(QCommands.PREVIOUS);
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ namespace qController
|
|||||||
Frame f = new Frame
|
Frame f = new Frame
|
||||||
{
|
{
|
||||||
Content = mainG,
|
Content = mainG,
|
||||||
OutlineColor = Color.Black,
|
BorderColor = Color.Black,
|
||||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||||
Padding = 30,
|
Padding = 30,
|
||||||
Margin = new Thickness(10,10,10,10),
|
Margin = new Thickness(10,10,10,10),
|
||||||
CornerRadius=20,
|
CornerRadius=20,
|
||||||
|
BackgroundColor = Color.FromHex("D8D8D8")
|
||||||
};
|
};
|
||||||
f.BackgroundColor = Color.FromHex("D8D8D8");
|
|
||||||
View = f;
|
View = f;
|
||||||
|
|
||||||
void InitItems()
|
void InitItems()
|
||||||
@@ -106,9 +106,7 @@ namespace qController
|
|||||||
void Connect(object sender, EventArgs e)
|
void Connect(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text));
|
App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text));
|
||||||
|
|
||||||
Console.WriteLine("Connect To " + nameLabel.Text + " Pressed");
|
Console.WriteLine("Connect To " + nameLabel.Text + " Pressed");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-16
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QSelectedCueOptionsCell : Frame
|
public class QLevelsCell : Frame
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<double> levels;
|
public List<double> levels;
|
||||||
@@ -16,14 +15,16 @@ namespace qController
|
|||||||
public Label mainLabel;
|
public Label mainLabel;
|
||||||
public Label rightLabel;
|
public Label rightLabel;
|
||||||
public Label leftLabel;
|
public Label leftLabel;
|
||||||
public QSelectedCueOptionsCell()
|
public QLevelsCell()
|
||||||
{
|
{
|
||||||
Padding = new Thickness(5);
|
Padding = new Thickness(5);
|
||||||
CornerRadius = 20;
|
CornerRadius = 20;
|
||||||
BackgroundColor = Color.Transparent;
|
BorderColor = Color.Black;
|
||||||
|
HasShadow = true;
|
||||||
|
BackgroundColor = Color.FromHex("D8D8D8");
|
||||||
|
IsVisible = false;
|
||||||
//highlight for testing
|
//highlight for testing
|
||||||
BackgroundColor = Color.Red;
|
//BackgroundColor = Color.Red;
|
||||||
|
|
||||||
|
|
||||||
Grid mainG = new Grid
|
Grid mainG = new Grid
|
||||||
@@ -63,14 +64,9 @@ namespace qController
|
|||||||
Maximum = 12
|
Maximum = 12
|
||||||
};
|
};
|
||||||
|
|
||||||
mainG.Children.Add(mainSlider, 1, 0);
|
|
||||||
mainG.Children.Add(leftSlider, 1, 1);
|
mainLabel = new Label
|
||||||
mainG.Children.Add(rightSlider, 1, 2);
|
{
|
||||||
|
|
||||||
Grid.SetColumnSpan(mainSlider, 4);
|
|
||||||
Grid.SetColumnSpan(leftSlider, 4);
|
|
||||||
Grid.SetColumnSpan(rightSlider, 4);
|
|
||||||
mainLabel = new Label {
|
|
||||||
Text = "MAIN:",
|
Text = "MAIN:",
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
HorizontalTextAlignment = TextAlignment.Center
|
HorizontalTextAlignment = TextAlignment.Center
|
||||||
@@ -78,18 +74,26 @@ namespace qController
|
|||||||
|
|
||||||
leftLabel = new Label
|
leftLabel = new Label
|
||||||
{
|
{
|
||||||
Text = "LEFT:",
|
Text = "0:",
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
HorizontalTextAlignment = TextAlignment.Center
|
HorizontalTextAlignment = TextAlignment.Center
|
||||||
};
|
};
|
||||||
|
|
||||||
rightLabel = new Label
|
rightLabel = new Label
|
||||||
{
|
{
|
||||||
Text = "RIGHT:",
|
Text = "1:",
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
HorizontalTextAlignment = TextAlignment.Center
|
HorizontalTextAlignment = TextAlignment.Center
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mainG.Children.Add(mainSlider, 1, 0);
|
||||||
|
mainG.Children.Add(leftSlider, 1, 1);
|
||||||
|
mainG.Children.Add(rightSlider, 1, 2);
|
||||||
|
|
||||||
|
Grid.SetColumnSpan(mainSlider, 4);
|
||||||
|
Grid.SetColumnSpan(leftSlider, 4);
|
||||||
|
Grid.SetColumnSpan(rightSlider, 4);
|
||||||
|
|
||||||
mainG.Children.Add(mainLabel, 0, 0);
|
mainG.Children.Add(mainLabel, 0, 0);
|
||||||
mainG.Children.Add(leftLabel, 0, 1);
|
mainG.Children.Add(leftLabel, 0, 1);
|
||||||
mainG.Children.Add(rightLabel, 0, 2);
|
mainG.Children.Add(rightLabel, 0, 2);
|
||||||
@@ -116,7 +116,6 @@ namespace qController
|
|||||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||||
HorizontalOptions = LayoutOptions.FillAndExpand
|
HorizontalOptions = LayoutOptions.FillAndExpand
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//BACKGROUND COLORS FOR TESTING ONLY
|
//BACKGROUND COLORS FOR TESTING ONLY
|
||||||
//notes.BackgroundColor = Color.Red;
|
//notes.BackgroundColor = Color.Red;
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ namespace qController
|
|||||||
|
|
||||||
public const string COMMENTING_O = "\uF27B";
|
public const string COMMENTING_O = "\uF27B";
|
||||||
|
|
||||||
|
public const string DOLLAR = "\uF155";
|
||||||
|
public const string MAIL = "\uE812";
|
||||||
|
|
||||||
|
|
||||||
public static string GetIconFromType(string type)
|
public static string GetIconFromType(string type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.ControlPage">
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.ControlPage">
|
||||||
<ContentPage.Content>
|
<ContentPage.Content>
|
||||||
<AbsoluteLayout x:Name="sLayout">
|
<AbsoluteLayout x:Name="sLayout">
|
||||||
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand" AbsoluteLayout.LayoutFlags="All">
|
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand" AbsoluteLayout.LayoutBounds="0,0,1,.09" AbsoluteLayout.LayoutFlags="All" BackgroundColor="#71AEFF">
|
||||||
<Grid.AbsoluteLayout.LayoutBounds>
|
|
||||||
<OnPlatform x:TypeArguments="Rectangle" iOS="0,0,1,.09" Android="0,0,1,.08" />
|
|
||||||
</Grid.AbsoluteLayout.LayoutBounds>
|
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@@ -14,10 +10,9 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<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 = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" FontSize="25" Text=""/>
|
||||||
<Label x:Name = "instanceName" HorizontalTextAlignment="Center" HorizontalOptions = "CenterAndExpand" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="1"/>
|
<Label x:Name = "instanceName" HorizontalTextAlignment="Center" HorizontalOptions = "CenterAndExpand" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="1"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</AbsoluteLayout>
|
</AbsoluteLayout>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace qController
|
|||||||
{
|
{
|
||||||
QController qController;
|
QController qController;
|
||||||
QSelectedCueCell qCell;
|
QSelectedCueCell qCell;
|
||||||
QSelectedCueOptionsCell qSelectedCueOptions;
|
QLevelsCell qLevelsCell;
|
||||||
ShadowButton showLevelsButton;
|
ShadowButton showLevelsButton;
|
||||||
Grid mainG;
|
Grid mainG;
|
||||||
QControlsBlock qControlsBlock;
|
QControlsBlock qControlsBlock;
|
||||||
@@ -74,19 +74,13 @@ namespace qController
|
|||||||
App.rootPage.MenuPage.ChangeToControl();
|
App.rootPage.MenuPage.ChangeToControl();
|
||||||
NavigationPage.SetHasNavigationBar(this, false);
|
NavigationPage.SetHasNavigationBar(this, false);
|
||||||
|
|
||||||
topBar.BackgroundColor = Color.FromHex("71AEFF");
|
|
||||||
|
|
||||||
|
|
||||||
BackgroundColor = Color.FromHex("4A4A4A");
|
BackgroundColor = Color.FromHex("4A4A4A");
|
||||||
menuButton.Text = QIcon.MENU;
|
|
||||||
|
|
||||||
qCell = new QSelectedCueCell();
|
qCell = new QSelectedCueCell();
|
||||||
|
|
||||||
|
|
||||||
qCell.SelectedCueEdited += OnSelectedCueEdited;
|
qCell.SelectedCueEdited += OnSelectedCueEdited;
|
||||||
|
|
||||||
AbsoluteLayout.SetLayoutFlags(qCell, AbsoluteLayoutFlags.All);
|
AbsoluteLayout.SetLayoutFlags(qCell, AbsoluteLayoutFlags.All);
|
||||||
|
|
||||||
|
|
||||||
switch (Device.RuntimePlatform)
|
switch (Device.RuntimePlatform)
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
case Device.iOS:
|
||||||
@@ -107,8 +101,6 @@ namespace qController
|
|||||||
menuButtonGesture.Tapped += ShowMenu;
|
menuButtonGesture.Tapped += ShowMenu;
|
||||||
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sLayout.Children.Add(qCell);
|
sLayout.Children.Add(qCell);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,80 +109,67 @@ namespace qController
|
|||||||
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);
|
qController.qClient.sendArgsUDP(address, args.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishUI()
|
void FinishUI()
|
||||||
{
|
{
|
||||||
string workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id;
|
string workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id;
|
||||||
|
|
||||||
qSelectedCueOptions = new QSelectedCueOptionsCell();
|
qLevelsCell = new QLevelsCell();
|
||||||
|
|
||||||
qSelectedCueOptions.mainSlider.ValueChanged += (sender, args) =>
|
qLevelsCell.mainSlider.ValueChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/0", (float)args.NewValue);
|
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/0", (float)args.NewValue);
|
||||||
};
|
};
|
||||||
qSelectedCueOptions.leftSlider.ValueChanged += (sender, args) =>
|
qLevelsCell.leftSlider.ValueChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/1", (float)args.NewValue);
|
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/1", (float)args.NewValue);
|
||||||
};
|
};
|
||||||
qSelectedCueOptions.rightSlider.ValueChanged += (sender, args) =>
|
qLevelsCell.rightSlider.ValueChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qSelectedCueOptions.activeCue + "/sliderLevel/2", (float)args.NewValue);
|
qController.qClient.sendArgs(workspace_prefix + "/cue_id/" + qLevelsCell.activeCue + "/sliderLevel/2", (float)args.NewValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Button showLevelsInnerButton = new Button
|
||||||
qControlsBlock = new QControlsBlock(qController);
|
|
||||||
|
|
||||||
switch (Device.RuntimePlatform)
|
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
|
||||||
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.53, 1, 0.25));
|
|
||||||
AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All);
|
|
||||||
AbsoluteLayout.SetLayoutBounds(qSelectedCueOptions, new Rectangle(0,0.50,1,0.25));
|
|
||||||
AbsoluteLayout.SetLayoutFlags(qSelectedCueOptions, AbsoluteLayoutFlags.All);
|
|
||||||
break;
|
|
||||||
case Device.Android:
|
|
||||||
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.58, 1, 0.25));
|
|
||||||
AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All);
|
|
||||||
AbsoluteLayout.SetLayoutBounds(qSelectedCueOptions, new Rectangle(0,0.70,1,0.25));
|
|
||||||
AbsoluteLayout.SetLayoutFlags(qSelectedCueOptions, AbsoluteLayoutFlags.All);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
sLayout.Children.Add(qControlsBlock);
|
|
||||||
|
|
||||||
sLayout.Children.Add(qSelectedCueOptions);
|
|
||||||
|
|
||||||
|
|
||||||
Button b = new Button{
|
|
||||||
Text = QIcon.SLIDERS,
|
Text = QIcon.SLIDERS,
|
||||||
TextColor = Color.Black,
|
TextColor = Color.Black,
|
||||||
FontFamily = App.QFont,
|
FontFamily = App.QFont,
|
||||||
FontSize = App.HeightUnit * 4,
|
FontSize = App.HeightUnit * 4,
|
||||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||||
HorizontalOptions =LayoutOptions.FillAndExpand,
|
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||||
HeightRequest = App.HeightUnit * 8,
|
HeightRequest = App.HeightUnit * 8,
|
||||||
WidthRequest = App.HeightUnit * 8,
|
WidthRequest = App.HeightUnit * 8,
|
||||||
CornerRadius = (int)(App.HeightUnit * 4),
|
CornerRadius = (int)(App.HeightUnit * 4),
|
||||||
BackgroundColor = Color.LightBlue
|
BackgroundColor = Color.LightBlue
|
||||||
};
|
};
|
||||||
b.Clicked += (s, e) =>
|
showLevelsInnerButton.Clicked += (s, e) =>
|
||||||
{
|
{
|
||||||
qSelectedCueOptions.IsVisible = !qSelectedCueOptions.IsVisible;
|
qLevelsCell.IsVisible = !qLevelsCell.IsVisible;
|
||||||
};
|
};
|
||||||
|
|
||||||
showLevelsButton = new ShadowButton(b);
|
showLevelsButton = new ShadowButton(showLevelsInnerButton);
|
||||||
|
qControlsBlock = new QControlsBlock(qController);
|
||||||
|
|
||||||
|
AbsoluteLayout.SetLayoutFlags(qControlsBlock, AbsoluteLayoutFlags.All);
|
||||||
|
AbsoluteLayout.SetLayoutFlags(qLevelsCell, AbsoluteLayoutFlags.All);
|
||||||
|
AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional);
|
||||||
|
|
||||||
switch (Device.RuntimePlatform)
|
switch (Device.RuntimePlatform)
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
case Device.iOS:
|
||||||
|
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.53, 1, 0.25));
|
||||||
|
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0.9,0.40,0.8,0.25));
|
||||||
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.04, 0.34, App.HeightUnit * 8, App.HeightUnit * 8));
|
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.04, 0.34, App.HeightUnit * 8, App.HeightUnit * 8));
|
||||||
AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional);
|
|
||||||
break;
|
break;
|
||||||
case Device.Android:
|
case Device.Android:
|
||||||
|
AbsoluteLayout.SetLayoutBounds(qControlsBlock, new Rectangle(0, 0.58, 1, 0.25));
|
||||||
|
AbsoluteLayout.SetLayoutBounds(qLevelsCell, new Rectangle(0.9, 0.40, 0.8, 0.25));
|
||||||
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.04, 0.39, App.HeightUnit * 8, App.HeightUnit * 8));
|
AbsoluteLayout.SetLayoutBounds(showLevelsButton, new Rectangle(0.04, 0.39, App.HeightUnit * 8, App.HeightUnit * 8));
|
||||||
AbsoluteLayout.SetLayoutFlags(showLevelsButton, AbsoluteLayoutFlags.PositionProportional);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sLayout.Children.Add(qControlsBlock);
|
||||||
|
sLayout.Children.Add(qLevelsCell);
|
||||||
sLayout.Children.Add(showLevelsButton);
|
sLayout.Children.Add(showLevelsButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +200,7 @@ namespace qController
|
|||||||
Device.BeginInvokeOnMainThread(() =>
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.rootPage.MenuPage.ChangeToWorkspace(e.UpdatedWorkspace);
|
App.rootPage.MenuPage.ChangeToWorkspace(e.UpdatedWorkspace);
|
||||||
});
|
});
|
||||||
if (qCell.activeCue == null)
|
if (qCell.activeCue == null)
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(() => {
|
Device.BeginInvokeOnMainThread(() => {
|
||||||
@@ -278,14 +257,12 @@ namespace qController
|
|||||||
else
|
else
|
||||||
showLevelsButton.IsVisible = false;
|
showLevelsButton.IsVisible = false;
|
||||||
qCell.UpdateSelectedCue(args.Cue);
|
qCell.UpdateSelectedCue(args.Cue);
|
||||||
//if (!mainG.IsVisible)
|
if(qLevelsCell != null)
|
||||||
// mainG.IsVisible = true;
|
|
||||||
if(qSelectedCueOptions != null)
|
|
||||||
{
|
{
|
||||||
qSelectedCueOptions.activeCue = args.Cue.uniqueID;
|
qLevelsCell.activeCue = args.Cue.uniqueID;
|
||||||
if (args.Cue.levels != null)
|
if (args.Cue.levels != null)
|
||||||
{
|
{
|
||||||
qSelectedCueOptions.UpdateLevels(args.Cue.levels[0]);
|
qLevelsCell.UpdateLevels(args.Cue.levels[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,24 +18,8 @@ namespace qController
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
items = new ObservableCollection<MenuPageItem>();
|
items = new ObservableCollection<MenuPageItem>();
|
||||||
|
|
||||||
items.Add(new MenuPageItem
|
ChangeToHome();
|
||||||
{
|
|
||||||
Title = "Scan Network",
|
|
||||||
Icon = "\uE800",
|
|
||||||
Command = "scan"
|
|
||||||
});
|
|
||||||
items.Add(new MenuPageItem
|
|
||||||
{
|
|
||||||
Title = "Add Manually",
|
|
||||||
Icon = "\uE801",
|
|
||||||
Command = "add"
|
|
||||||
});
|
|
||||||
/*items.Add(new MenuPageItem
|
|
||||||
{
|
|
||||||
Title = "Open Link",
|
|
||||||
Icon = "\uF0C9",
|
|
||||||
Command = "open_link"
|
|
||||||
});*/
|
|
||||||
listView = new ListView
|
listView = new ListView
|
||||||
{
|
{
|
||||||
ItemsSource = items,
|
ItemsSource = items,
|
||||||
@@ -90,6 +74,7 @@ namespace qController
|
|||||||
Icon = QIcon.CANCEL,
|
Icon = QIcon.CANCEL,
|
||||||
Command = "disconnect"
|
Command = "disconnect"
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
public void ChangeToWorkspace(QWorkSpace workspace)
|
public void ChangeToWorkspace(QWorkSpace workspace)
|
||||||
{
|
{
|
||||||
@@ -184,6 +169,18 @@ namespace qController
|
|||||||
Title = "Add Manually",
|
Title = "Add Manually",
|
||||||
Icon = "\uE801",
|
Icon = "\uE801",
|
||||||
Command = "add"
|
Command = "add"
|
||||||
|
});
|
||||||
|
items.Add(new MenuPageItem
|
||||||
|
{
|
||||||
|
Title = "Send Feedback",
|
||||||
|
Icon = QIcon.MAIL,
|
||||||
|
Command = "feedback"
|
||||||
|
});
|
||||||
|
items.Add(new MenuPageItem
|
||||||
|
{
|
||||||
|
Title = "Support Project",
|
||||||
|
Icon = QIcon.DOLLAR,
|
||||||
|
Command = "support"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-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" xmlns:local="clr-namespace:qController" x:Class="qController.QConnectionPage">
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:qController" x:Class="qController.QConnectionPage">
|
||||||
<StackLayout x:Name="sLayout">
|
<StackLayout x:Name="sLayout">
|
||||||
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand">
|
<Grid x:Name="topBar" HorizontalOptions="FillAndExpand" BackgroundColor="#71AEFF">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
@@ -10,10 +10,9 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0"/>
|
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" Text=""/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ListView x:Name="lstView" HasUnevenRows = "true" >
|
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A"></ListView>
|
||||||
</ListView>
|
|
||||||
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
@@ -28,48 +28,58 @@ namespace qController
|
|||||||
else if(args.Command == "add")
|
else if(args.Command == "add")
|
||||||
{
|
{
|
||||||
AddWorkspace();
|
AddWorkspace();
|
||||||
}else if(args.Command == "open_link")
|
}
|
||||||
|
else if (args.Command == "feedback")
|
||||||
{
|
{
|
||||||
Device.OpenUri(new Uri("http://www.jwetzell.com"));
|
Console.WriteLine("Give Feedback selected");
|
||||||
|
}
|
||||||
|
else if(args.Command == "support")
|
||||||
|
{
|
||||||
|
UserDialogs.Instance.Confirm(new ConfirmConfig
|
||||||
|
{
|
||||||
|
Title = "Support the Project",
|
||||||
|
Message = "This application will never be a paid app or contain any sort of ads, but if you choose to show your support you may do so by clicking the Donate button below. Thank you!",
|
||||||
|
OkText = "Donate",
|
||||||
|
OnAction = (response) =>
|
||||||
|
{
|
||||||
|
if (response)
|
||||||
|
Device.OpenUri(new Uri("https://linktr.ee/JoelWetzell"));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitGUI()
|
private void InitGUI()
|
||||||
{
|
{
|
||||||
NavigationPage.SetHasNavigationBar(this, false);
|
NavigationPage.SetHasNavigationBar(this, false);
|
||||||
lstView.ItemsSource = QStorage.qInstances;
|
listView.ItemsSource = QStorage.qInstances;
|
||||||
|
|
||||||
lstView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
|
listView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
|
||||||
lstView.SeparatorVisibility = SeparatorVisibility.None;
|
listView.SeparatorVisibility = SeparatorVisibility.None;
|
||||||
lstView.ItemTapped += (object sender, ItemTappedEventArgs e) =>
|
listView.ItemTapped += (object sender, ItemTappedEventArgs e) =>
|
||||||
{
|
{
|
||||||
// don't do anything if we just de-selected the row
|
// don't do anything if we just de-selected the row
|
||||||
if (e.Item == null) return;
|
if (e.Item == null) return;
|
||||||
// do something with e.SelectedItem
|
// do something with e.SelectedItem
|
||||||
((ListView)sender).SelectedItem = null; // de-select the row
|
((ListView)sender).SelectedItem = null; // de-select the row
|
||||||
};
|
};
|
||||||
topBar.BackgroundColor = Color.FromHex("71AEFF");
|
|
||||||
|
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
||||||
|
|
||||||
switch (Device.RuntimePlatform)
|
switch (Device.RuntimePlatform)
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
case Device.iOS:
|
||||||
topBar.HeightRequest = Math.Max(App.Height * .09, 65);
|
topBar.HeightRequest = Math.Max(App.Height * .09, 65);
|
||||||
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
|
||||||
menuButton.FontSize = App.Height * .04;
|
menuButton.FontSize = App.Height * .04;
|
||||||
break;
|
break;
|
||||||
case Device.Android:
|
case Device.Android:
|
||||||
topBar.HeightRequest = App.Height * .08;
|
topBar.HeightRequest = App.Height * .08;
|
||||||
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
|
||||||
menuButton.FontSize = App.Height * .05;
|
menuButton.FontSize = App.Height * .05;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
menuButton.Text = "\uF0C9";
|
|
||||||
|
|
||||||
lstView.BackgroundColor = Color.FromHex("4A4A4A");
|
|
||||||
BackgroundColor = Color.FromHex("4A4A4A");
|
BackgroundColor = Color.FromHex("4A4A4A");
|
||||||
var menuButtonGesture = new TapGestureRecognizer();
|
var menuButtonGesture = new TapGestureRecognizer();
|
||||||
|
|
||||||
menuButtonGesture.Tapped += showMenu;
|
menuButtonGesture.Tapped += showMenu;
|
||||||
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
||||||
|
|
||||||
@@ -109,7 +119,6 @@ namespace qController
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async void Scan(){
|
async void Scan(){
|
||||||
bool workspacesFound = false;
|
bool workspacesFound = false;
|
||||||
App.showToast("Scanning for Instances...");
|
App.showToast("Scanning for Instances...");
|
||||||
@@ -141,14 +150,5 @@ namespace qController
|
|||||||
{
|
{
|
||||||
App.MenuIsPresented = true;
|
App.MenuIsPresented = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showToast(string message)
|
|
||||||
{
|
|
||||||
var toastConfig = new ToastConfig(message);
|
|
||||||
toastConfig.SetDuration(3000);
|
|
||||||
toastConfig.SetPosition(ToastPosition.Bottom);
|
|
||||||
UserDialogs.Instance.Toast(toastConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user