Пример #1
0
        public BackToMenuFromDrawButton(AdjacencyList adjacencyList, List <VertexDraw> vertexDraws,
                                        List <EdgeDraw> edgeDraws, StartForm.DrawForm drawForm, AdjacencyListPanel adjacencyListPanel,
                                        WeightTable weightTable, List <List <CellBox> > matrix, List <List <CellAdjacencyList> > cells,
                                        string buttonText = "Menu") : base(buttonText)
        {
            ForeColor = Color.Black;

            this.BackColor = Color.Orange;

            Font = new System.Drawing.Font("Comic Sans MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(204)));

            FlatStyle = System.Windows.Forms.FlatStyle.Popup;

            Text = buttonText;

            Location = new System.Drawing.Point(300, 410);

            this.adjacencyList = adjacencyList;

            this.vertexDraws = vertexDraws;

            this.edgeDraws = edgeDraws;

            this.drawForm = drawForm;

            this.weightTable = weightTable;

            this.adjacencyListPanel = adjacencyListPanel;

            this.matrix = matrix;

            this.cells = cells;
        }
        public DeleteAllButton(int width, int height, AdjacencyList adjacencyList, List <VertexDraw> vertexDraws,
                               List <EdgeDraw> edgeDraws, StartForm.DrawForm drawForm, AdjacencyListPanel adjacencyListPanel,
                               WeightTable weightTable, List <List <CellBox> > matrix, List <List <CellAdjacencyList> > cells)
        {
            Size = new System.Drawing.Size(width, height);

            Dock = DockStyle.Top;

            Text = "Delete all";

            Click += new EventHandler(ButtonClick);

            this.adjacencyList = adjacencyList;

            this.vertexDraws = vertexDraws;

            this.edgeDraws = edgeDraws;

            this.drawForm = drawForm;

            this.weightTable = weightTable;

            this.adjacencyListPanel = adjacencyListPanel;

            this.matrix = matrix;

            this.cells = cells;
        }
Пример #3
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());
        }
Пример #4
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;
        }
Пример #5
0
        public SaveWeightButton(int width, int height, AdjacencyList adjacencyList, List <List <CellBox> > matrix, WeightTable weightTable, AdjacencyListPanel adListPanel)
        {
            this.adjacencyList = adjacencyList;

            this.matrix = matrix;

            this.weightTable = weightTable;

            this.adListPanel = adListPanel;

            Size = new System.Drawing.Size(width, height);

            Text = "Save Changes";

            Click += new EventHandler(ButtonClick);

            Enabled = false;
        }
Пример #6
0
 public MatrixWeightPanel(WeightTable weightTable, List <List <CellBox> > matrix)
 {
     this.weightTable = weightTable;
     this.matrix      = matrix;
 }