diff --git a/Droid/Assets/qfont.ttf b/Droid/Assets/qfont.ttf old mode 100755 new mode 100644 index 3e00f09..b3ee7ff Binary files a/Droid/Assets/qfont.ttf and b/Droid/Assets/qfont.ttf differ diff --git a/iOS/Resources/qfont.ttf b/iOS/Resources/qfont.ttf old mode 100755 new mode 100644 index 3e00f09..b3ee7ff Binary files a/iOS/Resources/qfont.ttf and b/iOS/Resources/qfont.ttf differ diff --git a/qController.Standard/App.xaml.cs b/qController.Standard/App.xaml.cs index d7dbaa7..60c4673 100644 --- a/qController.Standard/App.xaml.cs +++ b/qController.Standard/App.xaml.cs @@ -7,6 +7,7 @@ namespace qController public static INavigation iNav; public static NavigationPage NavigationPage { get; private set; } public static RootPage rootPage; + public static string QFont; public static bool MenuIsPresented { @@ -26,6 +27,18 @@ namespace qController /*MainPage = new NavigationPage(new QConnectionPage()); iNav = MainPage.Navigation;*/ + + switch (Device.RuntimePlatform) + { + case Device.iOS: + QFont = "qfont"; + break; + case Device.Android: + QFont = "qfont.ttf#qfont"; + break; + + } + var menuPage = new MenuPage(); rootPage = new RootPage(); NavigationPage = new NavigationPage(new QConnectionPage()); diff --git a/qController.Standard/Classes/Cell/QCueListView.cs b/qController.Standard/Classes/Cell/QCueListView.cs deleted file mode 100644 index 239efd2..0000000 --- a/qController.Standard/Classes/Cell/QCueListView.cs +++ /dev/null @@ -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 cueLists = new List(); - 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(); - } - } -} \ No newline at end of file diff --git a/qController.Standard/Classes/Cell/QInstanceCell.cs b/qController.Standard/Classes/Cell/QInstanceCell.cs index 28e6214..dc65b63 100644 --- a/qController.Standard/Classes/Cell/QInstanceCell.cs +++ b/qController.Standard/Classes/Cell/QInstanceCell.cs @@ -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"); diff --git a/qController.Standard/Classes/Cell/QSelectedCueCell.cs b/qController.Standard/Classes/Cell/QSelectedCueCell.cs index 093ab27..6d579b7 100644 --- a/qController.Standard/Classes/Cell/QSelectedCueCell.cs +++ b/qController.Standard/Classes/Cell/QSelectedCueCell.cs @@ -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; } } diff --git a/qController.Standard/Classes/Communication/IPHelper.cs b/qController.Standard/Classes/Communication/IPHelper.cs deleted file mode 100644 index dd1dea2..0000000 --- a/qController.Standard/Classes/Communication/IPHelper.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Net; - -namespace qController -{ - public class IPHelper - { - public IPHelper() - { - } - - public static bool IsValidAddress(string ipString){ - if ((ipString.Split('.').Length - 1) != 3) return false; - IPAddress address; - return IPAddress.TryParse(ipString, out address); - } - } -} diff --git a/qController.Standard/Classes/Communication/QClient.cs b/qController.Standard/Classes/Communication/QClient.cs index 29e5659..598b9f8 100644 --- a/qController.Standard/Classes/Communication/QClient.cs +++ b/qController.Standard/Classes/Communication/QClient.cs @@ -12,12 +12,16 @@ namespace qController public QParser qParser; public QReceiver qReceiver; + string Address; + int Port; public QClient(string address, int port) { + Address = address; + Port = port; qParser = new QParser(); - qReceiver = new QReceiver(port + 1); - tcpSender = new TCPSender(address, port); - udpSender = new UDPSender(address, port); + qReceiver = new QReceiver(Port + 1); + tcpSender = new TCPSender(Address, Port); + udpSender = new UDPSender(Address, Port); tcpSender.MessageReceived += OnMessageReceived; qReceiver.UpdateMessageReceived += OnMessageReceived; @@ -44,11 +48,15 @@ namespace qController } public void sendStringUDP(string address) { + udpSender = new UDPSender(Address,Port); udpSender.Send(new OscMessage(address)); + udpSender.Close(); } public void sendArgsUDP(string address, params object[] args) { + udpSender = new UDPSender(Address, Port); udpSender.Send(new OscMessage(address, args)); + udpSender.Close(); } public void sendAndReceiveString(string address) { diff --git a/qController.Standard/Classes/Cues/QCue.cs b/qController.Standard/Classes/Cues/QCue.cs index d523532..1f09f54 100644 --- a/qController.Standard/Classes/Cues/QCue.cs +++ b/qController.Standard/Classes/Cues/QCue.cs @@ -26,5 +26,64 @@ namespace qController public string displayName { get; set; } public bool isLoaded { get; set; } public string notes { get; set; } + + public string getIconString() + { + switch (type) + { + case "Group": + return "\uF248"; + case "Audio": + return "\uE807"; + case "Mic": + return "\uF130"; + case "Video": + return "\uE805"; + case "Camera": + return "\uE806"; + case "Text": + return "T"; + case "Light": + return "\uF0EB"; + case "Fade": + return "\uF1DE"; + case "Network": + return "\uF192"; + case "MIDI": + return ""; + case "MIDI File": + return "\uE804"; + case "Timecode": + return "\uE808"; + case "Start": + return "\uE809"; + case "Stop": + return "\uE80A"; + case "Pause": + return "\uE80B"; + case "Load": + return "\uE80E"; + case "Reset": + return "\uE80F"; + case "Devamp": + return "\uE80C"; + case "GoTo": + return "\uF178"; + case "Target": + return "\uE80D"; + case "Arm": + return "\uE810"; + case "Disarm": + return ""; + case "Wait": + return "\uF250"; + case "Memo": + return "\uF27B"; + case "Script": + return "\uE811"; + default: + return ""; + } + } } } diff --git a/qController.Standard/Classes/Settings/QGrid.cs b/qController.Standard/Classes/Settings/QGrid.cs deleted file mode 100644 index 7270407..0000000 --- a/qController.Standard/Classes/Settings/QGrid.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -namespace qController -{ - public class QGrid - { - - public QGrid() - { - } - } -} diff --git a/qController.Standard/Pages/ControlPage.xaml b/qController.Standard/Pages/ControlPage.xaml index e4cd2ca..76b8436 100644 --- a/qController.Standard/Pages/ControlPage.xaml +++ b/qController.Standard/Pages/ControlPage.xaml @@ -10,7 +10,7 @@ - +