Ejemplo n.º 1
0
        public void SetActivePrimitive(PrimitiveBox prim)
        {
            if (InvokeRequired)
            {
                //HasGameThread = true;

                new Thread(() =>
                {
                    var del = new SetActiveDelegate(SetActivePrimitive);
                    Invoke(del, new object[] { prim });
                }).Start();
                //HasGameThread = false;
            }
            else
            {
                if (prim == ActivePrim)
                {
                    return;
                }
                var panel = OperandEditTable;
                panel.Controls.Clear();
                panel.RowCount = 0;
                panel.RowStyles.Clear();
                if (prim == null || prim.Descriptor == null)
                {
                    return;
                }
                ActivePrim = prim;
                for (int i = 0; i < 10; i++)
                {
                    panel.RowStyles.Add(new RowStyle(SizeType.AutoSize));
                }
                prim.Descriptor.PopulateOperandView(this, EditorCont.Scope, panel);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Bind object data to form controld
        /// </summary>
        public void BindData()
        {
            AddTreeViewItemDelegate del1 = AddTreeViewItem;

            Invoke(del1, _report);

            SetActiveDelegate del2 = SetActive;

            Invoke(del2, new object[] { true, null });
        }
Ejemplo n.º 3
0
        public void SetActivePrimitive(PrimitiveBox prim)
        {
            if (InvokeRequired)
            {

                //HasGameThread = true;

                new Thread(() =>
                {
                    var del = new SetActiveDelegate(SetActivePrimitive);
                    Invoke(del, new object[] { prim });
                }).Start();
                //HasGameThread = false;
            }
            else
            {
                if (prim == null || prim.Descriptor == null || ActivePrim == prim) return;
                ActivePrim = prim;
                var panel = OperandEditTable;
                panel.Controls.Clear();
                panel.RowCount = 0;
                panel.RowStyles.Clear();
                for (int i=0; i<10; i++) panel.RowStyles.Add(new RowStyle(SizeType.AutoSize));
                prim.Descriptor.PopulateOperandView(this, EditorCont.Scope, panel);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Set form visiblity and show specified loading message if no active
        /// </summary>
        /// <param name="active"></param>
        /// <param name="loadingMessage"></param>
        public void SetActivity(bool active, string loadingMessage)
        {
            SetActiveDelegate del2 = SetActive;

            Invoke(del2, new object[] { active, loadingMessage });
        }