예제 #1
0
        private void CreateHeatFromFile(Backend.Model.IntensityData idata)
        {
            Panel heatpanel = CreateHeatPanel();

            AddHeatChartFromFile(heatpanel, idata);
            AddButtons(heatpanel);
            graphpanel.Controls.Add(heatpanel);
        }
예제 #2
0
        public void OpenHeatMap()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "csv|*.csv";

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                Backend.Model.IntensityData idata = Backend.FileService.Instance.loadIntensityData(ofd.FileName);
                CreateHeatFromFile(idata);
            }
            else
            {
                DialogResult dr = MessageBox.Show("Please choose a file", "File not found", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning);
                if (dr == DialogResult.Retry)
                {
                    OpenHeatMap();
                }
            }
        }