コード例 #1
0
        public String GetProgress(String TaskId)
        {
            ApiRequest ApiRequest = new TaskApiRequest(TaskId);

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

            return(tempProgress);
        }
コード例 #2
0
        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);
        }
コード例 #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 ... ");
            }
        }
コード例 #4
0
        public string GetPrintingInformation(String TaskId)
        {
            ApiRequest ApiRequest = new TaskApiRequest(TaskId);

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