Beispiel #1
0
        public MainForm()
        {
            InitializeComponent();

            controlGraph1.ProgressBar = toolStripProgressBar1;

            Model         = new ParallelUnstructuredModel();
            SelectedPoint = Model.Bounds.Location;

            controlPlayback1.PositionChanged += (o, v) => DisplayEntry(v);
            controlPlayback1.PlaybackChanged += (o, v) => timer1.Enabled = v;

            controlDmp1.DmpControl.DataLocationChanged += (o, e) =>
            {
                if (ModifierKeys == Keys.Shift)
                {
                    SelectedPoint = e;
                    lblPos.Text   = string.Format("X: {0} Y: {1}", e.X, e.Y);
                    if (controlGraph1.Model == Model)
                    {
                        controlGraph1.DisplayPoint(SelectedPoint);
                    }
                }
            };

            txtTicks.Text = timer1.Interval.ToString();
        }
Beispiel #2
0
        public void InitializeFrom(ParallelUnstructuredModel model, PointF location)
        {
            Model = model;

            if (initializeWorker.IsBusy)
            {
                return;
            }
            if (_ProgressBar != null)
            {
                _ProgressBar.Visible = true;
            }

            initializeWorker.RunWorkerAsync(location);
        }
Beispiel #3
0
 public void OpenFile(string filename)
 {
     timer1.Enabled = false;
     Model          = ParallelUnstructuredModel.FromFile(filename);
     SelectedPoint  = Model.Bounds.Location;
     cmbVariables.Items.Clear();
     cmbVariables.Items.AddRange(Model.Variables);
     if (cmbVariables.Items.Count > 0)
     {
         cmbVariables.SelectedItem = cmbVariables.Items[0];
     }
     controlGraph1.InitializeFrom(Model, SelectedPoint);
     OnPaletteChanged(this, EventArgs.Empty);
     UpdateUI();
 }
Beispiel #4
0
 public void InitializeFrom(ParallelUnstructuredModel model)
 {
     InitializeFrom(model, model.Dimensions.Bounds.Location);
 }
Beispiel #5
0
 private void NewModel()
 {
     timer1.Enabled = false;
     Model          = new ParallelUnstructuredModel();
     UpdateUI();
 }