コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Project-Jc/KryptPw
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MainDataGrid.Focus();

            if (!string.IsNullOrEmpty(kPw.Settings.PreviouslyLoadedFile) && File.Exists(kPw.Settings.PreviouslyLoadedFile))
            {
                ShowPasswordPanel(kPw.CurrentOperation = EncryptDecryptOperation.Decrypt, kPwFile.TmpPath = kPw.Settings.PreviouslyLoadedFile);
            }
        }
コード例 #2
0
        private void Dialog_Loaded(object sender, RoutedEventArgs e)
        {
            var remove = AlbumList?.FirstOrDefault(f => string.IsNullOrWhiteSpace(f.Id) || f.Id == "♥♦♣♠");

            if (remove != null)
            {
                AlbumList.Remove(remove);
            }

            MainDataGrid.ItemsSource = AlbumList;

            MainDataGrid.Focus();

            if (MainDataGrid.Items.Count > 0)
            {
                MainDataGrid.SelectedIndex = 0;
                MainDataGrid.FocusOnFirstCell();
            }
        }