public ChatWindowController OpenChatWindow(ContactBase customer) { var newChat = Instantiate(ChatWindowTemplate, ChatWindowTemplate.transform.parent); var moveLeft = 50; var otherWindows = ChatWindowTemplate .transform .parent .Cast <Transform>() .Where(w => w != newChat.transform) .ToList(); while (otherWindows.Any(t => Math.Abs(t.localPosition.x - newChat.transform.localPosition.x) < 5f && Math.Abs(t.localPosition.y - newChat.transform.localPosition.y) < 5f) && moveLeft > 0) { moveLeft--; newChat.transform.Translate(12f, -12f, 0f); } var chatWindow = newChat.GetComponent <ChatWindowController>(); chatWindow.OpenContextualWindow(customer); return(chatWindow); }
void IContactViewerPlugin.Create(ContactBase contact) { if (cvc == null) { cvc = new ContactViewerControl(); } cvc.LoadData(contact); }
void IContactTabControlPlugin.Create(ContactBase contact, IContactTabControl contactTabControl) { if (ctpc == null) { ctpc = new ContactTabPluginControl(); } ctpc.LoadData(contact); }
IList <NewMenuEntry> INewMenuPlugin.Entries(ContactBase contact) { var result = new SDK.List <NewMenuEntry>(); NewMenuEntry nme = new NewMenuEntry(AMTANGEE.SDK.Resources.Images[Resources.ImageIndexes.AMTANGEE], "Hello World"); result.Add(nme); return(result); }
public IDictionary <BarItem, bool> SubMenuEntries(ContactBase contact) { var result = new SDK.Dictionary <DevExpress.XtraBars.BarItem, bool>(); DevExpress.XtraBars.BarItem bi = new DevExpress.XtraBars.BarButtonItem(); bi.Caption = "Hello World 1"; bi.ItemClick += Bi_ItemClick; result.Add(bi, true); DevExpress.XtraBars.BarItem bi2 = new DevExpress.XtraBars.BarButtonItem(); bi2.Caption = "Hello World 2"; bi2.ItemClick += Bi_ItemClick; result.Add(bi2, false); return(result); }
public string FieldData(ContactBase contact, Address address, User user, DateTime date, string field, string additionalInformation, bool isForExport, bool throwExceptionIfContactNeeded) { var type = GetTypeByName(field); if (type == null) { return(""); } if (contact != null && contact.ExistsAndLoadedAndRights) { foreach (var a in contact.Accounts) { if (a.Type == type) { return(a.AccountName); } } } return(""); }
public void AddADRecipientsToContacts() { ExTraceGlobals.ContactsCallTracer.TraceDebug((long)this.GetHashCode(), "DirectoryItemEventHandler.AddToContacts"); string text = null; string contactType = "IPM.Contact"; int num = 0; bool flag = false; string text2 = null; if (base.IsParameterSet("email")) { text2 = (base.GetParameter("email") as string); } if (!string.IsNullOrEmpty(text2)) { if (base.IsParameterSet("id")) { this.itemIds = (ADObjectId[])base.GetParameter("id"); } IRecipientSession session = Utilities.CreateADRecipientSession(Culture.GetUserCulture().LCID, true, ConsistencyMode.IgnoreInvalid, true, base.UserContext); ADRecipient data = Utilities.CreateADRecipientFromProxyAddress((this.itemIds == null) ? null : ((ADObjectId)this.itemIds[0]), text2, session); Result <ADRecipient> result = new Result <ADRecipient>(data, null); this.results = new Result <ADRecipient> [1]; this.results[0] = result; } else { this.BindToData(); } for (int i = 0; i < this.results.Length; i++) { ADRecipient data2 = this.results[i].Data; if (data2 == null) { flag = true; } else { using (ContactBase contactBase = ContactUtilities.AddADRecipientToContacts(base.UserContext, data2)) { if (contactBase != null) { num++; if (num == 1) { contactBase.Load(); text = contactBase.Id.ObjectId.ToBase64String(); if (contactBase is DistributionList) { contactType = "IPM.DistList"; } } } } } } if (num == 1 && text != null) { this.RenderUrlToOpenContactAsDraft(text, contactType); return; } if (flag) { this.Writer.Write("<div id=\"sCntErr\">"); this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-552412224)); this.Writer.Write("</div>"); } }
public bool Visible(ContactBase contact) { return(true); }
void INewMenuPlugin.EntryClicked(NewMenuEntry entry, ContactBase contact) { SDK.MessageBox.Show("Entry '" + entry.Caption + "' clicked!"); }