This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region Copyright | |
| // <copyright file="MvxBindableLinearLayout.cs" company="Cirrious"> | |
| // (c) Copyright Cirrious. http://www.cirrious.com | |
| // This source is subject to the Microsoft Public License (Ms-PL) | |
| // Please see license.txt on http://opensource.org/licenses/ms-pl.html | |
| // All other rights reserved. | |
| // </copyright> | |
| // | |
| // Project Lead - Stuart Lodge, Cirrious. http://www.cirrious.com | |
| #endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Community.CsharpSqlite; | |
| namespace Tasky.DL.SQLite | |
| { | |
| public class CommunitySqlite3 : SQLite3 | |
| { | |
| public static void EnsureInitialised() | |
| { | |
| if (SQLite3.Instance == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using Windows.Foundation; | |
| using Windows.Foundation.Collections; | |
| using Windows.Storage; | |
| using Windows.UI.Xaml; | |
| using Windows.UI.Xaml.Controls; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| namespace SixSteps.Core.Interfaces.Speakers | |
| { | |
| public interface ISpeakerService | |
| { | |
| void GetSpeakers(string key, Action<List<Speaker>> onSuccess, Action<SpeakerServiceError> onError); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this code is a workaround for: | |
| // "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." | |
| // - this error caused by Nike not having a valid certificate now! | |
| ServicePointManager.ServerCertificateValidationCallback = delegate | |
| (object sender, | |
| System.Security.Cryptography.X509Certificates.X509Certificate pCertificate, | |
| System.Security.Cryptography.X509Certificates.X509Chain pChain, | |
| System.Net.Security.SslPolicyErrors pSSLPolicyErrors) | |
| { | |
| //if (pSSLPolicyErrors == System.Net.Security.SslPolicyErrors.RemoteCertificateNameMismatch && pCertificate.Issuer == "CN=Entrust Certification Authority - L1C, OU=\"(c) 2009 Entrust, Inc.\", OU=www.entrust.net/rpa is incorporated by reference, O=\"Entrust, Inc.\", C=US") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ElementDescription DefaultView() | |
| { | |
| var auto = new RootAuto(caption: "TestRootElement") | |
| { | |
| new SectionAuto(header: "Customer Info") | |
| { | |
| new StringAuto(caption: "ID", bindingExpression: () => Customer.ID), | |
| new StringAuto(caption: "Name", bindingExpression: () => Customer.Name), | |
| new StringAuto(caption: "Website", | |
| bindingExpression: () => Customer.Website, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private KeyedDescription GetMenuAutoView() | |
| { | |
| var auto = new ParentMenuAuto() | |
| { | |
| new MenuAuto(caption: "New", | |
| longCaption: "New Customer", | |
| icon: "ic_menu_add", | |
| command: () => AddCommand), | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Android.App; | |
| using Android.Content; | |
| using Android.OS; | |
| using Android.Runtime; | |
| using Android.Views; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private async Task StartRecognizeAsync() | |
| { | |
| var speechRecognizer = new SpeechRecognizer(); | |
| speechRecognizer.Grammars.AddGrammarFromList( | |
| "answer", | |
| new string[] | |
| { | |
| "Left", "Right", "Up", "Down", "AlphaLabs", "Centre" | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| It sounds a bit like what you want might be what Greg's done recently - http://www.gregshackles.com/2012/11/returning-results-from-view-models-in-mvvmcross/ | |
| For MsgBox... | |
| - For error message boxes, I use - http://slodge.blogspot.co.uk/2012/05/one-pattern-for-error-handling-in.html | |
| - For general popups, there was a very long (too long) answer I wrote at http://stackoverflow.com/questions/11053535/alerts-or-popups-in-mvvmcross | |
| - @AwkwardCoder has some quite humourous comments on Mvvm and confirm MessageBoxes in http://awkwardcoder.blogspot.co.uk/2012/03/showing-message-box-from-viewmodel-in.html - but I don't really like his final solution - I don't like the blocking message calls in his ViewModel | |
| For settings... | |
| - @CheeseBaron did some work https://github.com/Cheesebaron/MvvmCross.SettingsSample | |
| - There's a pattern I've used in a few apps where I use a JSON file with an IApplicationSettings service - it's not in public code at present, except for a very small sample in https://github.com/slodge/MvvmCrossCon |