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 void FileWatcherServiceOnFileCreated(object sender, FileCreatedEventArgs fileCreatedEventArgs) | |
{ | |
var fullName = fileCreatedEventArgs.FullName; | |
var fileName = fileCreatedEventArgs.FileName; | |
var extension = fileCreatedEventArgs.Extension; | |
try | |
{ | |
_imageManipulationService.ScaleAndSaveImage(fullName, fileName, extension, _targetResizedDirectory); | |
} |
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
// Based on : http://www.codeproject.com/Articles/2941/Resizing-a-Photographic-image-with-GDI-for-NET | |
private static void ScaleAndSaveImage(ImageResizeConfiguration config) | |
{ | |
using (var fileStream = new FileStream(config.FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) | |
using (var image = Image.FromStream(fileStream)) | |
{ | |
var sourceWidth = image.Width; | |
var sourceHeight = image.Height; | |
var destX = 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
using System; | |
using System.Linq; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
namespace ConsoleApplication3 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
var summoner = await leagueAPI.Summoner.GetSummonerByNameAsync("TuC Kiwii"); | |
var summonerStats = await leagueAPI.Stats.GetPlayerStatsSummariesBySummonerIdAsync(summoner.SummonerId); | |
var summonerStats2 = await summoner.GetPlayerStatsSummariesAsync(); | |
var normalStats = summonerStats2.FirstOrDefault(x => x.PlayerStatSummaryType == PlayerStatSummaryTypeEnum.Unranked); | |
if (normalStats != 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.Threading; | |
Console.Beep(659, 125); | |
Console.Beep(659, 125); | |
Thread.Sleep(125); | |
Console.Beep(659, 125); | |
Thread.Sleep(167); | |
Console.Beep(523, 125); | |
Console.Beep(659, 125); | |
Thread.Sleep(125); |
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.Threading; | |
Console.Beep(658, 125); | |
Console.Beep(1320, 500); | |
Console.Beep(990, 250); | |
Console.Beep(1056, 250); | |
Console.Beep(1188, 250); | |
Console.Beep(1320, 125); | |
Console.Beep(1188, 125); | |
Console.Beep(1056, 250); |