예제 #1
0
        public ToolPanel(int positionX, int positionY, WeightTable weightTable, List <EdgeDraw> edgeDraws
                         , AdjacencyList adjacencyList, StartForm.DrawForm drawForm, AdjacencyListPanel adListPanel
                         , List <VertexDraw> vertexDraws, List <List <CellBox> > matrix, List <List <CellAdjacencyList> > cells
                         , ShortestPathPanel shortestPathPanel)

        {
            Location = new System.Drawing.Point(positionX, positionY);

            Dock = DockStyle.Left;

            LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow;

            saveWeightButton = new SaveWeightButton(20, 20, adjacencyList, matrix, weightTable, adListPanel);

            tableButton = new WeightTableButton(20, 20, weightTable, adListPanel, saveWeightButton);

            cycleButton = new CycleButton(20, 20, adjacencyList, edgeDraws, drawForm);

            shortestPathButton = new ShortestPathPanelButton(20, 20, shortestPathPanel);

            adListButton = new AdjacencyListPanelButton(20, 20, adListPanel, weightTable, saveWeightButton);

            saveButton = new SaveButton(20, 20, adjacencyList, drawForm);

            deleteAllButton = new DeleteAllButton(20, 20, adjacencyList, vertexDraws, edgeDraws, drawForm, adListPanel, weightTable, matrix, cells);


            Items.Add(tableButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(adListButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(cycleButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(shortestPathButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(saveButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(deleteAllButton);

            Items.Add(new ToolStripSeparator());

            Items.Add(saveWeightButton);

            Items.Add(new ToolStripSeparator());
        }
예제 #2
0
        public WeightTableButton(int width, int height, WeightTable weightTable, AdjacencyListPanel adListPanel
                                 , SaveWeightButton saveWeightButton)
        {
            Size = new System.Drawing.Size(width, height);

            Dock = DockStyle.Top;

            Click += new EventHandler(ButtonClick);

            Text = "Weight Table";

            this.weightTable = weightTable;

            this.adListPanel = adListPanel;

            this.saveWeightButton = saveWeightButton;
        }