public override void Arrange()
        {
            _sut = new Document();
            _title = _sut.CreateTextBox(new Rectangle(new Point(20, 20), new Size(170, 10)));
            _title.SetColor(Color.Black);
            _title.SetFont(new FontProperties { Name = "Courier", Size = 20 });
            _title.AddText("The select Model");

            var location = new Point(20, 45);
            var size = new Size(170, 235);
            _textbox = _sut.CreateTextBox(new Rectangle(location, size));
            _textbox.SetFont(new FontProperties { Name = "Courier", Size = 10 });
            var realisticText = "The select Model is the most widely available I/O model in Winsock. " +
                                "We call it the select model because it centers on using the select function to " +
                                "manage I/O. The design of this model originated on Unix-based computers featuring " +
                                "Berkeley socket implementations. The select model was incorporated into Winsock 1.1 " +
                                "to allow applications that want to avoid blocking on socket calls the ability to manage " +
                                "multiple sockets in an organized manner. Because Winsock 1.1 is backward-compatible " +
                                "with Berkeley socket implementations, a Berkeley socket application that uses the select " +
                                "function should technically be able to run without modification.\n" +
                                "The select function can be used to determine whether there is data on a socket and " +
                                "whether a socket can be written to. The whole reason for having this function is to " +
                                "prevent your application from blocking on an I/O bound call such as send or recv when " +
                                "a socket is in a blocking mode and to prevent the WSAEWOULDBLOCK error when a socket " +
                                "is in nonblocking mode. The select function blocks for I/O opperations until the " +
                                "conditions specified as parameters are met. The function prototype for select is " +
                                "as follows:\n" +
                                "...";
            _textbox.AddText(realisticText);
        }
Exemplo n.º 2
0
        public void AddTextBox(TextBox textbox)
        {
            var newY = _size.Height - textbox.Position.Y;
            textbox.Position = new Point(textbox.Position.X, newY);

            _contents.AddTextBox(textbox);
        }
Exemplo n.º 3
0
 public override void Arrange()
 {
     var document = new Document();
     _sut = document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));
     _sut.SetFont(new FontProperties { Name = "Courier", Size = 10 });
     _addedText = "Added/text";
 }
Exemplo n.º 4
0
        public override void Arrange()
        {
            _document = new Document();
            _sut = _document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));

            _fontsize = 10;
            _properties = new FontProperties { Name = "Arial", Size = _fontsize };
        }
 public override void Arrange()
 {
     var document = new Document();
     _sut = document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));
     _sut.SetFont(new FontProperties { Name = "Helvetica", Size = 10 });
     _addedText = "Price: € 50,25-";
     _expectedText = @"Price: \200 50,25-";
 }
 public override void Arrange()
 {
     _sut = new Document();
     _textbox = _sut.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));
     _textbox.SetColor(Color.Black);
     _textbox.SetFont(new FontProperties { Name = "Helvetica", Size = 10 });
     _textbox.AddText("dit is een testje dat iets langer is.");
 }
Exemplo n.º 7
0
        public override void Arrange()
        {
            _document = new Document();
            _textbox = _document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));

            _fontProperties = new FontProperties { Name = "Arial" };
            _textbox.SetFont(_fontProperties);

            _sut = new ContentsObject(246);
        }
Exemplo n.º 8
0
        public override void Arrange()
        {
            _document = new Document();
            _page = _document.AddPage();
            _sut = _document.CreateTextBox(new Rectangle(33, 12, 155, 255));

            _sut.SetFont(new FontProperties("Helvetica", 10));

            _page.AddTextBox(_sut);
        }
 public override void Arrange()
 {
     _document = new Document();
     _page = _document.AddPage();
     _sut = _document.CreateTextBox(new Rectangle(33, 12, 155, 255));
     var canvas = _document.CreateCanvas();
     canvas.SetStrokeColor(Color.Black);
     canvas.SetFillColor(Color.White);
     canvas.DrawBox(new Rectangle(33, 12, 155, 255));
     _page.AddCanvas(canvas);
 }
 public override void Arrange()
 {
     _sut = new Document();
     _textbox1 = CreateTextbox(100, 25);
     _canvas1 = CreateCanvas(100, 25);
     _textbox2 = CreateTextbox(90, 60);
     _canvas2 = CreateCanvas(90, 60);
     _textbox3 = CreateTextbox(80, 95);
     _canvas3 = CreateCanvas(80, 95);
     _textbox4 = CreateTextbox(70, 130);
     _canvas4 = CreateCanvas(70, 130);
     _textbox5 = CreateTextbox(65, 165);
     _canvas5 = CreateCanvas(65, 165);
 }
        public override void Arrange()
        {
            _sut = new Document();

            var location1 = new Point(50, 25);
            var size1 = new Size(100, 50);
            _textbox1 = CreateTextbox(location1, size1);
            _canvas1 = CreateCanvas(location1, size1);

            var location2 = new Point(50, 100);
            var size2 = new Size(75, 50);
            _textbox2 = CreateTextbox(location2, size2);
            _canvas2 = CreateCanvas(location2, size2);
        }
Exemplo n.º 12
0
        public void InitializePage(DateTime datum)
        {
            _doc = new Document();
            _page = _doc.AddPage();

            var headertext = _doc.CreateTextBox(new Rectangle(0, 0, 50, 50));
            headertext.Position = new Point(400, 20);
            headertext.SetFont(new FontProperties("Helvetica", 10));
            _datum = datum;
            headertext.AddText("Afgedrukt op " + _datum.ToString("dd MMMM yyyy"));
            headertext.AddText("Ingevuld op           " + _datum.ToString("MMMM yyyy"));
            _page.AddTextBox(headertext);

            _text = _doc.CreateTextBox(new Rectangle(0, 0, 160, 50));

            _text.SetColor(Color.Black);
            _text.Position = new Point(40, 20);
        }
        public override void Arrange()
        {
            _sut = new Document();

            _canvas1 = _sut.CreateCanvas();
            _canvas1.SetFillColor(Color.Azure);
            _canvas1.SetStrokeColor(Color.Black);

            var location = new Point(20, 45);
            var size = new Size(100, 50);
            _canvas1.DrawBox(location, size);

            for (var i = 30; i < 120; i += 10)
            {
                DrawVerticalRuler(i);
            }

            _textbox1 = CreateTextbox(location, size, 10, TextAlignment.Justify);
        }
        public override void Arrange()
        {
            _sut = new Document();
            _title = _sut.CreateTextBox(new Rectangle(new Point(20, 20), new Size(170, 10)));
            _title.SetColor(Color.Black);
            _title.SetFont(new FontProperties { Name = "Helvetica", Size = 20 });
            _title.AddText("The select Model");

            _canvas1 = _sut.CreateCanvas();
            _canvas1.SetFillColor(Color.Azure);
            _canvas1.SetStrokeColor(Color.Black);

            var location = new Point(20, 45);
            var size = new Size(170, 110);
            _canvas1.DrawBox(location, size);
            _textbox1 = CreateTextbox(location, size, 10);

            _canvas2 = _sut.CreateCanvas();
            _canvas2.SetFillColor(Color.Azure);
            _canvas2.SetStrokeColor(Color.Black);

            _canvas2.DrawBox(new Point(20, 20), new Size(170, 115));
            _textbox2 = CreateTextbox(new Point(20, 20), new Size(170, 115), 20);
        }
Exemplo n.º 15
0
 public override void Act()
 {
     _result = _sut.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));
 }
Exemplo n.º 16
0
 public void AddTextBox(TextBox textbox)
 {
     _parts.Add(textbox);
 }
 public override void Arrange()
 {
     _document = new Document();
     _sut = _document.CreateTextBox(new Rectangle(new Point(50, 50), new Size(50, 50)));
 }