示例#1
0
        private void ChartMap_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                // Smooth out the rotation of the chart
                Cursor.Hide();          // hide the cursor
                xr = Cursor.Position.X; // record the current mouse position
                yr = Cursor.Position.Y; //

                if (prevxr.ToString() != null || prevyr.ToString() != null)
                {
                    prevxr = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapRotationX", xr);
                    prevyr = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapRotationY", yr);

                    Cursor.Position = new Point(Convert.ToInt32(prevxr), Convert.ToInt32(prevyr));
                }
            }

            if (e.Button == MouseButtons.Middle)
            {
                // change to the pan cursor
                Cursor.Current = Cursors.NoMove2D;
                mousePosPan    = e.Location;
            }

            if (e.Button == MouseButtons.Right)
            {
                contextMenuStrip.Show(Cursor.Position.X, Cursor.Position.Y);
            }
        }
示例#2
0
        public override void Init()
        {
            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMin", 0);
            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMax", defaultmaximumradarradius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            comboBoxView.Enabled = false;
            comboBoxView.Items.Add("Top".Tx(this));
            comboBoxView.Items.Add("Front".Tx(this));
            comboBoxView.Items.Add("Side".Tx(this));
            comboBoxView.Items.Add("Grid".Tx(this));
            comboBoxView.Items.Add("Report".Tx(this));

            var sel = SQLiteConnectionUser.GetSettingString(DbSave + "PlotOrientation", "!!");

            if (comboBoxView.Items.Contains(sel))
            {
                comboBoxView.SelectedItem = sel;
            }
            else
            {
                comboBoxView.SelectedIndex = 0;
            }

            comboBoxView.Enabled = true;

            computer = new StarDistanceComputer();

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(menuStrip, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);

            SelectView();
        }
示例#3
0
        public void Init(int dn, bool showexcel, EDDiscoveryForm disc)
        {
            displaynumber            = dn;
            discoveryform            = disc;
            numberBoxMinRadius.Value = SQLiteConnectionUser.GetSettingDouble(DbRadiusMin, 0);
            numberBoxMaxRadius.Value = SQLiteConnectionUser.GetSettingDouble(DbRadiusMax, 20);
            textBoxSystemName.Text   = SQLiteConnectionUser.GetSettingString(DbStar, "");
            numberBoxDoubleX.Value   = SQLiteConnectionUser.GetSettingDouble(DbX, 0);
            numberBoxDoubleY.Value   = SQLiteConnectionUser.GetSettingDouble(DbY, 0);
            numberBoxDoubleZ.Value   = SQLiteConnectionUser.GetSettingDouble(DbZ, 0);

            if (textBoxSystemName.Text.Length > 0)
            {
                SetXYZ();
            }

            ValidateEnable();

            textBoxSystemName.SetAutoCompletor(SystemClassDB.ReturnSystemListForAutoComplete);

            this.numberBoxMinRadius.TextChanged += new System.EventHandler(this.textBoxSystemName_RadiusChanged);
            this.numberBoxMaxRadius.TextChanged += new System.EventHandler(this.textBoxSystemName_RadiusChanged);
            this.textBoxSystemName.TextChanged  += new System.EventHandler(this.textBoxSystemName_TextChanged);

            this.numberBoxDoubleX.ValidityChanged += ValidityNumberBox;
            this.numberBoxDoubleY.ValidityChanged += ValidityNumberBox;
            this.numberBoxDoubleZ.ValidityChanged += ValidityNumberBox;

            numberBoxMinRadius.SetComparitor(numberBoxMaxRadius, -2);     // need to do this after values are set
            numberBoxMaxRadius.SetComparitor(numberBoxMinRadius, 2);

            buttonExtExcel.Visible = showexcel;

            ValidateEnable();
        }
示例#4
0
        public override void Init()
        {
            computer = new StarDistanceComputer();

            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "Min", defaultMinRadius);
            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "Max", defaultMaxRadius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            checkBoxCube.Checked = SQLiteConnectionUser.GetSettingBool(DbSave + "Behaviour", false);
        }
        public override void Init()
        {
            computer = new StarDistanceComputer();

            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMin", 0);
            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMax", defaultmaximumradarradius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            uctg.OnTravelSelectionChanged += Uctg_OnTravelSelectionChanged;
        }
示例#6
0
        public override void Init()
        {
            computer = new StarDistanceComputer();

            slideMaxItems.Value = maxitems = SQLiteConnectionUser.GetSettingInt(DbSave + "MapMaxItems", maxitems);

            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapMax", defaultMapMaxRadius);
            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapMin", defaultMapMinRadius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            uctg.OnTravelSelectionChanged += Uctg_OnTravelSelectionChanged;
            slidetimer          = new System.Windows.Forms.Timer();
            slidetimer.Interval = 500;
            slidetimer.Tick    += Slidetimer_Tick;
        }
        public override void Init()
        {
            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMin", 0);
            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "PlotMax", defaultmaximumradarradius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            comboBoxView.Enabled = false;
            comboBoxView.Items.Add("Top");
            comboBoxView.Items.Add("Front");
            comboBoxView.Items.Add("Side");
            comboBoxView.Items.Add("Grid");
            comboBoxView.Items.DefaultIfEmpty("Top");
            comboBoxView.SelectedItem = SQLiteConnectionUser.GetSettingString(DbSave + "PlotOrientation", "Top");
            comboBoxView.Enabled      = true;

            computer = new StarDistanceComputer();
        }
示例#8
0
        public override void Init()
        {
            computer = new StarDistanceComputer();

            slideMaxItems.Value = maxitems = SQLiteConnectionUser.GetSettingInt(DbSave + "MapMaxItems", maxitems);

            textMaxRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapMax", defaultMapMaxRadius);
            textMinRadius.ValueNoChange = SQLiteConnectionUser.GetSettingDouble(DbSave + "MapMin", defaultMapMinRadius);
            textMinRadius.SetComparitor(textMaxRadius, -2);     // need to do this after values are set
            textMaxRadius.SetComparitor(textMinRadius, 2);

            slidetimer          = new System.Windows.Forms.Timer();
            slidetimer.Interval = 500;
            slidetimer.Tick    += Slidetimer_Tick;

            var style = chartMap.ChartAreas[0].Area3DStyle;

            style.Rotation    = Math.Min(180, Math.Max(-180, style.Rotation - (Convert.ToInt32(SQLiteConnectionUser.GetSettingDouble(DbSave + "MapRotationX", xr)))));
            style.Inclination = Math.Min(90, Math.Max(-90, style.Inclination + (Convert.ToInt32(SQLiteConnectionUser.GetSettingDouble(DbSave + "MapRotationY", yr)))));
        }
示例#9
0
        public void Init(int dn, string ucn, bool showexcel, EDDiscoveryForm disc)
        {
            ucdbname                   = ucn;
            displaynumber              = dn;
            discoveryform              = disc;
            numberBoxMinRadius.Value   = SQLiteConnectionUser.GetSettingDouble(DbRadiusMin, 0);
            numberBoxMaxRadius.Value   = SQLiteConnectionUser.GetSettingDouble(DbRadiusMax, 20);
            textBoxSystemName.Text     = SQLiteConnectionUser.GetSettingString(DbStar, "");
            numberBoxDoubleX.Value     = SQLiteConnectionUser.GetSettingDouble(DbX, 0);
            numberBoxDoubleY.Value     = SQLiteConnectionUser.GetSettingDouble(DbY, 0);
            numberBoxDoubleZ.Value     = SQLiteConnectionUser.GetSettingDouble(DbZ, 0);
            checkBoxCustomCube.Checked = SQLiteConnectionUser.GetSettingBool(DbCube, false);
            extCheckBoxExcludeVisitedSystems.Checked = SQLiteConnectionUser.GetSettingBool(DbEVS, false);

            if (textBoxSystemName.Text.Length > 0)
            {
                SetXYZ();
            }

            ValidateEnable();

            textBoxSystemName.SetAutoCompletor(SystemCache.ReturnSystemAutoCompleteList, true);

            this.numberBoxMinRadius.TextChanged += new System.EventHandler(this.textBoxSystemName_RadiusChanged);
            this.numberBoxMaxRadius.TextChanged += new System.EventHandler(this.textBoxSystemName_RadiusChanged);
            this.textBoxSystemName.TextChanged  += new System.EventHandler(this.textBoxSystemName_TextChanged);

            this.numberBoxDoubleX.ValidityChanged += ValidityNumberBox;
            this.numberBoxDoubleY.ValidityChanged += ValidityNumberBox;
            this.numberBoxDoubleZ.ValidityChanged += ValidityNumberBox;

            numberBoxMinRadius.SetComparitor(numberBoxMaxRadius, -2);     // need to do this after values are set
            numberBoxMaxRadius.SetComparitor(numberBoxMinRadius, 2);

            buttonExtExcel.Visible = showexcel;

            ValidateEnable();

            BaseUtils.Translator.Instance.Translate(this, new Control[] { labelX, labelY, labelZ });
        }
示例#10
0
 public override void LoadLayout()
 {
     DGVLoadColumnLayout(dataGridView, DbColumnSave);
     splitContainer.SplitterDistance(SQLiteConnectionUser.GetSettingDouble(DbSplitterSave, 0.2));
 }