示例#1
0
 private void AccountTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         KeyTextBox.Focus();
     }
 }
        /*Enter key area*/


        /*Buttons*/
        private void OkButton_Click(object sender, EventArgs e)
        {
            TypedPassword.Value = KeyTextBox.Text;
            KeyTextBox.Focus();
            PublicVar.okPressed = true;
            Hide();
        }
示例#3
0
文件: MainForm.cs 项目: radtek/Thingy
 private void SetValueButton_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(KeyTextBox.Text))
     {
         settings[KeyTextBox.Text] = ValueTextBox.Text;
         KeyTextBox.Clear();
         ValueTextBox.Clear();
         RefreshDictionaryView(settings, SettingsListBox);
     }
 }
 public MainWindow()
 {
     InitializeComponent();
     FillerCharTextBox
     .GetObservable(TextBox.TextProperty)
     .Subscribe(text => OnRefreshKeyNeeded());
     KeyTextBox
     .GetObservable(TextBox.TextProperty)
     .Subscribe(text => OnRefreshKeyNeeded());
     RefreshKey();
 }
示例#5
0
        public void refreshJsonTree(JToken jtok_root)
        {
            // 변환
            JsonTreeViewItem root_jtree = JsonTreeViewItem.convertToTreeViewItem(jtok_root);

            if (root_jtree == null)
            {
                return;
            }

            // 삭제
            json_tree_view.Items.Clear();

            // 추가
            KeyTextBox tb = new KeyTextBox(JsonInfo.current.Filename, false);

            root_jtree.Header.Children.Insert(0, tb);
            json_tree_view.Items.Add(root_jtree);
        }
示例#6
0
        private void AddEditForm_Load(object sender, EventArgs e)
        {
            if (mode == Mode.Add)
            {
                HeaderLabel.Text = "ADD ENTRY";
                AddButton.Text   = "Add";
            }
            else
            {
                HeaderLabel.Text = "EDIT ENTRY";
                AddButton.Text   = "Edit";

                if (MainForm.isSNShow || MainForm.isEmailShow || MainForm.isOtherShow)
                {
                    NameTextBox.Text           = addEntry.Name;
                    LoginTextBox.Text          = addEntry.Login;
                    PasswordTextBox.Text       = addEntry.Password;
                    RepeatPasswordTextBox.Text = addEntry.Password;
                    PhoneTextBox.Text          = addEntry.Phone;
                    UrlTextBox.Text            = addEntry.URL;
                    NotesTextBox.Text          = addEntry.Notes;
                }

                if (MainForm.isHomebankingShow)
                {
                    NameTextBox.Text       = addHomebankingEntry.Name;
                    CardNumberTextBox.Text = addHomebankingEntry.CardNumber;
                    DateTextBox.Text       = addHomebankingEntry.Date;
                    CvcTextBox.Text        = addHomebankingEntry.CVC;
                    PhoneTextBox.Text      = addHomebankingEntry.Phone;
                    NotesTextBox.Text      = addHomebankingEntry.Notes;
                }

                if (MainForm.isLicensesShow)
                {
                    NameTextBox.Text  = addLicenseEntry.Name;
                    KeyTextBox.Text   = addLicenseEntry.Key;
                    NotesTextBox.Text = addLicenseEntry.Notes;
                }
            }

            if (MainForm.isSNShow || MainForm.isEmailShow || MainForm.isOtherShow)
            {
                Size = new Size(315, 500);

                CloseButton.Location = new Point(271, 15);

                CardNumberTextBox.Hide();
                CvcTextBox.Hide();
                DateTextBox.Hide();

                LoginTextBox.Show();
                PasswordTextBox.Show();
                RepeatPasswordTextBox.Show();

                KeyTextBox.Hide();

                PhoneTextBox.Location = new Point(39, 267);
                NotesTextBox.Location = new Point(39, 367);
                AddButton.Location    = new Point(254, 449);
                CancelButton.Location = new Point(173, 449);

                NameTextBox.TabIndex           = 0;
                LoginTextBox.TabIndex          = 1;
                PasswordTextBox.TabIndex       = 2;
                RepeatPasswordTextBox.TabIndex = 3;
                PhoneTextBox.TabIndex          = 4;
                UrlTextBox.TabIndex            = 5;
                NotesTextBox.TabIndex          = 6;

                CardNumberTextBox.TabIndex = 7;
                CvcTextBox.TabIndex        = 8;
                DateTextBox.TabIndex       = 9;
                KeyTextBox.TabIndex        = 10;
            }
            else if (MainForm.isHomebankingShow)
            {
                Size = new Size(535, 311);

                CloseButton.Location = new Point(491, 12);

                LoginTextBox.Hide();
                PasswordTextBox.Hide();
                RepeatPasswordTextBox.Hide();

                CardNumberTextBox.Show();
                CvcTextBox.Show();
                DateTextBox.Show();

                KeyTextBox.Hide();

                PhoneTextBox.Location = new Point(287, 167);
                NotesTextBox.Location = new Point(39, 217);
                AddButton.Location    = new Point(475, 260);
                CancelButton.Location = new Point(394, 260);

                NameTextBox.TabIndex           = 0;
                LoginTextBox.TabIndex          = 6;
                PasswordTextBox.TabIndex       = 7;
                RepeatPasswordTextBox.TabIndex = 8;
                PhoneTextBox.TabIndex          = 4;
                UrlTextBox.TabIndex            = 9;
                NotesTextBox.TabIndex          = 5;

                CardNumberTextBox.TabIndex = 1;
                CvcTextBox.TabIndex        = 2;
                DateTextBox.TabIndex       = 3;
                KeyTextBox.TabIndex        = 10;

                SetLanguage();
            }
            else
            {
                Size = new Size(537, 255);

                CloseButton.Location = new Point(492, 12);

                LoginTextBox.Hide();
                PasswordTextBox.Hide();
                RepeatPasswordTextBox.Hide();

                CardNumberTextBox.Hide();
                CvcTextBox.Hide();
                DateTextBox.Hide();

                KeyTextBox.Show();

                PhoneTextBox.Hide();
                NotesTextBox.Location = new Point(39, 167);
                AddButton.Location    = new Point(476, 204);
                CancelButton.Location = new Point(395, 204);

                NameTextBox.TabIndex           = 0;
                LoginTextBox.TabIndex          = 3;
                PasswordTextBox.TabIndex       = 4;
                RepeatPasswordTextBox.TabIndex = 5;
                PhoneTextBox.TabIndex          = 6;
                UrlTextBox.TabIndex            = 7;
                NotesTextBox.TabIndex          = 2;

                CardNumberTextBox.TabIndex = 8;
                CvcTextBox.TabIndex        = 9;
                DateTextBox.TabIndex       = 10;
                KeyTextBox.TabIndex        = 1;
            }

            SetLanguage();
        }
 /*Form Events*/
 private void EnterKeyForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     KeyTextBox.Focus();
 }
 KeyInputDialog()
 {
     InitializeComponent();
     KeyTextBox.Focus();
 }
 private void ShowPassButton_MouseUp(object sender, MouseEventArgs e)
 {
     KeyTextBox.PasswordChar = '●';
     KeyTextBox.Focus();
 }