Exemple #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);
        }
Exemple #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;
 }
Exemple #3
0
 public PicItem()
 {
     mPC			= PlaceCode.Empty;
     mImage	= null;
     mText		= string.Empty;
     mState	= DataRowState.Unchanged;
 }
Exemple #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;
        }
Exemple #5
0
 public virtual TreeNode SearchByCode(PlaceCode aPC)
 {
     return SearchByCode(Nodes, aPC.place, aPC.code);
 }
Exemple #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;
 }
Exemple #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;
        }
Exemple #8
0
 public EvA_SelectedTreeItem(PlaceCode aPC, string aText)
     : this(aPC, aText, null)
 {
 }
Exemple #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);
 }
Exemple #10
0
 public CASTreeItemData(PlaceCode aPC)
 {
     pPC			= aPC;
     pTemp		= 0;
 }
Exemple #11
0
 protected virtual bool CompareByCode(TreeNode aTN, PlaceCode aPC)
 {
     return ((CASTreeItemData)aTN.Tag).pPC.Equals(aPC);
 }
Exemple #12
0
 public _ListBoxPCItem(PlaceCode aPC, string aText)
 {
     _pc = aPC;
       _text = aText;
 }
Exemple #13
0
 public static void SelectPC(ComboBox aCbo, PlaceCode aPC)
 {
     foreach (_ListBoxPCItem pci in aCbo.Items)
       {
     if (pci.pPC.Equals(aPC))
       aCbo.SelectedItem = pci;
       }
 }
Exemple #14
0
 public EvA_SelectedTreeItem(PlaceCode aPC, string aText, object aTag)
 {
     _pc		= aPC;
     _text = aText;
     _tag	= aTag;
 }
Exemple #15
0
 public static string PlaceCode2PDC(PlaceCode aPC)
 {
     return aPC.place.ToString() + PlaceCode.DELIM + aPC.code.ToString();
 }
Exemple #16
0
 public int AddRoot(PlaceCode aPC)
 {
     return mArrRoots.Add(aPC);
       /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       /// ��������� ��������� �� _currRootInd, ���� ����� ����� � ����������
       /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 }
Exemple #17
0
 public EvA_PlaceCode(PlaceCode aPC)
 {
     _pc	= aPC;
 }