Exemple #1
0
        void SetNewType(ClassInstance classInstance)
        {
            m_CurrentType         = classInstance.type;
            m_CurrentInstance     = classInstance.instance;
            m_CurrentInstanceName = classInstance.name;

            foreach (IClassInfoView view in m_ClassSubViews)
            {
                view.ShowTypeView(m_CurrentType, m_CurrentInstance);
            }
        }
Exemple #2
0
 void DrawInstanceButton(int index, ClassInstance classInstance)
 {
     Utils.Caller.Try(() =>
     {
         if (classInstance.instance != null)
         {
             if (ImGui.Selectable(classInstance.name + "##InstanceList" + index))
             {
                 //SetNewType(classInstance.type, classInstance.instance);
                 SetNewType(classInstance);
             }
         }
     });
 }
Exemple #3
0
        /// <summary>
        /// Add a new instance to instance list
        /// </summary>
        public virtual bool AddNewInstance(string name, Type parent, object instance)
        {
            if (instance == null)
            {
                return(false);
            }
            bool res = Utils.Caller.Try(() =>
            {
                ShowWindow();
                ClassInstance classInstance = new ClassInstance(name, parent, instance.GetType(), instance);
                m_Instances.Add(m_NewInstanceIndex, classInstance);
                ++m_NewInstanceIndex;
            });

            return(res);
        }