private void btnIncludeFn0_Click(object sender, System.EventArgs e)
 {
     CallTreeForm.FnViewFilter viewFilter = FindFunction(tbIncludeFn0);
     if (viewFilter.functionId > 0)
     {
         includeFns[0] = viewFilter;
     }
 }
 private void btnExcludeFn1_Click(object sender, System.EventArgs e)
 {
     CallTreeForm.FnViewFilter viewFilter = FindFunction(tbExcludeFn1);
     if (viewFilter.functionId > 0)
     {
         excludeFns[1] = viewFilter;
     }
 }
Beispiel #3
0
        //
        //  Popup a dialog to let the user select a function name from
        //  the list of all functions in the current view.
        //
        //  Returns:
        //     -1:  Dialog cancelled
        //	   >=0: Fn id.
        //

        private CallTreeForm.FnViewFilter FindFunction(TextBox tb)
        {
            int id = -2;

            TreeNode.NodeType nodetype = TreeNode.NodeType.Call;
            var functionFind           = new FunctionFind(m_treeOwner, tb.Text);
            var viewFilter             = new CallTreeForm.FnViewFilter();

            if (functionFind.ShowDialog() == DialogResult.OK)
            {
                id = functionFind.SelectedFunctionId;
                if (id >= 0)
                {
                    nodetype = functionFind.SelectedNodeType;
                    tb.Text  = GetName(nodetype, id);
                }
            }

            viewFilter.functionId = id;
            viewFilter.nodetype   = nodetype;

            return(viewFilter);
        }
		//
		//  Popup a dialog to let the user select a function name from 
		//  the list of all functions in the current view.
		//
		//  Returns:
		//     -1:  Dialog cancelled
		//	   >=0: Fn id.
		//

		private CallTreeForm.FnViewFilter FindFunction( TextBox tb )
		{
			int id = -2;
			TreeNode.NodeType nodetype = TreeNode.NodeType.Call;
			FunctionFind functionFind = new FunctionFind( m_treeOwner, tb.Text );
			CallTreeForm.FnViewFilter viewFilter = new CallTreeForm.FnViewFilter();

			if (functionFind.ShowDialog() == DialogResult.OK)
			{
				id = functionFind.SelectedFunctionId;
				if (id >= 0)
				{
					nodetype = functionFind.SelectedNodeType;
					tb.Text = GetName( nodetype, id );
				}
			}

			viewFilter.functionId = id;
			viewFilter.nodetype = nodetype;

			return viewFilter;
		}