Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc622fd1

Browse files
fix
1 parent01fa531 commitc622fd1

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
usingSystem;
2-
usingWindows.UI;
3-
usingCoder.Desktop.App.ViewModels;
4-
usingMicrosoft.UI.Xaml.Data;
5-
usingMicrosoft.UI.Xaml.Media;
6-
7-
namespaceCoder.Desktop.App.Converters;
8-
9-
publicclassAgentStatusToColorConverter:IValueConverter
10-
{
11-
privatestaticreadonlySolidColorBrushGreen=new(Color.FromArgb(255,52,199,89));
12-
privatestaticreadonlySolidColorBrushRed=new(Color.FromArgb(255,255,59,48));
13-
privatestaticreadonlySolidColorBrushGray=new(Color.FromArgb(255,142,142,147));
14-
privatestaticreadonlySolidColorBrushYellow=new(Color.FromArgb(255,204,1,0));
15-
16-
publicobjectConvert(objectvalue,TypetargetType,objectparameter,stringlanguage)
17-
{
18-
if(valueis notAgentConnectionStatusstatus)returnGray;
19-
20-
returnstatusswitch
21-
{
22-
AgentConnectionStatus.Green=>Green,
23-
AgentConnectionStatus.Red=>Red,
24-
AgentConnectionStatus.Yellow=>Yellow,
25-
_=>Gray,
26-
};
27-
}
28-
29-
publicobjectConvertBack(objectvalue,TypetargetType,objectparameter,stringlanguage)
30-
{
31-
thrownewNotImplementedException();
32-
}
33-
}
1+
usingSystem;
2+
usingWindows.UI;
3+
usingCoder.Desktop.App.ViewModels;
4+
usingMicrosoft.UI.Xaml.Data;
5+
usingMicrosoft.UI.Xaml.Media;
6+
7+
namespaceCoder.Desktop.App.Converters;
8+
9+
publicclassAgentStatusToColorConverter:IValueConverter
10+
{
11+
privatestaticreadonlySolidColorBrushGreen=new(Color.FromArgb(255,52,199,89));
12+
privatestaticreadonlySolidColorBrushRed=new(Color.FromArgb(255,255,59,48));
13+
privatestaticreadonlySolidColorBrushGray=new(Color.FromArgb(255,142,142,147));
14+
privatestaticreadonlySolidColorBrushYellow=new(Color.FromArgb(255,204,1,0));
15+
16+
publicobjectConvert(objectvalue,TypetargetType,objectparameter,stringlanguage)
17+
{
18+
if(valueis notAgentConnectionStatusstatus)returnGray;
19+
20+
returnstatusswitch
21+
{
22+
AgentConnectionStatus.Green=>Green,
23+
AgentConnectionStatus.Red=>Red,
24+
AgentConnectionStatus.Yellow=>Yellow,
25+
_=>Gray,
26+
};
27+
}
28+
29+
publicobjectConvertBack(objectvalue,TypetargetType,objectparameter,stringlanguage)
30+
{
31+
thrownewNotImplementedException();
32+
}
33+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp