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); }
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; }
public PicItem() { mPC = PlaceCode.Empty; mImage = null; mText = string.Empty; mState = DataRowState.Unchanged; }
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; }
public virtual TreeNode SearchByCode(PlaceCode aPC) { return SearchByCode(Nodes, aPC.place, aPC.code); }
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; }
/// <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; }
public EvA_SelectedTreeItem(PlaceCode aPC, string aText) : this(aPC, aText, null) { }
/// <summary> /// ����������� ������� �������� ���� �������� � ������ (TreeNode) /// ������� � ��������� ����. /// ����������� ������ ���� ���������� � ����������� ������. /// </summary> /// <param name="aRootCode">���� � �������� ����������� �������� ��������</param> //public virtual void LoadAll(int aRootCode) //{ //} public void ReloadLevel(PlaceCode pc) { ReloadLevel(pc.place,pc.code); }
public CASTreeItemData(PlaceCode aPC) { pPC = aPC; pTemp = 0; }
protected virtual bool CompareByCode(TreeNode aTN, PlaceCode aPC) { return ((CASTreeItemData)aTN.Tag).pPC.Equals(aPC); }
public _ListBoxPCItem(PlaceCode aPC, string aText) { _pc = aPC; _text = aText; }
public static void SelectPC(ComboBox aCbo, PlaceCode aPC) { foreach (_ListBoxPCItem pci in aCbo.Items) { if (pci.pPC.Equals(aPC)) aCbo.SelectedItem = pci; } }
public EvA_SelectedTreeItem(PlaceCode aPC, string aText, object aTag) { _pc = aPC; _text = aText; _tag = aTag; }
public static string PlaceCode2PDC(PlaceCode aPC) { return aPC.place.ToString() + PlaceCode.DELIM + aPC.code.ToString(); }
public int AddRoot(PlaceCode aPC) { return mArrRoots.Add(aPC); /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /// ��������� ��������� �� _currRootInd, ���� ����� ����� � ���������� /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }
public EvA_PlaceCode(PlaceCode aPC) { _pc = aPC; }