private void DoGearTabs(String textFile) { PartSelectorGear.Clear(); string TabsLine = System.IO.File.ReadAllText(db.DataPath + textFile); string[] TabsList = TabsLine.Split(new char[] { (char)';' }); for (int Progress = 0; Progress < TabsList.Length; Progress++) { Util.DoPartsCategory(TabsList[Progress], PartSelectorGear); } }
private void PartsGear_SelectedIndexChanged(object sender, EventArgs e) { if (PartsGear.SelectedIndex == -1) { return; } string part = PartsGear.SelectedItem.ToString(); if (GlobalSettings.PartSelectorTracking == true) { PartSelectorGear.BeginUpdate(); TreeNodeAdv categoryNode = PartSelectorGear.FindFirstNodeByTag(part.Before('.'), false); if (categoryNode != null) { TreeNodeAdv partNode = categoryNode.FindFirstByTag(part.After('.'), false); PartSelectorGear.CollapseAll(); PartSelectorGear.SelectedNode = partNode; if (partNode != null) { Util.CenterNode(PartSelectorGear.SelectedNode, gearVisibleLine); } } PartSelectorGear.EndUpdate(); } else { PartInfoGear.Clear(); List <string> xmlSection = db.GetPartSection(part); if (xmlSection != null) { PartInfoGear.Lines = xmlSection.ToArray(); } } saveGear(false); }