Exemplo n.º 1
0
 private void RunFrame(object sender, EventArgs e)
 {
     try
     {
         GpssBlockData[] gpssBlocks = SimDataObtainer.GetSimData();
         if (model.blocks != null)
         {
             GpssToVisualConverter.UpdateStats(model.blocks, gpssBlocks);
         }
         else
         {
             model.blocks = GpssToVisualConverter.Convert(gpssBlocks);
         }
         foreach (VisualBlock block in model.blocks)
         {
             Controls.Add(block);
         }
         Invalidate();
     }
     catch (Exception)
     {
         StopTimer();
         Close();
     }
 }
Exemplo n.º 2
0
        private void showToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string error = "";

            if (!SimDataObtainer.Init(ref error))
            {
                MessageBox.Show(error);
            }
            else
            {
                modelForm = new ModelForm();
                modelForm.Show(this);
                modelForm.StartTimer();
            }
        }