public ProfileControl(LinkConfigProfileModel dataSource) { InitializeComponent(); Dock = DockStyle.Fill; _dataSource = dataSource; NeedToSave = true; }
public void SaveLinkConfigProfile(LinkConfigProfileModel profile) { var client = GetLinkConfigProfilesClient(); if (client != null) { try { var sessionKey = client.getSessionKey(Login, Password); if (!string.IsNullOrEmpty(sessionKey)) client.saveProfile(sessionKey,profile); } catch (Exception ex) { } } }
public void AddProfile() { using (var form = new FormEditProfile(true)) { if (form.ShowDialog(FormMain.Instance) != DialogResult.OK) return; var newProfileModel = new LinkConfigProfileModel(); newProfileModel.name = form.ProfileName; newProfileModel.order = _profileModels.Any() ? _profileModels.Max(pm => pm.order) + 1 : 0; _profileModels.Add(newProfileModel); var newProfileControl = new ProfileControl(newProfileModel); _profileControls.Add(newProfileControl); newProfileControl.SaveData(); RefreshGrid(); gridViewProfiles.FocusedRowHandle = _profileControls.IndexOf(newProfileControl); } }
/// <remarks/> public void getAffectedLinksAsync(string sessionKey, LinkConfigProfileModel profile, object userState) { if ((this.getAffectedLinksOperationCompleted == null)) { this.getAffectedLinksOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetAffectedLinksOperationCompleted); } this.InvokeAsync("getAffectedLinks", new object[] { sessionKey, profile}, this.getAffectedLinksOperationCompleted, userState); }
/// <remarks/> public void getAffectedLinksAsync(string sessionKey, LinkConfigProfileModel profile) { this.getAffectedLinksAsync(sessionKey, profile, null); }
public LibraryLinkReference[] getAffectedLinks(string sessionKey, LinkConfigProfileModel profile) { object[] results = this.Invoke("getAffectedLinks", new object[] { sessionKey, profile}); return ((LibraryLinkReference[])(results[0])); }
/// <remarks/> public void deleteProfileAsync(string sessionKey, LinkConfigProfileModel profile) { this.deleteProfileAsync(sessionKey, profile, null); }
public void deleteProfile(string sessionKey, LinkConfigProfileModel profile) { this.Invoke("deleteProfile", new object[] { sessionKey, profile}); }
public LibraryLinkReference[] GetLinkConfigProfileAffectedLinks(LinkConfigProfileModel profile) { var affectedLinks = new List<LibraryLinkReference>(); var client = GetLinkConfigProfilesClient(); if (client != null) { try { var sessionKey = client.getSessionKey(Login, Password); if (!string.IsNullOrEmpty(sessionKey)) affectedLinks.AddRange(client.getAffectedLinks(sessionKey, profile) ?? new LibraryLinkReference[] { }); } catch (Exception ex) { } } return affectedLinks.ToArray(); }