コード例 #1
0
        private void InitializeWaypoints(bool initialize)
        {
            try
            {
                if (_reader == null)
                {
                    MessageBox.Show(this, "Please open a nav file first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (_waypoints == null)
                {
                    _waypoints      = new WaypointControl();
                    _waypoints.Dock = DockStyle.Fill;
                }

                if (initialize)
                {
                    _waypoints.InitializeWaypoints(_reader);
                }

                SetActiveControl(_waypoints);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Unable to load waypoints. " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: fishxz/omni-bot
        private void InitializeWaypoints(bool initialize)
        {
            try
            {
                if (_reader == null)
                {
                    MessageBox.Show(this, "Please open a nav file first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (_waypoints == null)
                {
                    _waypoints = new WaypointControl();
                    _waypoints.Dock = DockStyle.Fill;
                }

                if (initialize)
                {
                    _waypoints.InitializeWaypoints(_reader);
                }

                SetActiveControl(_waypoints);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Unable to load waypoints. " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }