示例#1
0
        public GraphWindow(GraphSettings defaultGraphSettings) : base(defaultGraphSettings.Title)
        {
            this.defaultGraphSettings = defaultGraphSettings;

            ID = defaultGraphSettings.Title;

            if (GraphSettings.FromFile(GraphSettingsFilePath, out graphSettings) == false)
            {
                graphSettings = defaultGraphSettings.Clone();
            }

            InitializeComponent();

            Name = defaultGraphSettings.Title;
            Text = defaultGraphSettings.Title;

            graph.ShowLegend   = graphSettings.ShowLegend;
            graph.AxesRange    = graphSettings.AxesRange;
            graph.YAxisLabel   = graphSettings.YAxisLabel;
            graph.LockXMouse   = true;
            graph.ZoomFromXMin = graph.LockXMouse;
            graph.Rolling      = true;

            graph.Traces.AddRange(defaultGraphSettings.Traces);
        }
示例#2
0
        private void resetViewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            graphSettings = defaultGraphSettings.Clone();

            graph.ResetView();
        }