Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            listStaff                   = new ObservableCollection <Staff>(SqliteDataAcces.GetListAuthor());
            cmbAuthor.ItemsSource       = listStaff;
            cmbAuthor.SelectedValuePath = "AuthorID";

            lbFilteredCaseEntry.ItemsSource       = listFilteredCaseEntry;
            lbFilteredCaseEntry.SelectedValuePath = "CaseNumber";
            listAllCaseEntries     = SqliteDataAcces.GetListAllCaseEntries();
            listAllCaselyUserDatas = SqliteDataAcces.GetAllCaselyUserData();
            SearchDatabase();
        }
Exemplo n.º 2
0
 public WindowReportEditor()
 {
     InitializeComponent();
     txtCaseNumber.Text = SqliteDataAcces.CaseNumberPrefix;
     foreach (var a in SqliteDataAcces.GetListAuthor())
     {
         cmbAuthor.Items.Add(a.AuthorID);
     }
     foreach (var a in SqliteDataAcces.GetUniqueService())
     {
         cmbService.Items.Add(a);
     }
 }
Exemplo n.º 3
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // load the names of authors
            listStaff                       = new ObservableCollection <Staff>(SqliteDataAcces.GetListAuthor());
            cmbAuthor.ItemsSource           = listStaff;
            cmbAuthor.SelectedValuePath     = "AuthorID";
            cmbCaseNumber.ItemsSource       = listFilteredCaseEntry;
            cmbCaseNumber.SelectedValuePath = "CaseNumber";
            dtFilterDate.Text               = "";
            wbDiffText.Text                 = "<h3><b>Casely is loading! Please be patient :)</b></h3>";
            // load all the cases from the database
            listAllCaseEntry = await GetAllCaseEntryAsync();

            listAllCaselyUserData = await GetAllCaselyUserDataAsync();

            RefreshCaseListUI(listAllCaseEntry);
            cmbService.ItemsSource        = suggestionService;
            cmbSelfEvaluation.ItemsSource = suggestionEvaluation;
            allCasesLoaded = true;
            ApplyFiltersToCaseListAndRefresh();

            // instantiate keyboard shortcuts
            RoutedCommand cmndSettingnext = new RoutedCommand();

            cmndSettingnext.InputGestures.Add(new KeyGesture(Key.N, ModifierKeys.Control));
            CommandBindings.Add(new CommandBinding(cmndSettingnext, btnNextCase_Click));

            RoutedCommand cmndSettingPrev = new RoutedCommand();

            cmndSettingPrev.InputGestures.Add(new KeyGesture(Key.P, ModifierKeys.Control));
            CommandBindings.Add(new CommandBinding(cmndSettingPrev, btnPreviousCase_Click));

            RoutedCommand cmndSettingService = new RoutedCommand();

            cmndSettingService.InputGestures.Add(new KeyGesture(Key.R, ModifierKeys.Control));
            CommandBindings.Add(new CommandBinding(cmndSettingService, focusService));

            RoutedCommand cmndSettingEval = new RoutedCommand();

            cmndSettingEval.InputGestures.Add(new KeyGesture(Key.E, ModifierKeys.Control));
            CommandBindings.Add(new CommandBinding(cmndSettingEval, focusEvaluation));

            RoutedCommand cmndSettingEvalComments = new RoutedCommand();

            cmndSettingEvalComments.InputGestures.Add(new KeyGesture(Key.W, ModifierKeys.Control));
            CommandBindings.Add(new CommandBinding(cmndSettingEvalComments, focusSelfEvalComments));
        }