示例#1
0
 /// <summary>
 /// Accounts toolbar > Add
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void addAccountMenu_Click(object sender, EventArgs e)
 {
     using (var window = new AccountUpdateOrAdditionWindow())
     {
         window.ShowDialog(this);
         return;
     }
 }
示例#2
0
        /// <summary>
        /// Accounts toolbar > Edit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void editAccountMenu_Click(object sender, EventArgs e)
        {
            var account = accountsListBox.Accounts.ElementAt(accountsListBox.SelectedIndex);

            using (var window = new AccountUpdateOrAdditionWindow(account))
            {
                window.ShowDialog(this);
                return;
            }
        }
示例#3
0
        /// <summary>
        /// On double click, forces the edition
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void accountsListBox_DoubleClick(object sender, EventArgs e)
        {
            // Search for the double-clicked item
            int index = 0;
            var point = Cursor.Position;

            point = accountsListBox.PointToClient(point);
            foreach (var account in accountsListBox.Accounts)
            {
                var rect = accountsListBox.GetItemRectangle(index);
                index++;

                if (rect.Contains(point))
                {
                    // Open the edition window
                    using (var window = new AccountUpdateOrAdditionWindow(account))
                    {
                        window.ShowDialog(this);
                        return;
                    }
                }
            }
        }
 /// <summary>
 /// Handles the Click event of the ChangeInfoMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void ChangeInfoMenuItem_Click(object sender, EventArgs e)
 {
     // This menu should be enabled only for CCP characters with non-null accounts.
     using (AccountUpdateOrAdditionWindow f = new AccountUpdateOrAdditionWindow(m_character.Identity.Account))
     {
         f.ShowDialog();
     }
 }
 /// <summary>
 /// Accounts toolbar > Add
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void addAccountMenu_Click(object sender, EventArgs e)
 {
     using (var window = new AccountUpdateOrAdditionWindow())
     {
         window.ShowDialog(this);
         return;
     }
 }
        /// <summary>
        /// Accounts toolbar > Edit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void editAccountMenu_Click(object sender, EventArgs e)
        {
            if (accountsListBox.SelectedIndex == -1)
                return;

            var account = accountsListBox.Accounts.ElementAt(accountsListBox.SelectedIndex);
            using (var window = new AccountUpdateOrAdditionWindow(account))
            {
                window.ShowDialog(this);
                return;
            }
        }
        /// <summary>
        /// On double click, forces the edition
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void accountsListBox_DoubleClick(object sender, EventArgs e)
        {
            // Search for the double-clicked item
            int index = 0;
            var point = Cursor.Position;
            point = accountsListBox.PointToClient(point);
            foreach (var account in accountsListBox.Accounts)
            {
                var rect = accountsListBox.GetItemRectangle(index);
                index++;

                if (rect.Contains(point))
                {
                    // Open the edition window
                    using (var window = new AccountUpdateOrAdditionWindow(account))
                    {
                        window.ShowDialog(this);
                        return;
                    }
                }
            }
        }