예제 #1
0
        /* func */
        private static JPTaskConnector CreateJPTaskConnector()
        {
            string          content   = File.ReadAllText(JPTaskConnector.Path);
            JPTaskConnector connector = new JPTaskConnector(content);

            return(connector);
        }
예제 #2
0
        public void SendToServer()
        {
            byte[]          BinData   = File.ReadAllBytes(BinDataFullName);
            JPTaskConnector connector = EditorWindow.GetWindow <JigsawPuzzleWindow>().Connector.Value;

            connector.PostFile(
                "Explorer", "UploadFiles",
                BinData, "File", $"{BinDataName}",
                (object obj) => Debug.Log($"Task/CreateNewData success. File : {BinDataName}\n{obj}"),
                (HttpResponseMessage message) => Debug.LogError($"Task/CreateNewData failed. File : {BinDataName}\n{message.Content.ReadAsStringAsync().Result}"));
            BinData = File.ReadAllBytes(InfoDataFullName);
            connector.PostFile(
                "Explorer", "UploadFiles",
                BinData, "File", $"{InfoDataName}",
                (object obj) => Debug.Log($"Task/CreateNewData success. File : {InfoDataName}\n{obj}"),
                (HttpResponseMessage message) => Debug.LogError($"Task/CreateNewData failed. File : {InfoDataName}\n{message.Content.ReadAsStringAsync().Result}"));
        }