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
//the object of this methode is to create 2 rectangles, from our two objects and see they intersect or not | |
protected bool IsObjectHidden(FrameworkElement child, FrameworkElement scrollViewer, int Offset) | |
{ | |
//Getting the information related to the scrollViewer | |
GeneralTransform childTransform = child.TransformToVisual(scrollViewer); | |
//creating out first rectangle using the object that i wish to ttrack | |
Rect childRectangle = childTransform.TransformBounds(new Rect(new Point(0, 0), child.RenderSize)); | |
//creating out second rectangle using the scrollViewer |
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 class DeviceTypeHelper | |
{ | |
public static DeviceTypeEnum GetDeviceType() | |
{ | |
switch (Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily) | |
{ | |
case "Windows.Desktop": | |
return DeviceTypeEnum.Tablet; | |
case "Windows.Mobile": | |
return DeviceTypeEnum.Phone; |
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 class StatusBarHelper | |
{ | |
private static StatusBar statusBar | |
{ | |
get | |
{ | |
if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) | |
{ | |
return StatusBar.GetForCurrentView(); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Windows.UI.Xaml; | |
namespace Win10.StateTriggers | |
{ |
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 class CoreTools | |
{ | |
public static async Task<string> GetRedirectedUrl(string url) | |
{ | |
//this allows you to set the settings so that we can get the redirect url | |
var handler = new HttpClientHandler() | |
{ | |
AllowAutoRedirect = false | |
}; | |
string redirectedUrl = null; |
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
/// <summary> | |
/// class for requesting lists. | |
/// </summary> | |
public class ListRequest : RequestBase | |
{ | |
private string _callId; | |
public ListRequest(string callId) | |
{ | |
_callId = callId; |
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 interface IFileIoReaderHelper | |
{ | |
string ReadFromDefaultFile(string fileName); | |
} | |
public class FileIOReaderHelper : IFileIoReaderHelper | |
{ | |
//Read the content from Json file | |
public string ReadFromDefaultFile(string fileName) | |
{ |
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
/// <summary> | |
/// wrapper to serialize correctly when sending requests. | |
/// </summary> | |
public class RequestWrapper | |
{ | |
public string query { get; set; } | |
public string variables { get; set; } | |
} |
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 class DataService | |
{ | |
public async Task<string> MakeRequest(RequestBase req) | |
{ | |
if (req == null) | |
{ | |
throw new ArgumentNullException("req"); | |
} | |
//creating http message |
OlderNewer