12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace LYFZ.Software.MainBusiness.VersionControl
- {
- public class VersionFunction : IVersionFuction
- {
-
-
-
-
-
- public void RemoveDrowDownListData(System.Windows.Forms.Control control, string[] MoveValueList)
- {
- LYFZ.ComponentLibrary.ComboBoxTreeViewEx comboBox = (LYFZ.ComponentLibrary.ComboBoxTreeViewEx)control;
- string strValueData = "," + string.Join(",", MoveValueList) + ",";
- List<System.Windows.Forms.TreeNode> removeItemLsit = new List<System.Windows.Forms.TreeNode>();
- foreach (System.Windows.Forms.TreeNode obj in comboBox.Nodes)
- {
- if(strValueData.IndexOf(","+obj.Tag.ToString()+",")>-1)
- {
- removeItemLsit.Add(obj);
- }
- }
- foreach (System.Windows.Forms.TreeNode obj in removeItemLsit)
- {
- comboBox.Nodes.Remove(obj);
- }
- }
-
-
-
-
-
- public void ShowOrHideControl(
- List<System.Windows.Forms.Control> showHideControls,
- List<System.Windows.Forms.Control> moveControls)
- {
- int splitWidth = 10;
- System.Drawing.Point firstPoint = new System.Drawing.Point(-1,-1);
- if(showHideControls.Count>0)
- {
- for(int i=0;i<showHideControls.Count;i++)
- {
- showHideControls[i].Visible = false;
- if(firstPoint.X==-1)
- {
- firstPoint =
- new System.Drawing.Point(
- showHideControls[i].Location.X,
- showHideControls[i].Location.Y
- );
- }
- else
- {
- if(firstPoint.X>showHideControls[i].Location.X)
- {
- firstPoint.X = showHideControls[i].Location.X;
- }
- }
- }
- }
- if (moveControls != null)
- {
- foreach (System.Windows.Forms.Control control in moveControls)
- {
- control.Location = new System.Drawing.Point(
- firstPoint.X,
- control.Location.Y
- );
- firstPoint.X +=control.Width+ splitWidth;
- }
- }
- }
-
-
-
-
-
- public void ShowOrHideTabControl(System.Windows.Forms.TabControl tabControl, List<System.Windows.Forms.TabPage> tabPages)
- {
- foreach(System.Windows.Forms.TabPage tabPage in tabPages)
- {
- tabControl.TabPages.Remove(tabPage);
- }
- }
- }
- }
|