Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CoFlow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sandra Borst
CoFlow
Commits
46295417
Commit
46295417
authored
5 months ago
by
Philipp Müller
Browse files
Options
Downloads
Patches
Plain Diff
fixed search in programs list
parent
e3d53ce3
No related branches found
No related tags found
1 merge request
!28
added program list
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml.cs
+6
-19
6 additions, 19 deletions
...ektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml.cs
with
6 additions
and
19 deletions
InnoLabProjektDektopApp/InnoLabProjektDektopApp/Screens/FirstLaunch/03_2ProgramsList.xaml.cs
+
6
−
19
View file @
46295417
...
@@ -64,23 +64,7 @@ namespace InnoLabProjektDektopApp
...
@@ -64,23 +64,7 @@ namespace InnoLabProjektDektopApp
foreach
(
var
item
in
filteredItems
)
foreach
(
var
item
in
filteredItems
)
{
{
// Create a StackPanel for each filtered item
// Create a StackPanel for each filtered item
var
stackPanel
=
new
StackPanel
{
Orientation
=
Orientation
.
Horizontal
,
Margin
=
new
Thickness
(
5
,
2
,
5
,
2
)
};
ShowNewItemInList
(
item
.
ProcessName
,
item
.
MainWindowTitle
,
item
.
IsDistracting
);
var
checkBox
=
new
CheckBox
{
Content
=
$"
{
item
.
ProcessName
}
:
{
item
.
MainWindowTitle
}
"
,
Margin
=
new
Thickness
(
5
),
IsChecked
=
item
.
IsDistracting
,
Tag
=
item
};
checkBox
.
Checked
+=
CheckBox_CheckedChanged
;
checkBox
.
Unchecked
+=
CheckBox_CheckedChanged
;
stackPanel
.
Children
.
Add
(
checkBox
);
// Add the filtered StackPanel to ItemsPanel
ItemsPanel
.
Children
.
Add
(
stackPanel
);
}
}
}
}
}
}
...
@@ -232,9 +216,9 @@ namespace InnoLabProjektDektopApp
...
@@ -232,9 +216,9 @@ namespace InnoLabProjektDektopApp
{
{
Content
=
$"
{
mainWindowTitle
}
(
{
processName
}
)"
,
Content
=
$"
{
mainWindowTitle
}
(
{
processName
}
)"
,
Margin
=
new
Thickness
(
5
),
Margin
=
new
Thickness
(
5
),
IsChecked
=
true
,
IsChecked
=
isDistracting
,
ToolTip
=
$"
{
mainWindowTitle
}
(
{
processName
}
)"
,
ToolTip
=
$"
{
mainWindowTitle
}
(
{
processName
}
)"
,
Tag
=
new
ProcessEntry
{
ProcessName
=
processName
,
MainWindowTitle
=
mainWindowTitle
,
IsDistracting
=
true
}
Tag
=
new
ProcessEntry
{
ProcessName
=
processName
,
MainWindowTitle
=
mainWindowTitle
,
IsDistracting
=
isDistracting
}
};
};
newCheckBox
.
Checked
+=
CheckBox_CheckedChanged
;
newCheckBox
.
Checked
+=
CheckBox_CheckedChanged
;
newCheckBox
.
Unchecked
+=
CheckBox_CheckedChanged
;
newCheckBox
.
Unchecked
+=
CheckBox_CheckedChanged
;
...
@@ -334,6 +318,9 @@ namespace InnoLabProjektDektopApp
...
@@ -334,6 +318,9 @@ namespace InnoLabProjektDektopApp
// Wert in der JSON-Datenstruktur aktualisieren
// Wert in der JSON-Datenstruktur aktualisieren
item
.
IsDistracting
=
checkBox
.
IsChecked
??
false
;
item
.
IsDistracting
=
checkBox
.
IsChecked
??
false
;
// Write the value into the _data dictionary
_data
[
"Programs"
].
FirstOrDefault
(
p
=>
p
.
ProcessName
.
Equals
(
item
.
ProcessName
,
StringComparison
.
CurrentCultureIgnoreCase
))!.
IsDistracting
=
item
.
IsDistracting
;
// Änderungen in die Datei schreiben
// Änderungen in die Datei schreiben
SaveData
();
SaveData
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment