Ejemplo n.º 1
0
        /* ------------------------------------------- 계정 정보 키값 리스트뷰 ------------------------------------------- */

        //정보 싱글 클릭 이벤트
        private void infoLightClick(object sender, MouseButtonEventArgs e)
        {
            EncryptedKeyMap data = (EncryptedKeyMap)accountKeyValueView.SelectedItem;

            if (data == null)
            {
                return;
            }

            deleteKeyPairBtn.IsEnabled = true;
            modifyKeyPairBtn.IsEnabled = true;
        }
Ejemplo n.º 2
0
        public ModifyKeyPairWindow(DatafileManager manager, String accountId, String keyPairId)
        {
            InitializeComponent();
            fileManager        = manager;
            datafile           = fileManager.getCurrentValidDataFile();
            encryptedAccountId = accountId;
            encryptedKeyPairId = keyPairId;

            EncryptedKeyMap keyInfo = datafile.getAccountInfo(accountId).getEncryptedKeyMapById(keyPairId);

            newKeyName.Text  = keyInfo.KeyTitle;
            newKeyValue.Text = keyInfo.PureValue;
        }
Ejemplo n.º 3
0
        //키값 삭제
        private void deleteKeyPair(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("이 키페어를 삭제하시겠습니까?\n 이 작업은 복구될 수 없습니다!",
                                                      "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning);

            if (result == MessageBoxResult.Yes)
            {
                EncryptedKeyMap data       = (EncryptedKeyMap)accountKeyValueView.SelectedItem;
                AccountInfo     sourceData = (AccountInfo)accountListView.SelectedItem;
                if (sourceData == null || data == null)
                {
                    return;
                }
                datafile.deleteKeyPair(sourceData.ID_key, data.Id);

                accountKeyValueView.ItemsSource = datafile.getAccountInfo(sourceData.ID_key).KeyBundle;
                accountKeyValueView.Items.Refresh();
                deselectInfo();
            }
        }
Ejemplo n.º 4
0
        //키값 클립보드에 복사
        private void CopyToClipBoard(object sender, RoutedEventArgs e)
        {
            DependencyObject obj = (DependencyObject)e.OriginalSource;

            while (!(obj is ListViewItem))
            {
                try
                {
                    obj = VisualTreeHelper.GetParent(obj);
                }
                catch
                {
                    return;
                }
            }
            ListViewItem    item   = (ListViewItem)obj;
            EncryptedKeyMap copied = (EncryptedKeyMap)item.Content;

            Clipboard.SetText(copied.PureValue);
            //MessageBox.Show("복사했습니다!");
        }
Ejemplo n.º 5
0
        //키값 변경
        private void modifyKeyPair(object sender, RoutedEventArgs e)
        {
            AccountInfo     sourceData = (AccountInfo)accountListView.SelectedItem;
            EncryptedKeyMap data       = (EncryptedKeyMap)accountKeyValueView.SelectedItem;

            if (sourceData == null || data == null)
            {
                return;
            }

            ModifyKeyPairWindow modifyKeyPairWindow = new ModifyKeyPairWindow(fileManager, sourceData.ID_key, data.Id);
            bool?result = modifyKeyPairWindow.ShowDialog();

            if (result == true)
            {
                updateData();
                accountKeyValueView.ItemsSource = sourceData.KeyBundle;
                accountKeyValueView.Items.Refresh();
                deselectInfo();
            }
        }