Пример #1
0
        private void DeleteOwnerTranslate()
        {
            if (listViewOwnerTranslate.SelectedItems.Count <= 0)
            {
                return;
            }

            if (DialogResult.No == yMessageBox.ShowConfirm(this, "Are your sure want to delete the '" + listViewOwnerTranslate.SelectedItems[0].SubItems[0].Text + "'?", "Delete Owner Translate Confirm", MessageBoxButtons.YesNo))
            {
                return;
            }
            string key = listViewOwnerTranslate.SelectedItems[0].SubItems[0].Text;

            OwnerTranslate.Remove(key);
            OwnerTranslate.SaveToFile();
            RefreshTabOwnerTranslate();
        }
Пример #2
0
        public void OnInputOwnerTranslateCompleted(InputOwnerTranslateMode mode, OwnerEntry owner)
        {
            if (mode == InputOwnerTranslateMode.Add)
            {
                OwnerTranslate.Add(owner);
                RefreshTabOwnerTranslate();
                SelectOwnerTranslateVisuable(owner.DomainUser);

                OwnerTranslate.SaveToFile();
            }
            else
            {
                if (m_selectedOwner != null)
                {
                    OwnerTranslate.Remove(m_selectedOwner.DomainUser);
                    OwnerTranslate.Add(owner);
                    RefreshTabOwnerTranslate();
                    SelectOwnerTranslateVisuable(owner.DomainUser);

                    OwnerTranslate.SaveToFile();
                }
            }
        }