Exemplo n.º 1
0
        private void buttonChange_Click(object sender, EventArgs e)
        {
            if (listViewMain.SelectedItems.Count == 1)
            {
                ManageItems manageItems = new ManageItems(this);
                AES256      AES         = new AES256();

                if (manageItems.CheckInputData() && MessageBox.Show("정말로 변경하시겠습니까?", "질문", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    string[] arrItems = { textBoxSiteName.Text, textBoxSiteAddress.Text, textBoxID.Text, textBoxMemo.Text, textBoxPassword.Text };
                    arrItems[4] = AES.EncryptString(arrItems[4]);

                    foreach (ListViewItem LVI in listViewMain.SelectedItems)
                    {
                        LVI.Text             = arrItems[0];
                        LVI.SubItems[1].Text = arrItems[1];
                        LVI.SubItems[2].Text = arrItems[2];
                        LVI.SubItems[3].Text = arrItems[3];
                        LVI.Tag = arrItems[4];

                        manageItems.Change(LVI.Index, arrItems);
                    }

                    manageItems.SaveFile();
                }
            }
            else
            {
                MessageBox.Show("변경하실 항목을 선택해 주세요.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Exemplo n.º 2
0
        private void 비밀번호변경ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ManageItems manageItems = new ManageItems(this);

            textBoxSearch.Text = ""; manageItems.Search();

            frmChangePassword form = new frmChangePassword(this);

            form.Show(); this.Hide();
        }
Exemplo n.º 3
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            if (listViewMain.SelectedItems.Count == 1)
            {
                if (MessageBox.Show("정말로 삭제하시겠습니까?", "질문", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    ManageItems manageItems = new ManageItems(this);

                    foreach (ListViewItem LVI in listViewMain.SelectedItems)
                    {
                        manageItems.Delete(LVI.Index);
                        LVI.Remove();
                    }

                    manageItems.SaveFile();
                }
            }
            else
            {
                MessageBox.Show("삭제하실 항목을 선택해 주세요.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Exemplo n.º 4
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            ManageItems manageItems = new ManageItems(this);
            AES256      AES         = new AES256();

            string[] arrItems = { textBoxSiteName.Text, textBoxSiteAddress.Text, textBoxID.Text, textBoxMemo.Text, textBoxPassword.Text };
            arrItems[4] = AES.EncryptString(arrItems[4]);

            if (manageItems.CheckInputData())
            {
                ListViewItem LVI = new ListViewItem();
                LVI.Text = arrItems[0];
                LVI.SubItems.Add(arrItems[1]);
                LVI.SubItems.Add(arrItems[2]);
                LVI.SubItems.Add(arrItems[3]);
                LVI.Tag = arrItems[4];

                listViewMain.Items.Add(LVI);
                manageItems.Add(arrItems);
                manageItems.SaveFile();
            }
        }
Exemplo n.º 5
0
        private void textBoxSearch_TextChanged(object sender, EventArgs e)
        {
            ManageItems manageItems = new ManageItems(this);

            manageItems.Search(comboBoxSearch.Text, textBoxSearch.Text);
        }
Exemplo n.º 6
0
        private void frmMain_Shown(object sender, EventArgs e)
        {
            ManageItems manageItems = new ManageItems(this);

            manageItems.LoadFile(); manageItems.Search();
        }