Esempio n. 1
0
 public AddAccount()
 {
     Account = new SteamAccount();
     InitializeComponent();
     comboBoxType.ItemsSource      = Enum.GetValues(typeof(AccountType));
     ComboBoxAutoStart.ItemsSource = Enum.GetValues(typeof(AutoStart));
 }
Esempio n. 2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (Account != null)
     {
         if (string.IsNullOrEmpty(Account.Username))
         {
             Account = null;
         }
     }
 }
Esempio n. 3
0
        public AddAccount(SteamAccount editAccount)
        {
            InitializeComponent();
            Account = editAccount;
            comboBoxType.ItemsSource      = Enum.GetValues(typeof(AccountType));
            ComboBoxAutoStart.ItemsSource = Enum.GetValues(typeof(AutoStart));

            comboBoxType.SelectedItem      = editAccount.Type;
            ComboBoxAutoStart.SelectedItem = editAccount.AutoStart;
            textBoxProfilename.Text        = editAccount.Name;
            textBoxUsername.Text           = editAccount.Username;
            textBoxPassword.Password       = editAccount.Password;
        }
Esempio n. 4
0
 private void buttonSave_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Account.Type      = (AccountType)comboBoxType.SelectedItem;
         Account.AutoStart = (AutoStart)ComboBoxAutoStart.SelectedItem;
         Account.Name      = textBoxProfilename.Text;
         Account.Username  = textBoxUsername.Text;
         Account.Password  = textBoxPassword.Password;
     }
     catch
     {
         Account = null;
     }
     Close();
 }
Esempio n. 5
0
        public bool LoginBnet(SteamAccount b)
        {
            if (!IsSteamRunning())
            {
                LogoutSteam();
            }
            FileUpdateManager.Updater();
            Process ahk = new Process {
                StartInfo = new ProcessStartInfo(@"main.ahk", b.Username + " " + b.Password)
            };

            ahk.Start();
            _recentSteamAccount = b;
            ScheduleHandleAutoStart();
            return(true);
        }
Esempio n. 6
0
        private void Image_MouseUp(object sender, MouseButtonEventArgs e)
        {
            Image itemClicked = (Image)e.Source;

            SteamAccount     selectedAcc  = (SteamAccount)itemClicked.DataContext;
            MessageBoxResult dialogResult = MessageBox.Show("Are you sure you want to delete the '" + selectedAcc.Name + "' account?", "Delete Account", MessageBoxButton.YesNo);

            if (dialogResult == MessageBoxResult.Yes)
            {
                _accountList.Accounts.Remove((SteamAccount)listBoxAccounts.SelectedItem);
                listBoxAccounts.Items.Refresh();
            }
            else if (dialogResult == MessageBoxResult.No)
            {
                //do something else
            }
        }
Esempio n. 7
0
        private void listBoxAccounts_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            SteamAccount selectedAcc = (SteamAccount)listBoxAccounts.SelectedItem;

            _steam.StartSteamAccount(selectedAcc);
        }
Esempio n. 8
0
 public bool StartSteamAccount(SteamAccount a)
 {
     LoginBnet(a);
     return(false);
 }