Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
More minor updates - prepped for release
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Jan 13, 2015
1 parent d29e20a commit 78849c5
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 49 deletions.
4 changes: 3 additions & 1 deletion Acr.XamForms.Mobile.WindowsPhone/Net/NetworkService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using Acr.XamForms.Mobile.Net;
using Acr.XamForms.Mobile.WindowsPhone.Net;
Expand All @@ -10,12 +11,13 @@


namespace Acr.XamForms.Mobile.WindowsPhone.Net {

public class NetworkService : AbstractNetworkService {

public NetworkService() {
this.UpdateStatus();
DeviceNetworkInformation.NetworkAvailabilityChanged += this.OnNetworkAvailabilityChanged;
NetworkChange.NetworkAddressChanged += (sender, args) => {}; // this has to be listened to as well to hear previous event
}


Expand Down
3 changes: 1 addition & 2 deletions Samples/Samples.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.acrapps.forms" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<application android:label="ACR Xamarin Forms" android:icon="@drawable/Icon">
</application>
<application android:label="ACR Xamarin Forms" android:icon="@drawable/Icon"></application>
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CALL_PHONE" />
Expand Down
3 changes: 2 additions & 1 deletion Samples/Samples.Android/Samples.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<TargetFrameworkVersion>v4.4</TargetFrameworkVersion>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<MandroidI18n />
<JavaMaximumHeapSize>
</JavaMaximumHeapSize>
<NuGetPackageImportStamp>b427e365</NuGetPackageImportStamp>
<AndroidUseLatestPlatformSdk />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
4 changes: 2 additions & 2 deletions Samples/Samples/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Command<KeyValuePair<string, string>> Select {
private ICommand addCommand;
public ICommand Add {
get {
this.addCommand = this.addCommand ?? new Command(() => this.OnAdd());
this.addCommand = this.addCommand ?? new Command(async () => await this.OnAdd());
return this.addCommand;
}
}
Expand All @@ -61,7 +61,7 @@ public ICommand Add {
private ICommand clearCommand;
public ICommand Clear {
get {
this.clearCommand = this.clearCommand ?? new Command(() => this.OnClear());
this.clearCommand = this.clearCommand ?? new Command(async () => await this.OnClear());
return this.clearCommand;
}
}
Expand Down
13 changes: 9 additions & 4 deletions Samples/Samples/ViewModels/SignatureListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private async Task OnCreate() {
var fileName = String.Format(FILE_FORMAT, DateTime.Now);
IFile file = null;
using (var stream = result.GetStream()) {
file = this.fileSystem.AppData.CreateFile(fileName);
file = this.fileSystem.Temp.CreateFile(fileName);
using (var fs = file.OpenWrite())
stream.CopyTo(fs);
}
Expand All @@ -94,9 +94,14 @@ public Command<Signature> Select {
get {
this.selectCmd = this.selectCmd ?? new Command<Signature>(s =>
this.dialogs.ActionSheet(new ActionSheetConfig()
.Add("View", () =>
Device.OpenUri(new Uri("file://" + s.FilePath))
)
.Add("View", () => {
try {
Device.OpenUri(new Uri("file://" + s.FilePath));
}
catch {
this.dialogs.Alert("Cannot open file");
}
})
.Add("Delete", async () => {
var r = await this.dialogs.ConfirmAsync(String.Format("Are you sure you want to delete {0}", s.FileName));
if (!r)
Expand Down
29 changes: 15 additions & 14 deletions Samples/Samples/ViewModels/UserDialogViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public string Result {
public ICommand Alert {
get {
return new Command(async () => {
await dialogService.AlertAsync("Test alert", "Alert Title", "CHANGE ME!");
await this.dialogService.AlertAsync("Test alert", "Alert Title", "CHANGE ME!");
this.Result = "Returned from alert!";
});
}
Expand All @@ -42,8 +42,9 @@ public ICommand ActionSheet {
var cfg = new ActionSheetConfig().SetTitle("Test Title");
for (var i = 0; i < 10; i++) {
var display = (i + 1);
cfg.Add("Option " + display, () => String.Format("Option {0} Selected", display));
cfg.Add("Option " + display, () => this.Result = String.Format("Option {0} Selected", display));
}
this.dialogService.ActionSheet(cfg);
});
}
}
Expand All @@ -52,7 +53,7 @@ public ICommand ActionSheet {
public ICommand Confirm {
get {
return new Command(async () => {
var r = await dialogService.ConfirmAsync("Pick a choice", "Pick Title", "Yes", "No");
var r = await this.dialogService.ConfirmAsync("Pick a choice", "Pick Title", "Yes", "No");
var text = (r ? "Yes" : "No");
this.Result = "Confirmation Choice: " + text;
});
Expand All @@ -63,7 +64,7 @@ public ICommand Confirm {
public ICommand Login {
get {
return new Command(async () => {
var r = await dialogService.LoginAsync();
var r = await this.dialogService.LoginAsync();
this.Result = String.Format(
"Login {0} - User Name: {1} - Password: {2}",
r.Ok ? "Success" : "Cancelled",
Expand All @@ -89,14 +90,14 @@ public ICommand Progress {
return new Command(async () => {
var cancelled = false;

using (var dlg = dialogService.Progress("Test Progress")) {
using (var dlg = this.dialogService.Progress("Test Progress")) {
dlg.SetCancel(() => cancelled = true);
while (!cancelled && dlg.PercentComplete < 100) {
await Task.Delay(TimeSpan.FromMilliseconds(500));
dlg.PercentComplete += 2;
}
}
this.Result = (cancelled ? "Progress Cancelled" : "Progress Complete");
this.Result = (cancelled ? "Progress Cancelled" : "Progress Complete");
});
}
}
Expand All @@ -105,12 +106,12 @@ public ICommand Progress {
public ICommand ProgressNoCancel {
get {
return new Command(async () => {
using (var dlg = dialogService.Progress("Progress (No Cancel)")) {
using (var dlg = this.dialogService.Progress("Progress (No Cancel)")) {
while (dlg.PercentComplete < 100) {
await Task.Delay(TimeSpan.FromSeconds(1));
dlg.PercentComplete += 20;
}
}
}
});
}
}
Expand All @@ -119,9 +120,9 @@ public ICommand ProgressNoCancel {
public ICommand LoadingNoCancel {
get {
return new Command(async () => {
using (dialogService.Loading("Loading (No Cancel)"))
using (this.dialogService.Loading("Loading (No Cancel)"))
await Task.Delay(TimeSpan.FromSeconds(3));

this.Result = "Loading Complete";
});
}
Expand All @@ -133,15 +134,15 @@ public ICommand Loading {
return new Command(async () => {
var cancelSrc = new CancellationTokenSource();

using (var dlg = dialogService.Loading("Loading")) {
using (var dlg = this.dialogService.Loading("Loading")) {
dlg.SetCancel(cancelSrc.Cancel);

try {
await Task.Delay(TimeSpan.FromSeconds(5), cancelSrc.Token);
}
catch { }
}
this.Result = (cancelSrc.IsCancellationRequested ? "Loading Cancelled" : "Loading Complete");
this.Result = (cancelSrc.IsCancellationRequested ? "Loading Cancelled" : "Loading Complete");
});
}
}
Expand All @@ -151,9 +152,9 @@ public ICommand Toast {
get {
return new Command(() => {
this.Result = "Toast Shown";
dialogService.Toast("Test Toast", onClick: () => {
this.dialogService.Toast("Test Toast", onClick: () => {
this.Result = "Toast Pressed";
});
});
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion nuspec/Acr.XamForms.BarCodeScanner.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<releaseNotes>
2.0
Update to iOS unified
Update to Xamarin Forms 1.3
Update to Xamarin Forms 1.3.1
Barcode creation
Simplified API

Expand Down
28 changes: 16 additions & 12 deletions nuspec/Acr.XamForms.Mobile.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Acr.XamForms.Mobile</id>
<<<<<<< HEAD
<version>1.4.1</version>
<title>Mobile Services for Xamarin Forms</title>
<description>XPlat Camera-Gallery Access, Geo-Location, Settings, Network Detection, Phone, File System Management, SMS, File Opener, and Logging for Xamarin Forms</description>
=======
<version>2.0.0</version>
<title>Mobile Service Plugins for Xamarin.Forms</title>
<description>XPlat Camera-Gallery Access, Geo-Location, Settings, Network Detection, Phone, File System Management, SMS, and Logging for Xamarin Forms</description>
>>>>>>> dev
<description>
Includes several essentials services for development with Xamarin.Forms
- Camera
- Photo Gallery Access
- Device Information
- Network Detection and Monitoring
- Geolocation
- Settings
- Phone Initiation
- SMS Initiation
- Text-to-Speech
- File System Management
</description>
<authors>Allan Ritchie</authors>
<owners>Allan Ritchie</owners>
<licenseUrl>http://opensource.org/licenses/ms-pl.html</licenseUrl>
Expand All @@ -22,11 +28,10 @@
<dependency id="Newtonsoft.Json" version="[6.0, 7)" />
</dependencies>
<releaseNotes>
<<<<<<< HEAD
=======
2.0
Update to Unified API
Update Xamarin.Mobile
Update Xamarin.Mobile 0.75
Update to Xamarin.Forms 1.3.1
Fix iOS defect when reading properties on device info outside of main thread
Clean out some useless services
Fix Text-to-speech service on android
Expand All @@ -36,7 +41,6 @@ Update to Xamarin.Mobile 0.74
Fixes for new iOS8 file structure
Adding AppVersion property to Device Info

>>>>>>> dev
1.4.1
FIX: settings issue with iOS

Expand Down Expand Up @@ -75,7 +79,7 @@ Initial Release
<file src="..\bin\Release\Portable\Acr.XamForms.Mobile.dll" target="lib\MonoAndroid10\Acr.XamForms.Mobile.dll" />
<file src="..\bin\Release\MonoAndroid\Acr.XamForms.Mobile.Droid.dll" target="lib\MonoAndroid10\Acr.XamForms.Mobile.Droid.dll" />
<file src="..\bin\Release\MonoAndroid\Xamarin.Mobile.dll" target="lib\MonoAndroid10\Xamarin.Mobile.dll" />

<!-- touch -->
<file src="..\bin\Release\Portable\Acr.XamForms.Mobile.dll" target="lib\Xamarin.iOS10\Acr.XamForms.Mobile.dll" />
<file src="..\bin\Release\MonoTouch\Acr.XamForms.Mobile.iOS.dll" target="lib\Xamarin.iOS10\Acr.XamForms.Mobile.iOS.dll" />
Expand Down
2 changes: 1 addition & 1 deletion nuspec/Acr.XamForms.SignaturePad.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
2.0
Simplified API
Update to iOS unified
Update to Xamarin Forms 1.3
Update to Xamarin Forms 1.3.1

1.1.2
Update to signaturepad 1.3.5
Expand Down
24 changes: 13 additions & 11 deletions nuspec/Acr.XamForms.UserDialogs.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Acr.XamForms.UserDialogs</id>
<<<<<<< HEAD
<version>2.0.2</version>
<title>User Dialogs for Xamarin Forms</title>
=======
<version>3.0.0</version>
<title>User Dialogs Plugin for Xamarin.Forms</title>
>>>>>>> dev
<authors>Allan Ritchie</authors>
<owners>Allan Ritchie</owners>
<description>Alert, Confirm, Prompt, Toast, Action Sheet, Login, Loading, and Progress Dialogs calls for Xamarin Forms</description>
<description>
This plugin for Xamarin.Forms contains several useful dialogs that you can call from your ViewModels
- ActionSheet
- Alert
- Confirm
- Prompt
- Login
- Toast
- Loading
- Deterministic Progress
</description>
<licenseUrl>http://opensource.org/licenses/ms-pl.html</licenseUrl>
<projectUrl>https://github.com/aritchie/acr-xamarin-forms</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand All @@ -26,15 +31,13 @@
</group>
</dependencies>
<releaseNotes>
<<<<<<< HEAD
=======
3.0
Tasks are now part of the interface again for easier mocking
FIX: iOS7 dismiss and button index
FIX: Android login password display
Update BTProgressHUD
Update BTProgressHUD 1.15
Update to iOS unified
Update to Xamarin Forms 1.3
Update to Xamarin Forms 1.3.1

2.1.2
FIX: iOS8 iPad actionsheet
Expand All @@ -46,7 +49,6 @@ Update to XF 1.2.3
* NEW * Login Dialog on all platforms
iOS8 now uses UIAlertController

>>>>>>> dev
2.0.2
Fix null reference with action sheet and back button on WP8
Fix scrolling issue with action sheet in WP8
Expand Down

0 comments on commit 78849c5

Please sign in to comment.