         request.HTTPBody = strData
         
         let task : NSURLSessionDataTask = NSURLSession.sharedSession().dataTaskWithRequest(request) { (data, response, error) -> Void in
-            UIApplication.sharedApplication().networkActivityIndicatorVisible = false
             
             if error != nil {
                 errorStatus.offlineError(error: error!)

        }
    }
    
    internal func presetNames() -> [String]{
        var strArray:[String] = []
        
        for preset in self.presets{
           strArray.append(preset.PresetName)
        }
        
        return strArray
    }
    
    internal func loadPreset(presetName presetName:String) -> Preset{
        for preset in self.presets{
            print(preset.PresetName)
        }
        return self.presets[0]
    }
    
    internal func savePreset(preset preset:Preset) -> Bool{
        var data = self.ud.objectForKey("Presets") as! NSData
        var pre = NSKeyedUnarchiver.unarchiveObjectWithData(data) as! [Preset]
        
        pre.append(preset)
        print(pre)
        
        data = NSKeyedArchiver.archivedDataWithRootObject(pre)
        
        self.ud.setObject(data, forKey: "Presets")
        self.ud.synchronize()
        return false
    }
    
    
    internal func Login(user user:String,pass:String,regist:(Bool)->Void){
        let str = "user_name=\(user)&password=\(pass)"

                success(nil)
            }
        }
        task.resume()
    }
    
