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