//
//  DataMgr.h
//  Macalline
//
//  Created by JianjiYuan on 14-12-4.
//  Copyright (c) 2014年 JianjiYuan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DataMgr : NSObject

+ (instancetype)getInstance;
@property (nonatomic, strong) NSString* remoteNotificationID;

@property (nonatomic, strong) NSString*userID;

@property (nonatomic, strong) NSString*hasNewVersion;

@property (nonatomic, strong) NSString*taskIsEnd;

@property (nonatomic, strong) NSString*serverTime;

@property (nonatomic, strong) NSString *bigAreaId;
@property (nonatomic, strong) NSString *bigAreaName;

@property (nonatomic, strong) NSString *smallAreaId;
@property (nonatomic, strong) NSString *smallAreaName;
@property (nonatomic, strong) NSString *shopName;
@property (nonatomic, strong) NSString *lastIndexOfItemNum;
@property (nonatomic, strong) NSString *roleId;
@property (nonatomic, strong) NSString *location;
@property (nonatomic, strong) NSString *locationName;
@property (nonatomic) BOOL isUploadActionExpired;

@property (nonatomic, strong) NSString *dayCount;

@property (nonatomic, strong) NSString *unfinishedTaskCountToDacuxiao;
@property (nonatomic, strong) NSString *unfinishedTaskCountToXiaocuxiao;
@property (nonatomic, strong) NSString *unfinishedTaskCountToDaoshi;
@property (nonatomic, strong) NSString *unfinishedTaskCountToMeicheng;
@property (nonatomic, strong) NSString *unfinishedTaskCountToXiuxiqu;
@property (nonatomic, strong) NSString *unfinishedTaskCountToGuanggaowei;
@property (nonatomic, strong) NSString *unfinishedTaskCountToBeijingyinyue;
@property (nonatomic, strong) NSString *unfinishedTaskCountToYingyunwuliao;

+ (BOOL)isScreenIphone4Size;

+ (NSString *)stringFromDate:(NSDate *)date format:(NSString *)format;
+ (NSDate *)dateFromString:(NSString *)strDate format:(NSString *)format;

//对图片尺寸进行压缩--
+ (UIImage*)imageWithImagePath:(NSString *)imagePath scaledToSize:(CGSize)newSize;

+ (NSString *)pathInCacheDirectory:(NSString *)fileName;
//创建缓存文件夹
+ (BOOL)createDirInCache:(NSString *)dirName;
// 删除图片缓存
+ (BOOL)deleteDirInCache:(NSString *)dirName;
// 图片本地缓存
+ (BOOL)saveImageToCacheDir:(NSString *)directoryPath image:(UIImage *)image
                  imageName:(NSString *)imageName imageType:(NSString *)imageType;
// 获取缓存图片
+ (NSData*)loadImageData:(NSString *)directoryPath imageName:(NSString *)imageName;

@end
