コード例 #1
0
        static void Main(string[] args)
        {
            // plain old text view
            var textView = new TextView();

            // decorated text view
            // TODO uncomment this line when you have refactored TextViewWithBorder and TextViewWithScroll
            //var decoratedTextView = new BorderDecorator(new ScrollDecorator(textView, 54), 5);

            // change this line to render your decorated text view
            RenderView (textView);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Window window = new Window();
            TextView textView = new TextView();

            // plain old text view
            // window.SetContents(textView);

            // decorated text view
            window.SetContents(new BorderDecorator(new ScrollDecorator(textView, 54), 5));

            window.DrawContents();
        }