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
mkdir C:\ARM-Temp |
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 sealed class MemoryMonitor : IDisposable | |
{ | |
#region Private members | |
private bool _isEnabled; | |
private bool _showVisualization; | |
private bool _isInitialized; | |
private bool _currentWarningExceeded; | |
private bool _currentCriticalExceeded; | |
private DispatcherTimer _timer; | |
private Popup _popup = new Popup(); |
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 event PropertyChangedEventHandler PropertyChanged; | |
protected virtual void NotifyPropertyChanged<T>(Expression<Func<T>> propertyEvaluator) | |
{ | |
var lambda = propertyEvaluator as LambdaExpression; | |
var member = lambda.Body as MemberExpression; | |
var handler = PropertyChanged; | |
if (handler != null) | |
{ | |
handler(this, new PropertyChangedEventArgs(member.Member.Name)); |
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 CCUtils | |
{ | |
public static CCRect CCRectIntersection(CCRect r1, CCRect r2) | |
{ | |
CCRect intersection = new CCRect(Math.Max(CCRect.CCRectGetMinX(r1), CCRect.CCRectGetMinX(r2)), Math.Max(CCRect.CCRectGetMinY(r1), CCRect.CCRectGetMinY(r2)), 0, 0); | |
intersection.size.width = Math.Min(CCRect.CCRectGetMaxX(r1), CCRect.CCRectGetMaxX(r2)) - | |
CCRect.CCRectGetMinX(intersection); | |
intersection.size.height = Math.Min(CCRect.CCRectGetMaxY(r1), CCRect.CCRectGetMaxY(r2)) - | |
CCRect.CCRectGetMinY(intersection); | |
return intersection; |
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
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) | |
#define UserDefaults [NSUserDefaults standardUserDefaults] | |
#define NotificationCenter [NSNotificationCenter defaultCenter] | |
#define SharedApplication [UIApplication sharedApplication] | |
#define Bundle [NSBundle mainBundle] | |
#define MainScreen [UIScreen mainScreen] | |
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES | |
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO | |
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x | |
#define NavBar self.navigationController.navigationBar |