Bookmark GetSelectedBookmark() { var RepositoryFactory = new MinnerDataFactory(new MiningDbContext()); return (RepositoryFactory.BookmarkRepository.Find(x => x.BookmarkAddress == this.cmbBookmarkAddress.Text)); }
/// <summary> /// FillBookmarkCombo /// </summary> private void FillBookmarkCombo() { this.repositoryItemComboBox.Items.Clear(); var RepositoryFactory = new MinnerDataFactory(this.DataBase); var bookmarks = RepositoryFactory.BookmarkRepository.GetAll(); this.repositoryItemComboBox.Items.AddRange(bookmarks.ToList()); }
/// <summary> /// AddModifyServerForm /// </summary> /// <param name="serverID"></param> public AddModifyMiningServer() { this.InitializeComponent(); this.RepositoryFactory = new MinnerDataFactory(this.DataBase); this.Mode = FormMode.Create; this.FillMinnerType(); this.FillMinnerRegion(); this.InitializeEvents(); }
/// <summary> /// ShowServerList /// </summary> private void OnShowServer() { var RepositoryFactory = new MinnerDataFactory(new MiningDbContext()); this.gridList.FillGrid <MiningServer>(RepositoryFactory.ServerRepository.GetAll().ToList()); this.SetGridAppearance(new List <string>() { @"ServerID", @"RegionID", @"MinerID", @"ServerStatus", @"ServerCreateDate", @"ServerRegion", @"MinerType", @"ServerLastUpdate" }, false); }
/// <summary> /// AddModifyServerForm /// </summary> /// <param name="serverID"></param> public AddModifyMiningServer(Guid serverID) { this.InitializeComponent(); this.Mode = FormMode.Update; this.Serverid = serverID; this.RepositoryFactory = new MinnerDataFactory(this.DataBase); this.FillMinnerType(); this.FillMinnerRegion(); this.InitializeEvents(); this.SetInitialValues(serverID); }
/// <summary> /// FillBookmarkCombo /// </summary> private void FillBookmarkCombo() { this.cmbBookmarkAddress.Properties.Items.Clear(); var RepositoryFactory = new MinnerDataFactory(new MiningDbContext()); var bookmarks = RepositoryFactory.BookmarkRepository.GetAll(); foreach (var b in bookmarks) { this.cmbBookmarkAddress.Properties.Items.Add(b.BookmarkAddress); } }
/// <summary> /// FillServer /// </summary> private void FillServer() { this.gridControlServer.DataSource = null; var RepositoryFactory = new MinnerDataFactory(new MiningDbContext()); this.gridControlServer.DataSource = RepositoryFactory.ServerRepository.GetAll(); foreach (GridColumn col in this.gridViewServer.Columns) { if (col.Name.Contains("ID") || col.Name.Contains("Id")) { col.VisibleIndex = -1; } if (col.Name.Contains("Region") || col.Name.Contains("Miner")) { col.VisibleIndex = -1; } col.OptionsColumn.AllowEdit = false; col.BestFit(); } }