mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-20 06:29:13 +00:00
* qfont.ttf:
* qfont.ttf: Icons * App.xaml.cs: Set Font String System Wide * RootPage.xaml.cs: * QGrid.cs: * QCueListView.cs: * qConnectionPage.xaml.cs: * IPHelper.cs: * QInstanceCell.cs: Switch to using Icon Font * QSelectedCueCell.cs: Switch to Type Icon instead of just name * QClient.cs: Create and dispose of sender for every sent message * QCue.cs: Add Icon Code method * ControlPage.xaml: Add hamburger menu * ControlPage.xaml.cs: Menu for Workspace listing/ cue selection * MenuPage.xaml.cs: Function to change menu items back for home page
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
public class QCueListView : Frame
|
||||
{
|
||||
ListView listView;
|
||||
public QCueListView()
|
||||
{
|
||||
Padding = new Thickness(5);
|
||||
CornerRadius = 20;
|
||||
BackgroundColor = Color.FromHex("D8D8D8");
|
||||
Grid mainG = new Grid
|
||||
{
|
||||
Padding = new Thickness(0),
|
||||
RowDefinitions =
|
||||
{
|
||||
new RowDefinition{Height = GridLength.Star}
|
||||
},
|
||||
ColumnDefinitions =
|
||||
{
|
||||
new ColumnDefinition{Width = new GridLength(1,GridUnitType.Star)}
|
||||
}
|
||||
};
|
||||
listView = new ListView();
|
||||
mainG.Children.Add(listView, 0, 0);
|
||||
Margin = new Thickness(10);
|
||||
Content = mainG;
|
||||
}
|
||||
|
||||
public void UpdateWithWorkspace(QWorkSpace qWorkspace)
|
||||
{
|
||||
List<string> cueLists = new List<string>();
|
||||
foreach( var cueList in qWorkspace.data )
|
||||
{
|
||||
cueLists.Add(cueList.listName);
|
||||
foreach(var cue in cueList.cues)
|
||||
{
|
||||
if(cue.number == "")
|
||||
cueLists.Add("\t" + cue.listName);
|
||||
else
|
||||
cueLists.Add("\t" + cue.number + " - " + cue.listName);
|
||||
}
|
||||
}
|
||||
listView.ItemsSource = cueLists.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,6 @@ namespace qController
|
||||
|
||||
Label nameLabel = new Label();
|
||||
Label addressLabel = new Label();
|
||||
Image connectButton = new Image();
|
||||
Image deleteButton = new Image();
|
||||
|
||||
Label connectLabel = new Label();
|
||||
Label deleteLabel = new Label();
|
||||
@@ -21,12 +19,10 @@ namespace qController
|
||||
var deleteTapGesture = new TapGestureRecognizer();
|
||||
|
||||
connectTapGesture.Tapped += Connect;
|
||||
connectButton.GestureRecognizers.Add(connectTapGesture);
|
||||
connectLabel.GestureRecognizers.Add(connectTapGesture);
|
||||
|
||||
|
||||
deleteTapGesture.Tapped += Delete;
|
||||
deleteButton.GestureRecognizers.Add(deleteTapGesture);
|
||||
deleteLabel.GestureRecognizers.Add(deleteTapGesture);
|
||||
|
||||
InitItems();
|
||||
@@ -79,15 +75,6 @@ namespace qController
|
||||
nameLabel.FontAttributes = FontAttributes.Bold;
|
||||
nameLabel.FontSize = 20;
|
||||
|
||||
connectButton.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
||||
connectButton.VerticalOptions = LayoutOptions.CenterAndExpand;
|
||||
connectButton.Source = "connect.png";
|
||||
|
||||
|
||||
deleteButton.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
||||
deleteButton.VerticalOptions = LayoutOptions.CenterAndExpand;
|
||||
deleteButton.Source = "delete.png";
|
||||
|
||||
addressLabel.HorizontalTextAlignment = TextAlignment.Center;
|
||||
addressLabel.VerticalTextAlignment = TextAlignment.Start;
|
||||
|
||||
@@ -103,20 +90,8 @@ namespace qController
|
||||
deleteLabel.FontSize = 40;
|
||||
deleteLabel.TextColor = Color.Red;
|
||||
|
||||
string qfont = "";
|
||||
|
||||
switch (Device.RuntimePlatform)
|
||||
{
|
||||
case Device.iOS:
|
||||
qfont = "qfont";
|
||||
break;
|
||||
case Device.Android:
|
||||
qfont = "qfont.ttf#qfont";
|
||||
break;
|
||||
|
||||
}
|
||||
connectLabel.FontFamily = qfont;
|
||||
deleteLabel.FontFamily = qfont;
|
||||
connectLabel.FontFamily = App.QFont;
|
||||
deleteLabel.FontFamily = App.QFont;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +105,7 @@ namespace qController
|
||||
|
||||
void Connect(object sender, EventArgs e)
|
||||
{
|
||||
App.NavigationPage.Navigation.PushModalAsync(new NavigationPage(new ControlPage(nameLabel.Text,addressLabel.Text)));
|
||||
App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text));
|
||||
|
||||
Console.WriteLine("Connect To " + nameLabel.Text + " Pressed");
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace qController
|
||||
Label number;
|
||||
Label type;
|
||||
Label notes;
|
||||
|
||||
public QSelectedCueCell()
|
||||
{
|
||||
Padding = new Thickness(5);
|
||||
@@ -66,23 +65,29 @@ namespace qController
|
||||
}
|
||||
};
|
||||
|
||||
number = new Label { Text = "N/A"};
|
||||
number.FontAttributes = FontAttributes.Bold;
|
||||
number.FontSize = 30;
|
||||
number.Margin = new Thickness(5);
|
||||
number = new Label {
|
||||
Text = "N/A",
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
FontSize = 30,
|
||||
Margin = new Thickness(5)
|
||||
};
|
||||
|
||||
name = new Label {
|
||||
Text = "N/A",
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
FontSize = 20,
|
||||
Margin = new Thickness(0)
|
||||
};
|
||||
|
||||
name = new Label { Text = "N/A" };
|
||||
name.FontAttributes = FontAttributes.Bold;
|
||||
name.HorizontalTextAlignment = TextAlignment.Center;
|
||||
name.FontSize = 20;
|
||||
name.Margin = new Thickness(0);
|
||||
|
||||
type = new Label { Text = "N/A" };
|
||||
type.FontAttributes = FontAttributes.Bold;
|
||||
type.VerticalTextAlignment = TextAlignment.Center;
|
||||
type.HorizontalTextAlignment = TextAlignment.End;
|
||||
type.Margin = new Thickness(5);
|
||||
type = new Label {
|
||||
Text = "",
|
||||
FontFamily = App.QFont,
|
||||
VerticalTextAlignment = TextAlignment.Center,
|
||||
HorizontalTextAlignment = TextAlignment.End,
|
||||
Margin = new Thickness(5),
|
||||
FontSize = 27
|
||||
};
|
||||
|
||||
notes = new Label { Text = "Viewing Notes Currently Unavailable" };
|
||||
notes.HorizontalTextAlignment = TextAlignment.Center;
|
||||
@@ -112,7 +117,7 @@ namespace qController
|
||||
{
|
||||
name.Text = cue.name;
|
||||
number.Text = cue.number;
|
||||
type.Text = cue.type;
|
||||
type.Text = cue.getIconString();
|
||||
notes.Text = cue.notes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user