public StylePair(StylesList container, Style st, string path) { p = container; p.owner.objectscontainer.AutoScrollMargin = new System.Drawing.Size(1, 1); p.owner.objectscontainer.Controls.Add(Name); p.owner.objectscontainer.Controls.Add(Path); p.owner.objectscontainer.Controls.Add(SetPath); p.owner.objectscontainer.Controls.Add(Canc); p.owner.objectscontainer.Controls.Add(Info); p.owner.objectscontainer.Controls.Add(SubInfo); stylecode = st.code; Name.Text = st.name; SetPath.Text = "..."; SetPath.Width = SetPathWidth / 2 - 2; Canc.Text = "Clr"; Canc.Width = SetPathWidth / 2; Name.Left = 0; Path.Left = PathLeft + Name.Left; Path.Width = PathWidth; SetPath.Left = 5 + Path.Left + Path.Width; Canc.Left = SetPath.Left + SetPath.Width + 2; Info.Left = SetPathWidth + SetPath.Left + 5; SubInfo.AutoSize=Info.AutoSize = true; SubInfo.Left = Path.Left; SubInfo.Font = new System.Drawing.Font(SubInfo.Font,System.Drawing.FontStyle.Bold); Path.Text = path; p.tipok.SetToolTip(Path, path); Path.Enabled = false; Pro2 = new Progress2(Path,0, 100, 1, (int)(1024 * 1024 * 1.5f)); SetPath.Click += new EventHandler(SetPath_Click); Canc.Click += new EventHandler(Canc_Click); p.tipok.SetToolTip(SetPath, "Установить путь\r\nТекущий путь : "+Path.Text); p.tipok.SetToolTip(Canc, "Очистить путь"); }
public void Add(Style style, string path = "") { pairs.Add(new StylePair(this, style, path)); pairs[pairs.Count - 1].Top = (currtop += topmargin); currtop += 30; }