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 class DiscordEventHandler | |
{ | |
private UserJoinedResponder _userJoinedResponder = new UserJoinedResponder(); | |
private UserLeftResponder _userLeftResponder = new UserLeftResponder(); | |
private MessageReceivedResponder _messageReceivedResponder = new MessageReceivedResponder(); | |
public Task UserJoinedEvent(SocketGuildUser socketGuildUser) | |
{ | |
_userJoinedResponder.RespondAsync(socketGuildUser); | |
return Task.CompletedTask; |
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 class MainWindowVm | |
{ | |
private static MainWindowVm _instance; | |
public static MainWindowVm Instance => _instance ?? (_instance = new MainWindowVm()); | |
private ISourceList<IAnimalVm> SourceList { get; } = new SourceList<IAnimalVm>(); | |
readonly ReadOnlyObservableCollection<IAnimalVm> _animals; | |
public ReadOnlyObservableCollection<IAnimalVm> Animals => _animals; | |
public ObservableCollection<EnumSelectorVm> AnimalClasses { get; } = new ObservableCollection<EnumSelectorVm>(); |
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 TSqlRecord MapToClass<TSqlRecord>(SqlDataReader reader) where TSqlRecord : class, ISqlRecord | |
{ | |
var returnedObject = Activator.CreateInstance<TSqlRecord>(); | |
try | |
{ | |
var modelProperties = returnedObject.GetType().GetProperties(); | |
var schemeTable = reader.GetSchemaTable(); | |
foreach (var t in modelProperties) | |
{ |
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
[assembly: ExportRenderer(typeof(MyTextCell), typeof(AccessorizedTextCellRenderer))] | |
[assembly: ExportRenderer(typeof(MyImageCell), typeof(AccessorizedImageCellRenderer))] | |
namespace MyApp.iOS.Renderers | |
{ | |
internal class CellAccessory | |
{ | |
private static readonly List<CellAccessory> _watchedCells = new List<CellAccessory>(); | |
internal static void Apply(Cell cell, UITableViewCell nativeCell) | |
{ |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="MyApp.Cells.List_Search_Page.SixDetailCell"> | |
<Frame HasShadow="False" Margin="0,1,0,1" Padding="3,3,1,1"> | |
<Frame.OutlineColor> | |
<OnPlatform x:TypeArguments="Color"> | |
<OnPlatform.iOS> |
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 class MySlider : Slider | |
{ | |
public MySlider() | |
{ | |
Mouse.AddMouseWheelHandler(this, OnMouseWheel); | |
} | |
private static void OnMouseWheel(object sender, MouseWheelEventArgs e) | |
{ | |
var slider = sender as Slider; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<views:BaseListView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:dataTemplateSelectors="clr-namespace:Mobile.Core.Data_Template_Selectors;assembly=Mobile.Core" | |
xmlns:customControls="clr-namespace:Mobile.Core.Custom_Controls;assembly=Mobile.Core" | |
xmlns:views="clr-namespace:Mobile.Core.Views;assembly=Mobile.Core" | |
xmlns:listSearchPage="clr-namespace:Mobile.Core.Cells.List_Search_Page;assembly=Mobile.Core" | |
x:Name="MyItemListView" | |
x:Class="Mobile.Core.Views.ItemListView"> | |
<ContentView.Resources> |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Post(); | |
Console.ReadLine(); | |
} | |
private static async void Post() | |
{ |
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
<Slider Width="150" DockPanel.Dock="Top" /> | |
<media:MediaElementWrapper x:Name="MediaElement" Source="C:\Users\Julien\Videos\cat and mouse.mp4" | |
LoadedBehavior="Play" | |
ScrubbingEnabled="True" | |
Stretch="None" /> | |
<Slider x:Name="ProgressSlider" | |
Grid.Row="0" |
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 readonly List<FolderVm> _folders = new List<FolderVm>(); | |
public void UpdateFolders(string path) | |
{ | |
var directoryInfo = new DirectoryInfo(Path.GetDirectoryName(path)); | |
var iteratedDirectories = new Stack<DirectoryInfo>(); | |
iteratedDirectories.Push(directoryInfo); |