Exemple #1
0
        private void InitializeLabels()
        {
            var labelIndex  = 0;
            int coulmsCount = 3;
            int rowCounts   = 4;

            new LabelsImproved();
            var labels = LabelsImproved.getList();

            for (int i = 1; i <= coulmsCount; i++)
            {
                var k = 0;
                for (int j = 1; j <= rowCounts + (i - 1); j++)
                {
                    if (labelIndex == labels.Count())
                    {
                        break;
                    }

                    var label = labels[labelIndex];
                    label.Location = new System.Drawing.Point(13 + 237 * (i - 1), 200 + 60 * (j - 1) + k);

                    Controls.Add(label);

                    if (labels[labelIndex].Name == LabelsImproved.names.description.ToString())
                    {
                        k = 60;
                    }

                    labelIndex++;
                }
                k = 0;
            }
        }
        private void TrackBar1_ValueChanged(object sender, System.EventArgs e)
        {
            Console.WriteLine(getEnum(Value));
            var textbox = LabelsImproved.getLabelByName(LabelsImproved.names.size);

            textbox.Text = string.Format("{0}: {1} {2}",
                                         Utils.GetEnumDescription(LabelsImproved.names.size),
                                         Value,
                                         getEnum(Value));
        }