Пример #1
0
        public dlgSelectTV2(CASTreeViewStep aTV)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            _cmdCancel.TabStop = false;

            mPCLoadingItem = PlaceCode.Empty;
            mSelectedNode = null;
            pIsLoadByObj = true;

            mTV = aTV;
            mTV.Dock = DockStyle.Fill;
            //mTV.AddMenuCommand(eCommand.Choice);
            mTV.Parent = this;
            //this.Controls.Add(mTV);
            mTV.BringToFront();

            _cmdCancel.Click += new EventHandler (DoCommandCancel);
            this.Load += new EventHandler (OnDlgLoad);
            this.Closed += new EventHandler (OnDlgClosed);
        }
Пример #2
0
 public static PlaceCode PDC2PlaceCode(string aPDC)
 {
     PlaceCode pc = new PlaceCode(0, 0);
       if (aPDC != null && aPDC.Length > 0)
       {
     string[] s = aPDC.Split(DELIM);
     if (s.Length == 2)
     {
       pc.place = Convert.ToInt32(s[0]);
       pc.code = Convert.ToInt32(s[1]);
     }
       }
       return pc;
 }
Пример #3
0
 public PicItem()
 {
     mPC			= PlaceCode.Empty;
     mImage	= null;
     mText		= string.Empty;
     mState	= DataRowState.Unchanged;
 }
Пример #4
0
        protected virtual bool CompareByCode(TreeNode aTN, PlaceCode aPC)
        {
            bool ret = false;
            CASTreeItemData tid = aTN.Tag as CASTreeItemData;
            if (tid != null)
                ret = tid.pPC.Equals(aPC);

            return ret;
        }
Пример #5
0
 public virtual TreeNode SearchByCode(PlaceCode aPC)
 {
     return SearchByCode(Nodes, aPC.place, aPC.code);
 }
Пример #6
0
 public virtual void Load(PlaceCode aPC, bool aExpandLevel)
 {
     SelectedNode = SearchByCode(aPC);
     if (SelectedNode != null && aExpandLevel)
         SelectedNode.Expand();
     //TreeNode retNd = SearchByCode(aPlace, aCode);
     //if (retNd != null)
     //	SelectedNode = retNd;
 }
Пример #7
0
        /// <summary>
        /// ������� � ��������� Node-�� ������� �� ���� Place:Code � ����.
        /// </summary>
        /// <param name="aNodeColl">��������� Node-�� � ������� �������������� �����</param>
        /// <param name="aPlace">place</param>
        /// <param name="aCode">���</param>
        /// <returns>��������� ������� ���������, ���� ������, ����� null</returns>
        public TreeNode FindNodeByCode(TreeNodeCollection aNodeColl, PlaceCode aPC)
        {
            CASTreeItemData tid = null;
            foreach(TreeNode tn in aNodeColl)
            {
                tid = tn.Tag as CASTreeItemData;
                if (tid != null)
                {
                    if (tid.pPlace == 0 && tid.pCode == aPC.code)
                        return tn;
                    else if (tid.pPC.Equals(aPC))
                        return tn;
                }
            }

            return null;
        }
Пример #8
0
 public EvA_SelectedTreeItem(PlaceCode aPC, string aText)
     : this(aPC, aText, null)
 {
 }
Пример #9
0
 /// <summary>
 /// ����������� ������� �������� ���� �������� � ������ (TreeNode)
 /// ������� � ��������� ����. 
 /// ����������� ������ ���� ���������� � ����������� ������.
 /// </summary>
 /// <param name="aRootCode">���� � �������� ����������� �������� ��������</param>
 //public virtual void LoadAll(int aRootCode)
 //{
 //}
 public void ReloadLevel(PlaceCode pc)
 {
     ReloadLevel(pc.place,pc.code);
 }
Пример #10
0
 public CASTreeItemData(PlaceCode aPC)
 {
     pPC			= aPC;
     pTemp		= 0;
 }
Пример #11
0
 protected virtual bool CompareByCode(TreeNode aTN, PlaceCode aPC)
 {
     return ((CASTreeItemData)aTN.Tag).pPC.Equals(aPC);
 }
Пример #12
0
 public _ListBoxPCItem(PlaceCode aPC, string aText)
 {
     _pc = aPC;
       _text = aText;
 }
Пример #13
0
 public static void SelectPC(ComboBox aCbo, PlaceCode aPC)
 {
     foreach (_ListBoxPCItem pci in aCbo.Items)
       {
     if (pci.pPC.Equals(aPC))
       aCbo.SelectedItem = pci;
       }
 }
Пример #14
0
 public EvA_SelectedTreeItem(PlaceCode aPC, string aText, object aTag)
 {
     _pc		= aPC;
     _text = aText;
     _tag	= aTag;
 }
Пример #15
0
 public static string PlaceCode2PDC(PlaceCode aPC)
 {
     return aPC.place.ToString() + PlaceCode.DELIM + aPC.code.ToString();
 }
Пример #16
0
 public int AddRoot(PlaceCode aPC)
 {
     return mArrRoots.Add(aPC);
       /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       /// ��������� ��������� �� _currRootInd, ���� ����� ����� � ����������
       /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 }
Пример #17
0
 public EvA_PlaceCode(PlaceCode aPC)
 {
     _pc	= aPC;
 }