public override void Initialize() { base.Initialize(); this._ReceivedDate = ""; this._SendDate = ""; this._ActivityDescription = ""; this._ActivityOrderDesc = ""; this._ReminderDate = ""; this._PercentOfDevelop = 0; this._CurrentWorker = new Worker(); this._PriorityType = ActivityPriorityType.OutOfValue; this._PreviousActivity = new Activity(); this._PrevRejectedActivity = new Activity(); this._CoWorkGroup = new WorkGroup(); this._ActionType = ActivityActionType.OutOfValue; this._IsViewed = SbnBoolean.OutOfValue; this._CoFolder = new Folder(); this._IsHidden = SbnBoolean.OutOfValue; this._CoDocument = new Document(); this._ComplementInfo = new ActivityComplementInfo(); this._ArchiveStatus = ActivityArchiveStatus.OutOfValue; this._CoDocumentType = new DocumentType(); this._CoTask = new Task(); this._HasReminderFlag = SbnBoolean.OutOfValue; this._Attachments = new WMCAttachments(); this._CoPlace = new WFPlace(); this._CoWC = new WorkContext(); }
private void ActivityManager_OnActivityInvite(ActivityActionType type, ref User user, ref Activity activity) { if (SceneManager.GetActiveScene().name.Contains("Menu") && type == ActivityActionType.Join && !Client.Instance.inRoom && !Client.Instance.inRadioMode) { PluginUI.instance.ShowInvite(user, activity); } }
private static void HandleActivityInvite(ActivityActionType type, ref User user, ref Activity activity) { if (Config.Instance.AllowInvites) { OnActivityInvite?.Invoke(type, ref user, ref activity); } }
private static void OnActivityInviteImpl(IntPtr ptr, ActivityActionType type, ref User user, ref Activity activity) { GCHandle h = GCHandle.FromIntPtr(ptr); Discord d = (Discord)h.Target; d.ActivityManagerInstance.OnActivityInvite?.Invoke(type, ref user, ref activity); }
/// <summary> /// Sends a game invite to a given user. If you do not have a valid activity with all the required fields, this call /// will error. /// See /// <a href="https://discord.com/developers/docs/game-sdk/activities#activity-action-field-requirements"> /// Activity /// Action Field Requirement /// </a> /// for the fields required to have join and spectate invites function properly. /// </summary> /// <param name="userId"></param> /// <param name="type"></param> /// <param name="content"></param> /// <param name="callback"></param> public void SendInvite(long userId, ActivityActionType type, string content, SendInviteHandler callback) { GCHandle wrapped = GCHandle.Alloc(callback); Methods.SendInvite(methodsPtr, userId, type, content, GCHandle.ToIntPtr(wrapped), SendInviteCallbackImpl); }
internal void CallActivityInvite(ActivityActionType actionType, ref User user, ref Activity activity) { OnActivityInvite?.Invoke(actionType, ref user, ref activity); }
private void DiscordClient_OnActivityInvite(ActivityActionType type, ref User user, ref Activity activity) { FindActivityEventHandler()?.CallActivityInvite(type, ref user, ref activity); }
/// <summary> /// Fires when the user receives a join or spectate invite. /// </summary> /// <param name="type">whether this invite is to join or spectate</param> /// <param name="user">the user sending the invite</param> /// <param name="activity"> the inviting user's current activity</param> private void ActivityManager_OnActivityInvite(ActivityActionType type, ref User user, ref Activity activity) { throw new System.NotImplementedException(); }
private static void HandleActivityInvite(ActivityActionType type, ref User user, ref DiscordSdk.Activity activity) { Console.WriteLine("Activity Invite"); }
/// <summary> /// Opens the overlay modal for sending game invitations to users, channels, and servers. If you do not have a valid /// activity with all the required fields, this call will error. /// See /// <a href="https://discord.com/developers/docs/game-sdk/activities#activity-action-field-requirements"> /// Activity Action Field Requirements /// </a> /// for the fields required to have join and spectate invites function properly. /// </summary> /// <param name="type"></param> /// <param name="callback"></param> public void OpenActivityInvite(ActivityActionType type, OpenActivityInviteHandler callback) { GCHandle wrapped = GCHandle.Alloc(callback); Methods.OpenActivityInvite(methodsPtr, type, GCHandle.ToIntPtr(wrapped), OpenActivityInviteCallbackImpl); }
private void OnActivityInvite(ActivityActionType type, ref User user, ref Activity activity) { activity_manager.AcceptInvite(user.Id); }