/// <summary> /// This notification is triggered if the profile was updated from the /// server. We're only interested if the profile is for the current user. /// </summary> /// <param name="sender">The profiles task</param> /// <param name="args">Profile event arguments specifying the profile affected</param> private void OnProfileUpdated(object sender, ProfileEventArgs args) { Platform.UIThread(this, delegate { if (args.Profile.Username == CIX.Username) { RefreshAccount(args.Profile, false); } }); }
/// <summary> /// Handle the event that is sent when a profile is updated. If the profile is the /// one we're displaying here, update what is displayed in the viewer. /// </summary> private void OnProfileUpdated(object sender, ProfileEventArgs args) { Platform.UIThread(this, delegate { if (_thisProfile != null && args.Profile.Username == _thisProfile.Username) { DisplayProfile(); } }); }
private void OnProfileEventReceived(System.Object aSource, ProfileEventArgs aArgs) { ExecuteSecure(() => { //ConsoleWriteLine("Profile event received: " + aArgs.EventType.ToString()); if (aArgs.EventType == ProfileEventType.ProfileNamesReceived && aArgs.ProfileUpdated) { //Program.ShowInfoMessageBox(this, "Profile has been updated", "The application will close all features that are no longer authorized"); } else if (aArgs.EventType == ProfileEventType.ProfileReceived) { // Application.Current.Dispatcher.BeginInvoke(new Action(() => //{ //MakeBtnEnable(); try { //getCamDeviceList(); CameraStateChangeEventListen(); AlarmEventListen(_connection.SessionContext.AlarmService); // btnStatrlisten.IsEnabled = false; } catch (Exception ex) { } //})); } if (aArgs.EventType == ProfileEventType.ProfileNamesReceived) { System.Windows.Application.Current.Dispatcher.BeginInvoke(new Action(() => { try { var _test = session.ProfileService.CurrentProfile; IList <string> profileNames = session.ProfileService.ProfileNames; _comboBoxProfileNames.DataSource = profileNames; if (profileNames.Count > 0) { _comboBoxProfileNames.SelectedIndex = 0; } } catch (Exception ex) { } })); } else if (aArgs.EventType == ProfileEventType.ProfileReceived) { //BuildProfileTree(SessionContext.ProfileService.CurrentProfile); } }); }
public void ProfileEvent(object sender, ProfileEventArgs e) { try { if (e.PanelBinding.PanelType == _streamDeckPanel.TypeOfPanel && _streamDeckPanel.HIDInstance == e.PanelBinding.HIDInstance) { LoadComboBoxLayers(); } } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
public void ProfileEvent(object sender, ProfileEventArgs e) { try { if (e.PanelBinding.PanelType == GamingPanelEnum.PZ55SwitchPanel && _switchPanelPZ55.HIDInstance == e.PanelBinding.HIDInstance) { ShowGraphicConfiguration(); } } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
public void ProfileEvent(object sender, ProfileEventArgs e) { try { if (e.PanelBinding.PanelType == GamingPanelEnum.TPM && _tpmPanel.HIDInstance.Equals(e.PanelBinding.HIDInstance)) { ShowGraphicConfiguration(); } } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
/// <summary> /// Save profile. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void SaveProfile(object sender, ProfileEventArgs e) { bool moveFirst = false; var profileList = _previewProfileController.GetProfilesByPortal(e.Profile.PortalId); if (e.Profile.Id == Null.NullInteger) { moveFirst = true; } //save profile _previewProfileController.Save(e.Profile); //if the profile is new, then move it to the top of list. if (moveFirst && profileList.Count > 0) { int moveId = e.Profile.Id; int nextId = profileList[0].Id; SortProfiles(moveId, nextId); } }
public void ProfileEvent(object sender, ProfileEventArgs e) { }
private void OnProfileSelected(ProfileEventArgs args) { View.SelectProfile(args.Profile); }
private void OnProfileSaved(ProfileEventArgs args) { View.UpdateProfile(args.Profile); }
/// <summary> /// Handles the CurrentStartupProjectsChanged event of the SolutionProxy control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ProfileEventArgs" /> instance containing the event data.</param> private void SolutionProxy_CurrentStartupProjectsChanged(object sender, ProfileEventArgs e) { UpdateCurrentStartupProjectService(e.Profile); }
void ActiveProfileChanged(object sender, ProfileEventArgs e) { CaptureRegion = e.Profile.CaptureRegion; }
void ChangeProfile(object sender, ProfileEventArgs e) { ChangeProfile(e.Profile); }
void RemoveDeletedProfile(object sender, ProfileEventArgs e) { AvailableProfiles.Remove(e.Profile); }
void AddCreatedProfile(object sender, ProfileEventArgs e) { AvailableProfiles.Add(e.Profile); }
public void OnActiveProfileChanged(ProfileEventArgs e) { EventHandler<ProfileEventArgs> handler = ActiveProfileChanged; if (handler != null) { handler(this, e); } }
private void OnProfileChanged(object sender, ProfileEventArgs e) { this.game = e.ActiveGameInstance; this.timerCheckFiles.Enabled = false; while (true) { try { IniFiles.Load(game); break; } catch (IniParsingException exc) { DialogResult result = FormIniError.OpenDialog(exc); if (result == DialogResult.Retry) { continue; } else if (result == DialogResult.Ignore) { continue; } else if (result == DialogResult.Abort) { Environment.Exit(-1); return; } //MsgBox.Get("iniParsingError").FormatText(exc.Message).Show(MessageBoxIcon.Error); //Application.Exit(); //return; } } LinkedTweaks.LoadValues(); // TODO: For some reason, it won't update the resolution combobox, unless I add this workaround: numCustomRes_ValueChanged(null, null); // Change image switch (e.ActiveGameInstance.Edition) { case GameEdition.Steam: this.pictureBoxGameEdition.Image = Resources.steam; this.toolStripStatusLabelEditionText.Text = "Steam"; this.labelGameEdition.Text = "Steam"; break; case GameEdition.BethesdaNet: this.pictureBoxGameEdition.Image = Resources.bethesda; this.toolStripStatusLabelEditionText.Text = "Bethesda.net"; this.labelGameEdition.Text = "Bethesda"; break; case GameEdition.BethesdaNetPTS: this.pictureBoxGameEdition.Image = Resources.bethesda_pts; this.toolStripStatusLabelEditionText.Text = "Bethesda.net (PTS)"; this.labelGameEdition.Text = "Bethesda\n(PTS)"; break; case GameEdition.MSStore: this.pictureBoxGameEdition.Image = Resources.msstore; this.toolStripStatusLabelEditionText.Text = "Microsoft Store"; this.labelGameEdition.Text = "Microsoft\nStore"; break; default: this.pictureBoxGameEdition.Image = Resources.help_128; this.toolStripStatusLabelEditionText.Text = Localization.GetString("unknown"); this.labelGameEdition.Text = Localization.GetString("unknown"); break; } LoadAccountProfile(); LoadCustomTab(); this.toolStripStatusLabelGameText.Text = e.ActiveGameInstance?.Title; this.timerCheckFiles.Enabled = true; }
public void OnProfileCreated(ProfileEventArgs e) { EventHandler<ProfileEventArgs> handler = ProfileCreated; if (handler != null) { handler(this, e); } }