Esempio n. 1
0
        // G u i

        private async void Button_Send_Clicked(object sender, EventArgs e)
        {
            bool success = false;

            if (SuperValidator1.Validate())
            {
                if (!UserRequestManager.CheckMaxAttachmentFileLength(request, 250 * 1024 * 1024))
                {
                    MessageBoxEx.Show(UserRequestGuiLangRes.MsgBox_IncludedBigFiles, UserRequestGuiLangRes.MsgBox_IncludedBigFiles_Titel, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    button_Send.Enabled = false;
                    circularProgress.Start();

                    /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
                    success = await SendRequest();

                    /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
                    circularProgress.Stop();
                    button_Send.Enabled = true;
                    /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
                    if (success)
                    {
                        MessageBoxEx.Show(UserRequestGuiLangRes.MsgBox_SendingRequestSuccess, UserRequestGuiLangRes.MsgBox_SendingRequestSuccess_Titel, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Close();
                    }
                    else
                    {
                        MessageBoxEx.Show(UserRequestGuiLangRes.MsgBox_ErrorSendingRequest, UserRequestGuiLangRes.MsgBox_ErrorSendingRequest_Titel, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
        // F e a t u r e s

        private void MapFiles()
        {
            files.Clear();
            if (!string.IsNullOrEmpty(prop.Value))
            {
                files.AddRange(UserRequestManager.TranslateFilesStringToArray(prop.Value));
            }
        }
        // SUMMARY: Report -> Get UserHttpRequest for specific click
        public ActionResult GetUserHttpReqeusts(WebLogTableData data)
        {
            UserRequestManager manager = new UserRequestManager();

            manager.Query(data);
            return(View("~/Views/Report/_LogTable.cshtml", new LogModel {
                Informations = manager.ConvertToLogModelInfomations(), InformationsLabel = "req"
            }));
        }
 private void WriteFiles()
 {
     prop.Value = UserRequestManager.TranslateFilesArrayToString(files.ToArray());
 }
Esempio n. 5
0
        // F e a t u r e s

        private async Task <bool> SendRequest()
        {
            var mgr = new UserRequestManager();

            return(await mgr.UploadRequest(request));
        }