Esempio n. 1
0
        public NonBarcodePopup()
        {
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize    = new Size((int)w, (int)h);
            Text          = @"Pattern Aç";
            Geometry.Rectangle v = new Geometry.Rectangle(w * 0.1f, w * 0.9f, 0f, h);


            for (var i = 0; i < _lineStrings.Count; i++)
            {
                var r   = v.SliceHorizontal((i + 1) / 12f, (i + 2) / 12f);
                var att = new TextPair(_lineStrings[i], _lineStrings[i], r);
                _lines.Add(att);
                att.Implement(Controls);
            }


            // buttons
            var buttonsRect = v.SliceHorizontal(0.9f, 0.95f);
            var conf        = new ModifiedButton("onay", "Onay");

            conf.Reorient(buttonsRect.SliceVertical(0.1f, 0.4f));
            conf.ClickAction = () =>
            {
                _confirmed = true;
                Close();
            };

            var exit = new ModifiedButton("çık", "Çık");

            exit.Reorient(buttonsRect.SliceVertical(0.6f, 0.9f));
            exit.ClickAction = Close;

            Controls.Add(conf);
            Controls.Add(exit);

            for (float i = 0; i < 3; i++)
            {
                var mrb = new ModifiedRadioButton("radio");
                mrb.Reorient(v.SliceHorizontal(0.8f, 0.9f).SliceVertical(i / 3f, (i + 1) / 3f));
                mrb.Text = $"Hücre {i + 1}";
                var i1 = i;
                mrb.ClickAction = () =>
                {
                    if (RobotNo == 0)
                    {
                        conf.Enabled = true;
                    }

                    RobotNo = (int)i1 + 1;
                };


                Controls.Add(mrb);
            }
        }
Esempio n. 2
0
        public void resize(int x, int y, int w, int h)
        {
            Geometry.Rectangle r = new Geometry.Rectangle(w, h, new Geometry.Point(x, y));

            var rows = r.SliceHorizontal(0.0f, 0.8f).Split(_rowCount, 1, 0f, 0f);

            for (var i = 0; i < _rowCount; i++)
            {
                _textPairs[i].reorient(rows[i]);
            }
            _apply.Reorient(r.SliceHorizontal(0.8f, 1f));
        }
Esempio n. 3
0
        public PalletePopup()
        {
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize    = new Size((int)w, (int)h);
            Text          = @"Palet Ekleme";
            Geometry.Rectangle v = new Geometry.Rectangle(w * 0.1f, w * 0.9f, 0f, h);


            var helpfulText = new ModifiedLabel("warn", "*Hücre no seçimi yapın.");

            helpfulText.Reorient(v.SliceHorizontal(0.5f, 0.75f));
            helpfulText.ForeColor  = Color.Red;
            helpfulText.ImageAlign = ContentAlignment.TopLeft;
            helpfulText.Visible    = false;
            Controls.Add(helpfulText);



            // buttons
            var buttonsRect = v.SliceHorizontal(0.75f, 0.9f);

            _confButton = new ModifiedButton("onay", "Onay");
            _confButton.Reorient(buttonsRect.SliceVertical(0.1f, 0.4f));
            _confButton.ClickAction = () =>
            {
                if (cb.SelectedIndex != -1)
                {
                    Confirmed = true;
                    Close();
                }
                else
                {
                    helpfulText.Visible = true;
                }
            };
            _confButton.Enabled = false;


            var exit = new ModifiedButton("çık", "Çık");

            exit.Reorient(buttonsRect.SliceVertical(0.6f, 0.9f));
            exit.ClickAction = Close;

            Controls.Add(_confButton);
            Controls.Add(exit);


            for (float i = 0; i < 3; i++)
            {
                var mrb = new ModifiedRadioButton("radio");
                mrb.Reorient(v.SliceHorizontal(1f / 8f, 2f / 8f).SliceVertical(i / 3f, (i + 1) / 3f));
                mrb.Text = $"Hücre {i+1}";
                var i1 = i;
                mrb.ClickAction = () =>
                {
                    if (RobotNo == 0)
                    {
                        _confButton.Enabled = true;
                    }
                    RobotNo = (int)i1 + 1;
                };


                Controls.Add(mrb);
            }



            cb.Reorient(v.SliceHorizontal(2.5f / 8f, 4f / 8f));
            //cb.IntegralHeight = false;
            cb.MaxDropDownItems = 5;
            cb.DropDownStyle    = ComboBoxStyle.Simple;
            //cb.DropDownStyle = ComboBoxStyle.DropDownList;
            cb.AutoCompleteMode = AutoCompleteMode.Append;
            cb.TabIndex         = 0;
            Controls.Add(cb);
        }