コード例 #1
0
        private void EditImage_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var itemClicked = (Image)e.Source;

            var selectedAcc  = (SteamAccount)itemClicked.DataContext;
            var newAccWindow = new AddAccount(selectedAcc);

            newAccWindow.Owner = this;
            newAccWindow.ShowDialog();

            _steamData.Accounts[listBoxAccounts.SelectedIndex] = newAccWindow.Account;
            UpdateListBoxView();
        }
コード例 #2
0
        private void btn_Add_Click(object sender, RoutedEventArgs e)
        {
            AddAccount newAccWindow = new AddAccount();

            newAccWindow.Owner = this;
            newAccWindow.ShowDialog();

            if (newAccWindow.Account != null)
            {
                accountList.Accounts.Add(newAccWindow.Account);
                li_Accounts.Items.Refresh();
            }
        }
コード例 #3
0
        private void buttonAddAccount_Click(object sender, RoutedEventArgs e)
        {
            var newAccWindow = new AddAccount();

            newAccWindow.Owner = this;

            if (newAccWindow.ShowDialog() != true)
            {
                return;
            }

            _steamData.Accounts.Add(newAccWindow.Account);
            UpdateListBoxView();
        }
コード例 #4
0
        private void buttonEditAccount_Click(object sender, RoutedEventArgs e)
        {
            if (listBoxAccounts.SelectedItem != null)
            {
                AddAccount newAccWindow = new AddAccount((SteamAccount)listBoxAccounts.SelectedItem);
                newAccWindow.Owner = this;
                newAccWindow.ShowDialog();

                if (newAccWindow.Account.Username != "" && newAccWindow.Account.Password != "")
                {
                    accountList.Accounts[listBoxAccounts.SelectedIndex] = newAccWindow.Account;

                    listBoxAccounts.Items.Refresh();
                }
            }
        }