Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // モデルを生成
            NodeCollection nodes = CreateGraph();

            Circularize(nodes, 200.0d);
            TimerSwitch timerSwitch = new TimerSwitch();
            Size        clientSize  = new Size(600, 600);

            // コントローラを生成
            NodeController  nodeController  = new NodeController(nodes, clientSize);
            TimerController timerController = new TimerController(timerSwitch);

            // ビューを生成
            MainForm form = new MainForm(nodes, timerSwitch, clientSize);

            form.SetControllers(nodeController, timerController);

            Application.Run(form);
        }
Exemplo n.º 2
0
 public NodeController(NodeCollection nodes, Size clientSize)
 {
     this.nodes      = nodes;
     this.clientSize = clientSize;
 }