internal void LoadTab(IQueryable <Sku> loadQuery, TaxonomyInfo taxonomy, string tabName, string toolTipText) { var sw = new Stopwatch(); sw.Start(); if (taxonomy != null) { foreach (var tab in AryaTools.Instance.Forms.SkuTabs.Where(tab => tab.Value.CurrentTaxonomy != null && tab.Value.CurrentTaxonomy == taxonomy)) { AryaTools.Instance.Forms.SkuForm.mainTabControl.SelectedTab = tab.Key; return; } } var newTab = new TabPage(tabName) { ToolTipText = toolTipText }; mainTabControl.TabPages.Add(newTab); mainTabControl.SelectTab(newTab); EntityDataGridView entityGridView = taxonomy == null ? new EntityDataGridView(loadQuery) : new EntityDataGridView(loadQuery, taxonomy); newTab.Controls.Add(entityGridView); entityGridView.Dock = DockStyle.Fill; UpdateTitleAndStatus(); AryaTools.Instance.Forms.SkuTabs.Add(newTab, entityGridView); AryaTools.Instance.Forms.SkuForm.Show(); AryaTools.Instance.Forms.SkuForm.BringToFront(); if (AryaTools.Instance.Forms.SkuForm.WindowState == FormWindowState.Minimized) { AryaTools.Instance.Forms.SkuForm.WindowState = FormWindowState.Maximized; } sw.Stop(); Diagnostics.WriteMessage("Loading - " + tabName.ToString(), "FrmSkuView - LoadTab()", sw.Elapsed); sw.Reset(); }
public FrmFindReplace(EntityDataGridView parent) : this() { _parent = parent; }
public JavascriptSkuViewObject(EntityDataGridView parentSkuView) { ParentSkuView = parentSkuView; }
// Private Methods (1) private decimal[] GetComparerValue(ColumnProperty columnProperty) { if (_comparerCache.ContainsKey(columnProperty)) { return(_comparerCache[columnProperty]); } int majorRank = 0; decimal minorRank = 0; try { var att = columnProperty.Attribute; decimal navOrder, dispOrder; bool inSchema; EntityDataGridView.GetAttributeOrders( att.AttributeName.ToLower(), _allAttributes, _taxonomy, out navOrder, out dispOrder, out inSchema); if (navOrder > 0 && _sortNavigationOrders) { majorRank = 2; minorRank = navOrder; } else if (dispOrder > 0 && _sortDisplayOrders) { majorRank = 3; minorRank = dispOrder; } else if (columnProperty.AttributeType != null && columnProperty.AttributeType.Contains(Attribute.AttributeTypeGlobal)) { majorRank = 0; minorRank = 0; } else if (columnProperty.AttributeType != null && columnProperty.AttributeType.Contains(Attribute.AttributeTypeCalculated)) { majorRank = 1; minorRank = 0; } else if (inSchema) { majorRank = 4; minorRank = 0; } else { majorRank = 5; minorRank = 0; } //if (!columnProperty.Visible || !AttributeHasValueInSkus(columnProperty.Attribute)) // majorRank += 10; } catch (Exception) { } var ranks = new[] { majorRank, minorRank }; _comparerCache.Add(columnProperty, ranks); return(ranks); }
public void GotoUrl(string url, EntityDataGridView parentSkuView, string title = null, bool allowNavigation = true, bool topMost = false) { Jsvo.ParentSkuView = parentSkuView; GotoUrl(new Uri(url ?? "about:blank"), title); }