Esempio n. 1
0
        //기본키값 추가
        private void AddGeneralKeyValue(object sender, RoutedEventArgs e)
        {
            AccountInfo sourceData = (AccountInfo)accountListView.SelectedItem;

            if (sourceData == null)
            {
                return;
            }
            //아이디 추가
            if (!datafile.getAccountInfo(sourceData.ID_key).isExist("아이디"))
            {
                datafile.getAccountInfo(sourceData.ID_key).addKeyPair("아이디", "-");
            }
            //비번 추가
            if (!(datafile.getAccountInfo(sourceData.ID_key).isExist("비밀번호") ||
                  datafile.getAccountInfo(sourceData.ID_key).isExist("비번") ||
                  datafile.getAccountInfo(sourceData.ID_key).isExist("Password")))
            {
                datafile.getAccountInfo(sourceData.ID_key).addKeyPair("비밀번호", "-");
            }

            accountKeyValueView.ItemsSource = datafile.getAccountInfo(sourceData.ID_key).KeyBundle;
            accountKeyValueView.Items.Refresh();
            deselectInfo();
        }
Esempio n. 2
0
        private void finallyAddKeyPair(object sender, RoutedEventArgs e)
        {
            String keyName = newKeyName.Text;
            String value   = newKeyValue.Text;

            if (keyName.Length == 0)
            {
                MessageBox.Show("키 이름을 입력해주세요!", "키 데이터 생성 오류");
            }
            else if (value.Length == 0)
            {
                MessageBox.Show("키값을 입력해주세요!", "키 데이터 생성 오류");
            }
            else
            {
                AccountInfo accountInfo = datafile.getAccountInfo(ID_KEY);
                accountInfo.addKeyPair(keyName, value);
                datafile.setAccountInfo(accountInfo);

                fileManager.saveFile();
                this.DialogResult = true;
                this.Close();
                return;
            }
        }
Esempio n. 3
0
        public ModifyAccountWindow(DatafileManager manager, String id)
        {
            InitializeComponent();
            fileManager = manager;
            datafile    = fileManager.getCurrentValidDataFile();
            AccountInfo account = datafile.getAccountInfo(id);

            lblQuestion.Content = formatTitle(account.InfoTitle);
            itemID = id;
        }
Esempio n. 4
0
        public AddNewKeyPairWindow(DatafileManager manager, String id)
        {
            InitializeComponent();
            fileManager = manager;
            datafile    = fileManager.getCurrentValidDataFile();
            ID_KEY      = id;

            AccountInfo accountInfo = datafile.getAccountInfo(ID_KEY);

            this.Title = "'" + accountInfo.InfoTitle + "' 에 새로운 키페어 추가";
        }
Esempio n. 5
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;
        }