Пример #1
0
        private void DtlpResDirControl_AfterSelect(object sender,
                                                   System.Windows.Forms.TreeViewEventArgs e)
        {
            /*
             *          if (procItemSelected != null)
             *          {
             *                  string strPath = GetPath(this.SelectedNode, '/');
             *                  ItemInfo iteminfo = (ItemInfo)
             *                          m_itemInfoTable[strPath];
             *                  if (iteminfo == null)
             *                  {
             *                          Debug.Assert(false, "路径[" + strPath +"]没有找到对应的ItemInfo事项");
             *                          procItemSelected(strPath, 0);	// 无法得到mask,于是用0代替mask
             *                          return;
             *                  }
             *
             *                  procItemSelected(strPath, iteminfo.Mask);
             *          }
             * */

            // 2007/11/13 改造
            if (this.ItemSelected != null)
            {
                string   strPath  = GetPath(this.SelectedNode, '/');
                ItemInfo iteminfo = (ItemInfo)
                                    m_itemInfoTable[strPath];
                int nMask = 0;
                if (iteminfo == null)
                {
                    Debug.Assert(false, "路径[" + strPath + "]没有找到对应的ItemInfo事项");
                    nMask = 0;  // 无法得到mask,于是用0代替mask
                }
                else
                {
                    nMask = iteminfo.Mask;
                }

                ItemSelectedEventArgs e1 = new ItemSelectedEventArgs();
                e1.Path = strPath;
                e1.Mask = nMask;

                this.ItemSelected(this, e1);
            }
        }
Пример #2
0
        private void dtlpResDirControl1_ItemSelected(object sender, ItemSelectedEventArgs e)
        {
            if ((e.Mask & DtlpChannel.TypeStdbase) != 0
    || (e.Mask & DtlpChannel.TypeFrom) != 0)
                this.textBox_resPath.Text = e.Path;
            else
                this.textBox_resPath.Text = "";

        }
Пример #3
0
        // 事项被selected
        private void dtlpResDirControl1_ItemSelected(object sender, ItemSelectedEventArgs e)
        {
            // 忽略掉第一次ItemSelected事件
            if (m_bFirst == true)
            {
                m_bFirst = false;
                return;
            }


            if ((e.Mask & DtlpChannel.TypeStdbase) != 0)
                this.textBox_dtlpRecPath.Text = e.Path;
            else
                this.textBox_dtlpRecPath.Text = "";

        }
Пример #4
0
		private void DtlpResDirControl_AfterSelect(object sender, 
            System.Windows.Forms.TreeViewEventArgs e)
		{
            /*
			if (procItemSelected != null) 
			{
				string strPath = GetPath(this.SelectedNode, '/');
				ItemInfo iteminfo = (ItemInfo)
					m_itemInfoTable[strPath];
				if (iteminfo == null) 
				{
					Debug.Assert(false, "路径[" + strPath +"]没有找到对应的ItemInfo事项");
					procItemSelected(strPath, 0);	// 无法得到mask,于是用0代替mask
					return;
				}

				procItemSelected(strPath, iteminfo.Mask);
			}
             * */

            // 2007/11/13 改造
            if (this.ItemSelected != null)
            {
                string strPath = GetPath(this.SelectedNode, '/');
                ItemInfo iteminfo = (ItemInfo)
                    m_itemInfoTable[strPath];
                int nMask = 0;
                if (iteminfo == null)
                {
                    Debug.Assert(false, "路径[" + strPath + "]没有找到对应的ItemInfo事项");
                    nMask = 0;	// 无法得到mask,于是用0代替mask
                }
                else
                    nMask = iteminfo.Mask;

                ItemSelectedEventArgs e1 = new ItemSelectedEventArgs();
                e1.Path = strPath;
                e1.Mask = nMask;

                this.ItemSelected(this, e1);
            }

		}