Ejemplo n.º 1
0
        public GraphDetailsDialog(GraphList graphList, DesignedGraph designedGraph)
        {
            InitializeComponent();
            tableLayoutPanel1.Visible = false;

            this.graphList = graphList;
            isNew = (designedGraph == null);
            if (isNew)
            {
                this.designedGraph = new DesignedGraph();
                // Generate an unique suggested name for the graph
                if (graphList != null)
                    this.designedGraph.DisplayName = Helpers.MakeUniqueName(Messages.GRAPH_NAME, graphList.DisplayNames);
                base.Text = Messages.GRAPHS_NEW_TITLE;
            }
            else
            {
                this.designedGraph = new DesignedGraph(designedGraph);
                base.Text = string.Format(Messages.GRAPHS_DETAILS_TITLE, this.designedGraph.DisplayName);
                SaveButton.Text = Messages.OK;
            }
            ActiveControl = GraphNameTextBox;
            GraphNameTextBox.Text = this.designedGraph.DisplayName;
            EnableControls();
        }
Ejemplo n.º 2
0
        public GraphDetailsDialog(GraphList graphList, DesignedGraph designedGraph)
        {
            InitializeComponent();

            this.graphList = graphList;
            isNew = (designedGraph == null);
            if (isNew)
            {
                this.designedGraph = new DesignedGraph();
                base.Text = Messages.GRAPHS_NEW_TITLE;
            }
            else
            {
                this.designedGraph = new DesignedGraph(designedGraph);
                base.Text = string.Format(Messages.GRAPHS_DETAILS_TITLE, this.designedGraph.DisplayName);
                SaveButton.Text = Messages.OK;
            }
            ActiveControl = GraphNameTextBox;
            GraphNameTextBox.Text = this.designedGraph.DisplayName;
            EnableControls();
        }