Exemple #1
0
        public String GetProgress(String TaskId)
        {
            ApiRequest ApiRequest = new TaskApiRequest(TaskId);

            String tempProgress = MakeRequest(HttpMethod.Post, "GetProgress", ApiRequest).Result;

            return(tempProgress);
        }
        public double GetProgress(String TaskId)
        {
            ApiRequest ApiRequest = new TaskApiRequest(TaskId);

            MakeRequestResponse resp = MakeRequest("POST", "GetProgress", ApiRequest).Result;

            Double.TryParse(resp.ResponseString, out double result);
            return(result);
        }
Exemple #3
0
        public String GetPrintingInformation(String TaskId)
        {
            string progress = checkProgress(TaskId);

            if (progress == "1")
            {
                ApiRequest ApiRequest = new TaskApiRequest(TaskId);
                return(MakeRequest(HttpMethod.Post, "GetPrintingInformation", ApiRequest).Result);
            }
            else if (progress == "-1")
            {
                throw new Exception("Slicing file failed ... ");
            }
            else if (string.IsNullOrEmpty(progress))
            {
                throw new Exception("Progress is Empty ... ");
            }
            else
            {
                throw new Exception("Encoutered error while downloading file ... ");
            }
        }
        public string GetPrintingInformation(String TaskId)
        {
            ApiRequest ApiRequest = new TaskApiRequest(TaskId);

            return(MakeRequest("POST", "GetPrintingInformation", ApiRequest).Result.ResponseString);
        }