コード例 #1
0
		public ProfileControl(LinkConfigProfileModel dataSource)
		{
			InitializeComponent();
			Dock = DockStyle.Fill;
			_dataSource = dataSource;
			NeedToSave = true;
		}
コード例 #2
0
		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)
				{
				}
			}
		}
コード例 #3
0
		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);
			}
		}
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 /// <remarks/>
 public void getAffectedLinksAsync(string sessionKey, LinkConfigProfileModel profile) {
     this.getAffectedLinksAsync(sessionKey, profile, null);
 }
コード例 #6
0
 public LibraryLinkReference[] getAffectedLinks(string sessionKey, LinkConfigProfileModel profile) {
     object[] results = this.Invoke("getAffectedLinks", new object[] {
                 sessionKey,
                 profile});
     return ((LibraryLinkReference[])(results[0]));
 }
コード例 #7
0
 /// <remarks/>
 public void deleteProfileAsync(string sessionKey, LinkConfigProfileModel profile) {
     this.deleteProfileAsync(sessionKey, profile, null);
 }
コード例 #8
0
 public void deleteProfile(string sessionKey, LinkConfigProfileModel profile) {
     this.Invoke("deleteProfile", new object[] {
                 sessionKey,
                 profile});
 }
コード例 #9
0
		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();
		}