Exemple #1
0
        private LabelText getLabelText(ReflectionScriptDefines refObject, Object parent)
        {
            LabelText newTextBox = new LabelText();

            newTextBox = (LabelText)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Exemple #2
0
        private void sendHtToWeb(string username, string password, string callUrl)
        {
            if (httpWorker.IsBusy)
            {
                MessageBox.Show("There is an Request already Send and in Progress. A Webrequest is Limited by one per RequestForm.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            string oldCap = this.getCaption();

            this.Enabled = false;
            this.setCaption("WAIT: Sending Content to Web...");
            NetHtAccess webCall = new NetHtAccess();

            webCall.setUri(callUrl);
            webCall.setUser(username, password);
            webCall.resetParameters();
            foreach (Control element in this.Controls)
            {
                Boolean sendThisAsString = true;
                //this.onCloseScript.updateVarByObject()
                if (element is LabelText)
                {
                    LabelText lt = (LabelText)element;
                    if (lt.doNotSend)
                    {
                        sendThisAsString = false;
                    }
                }

                if (element is ImageLoader)
                {
                    ImageLoader img = (ImageLoader)element;
                    sendThisAsString = false;
                    webCall.addOrReplaceParam(element.Name, img);
                }

                if (sendThisAsString)
                {
                    string nameOfObject = element.Name;
                    string objectValue  = element.Text;
                    webCall.addOrReplaceParam(nameOfObject, objectValue);
                }
            }
            httpWorker.RunWorkerAsync(webCall);

            this.Enabled = true;
            this.setCaption(oldCap);
        }