コード例 #1
0
ファイル: ScreenView.xaml.cs プロジェクト: Jitlee/WPFMonitor
        private void SetEletemt(Canvas canvas, MonitorControl mControl, t_Element obj, ElementSate eleStae,
           List<t_ElementProperty> listObj)
        {
            mControl.Selected += (o, e) =>
            {
                MonitorControl.UpdatePropertyGrid(mControl.BrowsableProperties, null);
                MonitorControl.UpdatePropertyGrid(mControl.BrowsableProperties, mControl);
            };
            if (eleStae == ElementSate.Save)
            {
                mControl.Name ="slt"+ obj.ElementID.ToString();
            }
            mControl.ScreenElement = obj;
            mControl.ListElementProp = listObj;
            mControl.ElementState = eleStae;

            mControl.SetPropertyValue();
            mControl.SetCommonPropertyValue();
            //添加到场景
            canvas.Children.Add(mControl);
        }
コード例 #2
0
        private void SetEletemt(Canvas canvas, MonitorControl mControl, t_Element obj, ElementSate eleStae,
            List<t_ElementProperty> listObj)
        {
            mControl.Selected += (o, e) =>
            {
                PropertyMain.Instance.ControlPropertyGrid.SelectedObject = null;
                PropertyMain.Instance.ControlPropertyGrid.BrowsableProperties = mControl.BrowsableProperties;
                PropertyMain.Instance.ControlPropertyGrid.SelectedObject = mControl;
            };
            if (eleStae == ElementSate.Save)
            {
                mControl.Name = obj.ElementID.ToString();
            }
            mControl.ScreenElement = obj;
            mControl.ListElementProp = listObj;
            mControl.ElementState = eleStae;

            //if (eleStae == ElementSate.Save)
            //{
            //    mControl.Name = obj.ElementID.ToString();
            //}
            mControl.SetPropertyValue();
            mControl.SetCommonPropertyValue();
            //添加到场景
            canvas.Children.Add(mControl);

            //if (CBIsztControl.IsChecked.Value)
            if (IsZT)
            {
                mControl.DesignMode();
            }
        }
コード例 #3
0
ファイル: ScreenView.cs プロジェクト: Jitlee/WPFMonitor
        private void SetEletemt(Canvas canvas, MonitorControl mControl, t_Element obj, ElementSate eleStae,
           List<t_ElementProperty> listObj)
        {
            mControl.Selected += (o, e) =>
            {
                //PropertyMain.Instance.ControlPropertyGrid.SelectedObject = null;
                //PropertyMain.Instance.ControlPropertyGrid.BrowsableProperties = mControl.BrowsableProperties;
                //PropertyMain.Instance.ControlPropertyGrid.SelectedObject = mControl;
                MonitorControl.OnUpdatePropertyGrid(new string[0], null);
                MonitorControl.OnUpdatePropertyGrid(mControl.BrowsableProperties, mControl);
            };
            if (eleStae == ElementSate.Save)
            {
                mControl.Name = "wpft" + obj.ElementID.ToString();
            }
            mControl.ScreenElement = obj;
            mControl.ListElementProp = listObj;
            mControl.ElementState = eleStae;

            mControl.SetPropertyValue();
            mControl.SetCommonPropertyValue();
            //添加到场景
            canvas.Children.Add(mControl);
        }