Exemplo n.º 1
0
        public override List <IPtrAccessor> GetConnections()
        {
            var list = new List <IPtrAccessor>();
            CStorySceneFlowCondition resource = (CStorySceneFlowCondition)Chunk.data;

            if (Chunk != null)
            {
                CPtr <CStorySceneLinkElement> trueLink = resource.TrueLink;
                if (trueLink != null)
                {
                    if (trueLink.Reference != null)
                    {
                        list.Add(trueLink);
                    }
                }

                CPtr <CStorySceneLinkElement> falseLink = resource.FalseLink;
                if (falseLink != null)
                {
                    if (falseLink.Reference != null)
                    {
                        list.Add(falseLink);
                    }
                }
            }

            return(list);
        }
Exemplo n.º 2
0
        public override void UpdateView()
        {
            var height = Height;

            base.UpdateView();
            Height = height;

            lblCondition.Text = "";

            CStorySceneFlowCondition resource = (CStorySceneFlowCondition)Chunk.data;

            CPtr <IQuestCondition> questCondition = resource.QuestCondition;

            if (questCondition != null)
            {
                if (questCondition.Reference != null)
                {
                    lblCondition.Click += delegate { FireSelectEvent(questCondition.Reference); };

                    // put something in the tex field:
                    dynamic IQuestCondition = questCondition.Reference.data; //FIXME dynamic
                    try
                    {
                        var factIdObj = IQuestCondition.FactId;
                        if (factIdObj != null && factIdObj is CString)
                        {
                            lblCondition.Text = ((CString)factIdObj).val;
                        }
                    }
                    catch (Exception)
                    {
                        lblCondition.Text = questCondition.Reference.REDName;
                    }
                }
            }

            var commentObj = resource.Comment;

            if (commentObj != null && commentObj is CString)
            {
                lblCondition.Text = ((CString)commentObj).val;
            }
        }