Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Bang Head!

Bang Head!

Scheduled Pinned Locked Moved The Weird and The Wonderful
wpfcomarchitectureworkspace
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VallarasuS
    wrote on last edited by
    #1

    Dude MVVM has a different meaning! :wtf: :wtf: :wtf:

        public LoginControl()
        {
            InitializeComponent();
            passwordTextBox.Focus();
            LoginViewModel loginViewModel = new LoginViewModel(new Model.UserCredential { Username = Environment.UserName, Domain = Environment.UserDomainName });
            ((LoginCommand)loginViewModel.LoginCommand).LoginResultValueChanged += new LoginCommand.LoginResultChangedHandler(LoginCommand\_LoginResultValueChanged);
            loginViewModel.LoginRemembered += new LoginViewModel.LoginRememberedHandler(loginViewModel\_LoginRemembered);
    
            this.DataContext = loginViewModel;
        }
    
        public bool LoginAsDifferentUser
        {
            get { return \_isLoginAsDifferentUser; }
            set
            {
                \_isLoginAsDifferentUser = value;
                if (this.DataContext != null && \_isLoginAsDifferentUser)
                {
                    (this.DataContext as LoginViewModel).ClearLoginCredential();
                    //usernameTextBox.Focus();
                }
                //else passwordTextBox.Focus();
            }
        }
    

    Regards Vallarasu S | FSharpMe.blogspot.com

    B B 2 Replies Last reply
    0
    • V VallarasuS

      Dude MVVM has a different meaning! :wtf: :wtf: :wtf:

          public LoginControl()
          {
              InitializeComponent();
              passwordTextBox.Focus();
              LoginViewModel loginViewModel = new LoginViewModel(new Model.UserCredential { Username = Environment.UserName, Domain = Environment.UserDomainName });
              ((LoginCommand)loginViewModel.LoginCommand).LoginResultValueChanged += new LoginCommand.LoginResultChangedHandler(LoginCommand\_LoginResultValueChanged);
              loginViewModel.LoginRemembered += new LoginViewModel.LoginRememberedHandler(loginViewModel\_LoginRemembered);
      
              this.DataContext = loginViewModel;
          }
      
          public bool LoginAsDifferentUser
          {
              get { return \_isLoginAsDifferentUser; }
              set
              {
                  \_isLoginAsDifferentUser = value;
                  if (this.DataContext != null && \_isLoginAsDifferentUser)
                  {
                      (this.DataContext as LoginViewModel).ClearLoginCredential();
                      //usernameTextBox.Focus();
                  }
                  //else passwordTextBox.Focus();
              }
          }
      

      Regards Vallarasu S | FSharpMe.blogspot.com

      B Offline
      B Offline
      BillW33
      wrote on last edited by
      #2

      But, as long as they use cool buzzwords in their code then they are demonstrating what cool programmers they are, right? ;) :wtf: X|

      Just because the code works, it doesn't mean that it is good code.

      1 Reply Last reply
      0
      • V VallarasuS

        Dude MVVM has a different meaning! :wtf: :wtf: :wtf:

            public LoginControl()
            {
                InitializeComponent();
                passwordTextBox.Focus();
                LoginViewModel loginViewModel = new LoginViewModel(new Model.UserCredential { Username = Environment.UserName, Domain = Environment.UserDomainName });
                ((LoginCommand)loginViewModel.LoginCommand).LoginResultValueChanged += new LoginCommand.LoginResultChangedHandler(LoginCommand\_LoginResultValueChanged);
                loginViewModel.LoginRemembered += new LoginViewModel.LoginRememberedHandler(loginViewModel\_LoginRemembered);
        
                this.DataContext = loginViewModel;
            }
        
            public bool LoginAsDifferentUser
            {
                get { return \_isLoginAsDifferentUser; }
                set
                {
                    \_isLoginAsDifferentUser = value;
                    if (this.DataContext != null && \_isLoginAsDifferentUser)
                    {
                        (this.DataContext as LoginViewModel).ClearLoginCredential();
                        //usernameTextBox.Focus();
                    }
                    //else passwordTextBox.Focus();
                }
            }
        

        Regards Vallarasu S | FSharpMe.blogspot.com

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #3

        X| X| X| Blech! X| X| X|

        Bill Gates is a very rich man today... and do you want to know why? The answer is one word: versions. Dave Barry Read more at [BrainyQuote](http://www.brainyquote.com/quotes/topics topic_technology.html#yAfSEbrfumitrteO.99)[^]

        E 1 Reply Last reply
        0
        • B Brisingr Aerowing

          X| X| X| Blech! X| X| X|

          Bill Gates is a very rich man today... and do you want to know why? The answer is one word: versions. Dave Barry Read more at [BrainyQuote](http://www.brainyquote.com/quotes/topics topic_technology.html#yAfSEbrfumitrteO.99)[^]

          E Offline
          E Offline
          ExcellentOrg
          wrote on last edited by
          #4

          Darn!! I almost thought you'd say: DLL Hell

          B 1 Reply Last reply
          0
          • E ExcellentOrg

            Darn!! I almost thought you'd say: DLL Hell

            B Offline
            B Offline
            Brisingr Aerowing
            wrote on last edited by
            #5

            ExcellentOrg wrote:

            DLL Hell

            Well, that works as well!

            Bill Gates is a very rich man today... and do you want to know why? The answer is one word: versions. Dave Barry Read more at [BrainyQuote](http://www.brainyquote.com/quotes/topics topic_technology.html#yAfSEbrfumitrteO.99)[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups