private string readUIandPopulate(ref ArrayList tArrayList) { string results = "\t\tInfo"; string str = ""; tArrayList.Add(results); foreach (object en in this.extraCuiPanles) { CostumeUserInput cui = (CostumeUserInput)en; string hQt = " \""; string tQt = "\""; string tbx = cui.getCUITextBox(); string label = cui.labelName; tbx = validateInput(tbx, label); if (label.ToLower().Equals("id")) { hQt = ""; tQt = ""; label = ""; } else if (label.ToLower().Equals("ismask")) { hQt = " "; tQt = ""; } if (tbx.Length > 0) { str = "\t\t\t" + label + hQt + tbx + tQt; tArrayList.Add(str); results += str; } } str = "\t\tEnd"; tArrayList.Add(str); results += str; return(results); }
private int getlastIndexOf(string kStr) { int m = -1; for (int i = 0; i < extraCuiPanles.Count; i++) { CostumeUserInput cui = (CostumeUserInput)extraCuiPanles[i]; if (cui.labelName.Equals(kStr)) { m = i; } } return(m); }
private ArrayList findUI(string kStr) { ArrayList uis = new ArrayList(); for (int i = 0; i < extraCuiPanles.Count; i++) { CostumeUserInput cui = (CostumeUserInput)extraCuiPanles[i]; if (cui.labelName.Equals(kStr)) { uis.Add(cui); } } return(uis); }
private void addUserEnteryPanel(int index, string panelName, string label, string text, bool isFx) { Control ct = this.Controls[this.Controls.Count - 1]; bool hasAdd = false; int yLocation = ct.Bottom + 6; int height = this.ClientSize.Height; int width = this.ClientSize.Width; this.ClientSize = new System.Drawing.Size(width, height + 51); this.SuspendLayout(); if (label.ToLower().Contains("key") || label.ToLower().Contains("fx")) { hasAdd = true; } CostumeUserInput cui = new CostumeUserInput(this.rootDir, panelName, label, yLocation, width, isFx, hasAdd, addBtn_Click); cui.Width = this.Width - 5; cui.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; cui.setCUITextBox(text); this.Controls.Add(cui); this.ResumeLayout(false); this.PerformLayout(); if (index != -1) { this.extraCuiPanles.Insert(index, cui); } else { this.extraCuiPanles.Add(cui); } this.AddCostumePieceToolTip.SetToolTip(cui, "Enter " + label + " Name"); }
private void fixCUIorder() { this.SuspendLayout(); Control ct = this.Controls[0]; int yLocation = ct.Bottom + 6; foreach (object obj in extraCuiPanles) { CostumeUserInput cui = (CostumeUserInput)obj; cui.Top = yLocation; yLocation = cui.Bottom + 6; } this.ResumeLayout(false); this.PerformLayout(); }