Commits

Szymon Wróblewski  committed 5ac8618

Fixed skipping frames, added message on error while loading settings

  • Participants
  • Parent commits 86c6ca1

Comments (0)

Files changed (1)

             if(skip >= chart1.Series[0].Points.Count) {
                 chart1.Series[0].Points.Clear();
                 rewindButton.Enabled = false;
+                count = 0;
             }
             else {
                 for(int i = 0; i < skip; i++) {
                     chart1.Series[0].Points.RemoveAt(chart1.Series[0].Points.Count - 1);
                 }
+                count -= skip;
             }
         }
 
                     DataContractSerializer serializer = new DataContractSerializer(typeof(Settings));
                     try {
                         settings.copyFrom(serializer.ReadObject(stream) as Settings);
+                        propertyGrid1.Refresh();
+                    }
+                    catch (Exception ex){
+                        //toolStripStatusLabel1.Text = String.Format("Error during loading settings: {0}", ex.Message);
+                        toolStripStatusLabel1.Text = "Error during loading settings";
                     }
                     finally {
                         stream.Close();