コード例 #1
0
        public async Task <string> AddCode(AddingCodeObject param)
        {
            bool isOver = await _db.AddingSubmit(param.Name, param.Description, param.CompileType, param.Code, param.IsSearch, param.FileMane);

            if (param.IsSearch)
            {
                GetResultList();
            }

            if (param.CompareLocal)
            {
                _resultCompare.TokkingMainCode  = _db.GetMainCodeList();
                _resultCompare.TokkingChildCode = _db.GetChildCodeList();
            }
            return(JsonConvert.SerializeObject(_resultCompare));
        }
コード例 #2
0
        private async void Load()
        {
            AddingCodeObject sendParams = new AddingCodeObject()
            {
                Name         = _name,
                Description  = _description,
                CompileType  = _typeCompile,
                IsSearch     = _isSearch,
                FileMane     = _fileName,
                Code         = _code,
                CompareLocal = _compareLocal
            };
            DataExchangeWithServer getCompilName = new DataExchangeWithServer("AddCode", "POST", JsonConvert.SerializeObject(sendParams), "application/json", true);
            string result = await getCompilName.SendToServer();

            if (result == null)
            {
                return;
            }
            FillTheListBackResult(JsonConvert.DeserializeObject <ResultCompareObject>(result));
            this.Close();
        }