public override void Init()
        {
            DBBaseName = "MapPanel";

            computer = new StarDistanceComputer();

            slideMaxItems.Value = maxitems = GetSetting("MapMaxItems", maxitems);

            textMaxRadius.ValueNoChange = GetSetting("MapMax", defaultMapMaxRadius);
            textMinRadius.ValueNoChange = GetSetting("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(GetSetting("MapRotationX", xr)))));
            style.Inclination = Math.Min(90, Math.Max(-90, style.Inclination + (Convert.ToInt32(GetSetting("MapRotationY", yr)))));

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(contextMenuStrip, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);
        }
Exemple #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();
        }
Exemple #3
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;
        }
Exemple #5
0
        public override void Init()
        {
            computer = new StarDistanceComputer();

            HistoryEntry he = uctg.GetCurrentHistoryEntry;      // does our UCTG have a system selected?

            if (he != null)
            {
                //System.Diagnostics.Debug.WriteLine("Star grid started, uctg selected, ask");
                computer.CalculateClosestSystems(he.System, (s, d) => BeginInvoke((MethodInvoker) delegate { NewStarListComputed(s, d); }));     // hook here, force closes system update
            }

            uctg.OnTravelSelectionChanged += Uctg_OnTravelSelectionChanged;
        }
        private double lookup_limit = 100;      // we start with a reasonable number, because if your in the bubble, you don't want to be looking up 1000

        public override void Init()
        {
            computer = new StarDistanceComputer();

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

            checkBoxCube.Checked = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(DbSave + "Behaviour", false);

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(contextMenuStrip, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);
        }
Exemple #7
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(EDDiscoveryForm ed, UserControlCursorType thc, int vn) //0=primary, 1 = first windowed version, etc
        {
            _discoveryForm = ed;
            uctg           = thc;
            uctg.OnTravelSelectionChanged += Uctg_OnTravelSelectionChanged;

            computer = new StarDistanceComputer();

            HistoryEntry he = uctg.GetCurrentHistoryEntry;      // does our UCTG have a system selected?

            if (he != null)
            {
                //System.Diagnostics.Debug.WriteLine("Star grid started, uctg selected, ask");
                computer.CalculateClosestSystems(he.System, (s, d) => BeginInvoke((MethodInvoker) delegate { NewStarListComputed(s, d); }));     // hook here, force closes system update
            }
        }
        private double lookup_limit = 100;      // we start with a reasonable number, because if your in the bubble, you don't want to be looking up 1000

        public override void Init()
        {
            DBBaseName = "StarDistancePanel";

            computer = new StarDistanceComputer();

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

            checkBoxCube.Checked = GetSetting("Behaviour", false);

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(contextMenuStrip, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);
        }
        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();
        }
Exemple #11
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)))));
        }
        private double lookup_limit = 100;      // we start with a reasonable number, because if your in the bubble, you don't want to be looking up 1000

        public override void Init()
        {
            DBBaseName = "StarDistancePanel";

            computer = new StarDistanceComputer();

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

            checkBoxCube.Checked = GetSetting("Behaviour", false);

            var enumlist    = new Enum[] { EDTx.UserControlStarDistance_colName, EDTx.UserControlStarDistance_colDistance, EDTx.UserControlStarDistance_colVisited, EDTx.UserControlStarDistance_labelExtMin, EDTx.UserControlStarDistance_labelExtMax, EDTx.UserControlStarDistance_checkBoxCube };
            var enumlistcms = new Enum[] { EDTx.UserControlStarDistance_viewSystemToolStripMenuItem, EDTx.UserControlStarDistance_viewOnEDSMToolStripMenuItem1, EDTx.UserControlStarDistance_addToTrilaterationToolStripMenuItem1, EDTx.UserControlStarDistance_addToExpeditionToolStripMenuItem };
            var enumlisttt  = new Enum[] { EDTx.UserControlStarDistance_textMinRadius_ToolTip, EDTx.UserControlStarDistance_textMaxRadius_ToolTip, EDTx.UserControlStarDistance_checkBoxCube_ToolTip };

            BaseUtils.Translator.Instance.TranslateControls(this, enumlist);
            BaseUtils.Translator.Instance.TranslateToolstrip(contextMenuStrip, enumlistcms, this);
            BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this);
        }
Exemple #13
0
        public override void Init()
        {
            DBBaseName = "PlotPanel";

            textMinRadius.ValueNoChange = GetSetting("PlotMin", 0.0);
            textMaxRadius.ValueNoChange = GetSetting("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".T(EDTx.UserControlPlot_Top));
            comboBoxView.Items.Add("Front".T(EDTx.UserControlPlot_Front));
            comboBoxView.Items.Add("Side".T(EDTx.UserControlPlot_Side));
            comboBoxView.Items.Add("Grid".T(EDTx.UserControlPlot_Grid));
            comboBoxView.Items.Add("Report".T(EDTx.UserControlPlot_Report));

            var sel = GetSetting("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();
        }