Example #1
0
        public void Build_Sucessful()
        {
            XsdReader reader = new XsdReader();

            ConfigurationFile.Xsd = new Element();

            if (reader.ProcessSchema(FileLocation.XsdFile))
            {
                NewRelic.AgentConfiguration.MainForm.XsdPath = FileLocation.XsdFile;
            }

            XmlWalker xm = new XmlWalker();

            xm.ProcessXml(FileLocation.ConfigFile);
            NewRelic.AgentConfiguration.MainForm.ConfigPath = FileLocation.ConfigFile;;
            ConfigMerge cm = new ConfigMerge();

            FlowLayoutPanel panel           = new FlowLayoutPanel();
            ToolTip         mainFormToolTip = new ToolTip();

            UIBuilder ui = new UIBuilder(panel, mainFormToolTip);

            ui.Build(true);

            Assert.IsTrue(panel.Controls.Count > 0, panel.Controls.Count.ToString());
        }
        public void Build_Sucessful()
        {
            XsdReader reader = new XsdReader();
            ConfigurationFile.Xsd = new Element();

            if (reader.ProcessSchema(FileLocation.XsdFile))
            {
                NewRelic.AgentConfiguration.MainForm.XsdPath = FileLocation.XsdFile;
            }

            XmlWalker xm = new XmlWalker();
            xm.ProcessXml(FileLocation.ConfigFile);
            NewRelic.AgentConfiguration.MainForm.ConfigPath = FileLocation.ConfigFile;;
            ConfigMerge cm = new ConfigMerge();

            FlowLayoutPanel panel = new FlowLayoutPanel();
            ToolTip mainFormToolTip = new ToolTip();

            UIBuilder ui = new UIBuilder(panel, mainFormToolTip);
            ui.Build(true);

            Assert.IsTrue(panel.Controls.Count > 0, panel.Controls.Count.ToString());
        }
Example #3
0
    IEnumerator ExecuteAction(ExperimentAction a)
    {
        if (a.type == ExperimentActionType.QuestoinairePart)
        {
            //load Lobby scene
            yield return(LoadYourAsyncScene(Lobby));

            //SceneManager.LoadScene(Lobby);

            //Build Questionaire UI
            uimanager.Build(a.ActionName);

            //add listener to move to next action
            uimanager.OnQuestionairePartCompleted.AddListener(NextAction);
        }
        else if (a.type == ExperimentActionType.scene)
        {
            yield return(LoadYourAsyncScene(a.ActionName));

            //SceneManager.LoadScene(a.ActionName);

            //find end of trialobject and link to OnEndOfTrialEvent
            //GameObject.Find("[REPLACEWITHCORRECTNAME]").GetComponent<PositionSerializerAdam>().OnEndOfTrialEvent.AddListener(NextAction);
            //GameObject.Find("EndOfTrialManager").GetComponent<EndOfTrialManager>().OnEndOfTrialEvent.AddListener(NextAction);

            if (!findAndListen("UiContainer"))
            {
                if (!findAndListen("EndOfTrialManager"))
                {
                    Debug.LogError("No Event End of trial Found");
                }
            }
        }

        yield return(Executing = false);
    }
        /// <summary>
        /// Build and displays the user interface for the tool based on th4e CONFIG and XSD file.
        /// This includes both the sidebar and the editing pane.
        /// </summary>
        public void LoadUI()
        {
            if (MenuBarFlow.Controls.Count > -1)
            {
                MenuBarFlow.SuspendLayout();
                MenuBarFlow.Controls.Clear();
                MenuBarFlow.Controls.Add(FormElements.Controls.MenuButton(ConfigurationFile.Xsd, MainFormToolTip));

                foreach (var element in ConfigurationFile.Xsd.Elements)
                {
                    if (!element.IsAdvanced)
                    {
                        MenuBarFlow.Controls.Add(FormElements.Controls.MenuButton(element, MainFormToolTip));
                    }
                    else if (element.IsAdvanced && ShowAdvanced)
                    {
                        MenuBarFlow.Controls.Add(FormElements.Controls.MenuButton(element, MainFormToolTip));
                    }
                }

                MenuBarFlow.ResumeLayout();
            }

            ContentFlow.SuspendLayout();
            ContentFlow.Controls.Clear();

            var ui = new UIBuilder(ContentFlow, MainFormToolTip);
            ui.Build(ShowAdvanced);
            ReloadSection();
            ContentFlow.ResumeLayout();
        }