Esempio n. 1
0
        private FormGroup getFormGroup(ReflectionScriptDefines refObject, Object parent)
        {
            FormGroup newTextBox = new FormGroup();

            newTextBox = (FormGroup)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 2
0
        private PrConsole getConsole(ReflectionScriptDefines refObject, Object parent)
        {
            PrConsole newTextBox = new PrConsole();

            newTextBox = (PrConsole)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 3
0
        private LabelInteger getLabelInt(ReflectionScriptDefines refObject, Object parent)
        {
            LabelInteger newTextBox = new LabelInteger();

            newTextBox = (LabelInteger)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 4
0
        private ReflectButton getButton(ReflectionScriptDefines refObject, Object parent)
        {
            ReflectButton newTextBox = new ReflectButton();

            newTextBox = (ReflectButton)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 5
0
        private ReflectList getListView(ReflectionScriptDefines refObject, Object parent)
        {
            ReflectList newTextBox = new ReflectList();

            newTextBox = (ReflectList)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 6
0
        private TextBox getTextBox(ReflectionScriptDefines refObject, Object parent)
        {
            TextBox newTextBox = new TextBox();

            newTextBox = (TextBox)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 7
0
        private NumericUpDown getNumeric(ReflectionScriptDefines refObject, Object parent)
        {
            NumericUpDown newTextBox = new NumericUpDown();

            newTextBox = (NumericUpDown)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 8
0
        private DateSelect getDatePick(ReflectionScriptDefines refObject, Object parent)
        {
            DateSelect newTextBox = new DateSelect();

            newTextBox = (DateSelect)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 9
0
        private DiffSensor getDiffSensor(ReflectionScriptDefines refObject, Object parent)
        {
            DiffSensor newTextBox = new DiffSensor();

            newTextBox = (DiffSensor)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 10
0
        private ImageLoader getPicture(ReflectionScriptDefines refObject, Object parent)
        {
            ImageLoader newTextBox = new ImageLoader();

            newTextBox = (ImageLoader)NewControlObject(newTextBox, refObject, parent);
            return(newTextBox);
        }
Esempio n. 11
0
        private ListView getOriginListView(ReflectionScriptDefines refObject, Object parent)
        {
            ListView resultView = new ListView();

            resultView.Name = refObject.name;

            resultView.View          = View.Details;
            resultView.FullRowSelect = true;
            resultView.GridLines     = true;

            return(resultView);
        }
Esempio n. 12
0
 private void debugView_ItemActivate(object sender, EventArgs e)
 {
     debugView.Columns[1].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
     messageSplit.Panel1Collapsed = true;
     foreach (ListViewItem lItem in debugView.SelectedItems)
     {
         if (lItem.Name == Projector.ScriptWriter.SCRIPT_IDENT)
         {
             ReflectionScriptDefines assignedScript = (ReflectionScriptDefines)lItem.Tag;
             errorTextBox.Text            = script.dump(assignedScript);
             messageSplit.Panel1Collapsed = false;
         }
     }
 }
Esempio n. 13
0
        /// <summary>
        /// add an Controll to a parent Object depending of the type of parent
        /// </summary>
        /// <param name="addThis">The Controll that will be added</param>
        /// <param name="refObject">Current ReflectionScript Object</param>
        /// <param name="parent">Parent Object</param>
        /// <returns>The object that is added</returns>
        private Object NewControlObject(Control addThis, ReflectionScriptDefines refObject, Object parent)
        {
            addThis.Name = refObject.name;
            if (parent is Form)
            {
                Form parForm = (Form)parent;
                parForm.Controls.Add(addThis);
                return(addThis);
            }

            if (parent is ContainerControl)
            {
                ContainerControl parForm = (ContainerControl)parent;
                parForm.Controls.Add(addThis);
                return(addThis);
            }

            return(addThis);
        }
Esempio n. 14
0
        private GroupQuery getGroupQuery(ReflectionScriptDefines refObject, Object parent)
        {
            if (this.obReferences.ContainsKey(refObject.name))
            {
                Object hValue = obReferences[refObject.name];
                if (hValue is GroupQuery)
                {
                    GroupQuery exists = (GroupQuery)hValue;

                    try
                    {
                        //exists.Show();
                        //exists.BringToFront();
                        //exists.Show();
                        exists.imHere = true;
                        return(exists);
                    }
                    catch (ObjectDisposedException disposed)
                    {
                        this.obReferences.Remove(refObject.name);
                    }
                }
            }

            GroupQuery grQuery = new GroupQuery();

            grQuery.Name = refObject.name;

            if (parent is MdiForm)
            {
                MdiForm mdi = (MdiForm)parent;
                mdi.addSubWindow(grQuery, refObject.name);
            }
            //grQuery.Show();

            if (!this.obReferences.ContainsKey(refObject.name))
            {
                this.obReferences.Add(refObject.name, grQuery);
            }
            return(grQuery);
        }
Esempio n. 15
0
        private queryBrowser getQueryBrowser(ReflectionScriptDefines refObject, Object parent)
        {
            queryBrowser browser = new queryBrowser();

            browser.Name        = refObject.name;
            browser.ScriptIdent = refObject.name;

            if (parent is MdiForm)
            {
                MdiForm      mdi        = (MdiForm)parent;
                queryBrowser existingQb = (queryBrowser)mdi.getQueryForm(refObject.name);
                if (null == existingQb)
                {
                    mdi.addQueryWindow(browser);
                }
                else
                {
                    return(existingQb);
                }
            }

            return(browser);
        }
Esempio n. 16
0
        private ReflectForm getForm(ReflectionScriptDefines refObject, Object parent)
        {
            ReflectForm newForm;

            newForm = (ReflectForm)this.getExistingObject(refObject.name);
            string objToken = refObject.name;

            if (newForm == null)
            {
                newForm = new ReflectForm();
            }
            newForm.ScriptIdent = refObject.name;
            newForm.Name        = objToken;
            if (parent is MdiForm)
            {
                MdiForm mdi = (MdiForm)parent;
                mdi.addSubWindow(newForm, refObject.name);
            }
            else if (parent is Form)
            {
                this.showRForm(newForm, refObject.name);
            }
            else if (parent is ReflectionScript)
            {
                ReflectionScript parScr = (ReflectionScript)parent;
                if (parScr.SetupBoolValue(ReflectionScript.SETUP_PREVIEW))
                {
                    this.showRForm(newForm, refObject.name);
                }
            }
            else
            {
                this.showRForm(newForm, refObject.name);
            }
            this.addObject(refObject.name, newForm);
            return(newForm);
        }
Esempio n. 17
0
        public Object getObject(ReflectionScriptDefines refObject, Object parent)
        {
            if (refObject.typeOfObject == "queryBrowser")
            {
                return(this.getQueryBrowser(refObject, parent));
            }

            if (refObject.typeOfObject == "ReflectForm")
            {
                return(this.getForm(refObject, parent));
            }

            if (refObject.typeOfObject == "TextBox")
            {
                return(this.getTextBox(refObject, parent));
            }

            if (refObject.typeOfObject == "LabelText")
            {
                return(this.getLabelText(refObject, parent));
            }

            if (refObject.typeOfObject == "LabelInteger")
            {
                return(this.getLabelInt(refObject, parent));
            }


            if (refObject.typeOfObject == "ReflectButton")
            {
                return(this.getButton(refObject, parent));
            }


            if (refObject.typeOfObject == "NumericUpDown")
            {
                return(this.getNumeric(refObject, parent));
            }


            if (refObject.typeOfObject == "DateSelect")
            {
                return(this.getDatePick(refObject, parent));
            }

            if (refObject.typeOfObject == "GroupQuery")
            {
                return(this.getGroupQuery(refObject, parent));
            }

            if (refObject.typeOfObject == "ReflectList")
            {
                return(this.getListView(refObject, parent));
            }

            if (refObject.typeOfObject == "ListView")
            {
                return(this.getOriginListView(refObject, parent));
            }

            if (refObject.typeOfObject == "ProfileWorker")
            {
                return(this.getProfilWorker(refObject, parent));
            }

            if (refObject.typeOfObject == "Profil")
            {
                return(this.getProfil(refObject, parent));
            }

            if (refObject.typeOfObject == "ReflectionDatabase")
            {
                return(this.getDatabase(refObject, parent));
            }

            if (refObject.typeOfObject == "RString")
            {
                return(this.getRString(refObject, parent));
            }

            if (refObject.typeOfObject == "PrConsole")
            {
                return(this.getConsole(refObject, parent));
            }

            if (refObject.typeOfObject == "ResultList")
            {
                return(this.getResultList(refObject, parent));
            }

            if (refObject.typeOfObject == "DiffSensor")
            {
                return(this.getDiffSensor(refObject, parent));
            }
            if (refObject.typeOfObject == "IntervalTimer")
            {
                return(this.getTimer(refObject, parent));
            }
            if (refObject.typeOfObject == "ImageLoader")
            {
                return(this.getPicture(refObject, parent));
            }

            if (refObject.typeOfObject == "FormGroup")
            {
                return(this.getFormGroup(refObject, parent));
            }

            if (refObject.typeOfObject == "FileSelector")
            {
                return(this.getFileSelector(refObject, parent));
            }

            return(null);
        }
Esempio n. 18
0
        public void watcher(ReflectionScriptDefines currentLine, int lineNumber, int State, int executionLevel)
        {
            if (this.showObjectListing)
            {
                getScriptObjects();
            }

            string objName = currentLine.name;

            if (objName == null)
            {
                objName = "(null)";
            }

            objName += currentLine.code;

            if (currentLine.namedReference != null)
            {
                objName += " :" + currentLine.namedReference;
            }


            string prompt = "";

            for (int i = 0; i < executionLevel; i++)
            {
                prompt += " - ";
            }


            this.logbook.Items.Add(prompt + "> (" + lineNumber + "|" + currentLine.lineNumber + ") " + objName);
            if (logbook.Items.Count > 2)
            {
                this.logbook.TopIndex = this.logbook.Items.Count - 1;
            }


            //updateColors(currentLine.lineNumber);
            if (lastLineUpdate != lineNumber)
            {
                updateColors(lineNumber);
            }
            lastLineUpdate = lineNumber;

            if (State == RefScriptExecute.STATE_RUN)
            {
                errorLabels.Text        = "Currently Running " + currentLine.lineNumber;
                errorLabels.ForeColor   = Color.DarkBlue;
                errorLabels.BackColor   = Color.LightBlue;
                errorLabels.ToolTipText = "";
            }

            if (State == RefScriptExecute.STATE_WAIT)
            {
                errorLabels.Text        = "Currently Waiting " + currentLine.lineNumber;
                errorLabels.ForeColor   = Color.DarkOrange;
                errorLabels.BackColor   = Color.LightYellow;
                errorLabels.ToolTipText = "";
                continueBtn.Enabled     = true;
            }

            if (State == RefScriptExecute.STATE_FINISHED)
            {
                errorLabels.Text        = "Execution is done " + currentLine.lineNumber;
                errorLabels.ForeColor   = Color.DarkGreen;
                errorLabels.BackColor   = Color.LightGreen;
                errorLabels.ToolTipText = "";
                isRunning = false;


                runButton.Enabled   = true;
                continueBtn.Enabled = false;
                updateColors();
            }



            if (script.getErrorCount() > 0)
            {
                errorLabels.Text        = script.getErrorCount() + "Execution errors: " + script.getErrors().Replace("\n", "").Substring(0, 20);
                errorLabels.ForeColor   = Color.Red;
                errorLabels.BackColor   = Color.DarkOrange;
                errorLabels.ToolTipText = script.getErrors();
            }

            // Application.DoEvents();
        }
Esempio n. 19
0
 private ReflectionDatabase getDatabase(ReflectionScriptDefines refObject, Object parent)
 {
     return(new ReflectionDatabase());
 }
Esempio n. 20
0
 private RString getRString(ReflectionScriptDefines refObject, Object parent)
 {
     return(new RString());
 }
Esempio n. 21
0
 private Profil getProfil(ReflectionScriptDefines refObject, Object parent)
 {
     return(new Profil());
 }
Esempio n. 22
0
 private ProfileWorker getProfilWorker(ReflectionScriptDefines refObject, Object parent)
 {
     return(new ProfileWorker());
 }
Esempio n. 23
0
 private ResultList getResultList(ReflectionScriptDefines refObject, Object parent)
 {
     return(new ResultList());
 }
Esempio n. 24
0
 private IntervalTimer getTimer(ReflectionScriptDefines refObject, Object parent)
 {
     return(new IntervalTimer());
 }
Esempio n. 25
0
 private FileSelector getFileSelector(ReflectionScriptDefines refObject, Object parent)
 {
     return(new FileSelector());
 }