示例#1
0
文件: MainForm.cs 项目: ltj/rentit
        /// <summary>
        /// Handles change requests to the current global credentials of the application.
        /// </summary>
        /// <param name="sender">The sender of the request.</param>
        /// <param name="args">The arguments specifying the new credentials.</param>
        private void ChangeCredentials(object sender, CredentialsChangeArgs args)
        {
            credentials = args.Credentials;

            Cursor.Current = Cursors.WaitCursor;
            RentItUserControl nextScreen = new MainScreen {
                                                              RentItProxy = this.rentItProxy,
                                                              Credentials = this.credentials
                                                          };
            ChangeContent(sender, new ContentChangeArgs(nextScreen, "RentIt"));
            Cursor.Current = Cursors.Default;

            TopBar.Credentials = this.credentials;
        }
示例#2
0
 /// <summary>
 /// For propagating the MainForms subscription to the CredentialsChangeEvent
 /// to the RentItUserControl's inner RentItUserControls.
 /// </summary>
 protected void CredentialsChangeEventPropagated(object obj, CredentialsChangeArgs e)
 {
     FireCredentialsChangeEvent(e.Credentials);
 }