/// <summary> /// 核心识别by sahuang /// </summary> private static void RunDetector(GroupSettings gSets) { while (gSets.PathQueue.Count != 0) { try { CreateProc(gSets); ProcExited(gSets); } catch (Exception ex) { Logger.Exception(ex); } finally { _totalCount--; Logger.Info("(龙图) " + (_totalCount + 1) + " ---> " + _totalCount); } } if (gSets.DragonCount < 1) return; Logger.Info("[" + gSets.GroupId + "] (龙图) " + gSets.DragonCount); SendMessage(gSets.routeMsg.ToSource("你龙了?")); gSets.Clear(); }
public void ReloadFromStream(Stream stream) { if (stream.Length > 0) { RadGridViewApplicationSettings loaded = (RadGridViewApplicationSettings)serializer.ReadObject(stream); FrozenColumnCount = loaded.FrozenColumnCount; ColumnSettings.Clear(); foreach (ColumnSetting cs in loaded.ColumnSettings) { ColumnSettings.Add(cs); } FilterSettings.Clear(); foreach (FilterSetting fs in loaded.FilterSettings) { FilterSettings.Add(fs); } GroupSettings.Clear(); foreach (GroupSetting gs in loaded.GroupSettings) { GroupSettings.Add(gs); } SortSettings.Clear(); foreach (SortSetting ss in loaded.SortSettings) { SortSettings.Add(ss); } } }
protected override bool OnDeserializeUnrecognizedElement(String elementName, XmlReader reader) { bool handled = false; // Deal with the "group" element if (elementName == "group") { ProfileGroupSettingsCollection groupCollection; ProfileGroupSettings newGroupSettings; ProfileGroupSettings curGroupSettings = null; string name = reader.GetAttribute("name"); groupCollection = GroupSettings; if (name != null) { curGroupSettings = groupCollection[name]; } newGroupSettings = new ProfileGroupSettings(); newGroupSettings.InternalReset(curGroupSettings); newGroupSettings.InternalDeserialize(reader, false); groupCollection.AddOrReplace(newGroupSettings); handled = true; } else { if (elementName == "clear") { GroupSettings.Clear(); } // Let the base class deal with "add, remove, clear" handled = base.OnDeserializeUnrecognizedElement(elementName, reader); } return(handled); }