/// <summary> /// Creates the shell agent. /// </summary> /// <returns></returns> private static IShellAgent CreateShellAgent() { var agt = ShellAgentFactory.CreateAgent(ShellAgentKey); agt.OnLoginUserCompleted += (snd, e) => _shellForm.ConfigureForUser(e.Info); return(agt); }
public SettingItem GetSettings(string accountId, string applicationFunctionId, string roleId, string objectId) { SettingItem req = new SettingItem() { ApplicationFunctionId = applicationFunctionId, AccountId = accountId, RoleId = roleId, ObjectId = objectId }; return(ShellAgentFactory .CreateAgent() .GetSettings(req)); }
/// <summary> /// Reads the settings. /// </summary> /// <returns></returns> public static void GetSettingsAsync(string accountId, string applicationFunctionId, string roleId, string objectId, Action <SettingItem> onSettingChanged) { _onSettingChanged = onSettingChanged; SettingItem req = new SettingItem() { ApplicationFunctionId = applicationFunctionId, AccountId = accountId, RoleId = roleId, ObjectId = objectId }; ShellAgentFactory .CreateAgent() .GetSettingsAsync(req, ChangeSetting); }
/// <summary> /// Saves the settings. /// </summary> /// <param name="settings">The settings.</param> public static void SaveSettings(string accountId, string applicationFunctionId, string roleId, string objectId, XElement settings, Action <SettingItem> onSettingChanged = null) { _onSettingChanged = onSettingChanged; ShellAgentFactory .CreateAgent() .SaveSettingsAsync(new SettingItem() { Id = Guid.NewGuid().ToString(), AccountId = accountId, ApplicationFunctionId = applicationFunctionId, RoleId = roleId, ObjectId = objectId, SettingInfo = settings }, ChangeSetting); }
/// <summary> /// Initializes a new instance of the <see cref="LoginViewModel"/> class. /// </summary> public LoginViewModel() { _shellAgent = ShellAgentFactory.CreateAgent(ShellAgentFactory.Key.Instance); _shellAgent.GetAuthenticationModesCompleted += (p) => { AuthenticationModes = p.ToList(); }; _shellAgent.LoginUserCompleted += (s) => { PMSSession.Current = s; }; }