コード例 #1
0
        /// <summary>
        /// Method to activate a variable for inspection tooltip. This is done by adding
        /// the variable into the inspection list. Only one variable can be shown in tooltips.
        /// </summary>
        /// <param name="name"> Name of variable to be added to inspection </param>
        internal bool ActivateTooltip(string name)
        {
            Logger.LogInfo("ActivateTooltip", name);
            if (string.IsNullOrEmpty(name))
            {
                return(false);
            }

            if (null == inspectionData)
            {
                inspectionData = new InspectionDataCollection();
                inspectionToolTip.ItemsSource = inspectionData.Data;
            }

            if (!inspectionData.AddInspectionData(name, true))
            {
                return(false);
            }

            this.MaxHeight = SystemParameters.FullPrimaryScreenHeight / 2.0;
            inspectionToolTip.Items.Refresh();
            colName.Width  = inspectionData.MaxNameWidth();
            colValue.Width = inspectionData.MaxValueWidth();
            return(true);
        }
コード例 #2
0
        /// <summary>
        /// Constructor for InspectionViewControl
        /// </summary>
        internal InspectionViewControl()
        {
            InitializeComponent();
            inspectionView.KeyDown += new KeyEventHandler(OnWatchWindowKeyDown);
            inspectionView.PreviewMouseDoubleClick += new MouseButtonEventHandler(OnWatchWindowPreviewMouseDoubleClick);
            inspectionView.MouseLeftButtonUp       += new MouseButtonEventHandler(OnWatchWindowMouseLeftButtonUp);

            dataCollection             = new InspectionDataCollection();
            inspectionView.ItemsSource = dataCollection.Data;
        }
コード例 #3
0
        /// <summary>
        /// Method to activate a variable for inspection tooltip. This is done by adding 
        /// the variable into the inspection list. Only one variable can be shown in tooltips.
        /// </summary>
        /// <param name="name"> Name of variable to be added to inspection </param>
        internal bool ActivateTooltip(string name)
        {
            Logger.LogInfo("ActivateTooltip", name);
            if (string.IsNullOrEmpty(name))
                return false;

            if (null == inspectionData)
            {
                inspectionData = new InspectionDataCollection();
                inspectionToolTip.ItemsSource = inspectionData.Data;
            }

            if (!inspectionData.AddInspectionData(name, true))
                return false;

            this.MaxHeight = SystemParameters.FullPrimaryScreenHeight / 2.0;
            inspectionToolTip.Items.Refresh();
            colName.Width = inspectionData.MaxNameWidth();
            colValue.Width = inspectionData.MaxValueWidth();
            return true;
        }