public void SetVisibleFirst(int count)
        {
            bool v = false;
            int  h = 0;

            for (int i = 0; i < Options.Count; i++)
            {
                if (i < count)
                {
                    v = true;
                    h = richTextBoxesHeight[i];
                }
                else
                {
                    v = false;
                    h = 0;
                }
                Extensions.SetControlVisible(Options[i], v);
                Extensions.SetControlVisible(Effects[i], v);
                //SetControlHeight(Effects[i], h);
            }
        }
Example #2
0
        private void SetTextToControls()
        {
            if (currentDialogData == null)
            {
                return;
            }
            if (!showOriginal)
            {
                Extensions.SetTextToControl(textBox3, currentDialogData.NameTrans);
                Extensions.SetTextToControl(textBox4, currentDialogData.TextTrans);
            }
            else
            {
                Extensions.SetTextToControl(textBox3, currentDialogData.Name);
                Extensions.SetTextToControl(textBox4, currentDialogData.Text);
            }

            if (currentDialogData.ChoiceDataList.Count > 0)
            {
                Extensions.SetControlVisible(listBox1, true);
                Extensions.ClearListBox(listBox1);
                foreach (var item in currentDialogData.ChoiceDataList)
                {
                    Extensions.AddTextToList(listBox1, showOriginal ? item.Text : item.TransText);
                }
                Extensions.SetControlHeight(listBox1, currentDialogData.ChoiceDataList.Count * 22);
            }
            else
            {
                if (listBox1.Visible)
                {
                    Extensions.SetControlVisible(listBox1, false);
                    Extensions.ClearListBox(listBox1);
                }
            }
        }