Comment detail

年間カレンダー (Nested Flatten)

これが一番簡単だと思います。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
//http://ja.doukaku.org/119/ 投稿用
using System;
using System.Windows.Forms;
namespace どう書く_org年間カレンダ {
    class Program {
        [STAThread]
        static void Main(string[] args) {
            Application.Run(new Form1());
        }

    }
    class Form1:Form {
        MonthCalendar calendar = new MonthCalendar();
        public Form1() {
            int year = int.Parse(Environment.GetCommandLineArgs()[1]);
            AutoSize = true;
            calendar.Parent = this;
            calendar.SetCalendarDimensions(4, 3);
            calendar.SelectionStart = new DateTime(year, 1, 1);
        }
    }
}

見た目修正。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//http://ja.doukaku.org/119/ 投稿用
using System;
using System.Drawing;
using System.Windows.Forms;
namespace どう書く_org年間カレンダ {
    class Program {
        [STAThread]
        static void Main(string[] args) {
            Application.Run(new Form1());
        }
    }
    class Form1:Form {
        public Form1() {
            int year = int.Parse(Environment.GetCommandLineArgs()[1]);
            Text = year + " Calender";
            MonthCalendar calendar = new MonthCalendar();
            calendar.Parent = this;
            calendar.Dock = DockStyle.Fill;
            calendar.SelectionStart = new DateTime(year, 1, 1);
            calendar.SelectionEnd = new DateTime(year, 1, 1);
            Size = new Size(calendar.SingleMonthSize.Width * 4, calendar.SingleMonthSize.Height * 3);
        }
    }
}

Index

Feed

Other

Link

Pathtraq

loading...