public Organisation( User createdByUser, string name, string description, string website, MediaResource avatar, MediaResource background, IEnumerable<string> categories, DateTime createdDateTime, Group parentGroup) : base(createdByUser, name, createdDateTime, parentGroup) { Check.RequireNotNull(categories != null, "categories"); InitMembers(); SetOrganisationDetails( description, website, avatar, background, categories); ApplyEvent(new DomainModelCreatedEvent<Organisation>(this, createdByUser, this)); }
public void SetPool(Pool pool) { this.pool = pool; group = pool.GetGroup(Matcher.FirstBoss); time = pool.GetGroup(Matcher.Time); createStages(); }
void RefreshData() { _Key = null; _Group = null; groupKey.Visible = false; }
void OnGameBoardElementAdded(Group group, Entity entity, int index, IComponent component) { var grid = pool.gameBoardCache.grid; var pos = entity.position; grid.Add(pos.x, pos.y, entity); pool.ReplaceGameBoardCache(grid); }
public void SetPool(Pool pool) { _pool = pool; _pool.GetGroup(Matcher.SettingsModel).OnEntityUpdated += update; _group = pool.GetGroup(Matcher.DifficultyController); _models = pool.GetGroup(Matcher.DifficultyModel); }
/** * Creates a ARQ (Appointment Request) segment object that belongs to the given * message. */ public ARQ(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(EI), true, 1, 22, new System.Object[]{message}, "Placer Appointment ID"); this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "Filler Appointment ID"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Occurrence Number"); this.add(typeof(EI), false, 1, 37, new System.Object[]{message}, "Placer Group Number"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Schedule ID"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Request Event Reason"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Reason"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Type"); this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Appointment Duration"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Duration Units"); this.add(typeof(DR), false, 0, 53, new System.Object[]{message}, "Requested Start Date/Time Range"); this.add(typeof(ST), false, 1, 5, new System.Object[]{message}, "Priority"); this.add(typeof(RI), false, 1, 100, new System.Object[]{message}, "Repeating Interval"); this.add(typeof(ST), false, 1, 5, new System.Object[]{message}, "Repeating Interval Duration"); this.add(typeof(XCN), false, 1, 48, new System.Object[]{message}, "Placer Contact Person"); this.add(typeof(XTN), false, 1, 40, new System.Object[]{message}, "Placer Contact Phone Number"); this.add(typeof(XAD), false, 1, 106, new System.Object[]{message}, "Placer Contact Address"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Placer Contact Location"); this.add(typeof(XCN), true, 1, 48, new System.Object[]{message}, "Entered By Person"); this.add(typeof(XTN), false, 0, 40, new System.Object[]{message}, "Entered By Phone Number"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Entered By Location"); this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Placer Appointment ID"); this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Filler Appointment ID"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a CSR (Clinical Study Registration) segment object that belongs to the given * message. */ public CSR(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(EI), true, 1, 60, new System.Object[]{message}, "Sponsor Study ID"); this.add(typeof(EI), false, 1, 60, new System.Object[]{message}, "Alternate Study ID"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Institution Registering the Patient"); this.add(typeof(CX), true, 1, 30, new System.Object[]{message}, "Sponsor Patient ID"); this.add(typeof(CX), false, 1, 30, new System.Object[]{message}, "Alternate Patient ID - CSR"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time Of Patient Study Registration"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Person Performing Study Registration"); this.add(typeof(XCN), true, 0, 250, new System.Object[]{message}, "Study Authorizing Provider"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/time Patient Study Consent Signed"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Patient Study Eligibility Status"); this.add(typeof(TS), false, 3, 26, new System.Object[]{message}, "Study Randomization Date/time"); this.add(typeof(CE), false, 3, 250, new System.Object[]{message}, "Randomized Study Arm"); this.add(typeof(CE), false, 3, 250, new System.Object[]{message}, "Stratum for Study Randomization"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Patient Evaluability Status"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/time Ended Study"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Reason Ended Study"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
public virtual void ApproveUser( Group group, String userIds ) { int[] ids = cvt.ToIntArray( userIds ); foreach (int userId in ids) { GroupUser gu = db.find<GroupUser>( getCondition( group.Id, userId ) ).first(); if (gu == null) continue; // 过滤掉已有成员 if (gu.Status == GroupRole.Administrator.Id || gu.Status == GroupRole.Member.Id) continue; gu.Status = GroupRole.Member.Id; db.update( gu, "Status" ); // 给申请者发送消息 String msg = string.Format( lang.get( "groupMemberJoinedMsg" ) + "“{0}”", group.Name ); String body = string.Format( lang.get( "groupMemberJoinedMsg" ) + "“<a href=\"{1}\" target=\"_blank\">{0}</a>”", group.Name, Link.ToMember( group ) ); User receiver = userService.GetById( userId ); msgService.SiteSend( msg, body, receiver ); addFeedInfo( gu, gu.Ip ); } recountMembers( group ); }
/** * Creates a MSH (Message Header) segment object that belongs to the given * message. */ public MSH(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(ST), true, 1, 1, new System.Object[]{message}, "Field Separator"); this.add(typeof(ST), true, 1, 4, new System.Object[]{message}, "Encoding Characters"); this.add(typeof(HD), false, 1, 227, new System.Object[]{message}, "Sending Application"); this.add(typeof(HD), false, 1, 227, new System.Object[]{message}, "Sending Facility"); this.add(typeof(HD), false, 1, 227, new System.Object[]{message}, "Receiving Application"); this.add(typeof(HD), false, 1, 227, new System.Object[]{message}, "Receiving Facility"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time Of Message"); this.add(typeof(ST), false, 1, 40, new System.Object[]{message}, "Security"); this.add(typeof(MSG), true, 1, 15, new System.Object[]{message}, "Message Type"); this.add(typeof(ST), true, 1, 20, new System.Object[]{message}, "Message Control ID"); this.add(typeof(PT), true, 1, 3, new System.Object[]{message}, "Processing ID"); this.add(typeof(VID), true, 1, 60, new System.Object[]{message}, "Version ID"); this.add(typeof(NM), false, 1, 15, new System.Object[]{message}, "Sequence Number"); this.add(typeof(ST), false, 1, 180, new System.Object[]{message}, "Continuation Pointer"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 155}, "Accept Acknowledgment Type"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 155}, "Application Acknowledgment Type"); this.add(typeof(ID), false, 1, 3, new System.Object[]{message, 399}, "Country Code"); this.add(typeof(ID), false, 0, 16, new System.Object[]{message, 211}, "Character Set"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Principal Language Of Message"); this.add(typeof(ID), false, 1, 20, new System.Object[]{message, 356}, "Alternate Character Set Handling Scheme"); this.add(typeof(EI), false, 0, 427, new System.Object[]{message}, "Message Profile Identifier"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
private void GetGroupsResponse(IAsyncResult result) { HttpWebRequest request = result.AsyncState as HttpWebRequest; if (request != null) { try { WebResponse response = request.EndGetResponse(result); Stream outStream = response.GetResponseStream(); StreamReader reader = new StreamReader(outStream); string xmlResult = reader.ReadToEnd(); XDocument xdoc = XDocument.Parse(xmlResult); IEnumerable<XElement> items = xdoc.Descendants("item"); foreach (XElement item in items) { String groupName = item.Element("name").Value; String city = item.Element("city").Value; String description = item.Element("description").Value; Group newGroup = new Group(groupName, city); newGroup.description = description; panoramaGroups.Add(newGroup); } } catch (WebException e) { txtZipCode1.Text = "WebException Received" + e.Message; return; } } }
/** * Creates a BPX (Blood product dispense status) segment object that belongs to the given * message. */ public BPX(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(SI), true, 1, 4, new System.Object[]{message}, "Set ID _ BPX"); this.add(typeof(CWE), true, 1, 250, new System.Object[]{message}, "BP Dispense Status"); this.add(typeof(ID), true, 1, 1, new System.Object[]{message, 511}, "BP Status"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "BP Date/Time of Status"); this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "BC Donation ID"); this.add(typeof(CNE), false, 1, 250, new System.Object[]{message}, "BC Component"); this.add(typeof(CNE), false, 1, 250, new System.Object[]{message}, "BC Donation Type / Intended Use"); this.add(typeof(CWE), false, 1, 250, new System.Object[]{message}, "CP Commercial Product"); this.add(typeof(XON), false, 1, 250, new System.Object[]{message}, "CP Manufacturer"); this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "CP Lot Number"); this.add(typeof(CNE), false, 1, 250, new System.Object[]{message}, "BP Blood Group"); this.add(typeof(CNE), false, 0, 250, new System.Object[]{message}, "BC Special Testing"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "BP Expiration Date/Time"); this.add(typeof(NM), true, 1, 5, new System.Object[]{message}, "BP Quantity"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "BP Amount"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "BP Units"); this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "BP Unique ID"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "BP Actual Dispensed To Location"); this.add(typeof(XAD), false, 1, 250, new System.Object[]{message}, "BP Actual Dispensed To Address"); this.add(typeof(XCN), false, 1, 250, new System.Object[]{message}, "BP Dispensed to Receiver"); this.add(typeof(XCN), false, 1, 250, new System.Object[]{message}, "BP Dispensing Individual"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
public void Remove(Group group) { lock (this.ThisLock) { _table.Remove(group); } }
/** * Creates a PEO (Product Experience Observation) segment object that belongs to the given * message. */ public PEO(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Event Identifiers Used"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Event Symptom/Diagnosis Code"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Event Onset Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Event Exacerbation Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Event Improved Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Event Ended Data/Time"); this.add(typeof(XAD), false, 0, 250, new System.Object[]{message}, "Event Location Occurred Address"); this.add(typeof(ID), false, 0, 1, new System.Object[]{message, 237}, "Event Qualification"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 238}, "Event Serious"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 239}, "Event Expected"); this.add(typeof(ID), false, 0, 1, new System.Object[]{message, 240}, "Event Outcome"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 241}, "Patient Outcome"); this.add(typeof(FT), false, 0, 600, new System.Object[]{message}, "Event Description From Others"); this.add(typeof(FT), false, 0, 600, new System.Object[]{message}, "Event From Original Reporter"); this.add(typeof(FT), false, 0, 600, new System.Object[]{message}, "Event Description From Patient"); this.add(typeof(FT), false, 0, 600, new System.Object[]{message}, "Event Description From Practitioner"); this.add(typeof(FT), false, 0, 600, new System.Object[]{message}, "Event Description From Autopsy"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Cause Of Death"); this.add(typeof(XPN), false, 0, 250, new System.Object[]{message}, "Primary Observer Name"); this.add(typeof(XAD), false, 0, 250, new System.Object[]{message}, "Primary Observer Address"); this.add(typeof(XTN), false, 0, 250, new System.Object[]{message}, "Primary Observer Telephone"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 242}, "Primary Observer's Qualification"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 242}, "Confirmation Provided By"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Primary Observer Aware Date/Time"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 243}, "Primary Observer's identity May Be Divulged"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a UB2 (UB2 - UB92 data segment) segment object that belongs to the given * message. */ public UB2(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(SI), false, 1, 4, new System.Object[]{message}, "Set ID - UB2"); this.add(typeof(ST), false, 1, 3, new System.Object[]{message}, "Co-Insurance Days (9)"); this.add(typeof(IS), false, 7, 2, new System.Object[]{message, 43}, "Condition Code (24-30)"); this.add(typeof(ST), false, 1, 3, new System.Object[]{message}, "Covered Days (7)"); this.add(typeof(ST), false, 1, 4, new System.Object[]{message}, "Non-Covered Days (8)"); this.add(typeof(UVC), false, 12, 11, new System.Object[]{message}, "Value Amount & Code"); this.add(typeof(OCD), false, 8, 11, new System.Object[]{message}, "Occurrence Code & Date (32-35)"); this.add(typeof(OSP), false, 2, 28, new System.Object[]{message}, "Occurrence Span Code/Dates (36)"); this.add(typeof(ST), false, 2, 29, new System.Object[]{message}, "UB92 Locator 2 (State)"); this.add(typeof(ST), false, 2, 12, new System.Object[]{message}, "UB92 Locator 11 (State)"); this.add(typeof(ST), false, 1, 5, new System.Object[]{message}, "UB92 Locator 31 (National)"); this.add(typeof(ST), false, 3, 23, new System.Object[]{message}, "Document Control Number"); this.add(typeof(ST), false, 23, 4, new System.Object[]{message}, "UB92 Locator 49 (National)"); this.add(typeof(ST), false, 5, 14, new System.Object[]{message}, "UB92 Locator 56 (State)"); this.add(typeof(ST), false, 1, 27, new System.Object[]{message}, "UB92 Locator 57 (National)"); this.add(typeof(ST), false, 2, 2, new System.Object[]{message}, "UB92 Locator 78 (State)"); this.add(typeof(NM), false, 1, 3, new System.Object[]{message}, "Special Visit Count"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
public void Add(Group group) { lock (this.ThisLock) { _table[group] = new GroupManager(group); } }
/** * Creates a RXA (Pharmacy/Treatment Administration) segment object that belongs to the given * message. */ public RXA(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(NM), true, 1, 4, new System.Object[]{message}, "Give Sub-ID Counter"); this.add(typeof(NM), true, 1, 4, new System.Object[]{message}, "Administration Sub-ID Counter"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time Start of Administration"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time End of Administration"); this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Administered Code"); this.add(typeof(NM), true, 1, 20, new System.Object[]{message}, "Administered Amount"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Units"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Dosage Form"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Administration Notes"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Administering Provider"); this.add(typeof(LA2), false, 1, 200, new System.Object[]{message}, "Administered-at Location"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Administered Per (Time Unit)"); this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Administered Strength"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Strength Units"); this.add(typeof(ST), false, 0, 20, new System.Object[]{message}, "Substance Lot Number"); this.add(typeof(TS), false, 0, 26, new System.Object[]{message}, "Substance Expiration Date"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Substance Manufacturer Name"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Substance/Treatment Refusal Reason"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Indication"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 322}, "Completion Status"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 323}, "Action Code-RXA"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "System Entry Date/Time"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a SCH (SCH - schedule activity information segment) segment object that belongs to the given * message. */ public SCH(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Placer Appointment ID"); this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Filler Appointment ID"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Occurrence Number"); this.add(typeof(EI), false, 1, 22, new System.Object[]{message}, "Placer Group Number"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Schedule ID"); this.add(typeof(CE), true, 1, 200, new System.Object[]{message}, "Event Reason"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Reason"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Type"); this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Appointment Duration"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Appointment Duration Units"); this.add(typeof(TQ), true, 0, 200, new System.Object[]{message}, "Appointment Timing Quantity"); this.add(typeof(XCN), false, 0, 48, new System.Object[]{message}, "Placer Contact Person"); this.add(typeof(XTN), false, 1, 40, new System.Object[]{message}, "Placer Contact Phone Number"); this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Placer Contact Address"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Placer Contact Location"); this.add(typeof(XCN), true, 0, 38, new System.Object[]{message}, "Filler Contact Person"); this.add(typeof(XTN), false, 1, 40, new System.Object[]{message}, "Filler Contact Phone Number"); this.add(typeof(XAD), false, 0, 106, new System.Object[]{message}, "Filler Contact Address"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Filler Contact Location"); this.add(typeof(XCN), true, 0, 48, new System.Object[]{message}, "Entered by Person"); this.add(typeof(XTN), false, 0, 40, new System.Object[]{message}, "Entered by Phone Number"); this.add(typeof(PL), false, 1, 80, new System.Object[]{message}, "Entered by Location"); this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Placer Appointment ID"); this.add(typeof(EI), false, 1, 75, new System.Object[]{message}, "Parent Filler Appointment ID"); this.add(typeof(CE), false, 1, 200, new System.Object[]{message}, "Filler Status Code"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a PRB (Problem Details) segment object that belongs to the given * message. */ public PRB(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(ID), true, 1, 2, new System.Object[]{message, 287}, "Action Code"); this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Action Date/Time"); this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Problem ID"); this.add(typeof(EI), true, 1, 60, new System.Object[]{message}, "Problem Instance ID"); this.add(typeof(EI), false, 1, 60, new System.Object[]{message}, "Episode of Care ID"); this.add(typeof(NM), false, 1, 60, new System.Object[]{message}, "Problem List Priority"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Problem Established Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Anticipated Problem Resolution Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Actual Problem Resolution Date/Time"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Classification"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Problem Management Discipline"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Persistence"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Confirmation Status"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Life Cycle Status"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Problem Life Cycle Status Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Problem Date of Onset"); this.add(typeof(ST), false, 1, 80, new System.Object[]{message}, "Problem Onset Text"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Ranking"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Certainty of Problem"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Probability of Problem (0-1)"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Individual Awareness of Problem"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Problem Prognosis"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Individual Awareness of Prognosis"); this.add(typeof(ST), false, 1, 200, new System.Object[]{message}, "Family/Significant Other Awareness of Problem/Prognosis"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Security/Sensitivity"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
internal Match(ParseStep parseStep, IEnumerator<ParseStep> stepEnumerator, IEnumerable<IList<ParenCapture>> captureSet) : base(0, parseStep.InitialStateIndex, parseStep.MatchedText.Length, parseStep.MatchedText, true) { _stepEnumerator = stepEnumerator; Groups = new GroupCollection(); Groups.Append(this); Captures.Prepend(this); foreach (var parenCaptures in captureSet) { var parenCapture = parenCaptures[0]; var group = new Group(parenCapture.Number, parenCapture.Index, parenCapture.Value.Length, parenCapture.Value, parenCapture.Success); Groups.Append(group); if (parenCapture.Success) { group.Captures.Prepend(group); } if (parenCaptures.Skip(1).All(c => c.Success)) { for (int i = 1; i < parenCaptures.Count; i++) { group.Captures.Prepend(new Capture(parenCaptures[i].Index, parenCaptures[i].Value.Length, parenCaptures[i].Value)); } } } }
/** * Creates a IN3 (Insurance Additional Information, Certification) segment object that belongs to the given * message. */ public IN3(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(SI), true, 1, 4, new System.Object[]{message}, "Set ID - IN3"); this.add(typeof(CX), false, 1, 250, new System.Object[]{message}, "Certification Number"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Certified By"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Certification Required"); this.add(typeof(MOP), false, 1, 23, new System.Object[]{message}, "Penalty"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Certification Date/Time"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Certification Modify Date/Time"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Operator"); this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Certification Begin Date"); this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Certification End Date"); this.add(typeof(DTN), false, 1, 6, new System.Object[]{message}, "Days"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Non-Concur Code/Description"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Non-Concur Effective Date/Time"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Physician Reviewer"); this.add(typeof(ST), false, 1, 48, new System.Object[]{message}, "Certification Contact"); this.add(typeof(XTN), false, 0, 250, new System.Object[]{message}, "Certification Contact Phone Number"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Appeal Reason"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Certification Agency"); this.add(typeof(XTN), false, 0, 250, new System.Object[]{message}, "Certification Agency Phone Number"); this.add(typeof(ICD), false, 0, 40, new System.Object[]{message}, "Pre-Certification Requirement"); this.add(typeof(ST), false, 1, 48, new System.Object[]{message}, "Case Manager"); this.add(typeof(DT), false, 1, 8, new System.Object[]{message}, "Second Opinion Date"); this.add(typeof(IS), false, 1, 1, new System.Object[]{message, 151}, "Second Opinion Status"); this.add(typeof(IS), false, 0, 1, new System.Object[]{message, 152}, "Second Opinion Documentation Received"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Second Opinion Physician"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a DG1 (Diagnosis) segment object that belongs to the given * message. */ public DG1(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(SI), true, 1, 4, new System.Object[]{message}, "Set ID - DG1"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 53}, "Diagnosis Coding Method"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Diagnosis Code - DG1"); this.add(typeof(ST), false, 1, 40, new System.Object[]{message}, "Diagnosis Description"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Diagnosis Date/Time"); this.add(typeof(IS), true, 1, 2, new System.Object[]{message, 52}, "Diagnosis Type"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Major Diagnostic Category"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Diagnostic Related Group"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "DRG Approval Indicator"); this.add(typeof(IS), false, 1, 2, new System.Object[]{message, 56}, "DRG Grouper Review Code"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Outlier Type"); this.add(typeof(NM), false, 1, 3, new System.Object[]{message}, "Outlier Days"); this.add(typeof(CP), false, 1, 12, new System.Object[]{message}, "Outlier Cost"); this.add(typeof(ST), false, 1, 4, new System.Object[]{message}, "Grouper Version And Type"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 359}, "Diagnosis Priority"); this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Diagnosing Clinician"); this.add(typeof(IS), false, 1, 3, new System.Object[]{message, 228}, "Diagnosis Classification"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Confidential Indicator"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Attestation Date/Time"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
/** * Creates a RXG (Pharmacy/Treatment Give) segment object that belongs to the given * message. */ public RXG(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(NM), true, 1, 4, new System.Object[]{message}, "Give Sub-ID Counter"); this.add(typeof(NM), false, 1, 4, new System.Object[]{message}, "Dispense Sub-ID Counter"); this.add(typeof(TQ), false, 1, 200, new System.Object[]{message}, "Quantity/Timing"); this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Give Code"); this.add(typeof(NM), true, 1, 20, new System.Object[]{message}, "Give Amount - Minimum"); this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Give Amount - Maximum"); this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Give Units"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Give Dosage Form"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Administration Notes"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 167}, "Substitution Status"); this.add(typeof(LA2), false, 1, 200, new System.Object[]{message}, "Dispense-to Location"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 136}, "Needs Human Review"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Pharmacy/Treatment Supplier's Special Administration Instructions"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Give Per (Time Unit)"); this.add(typeof(ST), false, 1, 6, new System.Object[]{message}, "Give Rate Amount"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Give Rate Units"); this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Give Strength"); this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Give Strength Units"); this.add(typeof(ST), false, 0, 20, new System.Object[]{message}, "Substance Lot Number"); this.add(typeof(TS), false, 0, 26, new System.Object[]{message}, "Substance Expiration Date"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Substance Manufacturer Name"); this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Indication"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Give Drug Strength Volume"); this.add(typeof(CWE), false, 1, 250, new System.Object[]{message}, "Give Drug Strength Volume Units"); this.add(typeof(CWE), false, 1, 60, new System.Object[]{message}, "Give Barcode Identifier"); this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 480}, "Pharmacy Order Type"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
public void SetPool(Pool pool) { group = pool.GetGroup(Matcher.AllOf(Matcher.PlayerScore, Matcher.GameObject)); killInfo = pool.GetGroup(Matcher.AllOf(Matcher.KillInfo, Matcher.GameObject)); score = pool.GetGroup(Matcher.Score); translation = pool.GetGroup(Matcher.TranslationService); }
public MoveCard(Player who, Card card, Group to, int idx, bool faceUp) { this.who = who; this.card = card; this.to = to; this.from = card.Group; this.idx = idx; this.faceUp = faceUp; }
// PUT api/Groups/5 public HttpResponseMessage PutGroup(int id, Group group) { if (!ModelState.IsValid) { return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } if (id != group.Id) { return Request.CreateResponse(HttpStatusCode.BadRequest); } db.Entry(group).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException ex) { return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex); } return Request.CreateResponse(HttpStatusCode.OK); }
/** * Creates a OBX (Observation segment) segment object that belongs to the given * message. */ public OBX(Group parent, ModelClassFactory factory) : base(parent,factory) { Message message = Message; try { this.add(typeof(SI), false, 1, 4, new System.Object[]{message}, "Set ID - OBX"); this.add(typeof(ID), true, 1, 2, new System.Object[]{message, 125}, "Value Type"); this.add(typeof(CE), true, 1, 590, new System.Object[]{message}, "Observation Identifier"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Observation Sub-ID"); this.add(typeof(Varies), false, 0, 65536, new System.Object[]{message}, "Observation Value"); this.add(typeof(CE), false, 1, 60, new System.Object[]{message}, "Units"); this.add(typeof(ST), false, 1, 10, new System.Object[]{message}, "References Range"); this.add(typeof(ID), false, 5, 5, new System.Object[]{message, 78}, "Abnormal Flags"); this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Probability"); this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test"); this.add(typeof(ID), true, 1, 1, new System.Object[]{message, 85}, "Observ Result Status"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date Last Obs Normal Values"); this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "User Defined Access Checks"); this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Observation"); this.add(typeof(CE), false, 1, 60, new System.Object[]{message}, "Producer's ID"); this.add(typeof(XCN), false, 1, 80, new System.Object[]{message}, "Responsible Observer"); this.add(typeof(CE), false, 0, 80, new System.Object[]{message}, "Observation Method"); } catch (HL7Exception he) { HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + this.getStructureName(), he); } }
public static Group createGroup(object[] items, LogicalOperator logicalOperator) { Group gr1 = new Group(); gr1.logicRelation = logicalOperator; gr1.Items = items; return gr1; }
public void SetPool(Pool pool) { _pool = pool; _camera = _pool.GetGroup(Matcher.Camera); _time = _pool.GetGroup(Matcher.Time); _group = pool.GetGroup(Matcher.AllOf(Matcher.Path, Matcher.GameObject, Matcher.Velocity, Matcher.VelocityLimit, Matcher.Position)); }
public void GetGroup() { m_Group = Group.GetGroup( Group.GroupsEnum.Administrator ); Assert.IsNotNull(m_Group); Assert.AreEqual(Group.GroupsEnum.Administrator, m_Group.GroupType); Assert.AreEqual(Group.GroupsEnum.Administrator.ToString(), m_Group.GroupID); }
private void bindLogo( Group group ) { if (strUtil.HasText( group.Logo )) set( "g.Logo", string.Format( "<img src='{0}' />", group.LogoSmall ) ); else set( "g.Logo", string.Empty ); }
public InterfaceOutPut ChangeJiaoLu(string data) { InterfaceOutPut output = new InterfaceOutPut(); JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer(); Group group = new Group(); try { ChangeGrpJlParam InParams = javaScriptSerializer.Deserialize <ChangeGrpJlParam>(data); if (!LCGroup.GetGroup(InParams.GroupGUID, group)) { throw new Exception("没有找到对应的机组"); } //可能还需要更新PLACEID if (!string.IsNullOrEmpty(group.trainPlanID)) { throw new Exception("该机组已按排计划,不能修改所属交路"); } SqlParameter[] sqlParams = new SqlParameter[] { new SqlParameter("strGroupGUID", InParams.GroupGUID), new SqlParameter("DestJiaoLu", InParams.DestJiaolu.jiaoluID), new SqlParameter("TrainGUID", InParams.TrainGUID), new SqlParameter("nOrder", 0) }; //获取最大序号 string strSql = "select ISNUll(max(nOrder),1) from TAB_Nameplate_TrainmanJiaolu_OrderInTrain where strTrainGUID = @TrainGUID"; int nOrder = Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.ConnString, CommandType.Text, strSql, sqlParams)); nOrder++; sqlParams[sqlParams.Length - 1].SqlValue = nOrder; SqlConnection conn = new SqlConnection(SqlHelper.ConnString); conn.Open(); using (SqlTransaction trans = conn.BeginTransaction()) { try { switch (InParams.SrcJiaolu.jiaoluType) { //记名式 case 2: { strSql = "delete from TAB_Nameplate_TrainmanJiaolu_Named where strGroupGUID = @strGroupGUID"; SqlHelper.ExecuteNonQuery(trans, CommandType.Text, strSql, sqlParams); break; } //轮乘 case 3: { strSql = "delete from TAB_Nameplate_TrainmanJiaolu_Order where strGroupGUID = @strGroupGUID"; SqlHelper.ExecuteNonQuery(trans, CommandType.Text, strSql, sqlParams); break; } //包乘 case 4: { //strSql = "delete from TAB_Nameplate_TrainmanJiaolu_OrderInTrain where strGroupGUID = @strGroupGUID"; //SqlHelper.ExecuteNonQuery(SqlHelper.ConnString, CommandType.Text, strSql, sqlParams); break; } } strSql = "update TAB_Nameplate_TrainmanJiaolu_OrderInTrain set strTrainGUID = @TrainGUID,nOrder = @nOrder where strGroupGUID = @strGroupGUID"; if (Convert.ToInt32(SqlHelper.ExecuteNonQuery(trans, CommandType.Text, strSql, sqlParams)) == 0) { //插入关联信息 strSql = @"insert into TAB_Nameplate_TrainmanJiaolu_OrderInTrain (strTrainGUID,nOrder,strGroupGUID) values(@TrainGUID,@nOrder,@strGroupGUID)"; SqlHelper.ExecuteNonQuery(trans, CommandType.Text, strSql, sqlParams); } //更新人员所属交路 strSql = @"update TAB_Org_Trainman set strTrainmanJiaoluGUID = @DestJiaoLu where strTrainmanGUID in ( select strTrainmanGUID1 from TAB_Nameplate_Group where strGroupGUID = @strGroupGUID union select strTrainmanGUID2 from TAB_Nameplate_Group where strGroupGUID = @strGroupGUID union select strTrainmanGUID3 from TAB_Nameplate_Group where strGroupGUID = @strGroupGUID union select strTrainmanGUID4 from TAB_Nameplate_Group where strGroupGUID = @strGroupGUID)"; SqlHelper.ExecuteNonQuery(trans, CommandType.Text, strSql, sqlParams); string strContent = string.Format("机组【{0}】 由【{1}】交路 更改为【{2}】交路", LCGroup.GetGroupString(group), InParams.SrcJiaolu.jiaoluName, InParams.DestJiaolu.jiaoluName); LCGroup.SaveNameplateLog(group, InParams.SrcJiaolu, InParams.DutyUser, LBoardChangeType.btcChangeJiaoLu, strContent); output.result = 0; trans.Commit(); } catch (Exception ex) { trans.Rollback(); throw ex; } finally { conn.Close(); } } } catch (Exception ex) { output.resultStr = ex.Message.ToString(); output.result = 1; } return(output); }
public GroupCommand(Group group) { receiver = group ?? throw new ArgumentNullException(); }
public override void Use(Player p, string message) { if (message == "") { Player.SendMessage(p, "Basic blocks: "); for (byte i = 0; i < Block.CpeCount; i++) { message += ", " + Block.Name(i); } Player.SendMessage(p, message.Remove(0, 2)); Player.SendMessage(p, "&d/blocks all <0/1/2/3/4> %Swill show the rest."); } else if (message.ToLower() == "all") { message = ""; Player.SendMessage(p, "Complex blocks: "); for (byte i = Block.CpeCount; i < 255; i++) { if (Block.Name(i).ToLower() != "unknown") message += ", " + Block.Name(i); } Player.SendMessage(p, message.Remove(0, 2)); Player.SendMessage(p, "Use &d/blocks all <0/1/2/3/4> %Sfor a readable list."); } else if (message.ToLower().IndexOf(' ') != -1 && message.Split(' ')[0] == "all") { int foundRange = 0; try { foundRange = int.Parse(message.Split(' ')[1]); } catch { Player.SendMessage(p, "Incorrect syntax"); return; } if (foundRange >= 5 || foundRange < 0) { Player.SendMessage(p, "Number must be between 0 and 4"); return; } message = ""; Player.SendMessage(p, "Blocks between " + foundRange * 51 + " and " + (foundRange + 1) * 51); for (byte i = (byte)(foundRange * 51); i < (byte)((foundRange + 1) * 51); i++) { if (Block.Name(i).ToLower() != "unknown") message += ", " + Block.Name(i); } Player.SendMessage(p, message.Remove(0, 2)); } else { string printMessage = ">>>&b"; if (Block.Byte(message) != Block.Zero) { byte b = Block.Byte(message); if (b < Block.CpeCount) { for (byte i = Block.CpeCount; i < 255; i++) { if (Block.Convert(i) == b) printMessage += Block.Name(i) + ", "; } if (printMessage != ">>>&b") { Player.SendMessage(p, "Blocks which look like \"" + message + "\":"); Player.SendMessage(p, printMessage.Remove(printMessage.Length - 2)); } else Player.SendMessage(p, "No Complex Blocks look like \"" + message + "\""); } else { Player.SendMessage(p, "&bComplex information for \"" + message + "\":"); Player.SendMessage(p, "&cBlock will appear as a \"" + Block.Name(Block.Convert(b)) + "\" block"); BlockProps props = Block.Properties[b]; if (Block.LightPass(b, 0, BlockDefinition.GlobalDefs)) Player.SendMessage(p, "Block will allow light through"); if (Block.Physics(b)) Player.SendMessage(p, "Block affects physics in some way"); //AFFECT! else Player.SendMessage(p, "Block will not affect physics in any way"); //It's AFFECT! if (Block.NeedRestart(b)) Player.SendMessage(p, "The block's physics will auto-start"); if (props.OPBlock) Player.SendMessage(p, "Block is unaffected by explosions"); if (Block.AllowBreak(b)) Player.SendMessage(p, "Anybody can activate the block"); if (Block.Walkthrough(b)) Player.SendMessage(p, "Block can be walked through"); if (Block.Death(b)) Player.SendMessage(p, "Walking through block will kill you"); if (props.DoorAirId != 0) Player.SendMessage(p, "Block is an ordinary door"); if (props.IsTDoor) Player.SendMessage(p, "Block is a tdoor, which allows other blocks through when open"); if (props.ODoorId != Block.Zero) Player.SendMessage(p, "Block is an odoor, which toggles (GLITCHY)"); if (Block.Mover(b)) Player.SendMessage(p, "Block can be activated by walking through it"); } } else if (Group.Find(message) != null) { LevelPermission Perm = Group.Find(message).Permission; foreach (Block.Blocks bL in Block.BlockList) { if (Block.canPlace(Perm, bL.type) && Block.Name(bL.type).ToLower() != "unknown") printMessage += Block.Name(bL.type) + ", "; } if (printMessage != ">>>&b") { Player.SendMessage(p, "Blocks which " + Group.Find(message).ColoredName + " %Scan place: "); Player.SendMessage(p, printMessage.Remove(printMessage.Length - 2)); } else Player.SendMessage(p, "No blocks are specific to this rank"); } else if (message.IndexOf(' ') == -1) { if (message.ToLower() == "count") Player.SendMessage(p, "Blocks in this map: " + p.level.blocks.Length); else Help(p); } else if (message.Split(' ')[0].ToLower() == "count") { int foundNum = 0; byte foundBlock = Block.Byte(message.Split(' ')[1]); if (foundBlock == Block.Zero) { Player.SendMessage(p, "Could not find block specified"); return; } for (int i = 0; i < p.level.blocks.Length; i++) { if (foundBlock == p.level.blocks[i]) foundNum++; } if (foundNum == 0) Player.SendMessage(p, "No blocks were of type \"" + message.Split(' ')[1] + "\""); else if (foundNum == 1) Player.SendMessage(p, "1 block was of type \"" + message.Split(' ')[1] + "\""); else Player.SendMessage(p, foundNum.ToString() + " blocks were of type \"" + message.Split(' ')[1] + "\""); } else { Player.SendMessage(p, "Unable to find block or rank"); } } }
internal virtual void ShowContextMenu(Card card, bool showGroupActions = true) { if (Player.LocalPlayer.Spectator) { return; } // Modify selection if (card == null || !card.Selected) { Selection.Clear(); } var menuItems = new CompositeCollection(); ContextGroup = group; ContextMenu = new ContextMenu { ItemsSource = menuItems, Tag = card }; // card has to captured somehow, otherwise it may be overwritten before released in the OnClosed handler, e.g. when rightclicking on a card, then directly right-clicking on another card. ContextMenu.Opened += (sender, args) => { ContextGroup.KeepControl(); var c = ((ContextMenu)sender).Tag as Card; if (c != null) { c.KeepControl(); } }; ContextMenu.Closed += (sender, args) => { ContextGroup.ReleaseControl(); var c = ((ContextMenu)sender).Tag as Card; if (c != null) { c.ReleaseControl(); } }; ContextCard = card; menuItems.Clear(); if (group.CanManipulate()) { if (card != null) { if (card.CanManipulate()) { if (_cardHeader != null) { _cardHeader.Header = card.Name; _cardHeader.Background = card.Controller.TransparentBrush; menuItems.Add(_cardMenu); } } else { var item = new MenuItem { Header = card.Name, Background = card.Controller.TransparentBrush }; item.SetResourceReference(StyleProperty, "MenuHeader"); menuItems.Add(item); item = new MenuItem { Header = "Take control" }; item.Click += delegate { card.TakeControl(); }; menuItems.Add(item); } if (!card.FaceUp) { var peekItem = new MenuItem { Header = "Peek", InputGestureText = "Ctrl+P" }; peekItem.Click += delegate { ContextCard.Peek(); }; if (menuItems.Count == 0) { var item = new MenuItem { Header = card.Name, Background = card.Owner.TransparentBrush }; item.SetResourceReference(StyleProperty, "MenuHeader"); menuItems.Add(item); } menuItems.Add(peekItem); } } if (showGroupActions) { menuItems.Add(_groupMenu); } } else// if (!group.WantToShuffle) { menuItems.Add(CreateGroupHeader()); var item = new MenuItem { Header = "Take control" }; item.Click += delegate { group.TakeControl(); }; menuItems.Add(item); menuItems.Add(new Separator()); item = CreateLookAtCardsMenuItem(); if (item != null) { menuItems.Add(item); } } //else // Group is being shuffled // return; ContextMenu.IsOpen = false; // Required to trigger the ReleaseControl calls if the ContextMenu was already open ContextMenu.UpdateLayout(); // Required if the ContextMenu was already open ContextMenu.IsOpen = true; ContextMenu.FontFamily = groupFont; ContextMenu.FontSize = fontsize; }
public abstract void VisitGroup(Group group);
static public QueryRequestCqlQuery createQueryRequestCqlQuery(string name, string[] queryModifierItems, ItemsChoiceType[] queryModifierItemsChoiceType1, Association targetAssociation, Group targetGroup) { QueryRequestCqlQuery arg = new QueryRequestCqlQuery(); arg.CQLQuery = new CQLQuery(); arg.CQLQuery.Target = new Object(); arg.CQLQuery.Target.name = name; if ((queryModifierItems != null) && (queryModifierItemsChoiceType1 != null)) { arg.CQLQuery.QueryModifier = new QueryModifier(); arg.CQLQuery.QueryModifier.countOnly = false; arg.CQLQuery.QueryModifier.Items = queryModifierItems; arg.CQLQuery.QueryModifier.ItemsElementName = queryModifierItemsChoiceType1; } if (targetAssociation != null) { arg.CQLQuery.Target.Item = targetAssociation; } else if (targetGroup != null) { arg.CQLQuery.Target.Item = targetGroup; } return(arg); }
public static SubPacket buildPacket(uint playerActorID, uint locationCode, ulong sequenceId, Group group) { byte[] data = new byte[PACKET_SIZE - 0x20]; using (MemoryStream mem = new MemoryStream(data)) { using (BinaryWriter binWriter = new BinaryWriter(mem)) { //Write list header binWriter.Write((UInt64)locationCode); binWriter.Write((UInt64)sequenceId); //Write list id binWriter.Write((UInt64)3); binWriter.Write((UInt64)group.groupIndex); binWriter.Write((UInt64)0); binWriter.Write((UInt64)group.groupIndex); //This seems to change depending on what the list is for binWriter.Write((UInt32)group.GetTypeId()); binWriter.Seek(0x40, SeekOrigin.Begin); //This is for Linkshell binWriter.Write((UInt32)group.GetGroupLocalizedName()); binWriter.Write(Encoding.ASCII.GetBytes(group.GetGroupName()), 0, Encoding.ASCII.GetByteCount(group.GetGroupName()) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(group.GetGroupName())); binWriter.Seek(0x64, SeekOrigin.Begin); //Does this change chat???? binWriter.Write((UInt32)0x6D); binWriter.Write((UInt32)0x6D); binWriter.Write((UInt32)0x6D); binWriter.Write((UInt32)0x6D); binWriter.Write((UInt32)group.GetMemberCount()); } } return(new SubPacket(OPCODE, playerActorID, data)); }
public GroupDto(Group group) { GroupName = group.GroupName; }
private void ParseGenericTypeDeclaration(string originalString) { if (originalString.IndexOf('[') == -1 && originalString.IndexOf('<') == -1) { // nothing to do unresolvedGenericTypeName = originalString; unresolvedGenericMethodName = originalString; return; } originalString = originalString.Trim(); bool isClrStyleNotation = originalString.IndexOf('`') > -1; Match m = (isClrStyleNotation) ? ClrPattern.Match(originalString) : CSharpPattern.Match(originalString); if (m == null || !m.Success) { unresolvedGenericTypeName = originalString; unresolvedGenericMethodName = originalString; return; } Group g = m.Groups["args"]; unresolvedGenericArguments = ParseGenericArgumentList(g.Value); string name = m.Groups["name"].Value; string remainder = m.Groups["remainder"].Value.Trim(); // check, if we're dealing with an array type declaration if (remainder.Length > 0 && remainder.IndexOf('[') > -1) { string[] remainderParts = StringUtils.Split(remainder, ",", false, false, "[]"); string arrayPart = remainderParts[0].Trim(); if (arrayPart[0] == '[' && arrayPart[arrayPart.Length - 1] == ']') { arrayDeclaration = arrayPart; remainder = ", " + string.Join(",", remainderParts, 1, remainderParts.Length - 1); } } unresolvedGenericMethodName = name + remainder; unresolvedGenericTypeName = name + "`" + unresolvedGenericArguments.Length + remainder; // char lBoundary = isClrStyleNotation ? '[' : GenericArgumentsPrefix; // char rBoundary = isClrStyleNotation ? ']' : GenericArgumentsSuffix; // // int argsStartIndex = originalString.IndexOf(lBoundary); // if (argsStartIndex < 0) // { // unresolvedGenericTypeName = originalString; // unresolvedGenericMethodName = originalString; // } // else // { // int argsEndIndex = originalString.LastIndexOf(rBoundary); // if (argsEndIndex != -1) // { // unresolvedGenericMethodName = originalString.Remove( // argsStartIndex, argsEndIndex - argsStartIndex + 1); // // unresolvedGenericArguments = ParseGenericArgumentList(originalString.Substring( // argsStartIndex + 1, argsEndIndex - argsStartIndex - 1)); // // unresolvedGenericTypeName = originalString.Replace( // originalString.Substring(argsStartIndex, argsEndIndex - argsStartIndex + 1), // "`" + unresolvedGenericArguments.Length); // } // } }
internal static void CoreLine(Player p, string fullName, string name, Group grp, int messages) { p.Message("{0} %S({1}) has:", fullName, name); p.Message(" Rank of {0}%S, wrote &a{1} %Smessages", grp.ColoredName, messages); }
public static StatisticOfGroup StaticticOfGroup(ClassesSchedule schedule, Group group) { return(new StatisticOfGroup(schedule, group)); }
internal static void GroupBroadcastKernel(ArrayView <int> data) { var idx = Grid.IdxX * Group.DimX + Group.IdxX; data[idx] = Group.Broadcast(Group.IdxX, Group.DimX - 1); }
/// <summary> /// Constructor /// </summary> /// <param name="g"></param> /// <param name="v"></param> public clsData(Group g, int v) { // Widen Scope _g = g; _v = _g.Document.GetElement(new ElementId(v)) as View; }
/// <summary> /// Creates a Group resource in the specified project using the data included in the request. /// Documentation https://developers.google.com/clouduseraccounts/alpha/reference/groups/insert /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated CloudUserAccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="body">A valid CloudUserAccounts alpha body.</param> /// <returns>OperationResponse</returns> public static Operation Insert(CloudUserAccountsService service, string project, Group body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (project == null) { throw new ArgumentNullException(project); } // Make the request. return(service.Groups.Insert(body, project).Execute()); } catch (Exception ex) { throw new Exception("Request Groups.Insert failed.", ex); } }
private async Task<bool> CheckIfNameIsUsedByAnother(Group group) { return await _groupDAO.FindAnotherByName(group, group.Name) != null; }
public CraftDefinition(Group group, Liquor liquor, Type[] ingredients, int[] amounts, TimeSpan matureperiod) { m_Group = group; m_Liquor = liquor; m_Ingredients = ingredients; m_Amounts = amounts; m_MaturationDuration = matureperiod; m_Labels = new int[m_Ingredients.Length]; for (int i = 0; i < m_Ingredients.Length; i++) { Type type = m_Ingredients[i]; if (type == typeof(Yeast)) { m_Labels[i] = 1150453; } else if (type == typeof(WheatWort)) { m_Labels[i] = 1150275; } else if (type == typeof(PewterBowlOfCorn)) { m_Labels[i] = 1025631; } else if (type == typeof(PewterBowlOfPotatos)) { m_Labels[i] = 1025634; } else if (type == typeof(TribalBerry)) { m_Labels[i] = 1040001; } else if (type == typeof(HoneydewMelon)) { m_Labels[i] = 1023189; } else if (type == typeof(JarHoney)) { m_Labels[i] = 1022540; } else if (type == typeof(Pitcher)) { if (m_Liquor == Liquor.Brandy) { m_Labels[i] = 1028091; // pitcher of wine } else { m_Labels[i] = 1024088; // pitcher of water } } else if (type == typeof(Dates)) { m_Labels[i] = 1025927; } else { Item item = Loot.Construct(type); if (item != null) { m_Labels[i] = item.LabelNumber; item.Delete(); } } } }
private static async Task <SharingResult> ShareSiteWithPeoplePickerValueImplementation(Web web, string peoplePickerInput, Group group, bool sendEmail, string emailBody) { // Solve the group id for the shared option based on default groups var groupId = group.Id; string roleValue = $"group:{groupId}"; // Right permission setup web.EnsureProperty(w => w.Url); var result = Web.ShareObject(web.Context, web.Url, peoplePickerInput, roleValue, groupId, false, sendEmail, false, null, emailBody, false); web.Context.Load(result); await web.Context.ExecuteQueryRetryAsync(); return(result); }
private async Task PutPermissionsInView(Group g = null) { ViewBag.Permissions = new MultiSelectList( await _context.Permissions.ToListAsync(), "Id", "Name", g?.GetPermissions().Select(x => x.Id).ToArray()); }
private static async Task <SharingResult> ShareSiteImplementation(Web web, string email, Group group, bool sendEmail, string emailBody) { var peoplePickerValue = await ResolvePeoplePickerValueForEmailImplementation(web, email); return(await ShareSiteWithPeoplePickerValueImplementation(web, peoplePickerValue, group, sendEmail, emailBody)); }
public override void Register() { RegisterItem("add-script", "Add Script", scriptItPrefab, () => { Debug.Log("Script added"); var host = pixel.GetScriptableHost(); var scriptable = Scriptable.CreateInstanceAndAssignTo(host); hierarchyManager.CreateScript(scriptable.gameObject); scriptManager.ShowImplementedScriptPanel(host); }); RegisterItem("edit-script", "Edit Script", scriptItPrefab, () => { Debug.Log("Edit script"); var host = !pixel.group.IsNotNull() ? GetComponent <ScriptableHost>() : pixel.GetFirstGroup().GetComponent <ScriptableHost>(); scriptManager.ShowImplementedScriptPanel(host); }); RegisterItem("toggle-pivot", "Toggle Pivot", () => { Debug.Log("Toggle pivot"); if (pixel.group.IsNotNull()) { var firstGroup = pixel.GetFirstGroup(); firstGroup.TogglePivot(); } else { pixel.TogglePivot(); } }); RegisterItem("group", "Group", () => { Debug.Log("Group"); Group.Create(); hierarchyManager.UpdatePixelPart(); }); RegisterItem("ungroup-one-by-one", "Ungroup", () => { Debug.Log("Ungroup One-by-one"); Group.UngroupOneByOne(); hierarchyManager.UpdatePixelPart(); }); RegisterItem("ungroup-single", "Ungroup", () => { Debug.Log("Ungroup Single"); Group.UngroupSingle(pixel); hierarchyManager.UpdatePixelPart(); }); RegisterItem("ungroup-all", "Ungroup All", () => { Debug.Log("Ungroup All"); Group.Ungroup(); hierarchyManager.UpdatePixelPart(); }); RegisterItem("create-prefab", "Create Prefab", () => { Debug.Log("Create Prefab"); // var pixels = FindObjectsOfType<Pixel>(); // var selectedPixels = pixels.Where(x => x.selecting); var selectedPixels = PixelManager.instance.GetPixels(x => x.selecting); if (selectedPixels.Any()) { var groupsAlreadyInPrefab = new List <Group>(); var selectedPixelsToArray = selectedPixels.ToArray(); foreach (var pixel in selectedPixelsToArray) { var group = pixel.GetFirstGroup(); if (group.IsNotNull()) { if (groupsAlreadyInPrefab.Any(x => x.id == group.id)) { continue; } groupsAlreadyInPrefab.Add(group); hierarchyManager.CreatePrefab(group.gameObject); continue; } hierarchyManager.CreatePrefab(pixel.gameObject); } groupsAlreadyInPrefab.Clear(); groupsAlreadyInPrefab = null; selectedPixelsToArray = null; selectedPixels = null; } else { var group = pixel.GetFirstGroup(); if (group.IsNotNull()) { hierarchyManager.CreatePrefab(group.gameObject); return; } hierarchyManager.CreatePrefab(pixel.gameObject); } }); RegisterItem("take-off", "Delete", takeOffPrefab, () => { Debug.Log("Take Off"); // PixelRemovingManager.instance.Remove(); var selectedPixels = PixelManager.instance.GetPixels(x => x.selecting); if (selectedPixels.Any()) { var potentialDeletingGroups = Group.GetManyGroups(selectedPixels); var it = selectedPixels.ToList(); it.ForEach(x => x.Remove()); var potentialDeletingGroupsIt = potentialDeletingGroups.Where(x => x.IsNotNull()).ToList(); Debug.Log(potentialDeletingGroupsIt.Count); potentialDeletingGroupsIt.ForEach(group => group.Remove()); potentialDeletingGroupsIt.Clear(); potentialDeletingGroups = null; } else { pixel.Remove(); } hierarchyManager.UpdatePixelPart(); }); }
private static async Task <SharingResult> InviteExternalUserImplementation(Group group, string email, bool sendEmail, string emailBody) { var web = (group.Context as ClientContext).Web; return(await ShareSiteImplementation(web, email, group, sendEmail, emailBody)); }
/// <summary> /// Share site for a person using complex JSON object for people picker value. /// </summary> /// <param name="web">Web for the context of the site to be shared.</param> /// <param name="peoplePickerInput">JSON object with the people picker value</param> /// <param name="group">The group to invite the user to</param> /// <param name="sendEmail">Should we send email for the given address.</param> /// <param name="emailBody">Text to be added on share email sent to receiver.</param> /// <returns>A SharingResult object</returns> public static SharingResult ShareSiteWithPeoplePickerValue(this Web web, string peoplePickerInput, Group group, bool sendEmail = true, string emailBody = "Site shared for you.") { return(Task.Run(() => ShareSiteWithPeoplePickerValueImplementation(web, peoplePickerInput, group, sendEmail, emailBody)).GetAwaiter().GetResult()); }
/// <summary> /// Invites an external user as a group member /// </summary> /// <param name="group">Group to add the user to</param> /// <param name="email">The email address of the external user</param> /// <param name="sendEmail">Should we send an email to the given address</param> /// <param name="emailBody">Text to be added to the email</param> /// <returns>A SharingResult object</returns> public static SharingResult InviteExternalUser(this Group group, string email, bool sendEmail = true, string emailBody = "Site shared with you.") { return(Task.Run(() => InviteExternalUserImplementation(group, email, sendEmail, emailBody)).GetAwaiter().GetResult()); }
/// <summary> /// Share site for a person using just email. Will resolve needed people picker JSON value automatically. /// </summary> /// <param name="web">Web for the context of the site to be shared.</param> /// <param name="email">Email of the person to whom site should be shared.</param> /// <param name="group">Group to invite the external user to</param> /// <param name="sendEmail">Should we send email for the given address.</param> /// <param name="emailBody">Text to be added on share email sent to receiver.</param> /// <returns>A SharingResult object</returns> public static async Task <SharingResult> ShareSiteAsync(this Web web, string email, Group group, bool sendEmail = true, string emailBody = "Site shared for you.") { await new SynchronizationContextRemover(); return(await ShareSiteImplementation(web, email, group, sendEmail, emailBody)); }
public ParticipantGroupAddedMessage(Group group) : base(group) { }
/// <summary> /// Invites an external user as a group member /// </summary> /// <param name="group">Group to add the user to</param> /// <param name="email">The email address of the external user</param> /// <param name="sendEmail">Should we send an email to the given address</param> /// <param name="emailBody">Text to be added to the email</param> /// <returns>A SharingResult object</returns> public static async Task <SharingResult> InviteExternalUserAsync(this Group group, string email, bool sendEmail = true, string emailBody = "Site shared with you.") { await new SynchronizationContextRemover(); return(await InviteExternalUserImplementation(group, email, sendEmail, emailBody)); }
private static Target[] NonSelfTargetsFor(this BattleState state, TeamType myTeam, Group group, Scope scope) { var opponentsAre = myTeam == TeamType.Party ? TeamType.Enemies : TeamType.Party; var teamMembers = group == Group.Ally ? Get(state, myTeam) : Get(state, opponentsAre); var membersAsTargets = teamMembers.Select(x => new MemberAsTarget(x)).ToArray(); return(scope == Scope.One ? Targets(membersAsTargets) : Targets(new Team(teamMembers))); }
public ParticipantGroupRemovedMessage(Group group) : base(group) { }
/// <summary> /// Executes this instance. /// </summary> public void Execute() { using (var rockContext = new RockContext()) { var relationshipGroupType = GroupTypeCache.Get(Rock.SystemGuid.GroupType.GROUPTYPE_KNOWN_RELATIONSHIPS.AsGuid()); if (relationshipGroupType != null) { var ownerRole = relationshipGroupType.Roles .Where(r => r.Guid.Equals(Rock.SystemGuid.GroupRole.GROUPROLE_KNOWN_RELATIONSHIPS_OWNER.AsGuid())) .FirstOrDefault(); var friendRole = relationshipGroupType.Roles .Where(r => r.Guid.Equals(Rock.SystemGuid.GroupRole.GROUPROLE_KNOWN_RELATIONSHIPS_FACEBOOK_FRIEND.AsGuid())) .FirstOrDefault(); if (ownerRole != null && friendRole != null) { var userLoginService = new UserLoginService(rockContext); var groupMemberService = new GroupMemberService(rockContext); // Convert list of facebook ids into list of usernames var friendUserNames = FacebookIds.Select(i => "FACEBOOK_" + i).ToList(); // Get the list of person ids associated with friends usernames var friendPersonIds = userLoginService.Queryable() .Where(l => l.PersonId.HasValue && l.PersonId != PersonId && friendUserNames.Contains(l.UserName)) .Select(l => l.PersonId.Value) .Distinct() .ToList(); // Get the person's group id var personGroup = groupMemberService.Queryable() .Where(m => m.PersonId == PersonId && m.GroupRoleId == ownerRole.Id && m.Group.GroupTypeId == relationshipGroupType.Id) .Select(m => m.Group) .FirstOrDefault(); // Verify that a 'known relationships' type group existed for the person, if not create it if (personGroup == null) { var groupMember = new GroupMember(); groupMember.PersonId = PersonId; groupMember.GroupRoleId = ownerRole.Id; personGroup = new Group(); personGroup.Name = relationshipGroupType.Name; personGroup.GroupTypeId = relationshipGroupType.Id; personGroup.Members.Add(groupMember); var groupService = new GroupService(rockContext); groupService.Add(personGroup); rockContext.SaveChanges(); } // Get the person's relationship group id var personGroupId = personGroup.Id; // Get all of the friend's relationship group ids var friendGroupIds = groupMemberService.Queryable() .Where(m => m.Group.GroupTypeId == relationshipGroupType.Id && m.GroupRoleId == ownerRole.Id && friendPersonIds.Contains(m.PersonId)) .Select(m => m.GroupId) .Distinct() .ToList(); // Find all the existing friend relationships in Rock ( both directions ) var existingFriends = groupMemberService.Queryable() .Where(m => m.Group.GroupTypeId == relationshipGroupType.Id && ( (friendPersonIds.Contains(m.PersonId) && m.GroupId == personGroupId) || (m.PersonId == PersonId && m.GroupId != personGroupId) )) .ToList(); // Create temp group members for current Facebook friends var currentFriends = new List <GroupMember>(); // ( Person > Friend ) foreach (int personId in friendPersonIds) { var groupMember = new GroupMember(); groupMember.GroupId = personGroupId; groupMember.PersonId = personId; groupMember.GroupRoleId = friendRole.Id; groupMember.GroupMemberStatus = GroupMemberStatus.Active; currentFriends.Add(groupMember); } // ( Friend > Person ) foreach (int familyId in friendGroupIds) { var groupMember = new GroupMember(); groupMember.GroupId = familyId; groupMember.PersonId = PersonId; groupMember.GroupRoleId = friendRole.Id; groupMember.GroupMemberStatus = GroupMemberStatus.Active; currentFriends.Add(groupMember); } // Add any current friends that do not exist in Rock yet foreach (var groupMember in currentFriends .Where(f => !existingFriends.Any(e => e.IsEqualTo(f)))) { groupMemberService.Add(groupMember); } // Delete any existing friends that are no longer facebook friends foreach (var groupMember in existingFriends .Where(f => !currentFriends.Any(e => e.IsEqualTo(f)))) { groupMemberService.Delete(groupMember); } rockContext.SaveChanges(); } } } }
public GroupInformationMessage(Group group) : base(Guid.Empty) { this.GroupId = group.ID; this.FriendlyName = group.FriendlyName; this.Singleton = (group is SingletonGroup); }