public EditLogDialog(RoadEventData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            InitializeComponent();

            _data              = data;
            txtComment.Text    = data.Comment;
            udCorrection.Value = Convert.ToDecimal(data.DistanceManualCorrection);
        }
Beispiel #2
0
        private void EditLogData(RoadEventData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            data = this.ParentAgent.CloneRoadEvent(data);

            if (ShowEditLogDataDialog(data) == DialogResult.OK)
            {
#pragma warning disable 4014
                this.ParentAgent.OnRoadEvent(data, isNew: false);
#pragma warning restore 4014
            }
        }
Beispiel #3
0
        private DialogResult ShowEditLogDataDialog(RoadEventData data)
        {
            var hotkeyModeEnabled = _hotkeyModeEnabled;

            _hotkeyModeEnabled = false;
            try
            {
                using (var dialog = new EditLogDialog(data))
                {
                    return(dialog.ShowDialog());
                }
            }
            finally
            {
                _hotkeyModeEnabled = hotkeyModeEnabled;
            }
        }