public override void Init()
        {
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);


            dataGridViewStarList.MakeDoubleBuffered();
            dataGridViewStarList.RowTemplate.Height        = DefaultRowHeight;
            dataGridViewStarList.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewStarList.RowTemplate.Height        = 26;
            dataGridViewStarList.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            dataGridViewStarList.Columns[2].ValueType = typeof(Int32);

            checkBoxEDSM.Checked              = SQLiteDBClass.GetSettingBool(DbEDSM, false);
            this.checkBoxEDSM.CheckedChanged += new System.EventHandler(this.checkBoxEDSM_CheckedChanged);

            checkBoxBodyClasses.Checked              = SQLiteConnectionUser.GetSettingBool(DbShowClasses, true);
            this.checkBoxBodyClasses.CheckedChanged += new System.EventHandler(this.buttonBodyClasses_CheckedChanged);

            checkBoxJumponium.Checked              = SQLiteConnectionUser.GetSettingBool(DbShowJumponium, true);
            this.checkBoxJumponium.CheckedChanged += new System.EventHandler(this.buttonJumponium_CheckedChanged);

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;
        }
        public static void InitaliseComboBox(ExtendedControls.ComboBoxCustom cc, string dbname)
        {
            cc.Enabled       = false;
            cc.DisplayMember = nameof(TravelHistoryFilter.Label);
            cc.DataSource    = new[]
            {
                TravelHistoryFilter.NoFilter,
                TravelHistoryFilter.FromHours(6),
                TravelHistoryFilter.FromHours(12),
                TravelHistoryFilter.FromHours(24),
                TravelHistoryFilter.FromDays(3),
                TravelHistoryFilter.FromWeeks(1),
                TravelHistoryFilter.FromWeeks(2),
                TravelHistoryFilter.LastMonth(),
                TravelHistoryFilter.LastQuarter(),
                TravelHistoryFilter.LastHalfYear(),
                TravelHistoryFilter.LastYear(),
                TravelHistoryFilter.Last(10),
                TravelHistoryFilter.Last(20),
                TravelHistoryFilter.Last(100),
                TravelHistoryFilter.Last(500),
            };

            string last  = SQLiteDBClass.GetSettingString(dbname, "");
            int    entry = Array.FindIndex((TravelHistoryFilter[])cc.DataSource, x => x.Label == last);

            //System.Diagnostics.Debug.WriteLine(dbname + "=" + last + "=" + entry);
            cc.SelectedIndex = (entry >= 0) ? entry: 0;

            cc.Enabled = true;
        }
Beispiel #3
0
        public override void Init()
        {
            DBBaseName = "LedgerGrid";

            dataGridViewLedger.MakeDoubleBuffered();
            dataGridViewLedger.DefaultCellStyle.WrapMode = DataGridViewTriState.False;

            var    jes      = EliteDangerousCore.JournalEntry.GetNameImageOfEvents(new string[] { "Ledger" });
            string cashtype = string.Join(";", jes.Select(x => x.Item1)) + ";";

            cfs = new JournalFilterSelector();
            cfs.AddAllNone();
            cfs.AddGroupOption(cashtype, "Cash Transactions".T(EDTx.UserControlLedger_CashTransactions), JournalEntry.JournalTypeIcons[JournalTypeEnum.Bounty]);
            cfs.AddJournalEntries(new string[] { "Ledger", "LedgerNC" });
            cfs.SaveSettings += EventFilterChanged;

            extCheckBoxWordWrap.Checked = GetSetting(dbWordWrap, true);
            UpdateWordWrap();
            extCheckBoxWordWrap.Click += extCheckBoxWordWrap_Click;

            discoveryform.OnHistoryChange += Redisplay;
            discoveryform.OnNewEntry      += NewEntry;

            var enumlist    = new Enum[] { EDTx.UserControlLedger_TimeCol, EDTx.UserControlLedger_Type, EDTx.UserControlLedger_Notes, EDTx.UserControlLedger_Credits, EDTx.UserControlLedger_Debits, EDTx.UserControlLedger_Balance, EDTx.UserControlLedger_NormProfit, EDTx.UserControlLedger_TotalProfit, EDTx.UserControlLedger_labelTime, EDTx.UserControlLedger_labelSearch };
            var enumlistcms = new Enum[] { EDTx.UserControlLedger_toolStripMenuItemGotoItem };
            var enumlisttt  = new Enum[] { EDTx.UserControlLedger_comboBoxTime_ToolTip, EDTx.UserControlLedger_textBoxFilter_ToolTip, EDTx.UserControlLedger_buttonFilter_ToolTip, EDTx.UserControlLedger_buttonExtExcel_ToolTip, EDTx.UserControlLedger_extCheckBoxWordWrap_ToolTip };

            BaseUtils.Translator.Instance.TranslateControls(this, enumlist);
            BaseUtils.Translator.Instance.TranslateToolstrip(contextMenuStrip, enumlistcms, this);
            BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this);

            TravelHistoryFilter.InitaliseComboBox(comboBoxTime, GetSetting(dbHistorySave, ""), incldockstartend: false);
        }
        public override void Init(EDDiscoveryForm ed, UserControlCursorType thc, int vn) //0=primary, 1 = first windowed version, etc
        {
            discoveryform = ed;
            displaynumber = vn;

            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.RowTemplate.Height        = 26;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxJournalWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;

            string filter = SQLiteDBClass.GetSettingString(DbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            ExtraIcons(false, false);
        }
Beispiel #5
0
        public override void Init()
        {
            DBBaseName = "LedgerGrid";

            dataGridViewLedger.MakeDoubleBuffered();
            dataGridViewLedger.DefaultCellStyle.WrapMode = DataGridViewTriState.False;

            var    jes      = EliteDangerousCore.JournalEntry.GetNameImageOfEvents(new string[] { "Ledger" });
            string cashtype = string.Join(";", jes.Select(x => x.Item1)) + ";";

            cfs = new FilterSelector();
            cfs.AddAllNone();
            cfs.AddGroupOption(cashtype, "Cash Transactions".T(EDTx.UserControlLedger_CashTransactions), JournalEntry.JournalTypeIcons[JournalTypeEnum.Bounty]);
            cfs.AddJournalEntries(new string[] { "Ledger", "LedgerNC" });
            cfs.SaveSettings += EventFilterChanged;

            discoveryform.OnHistoryChange += Redisplay;
            discoveryform.OnNewEntry      += NewEntry;

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

            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, GetSetting(dbHistorySave, ""), incldockstartend: false);
        }
        public override void Init()
        {
            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.RowTemplate.Height        = 26;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxJournalWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);

            string filter = SQLiteDBClass.GetSettingString(DbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;
        }
Beispiel #7
0
        public override void Init()
        {
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);

            dataGridViewTravel.MakeDoubleBuffered();
            dataGridViewTravel.RowTemplate.Height = DefaultRowHeight;

            string filter = SQLiteDBClass.GetSettingString(DbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
#if !DEBUG
            writeEventInfoToLogDebugToolStripMenuItem.Visible = false;
#endif

            ExtraIcons(false, false);

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;
            discoveryform.OnNoteChanged   += OnNoteChanged;
        }
        public override void Init()
        {
            DBBaseName = "JournalGrid";

            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.RowTemplate.MinimumHeight = 26;                                          // enough for the icon
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            cfs = new JournalFilterSelector();
            cfs.AddAllNone();
            cfs.AddJournalExtraOptions();
            cfs.AddJournalEntries();
            cfs.SaveSettings += EventFilterChanged;

            checkBoxCursorToTop.Checked = true;

            string filter = GetSetting(dbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;

            todotimer = new Timer()
            {
                Interval = 10
            };
            todotimer.Tick += Todotimer_Tick;

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;

            var enumlist    = new Enum[] { EDTx.UserControlJournalGrid_ColumnTime, EDTx.UserControlJournalGrid_Event, EDTx.UserControlJournalGrid_ColumnType, EDTx.UserControlJournalGrid_ColumnText, EDTx.UserControlJournalGrid_labelTime, EDTx.UserControlJournalGrid_labelSearch };
            var enumlistcms = new Enum[] { EDTx.UserControlJournalGrid_removeSortingOfColumnsToolStripMenuItem, EDTx.UserControlJournalGrid_jumpToEntryToolStripMenuItem, EDTx.UserControlJournalGrid_mapGotoStartoolStripMenuItem, EDTx.UserControlJournalGrid_viewOnEDSMToolStripMenuItem, EDTx.UserControlJournalGrid_toolStripMenuItemStartStop, EDTx.UserControlJournalGrid_runActionsOnThisEntryToolStripMenuItem, EDTx.UserControlJournalGrid_copyJournalEntryToClipboardToolStripMenuItem };
            var enumlisttt  = new Enum[] { EDTx.UserControlJournalGrid_comboBoxTime_ToolTip, EDTx.UserControlJournalGrid_textBoxSearch_ToolTip, EDTx.UserControlJournalGrid_buttonFilter_ToolTip, EDTx.UserControlJournalGrid_buttonExtExcel_ToolTip, EDTx.UserControlJournalGrid_checkBoxCursorToTop_ToolTip };

            BaseUtils.Translator.Instance.TranslateControls(this, enumlist);
            BaseUtils.Translator.Instance.TranslateToolstrip(historyContextMenu, enumlistcms, this);
            BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this);

            TravelHistoryFilter.InitaliseComboBox(comboBoxTime, GetSetting(dbHistorySave, ""));

            if (TranslatorExtensions.TxDefined(EDTx.UserControlTravelGrid_SearchTerms))     // if translator has it defined, use it (share with travel grid)
            {
                searchterms = "".TxID(EDTx.UserControlTravelGrid_SearchTerms);
            }
        }
Beispiel #9
0
        public override void Init()
        {
            DBBaseName = "StarListControl";

            checkBoxCursorToTop.Checked = true;

            dataGridViewStarList.MakeDoubleBuffered();
            dataGridViewStarList.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewStarList.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            dataGridViewStarList.Columns[2].ValueType = typeof(Int32);

            checkBoxEDSM.Checked              = GetSetting(dbEDSM, false);
            this.checkBoxEDSM.CheckedChanged += new System.EventHandler(this.checkBoxEDSM_CheckedChanged);

            displayfilters = GetSetting(dbDisplayFilters, "stars;planets;signals;volcanism;values;shortinfo;gravity;atmos;rings;valueables;organics;codex").Split(';');

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;

            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;
            autoupdateedsm    = new Timer()
            {
                Interval = 2000
            };
            autoupdateedsm.Tick += Autoupdateedsm_Tick;
            todotimer            = new Timer()
            {
                Interval = 20
            };
            todotimer.Tick += Todotimer_Tick;

            var enumlist    = new Enum[] { EDTx.UserControlStarList_ColumnTime, EDTx.UserControlStarList_ColumnSystem, EDTx.UserControlStarList_ColumnVisits, EDTx.UserControlStarList_ColumnInformation, EDTx.UserControlStarList_Value, EDTx.UserControlStarList_labelTime, EDTx.UserControlStarList_labelSearch };
            var enumlistcms = new Enum[] { EDTx.UserControlStarList_removeSortingOfColumnsToolStripMenuItem, EDTx.UserControlStarList_mapGotoStartoolStripMenuItem, EDTx.UserControlStarList_viewOnEDSMToolStripMenuItem, EDTx.UserControlStarList_setNoteToolStripMenuItem, EDTx.UserControlStarList_viewScanDisplayToolStripMenuItem };
            var enumlisttt  = new Enum[] { EDTx.UserControlStarList_comboBoxTime_ToolTip, EDTx.UserControlStarList_checkBoxEDSM_ToolTip, EDTx.UserControlStarList_textBoxSearch_ToolTip, EDTx.UserControlStarList_buttonExtExcel_ToolTip, EDTx.UserControlStarList_checkBoxCursorToTop_ToolTip };

            BaseUtils.Translator.Instance.TranslateControls(this, enumlist);
            BaseUtils.Translator.Instance.TranslateToolstrip(contextMenuStrip, enumlistcms, this);
            BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this);

            TravelHistoryFilter.InitaliseComboBox(comboBoxTime, GetSetting(dbHistorySave, ""), false);

            if (TranslatorExtensions.TxDefined(EDTx.UserControlTravelGrid_SearchTerms))      // if translator has it defined, use it (share with travel grid)
            {
                searchterms = "".TxID(EDTx.UserControlTravelGrid_SearchTerms);
            }
        }
Beispiel #10
0
        public override void Init()
        {
            dataGridViewLedger.MakeDoubleBuffered();
            dataGridViewLedger.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dataGridViewLedger.RowTemplate.Height        = 26;

            cfs.ConfigureThirdOption("Cash Transactions", string.Join(";", EliteDangerousCore.JournalEntry.GetListOfEventsWithOptMethod(true, "Ledger")));

            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave, incldockstartend: false);

            discoveryform.OnHistoryChange += Redisplay;
            discoveryform.OnNewEntry      += NewEntry;
        }
Beispiel #11
0
        public override void Init(EDDiscoveryForm ed, int vn)  //0=primary, 1 = first windowed version, etc
        {
            discoveryform = ed;
            displaynumber = vn;
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;

            dataGridViewTravel.MakeDoubleBuffered();
            dataGridViewTravel.RowTemplate.Height = DefaultRowHeight;
        }
Beispiel #12
0
        public override void Init()
        {
            DBBaseName = "StarListControl";

            checkBoxCursorToTop.Checked = true;


            dataGridViewStarList.MakeDoubleBuffered();
            dataGridViewStarList.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewStarList.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            dataGridViewStarList.Columns[2].ValueType = typeof(Int32);

            checkBoxEDSM.Checked              = GetSetting(dbEDSM, false);
            this.checkBoxEDSM.CheckedChanged += new System.EventHandler(this.checkBoxEDSM_CheckedChanged);

            checkBoxBodyClasses.Checked              = GetSetting(dbShowClasses, true);
            this.checkBoxBodyClasses.CheckedChanged += new System.EventHandler(this.buttonBodyClasses_CheckedChanged);

            checkBoxJumponium.Checked              = GetSetting(dbShowJumponium, true);
            this.checkBoxJumponium.CheckedChanged += new System.EventHandler(this.buttonJumponium_CheckedChanged);

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;

            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;
            autoupdateedsm    = new Timer()
            {
                Interval = 2000
            };
            autoupdateedsm.Tick += Autoupdateedsm_Tick;
            todotimer            = new Timer()
            {
                Interval = 20
            };
            todotimer.Tick += Todotimer_Tick;

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

            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, GetSetting(dbHistorySave, ""), false);
        }
Beispiel #13
0
        public override void Init(EDDiscoveryForm ed, int vn)  //0=primary, 1 = first windowed version, etc
        {
            discoveryform = ed;
            displaynumber = vn;

            dataGridViewLedger.MakeDoubleBuffered();
            dataGridViewLedger.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dataGridViewLedger.RowTemplate.Height        = 26;

            cfs.ConfigureThirdOption("Cash Transactions", string.Join(";", EliteDangerous.JournalEntry.GetListOfEventsWithOptMethod(true, "Ledger")));

            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            discoveryform.OnHistoryChange += Redisplay;
            discoveryform.OnNewEntry      += NewEntry;
        }
Beispiel #14
0
        public override void Init(EDDiscoveryForm ed, int vn)  //0=primary, 1 = first windowed version, etc
        {
            discoveryform = ed;
            displaynumber = vn;

            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.RowTemplate.Height        = 26;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxJournalWindow, DbHistorySave);

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;

            buttonRefresh.Visible = false;
        }
        public override void Init()
        {
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);

            dataGridViewStarList.MakeDoubleBuffered();
            dataGridViewStarList.RowTemplate.Height        = DefaultRowHeight;
            dataGridViewStarList.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewStarList.RowTemplate.Height        = 26;
            dataGridViewStarList.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            checkBoxEDSM.Checked = SQLiteDBClass.GetSettingBool(DbEDSM, false);

            ExtraIcons(false);

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;
        }
        public override void Init()
        {
            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            cfs = new FilterSelector(DbFilterSave);
            cfs.AddAllNone();
            cfs.AddJournalExtraOptions();
            cfs.AddJournalEntries();
            cfs.SaveSettings += EventFilterChanged;

            checkBoxCursorToTop.Checked = true;

            string filter = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingString(DbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;

            todotimer = new Timer()
            {
                Interval = 10
            };
            todotimer.Tick += Todotimer_Tick;

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;

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

            TravelHistoryFilter.InitaliseComboBox(comboBoxJournalWindow, DbHistorySave);

            dataViewScrollerPanel.LimitLargeChange = 4; // since row sizes can be variable, estimating large change on visible rows is problematic
        }
Beispiel #17
0
        public override void Init()
        {
            DBBaseName = "JournalGrid";

            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            cfs = new FilterSelector();
            cfs.AddAllNone();
            cfs.AddJournalExtraOptions();
            cfs.AddJournalEntries();
            cfs.SaveSettings += EventFilterChanged;

            checkBoxCursorToTop.Checked = true;

            string filter = GetSetting(dbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;

            todotimer = new Timer()
            {
                Interval = 10
            };
            todotimer.Tick += Todotimer_Tick;

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;

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

            TravelHistoryFilter.InitaliseComboBox(comboBoxTime, GetSetting(dbHistorySave, ""));
        }
        public override void Init()
        {
            DBBaseName = "StarListControl";

            checkBoxCursorToTop.Checked = true;

            dataGridViewStarList.MakeDoubleBuffered();
            dataGridViewStarList.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewStarList.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            dataGridViewStarList.Columns[2].ValueType = typeof(Int32);

            checkBoxEDSM.Checked              = GetSetting(dbEDSM, false);
            this.checkBoxEDSM.CheckedChanged += new System.EventHandler(this.checkBoxEDSM_CheckedChanged);

            displayfilters = GetSetting(dbDisplayFilters, "stars;planets;signals;volcanism;values;shortinfo;gravity;atmos;rings;valueables;").Split(';');

            discoveryform.OnHistoryChange += HistoryChanged;
            discoveryform.OnNewEntry      += AddNewEntry;

            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;
            autoupdateedsm    = new Timer()
            {
                Interval = 2000
            };
            autoupdateedsm.Tick += Autoupdateedsm_Tick;
            todotimer            = new Timer()
            {
                Interval = 20
            };
            todotimer.Tick += Todotimer_Tick;

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

            TravelHistoryFilter.InitaliseComboBox(comboBoxTime, GetSetting(dbHistorySave, ""), false);
        }
Beispiel #19
0
        public static void InitaliseComboBox(ExtendedControls.ExtComboBox cc, string last, bool incldockstartend = true)
        {
            cc.Enabled       = false;
            cc.DisplayMember = nameof(TravelHistoryFilter.Label);

            List <TravelHistoryFilter> el = new List <TravelHistoryFilter>()
            {
                TravelHistoryFilter.NoFilter,
                TravelHistoryFilter.FromHours(6),
                TravelHistoryFilter.FromHours(12),
                TravelHistoryFilter.FromHours(24),
                TravelHistoryFilter.FromDays(3),
                TravelHistoryFilter.FromWeeks(1),
                TravelHistoryFilter.FromWeeks(2),
                TravelHistoryFilter.LastMonth(),
                TravelHistoryFilter.LastQuarter(),
                TravelHistoryFilter.LastHalfYear(),
                TravelHistoryFilter.LastYear(),
                TravelHistoryFilter.LastTwoYears(),
                TravelHistoryFilter.LastThreeYears(),
                TravelHistoryFilter.Last(10),
                TravelHistoryFilter.Last(20),
                TravelHistoryFilter.Last(100),
                TravelHistoryFilter.Last(500),
            };

            if (incldockstartend)
            {
                el.Add(TravelHistoryFilter.LastDock());
                el.Add(TravelHistoryFilter.StartEnd());
            }

            cc.DataSource = el;

            int entry = el.FindIndex(x => x.Label == last);

            //System.Diagnostics.Debug.WriteLine(dbname + "=" + last + "=" + entry);
            cc.SelectedIndex = (entry >= 0) ? entry: 0;

            cc.Enabled = true;
        }
        public override void Init()
        {
            dataGridViewJournal.MakeDoubleBuffered();
            dataGridViewJournal.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dataGridViewJournal.RowTemplate.Height        = 26;
            dataGridViewJournal.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCells; // NEW! appears to work https://msdn.microsoft.com/en-us/library/74b2wakt(v=vs.110).aspx

            cfs = new FilterSelector(DbFilterSave);
            cfs.AddJournalExtraOptions();
            cfs.AddJournalEntries();
            cfs.Closing += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxJournalWindow, DbHistorySave);

            checkBoxMoveToTop.Checked = SQLiteConnectionUser.GetSettingBool(DbAutoTop, true);

            string filter = SQLiteDBClass.GetSettingString(DbFieldFilter, "");

            if (filter.Length > 0)
            {
                fieldfilter.FromJSON(filter);        // load filter
            }
            searchtimer = new Timer()
            {
                Interval = 500
            };
            searchtimer.Tick += Searchtimer_Tick;

            todotimer = new Timer()
            {
                Interval = 10
            };
            todotimer.Tick += Todotimer_Tick;

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry      += AddNewEntry;

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(historyContextMenu, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);
        }
        public override void Init(EDDiscoveryForm ed, int vn) //0=primary, 1 = first windowed version, etc
        {
            discoveryform = ed;
            displaynumber = vn;
            cfs.ConfigureThirdOption("Travel", "Docked;FSD Jump;Undocked;");
            cfs.Changed += EventFilterChanged;
            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave);

            discoveryform.OnHistoryChange += Display;
            discoveryform.OnNewEntry += AddNewEntry;

            dataGridViewTravel.MakeDoubleBuffered();
            dataGridViewTravel.RowTemplate.Height = DefaultRowHeight;

            string filter = SQLiteDBClass.GetSettingString(DbFieldFilter, "");
            if (filter.Length > 0)
                fieldfilter.FromJSON(filter);        // load filter

#if !DEBUG
            writeEventInfoToLogDebugToolStripMenuItem.Visible = false;
#endif
        }
        public override void Init()
        {
            dataGridViewLedger.MakeDoubleBuffered();
            dataGridViewLedger.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dataGridViewLedger.RowTemplate.Height        = 26;

            var    jes      = EliteDangerousCore.JournalEntry.GetListOfEventsWithOptMethodSortedImage(true, new string[] { "Ledger" });
            string cashtype = string.Join(";", jes.Select(x => x.Item1)) + ";";

            cfs = new FilterSelector(DbFilterSave);
            cfs.AddGroupOption("Cash Transactions".Tx(this), cashtype, JournalEntry.JournalTypeIcons[JournalTypeEnum.Bounty]);
            cfs.AddJournalEntries(new string[] { "Ledger", "LedgerNC" });
            cfs.Changed += EventFilterChanged;

            TravelHistoryFilter.InitaliseComboBox(comboBoxHistoryWindow, DbHistorySave, incldockstartend: false);

            discoveryform.OnHistoryChange += Redisplay;
            discoveryform.OnNewEntry      += NewEntry;

            BaseUtils.Translator.Instance.Translate(this);
            BaseUtils.Translator.Instance.Translate(contextMenuStrip, this);
            BaseUtils.Translator.Instance.Translate(toolTip, this);
        }