This file contains 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
const path = require('path'); | |
const webpack = require('webpack'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const phaserModule = path.join(__dirname, '/node_modules/phaser-ce/'); | |
const phaser = path.join(phaserModule, 'build/custom/phaser-split.js'); | |
const pixi = path.join(phaserModule, 'build/custom/pixi.js'); | |
const p2 = path.join(phaserModule, 'build/custom/p2.js'); | |
module.exports = { |
This file contains 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 bool IsLogin | |
{ | |
get | |
{ | |
return _isLogin; | |
} | |
set | |
{ | |
_isLogin = value; | |
RaisePropertyChanged(() => IsLogin); |
This file contains 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 abstract class ExtendedBindableObject : BindableObject | |
{ | |
public void RaisePropertyChanged<T>(Expression<Func<T>> property) | |
{ | |
var name = GetMemberInfo(property).Name; | |
OnPropertyChanged(name); | |
} | |
private MemberInfo GetMemberInfo(Expression expression) | |
{ |
This file contains 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 static void OnAutoWireViewModelChanged(BindableObject bindable, object oldValue, object newValue) | |
{ | |
var view = bindable as Element; | |
if (view == null) | |
{ | |
return; | |
} | |
var viewType = view.GetType(); | |
var viewName = viewType.FullName.Replace(".Views.", ".ViewModels."); |
This file contains 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
viewModelBase:ViewModelLocator.AutoWireViewModel="true" |
This file contains 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 LoginView() | |
{ | |
InitializeComponent(); | |
BindingContext = new LoginViewModel(navigationService); | |
} |
This file contains 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
<ContentPage ... xmlns:local="clr-namespace:eShop"> | |
<ContentPage.BindingContext> | |
<local:LoginViewModel /> | |
</ContentPage.BindingContext> | |
... | |
</ContentPage> |
This file contains 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 async void Button1_Click(...) | |
{ | |
var json = await GetJsonAsync(...); | |
textBox1.Text = json; | |
} | |
public class MyController : ApiController | |
{ | |
public async Task<string> Get() | |
{ |
This file contains 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 static async Task<JObject> GetJsonAsync(Uri uri) | |
{ | |
using (var client = new HttpClient()) | |
{ | |
var jsonString = await client.GetStringAsync(uri).ConfigureAwait(false); | |
return JObject.Parse(jsonString); | |
} | |
} |
This file contains 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
// My "library" method. | |
public static async Task<JObject> GetJsonAsync(Uri uri) | |
{ | |
using (var client = new HttpClient()) | |
{ | |
var jsonString = await client.GetStringAsync(uri); | |
return JObject.Parse(jsonString); | |
} | |
} |
NewerOlder