Пример #1
0
        private void LoadMenuItem_Click(object sender, EventArgs e)
        {
            var filter = TextResources.files_filter;

            using var openFileDialog = new OpenFileDialog
                  {
                      Filter           = filter,
                      FilterIndex      = 1,
                      RestoreDirectory = true
                  };

            if (openFileDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var fileName         = openFileDialog.FileName;
            var serializedEvents = File.ReadAllText(fileName);

            _mouseEvents = DeserializeFromString <MouseEventList>(serializedEvents);

            replayButton.Enabled = _mouseEvents.GetCount() > 0;
        }
Пример #2
0
 private bool HasMouseEvents()
 {
     return(_mouseEvents.GetCount() > 0);
 }