Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Klaus Merzbach
Frontend
Commits
72e6c315
Commit
72e6c315
authored
5 years ago
by
Dennis Eisold
Browse files
Options
Downloads
Patches
Plain Diff
Changed settings Topic
parent
f159e279
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Wetterstation/Form1.Designer.cs
+15
-15
15 additions, 15 deletions
Wetterstation/Form1.Designer.cs
Wetterstation/Form1.cs
+7
-7
7 additions, 7 deletions
Wetterstation/Form1.cs
with
22 additions
and
22 deletions
Wetterstation/Form1.Designer.cs
+
15
−
15
View file @
72e6c315
...
@@ -36,10 +36,10 @@ namespace Wetterstation
...
@@ -36,10 +36,10 @@ namespace Wetterstation
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
chartArea
1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
chartArea
3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend
1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend
3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series
1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series
3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Title
title
1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Title
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Title
title
3
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Title
();
this
.
lbTextInnentemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbTextInnentemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbTextAussentemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbTextAussentemp
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbTextWindSpeed
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbTextWindSpeed
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -446,23 +446,23 @@ namespace Wetterstation
...
@@ -446,23 +446,23 @@ namespace Wetterstation
// chart1
// chart1
//
//
this
.
chart1
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
this
.
chart1
.
Anchor
=
System
.
Windows
.
Forms
.
AnchorStyles
.
None
;
chartArea
1
.
Name
=
"ChartArea1"
;
chartArea
3
.
Name
=
"ChartArea1"
;
this
.
chart1
.
ChartAreas
.
Add
(
chartArea
1
);
this
.
chart1
.
ChartAreas
.
Add
(
chartArea
3
);
legend
1
.
Name
=
"Legend1"
;
legend
3
.
Name
=
"Legend1"
;
this
.
chart1
.
Legends
.
Add
(
legend
1
);
this
.
chart1
.
Legends
.
Add
(
legend
3
);
this
.
chart1
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
672
);
this
.
chart1
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
672
);
this
.
chart1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
chart1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
chart1
.
Name
=
"chart1"
;
this
.
chart1
.
Name
=
"chart1"
;
this
.
chart1
.
Palette
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartColorPalette
.
Excel
;
this
.
chart1
.
Palette
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartColorPalette
.
Excel
;
series
1
.
ChartArea
=
"ChartArea1"
;
series
3
.
ChartArea
=
"ChartArea1"
;
series
1
.
Legend
=
"Legend1"
;
series
3
.
Legend
=
"Legend1"
;
series
1
.
Name
=
"Series1"
;
series
3
.
Name
=
"Series1"
;
this
.
chart1
.
Series
.
Add
(
series
1
);
this
.
chart1
.
Series
.
Add
(
series
3
);
this
.
chart1
.
Size
=
new
System
.
Drawing
.
Size
(
991
,
132
);
this
.
chart1
.
Size
=
new
System
.
Drawing
.
Size
(
991
,
132
);
this
.
chart1
.
TabIndex
=
41
;
this
.
chart1
.
TabIndex
=
41
;
this
.
chart1
.
Text
=
"chTendenz"
;
this
.
chart1
.
Text
=
"chTendenz"
;
title
1
.
Name
=
"Title1"
;
title
3
.
Name
=
"Title1"
;
this
.
chart1
.
Titles
.
Add
(
title
1
);
this
.
chart1
.
Titles
.
Add
(
title
3
);
//
//
// lbHintergrund
// lbHintergrund
//
//
...
@@ -504,7 +504,7 @@ namespace Wetterstation
...
@@ -504,7 +504,7 @@ namespace Wetterstation
this
.
btSystemKnopf
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
btSystemKnopf
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
btSystemKnopf
.
BackgroundImage
=
global
::
Wetterstation
.
Properties
.
Resources
.
Zahnrad12
;
this
.
btSystemKnopf
.
BackgroundImage
=
global
::
Wetterstation
.
Properties
.
Resources
.
Zahnrad12
;
this
.
btSystemKnopf
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
btSystemKnopf
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
btSystemKnopf
.
Location
=
new
System
.
Drawing
.
Point
(
12
88
,
84
6
);
this
.
btSystemKnopf
.
Location
=
new
System
.
Drawing
.
Point
(
12
91
,
84
7
);
this
.
btSystemKnopf
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
btSystemKnopf
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
btSystemKnopf
.
Name
=
"btSystemKnopf"
;
this
.
btSystemKnopf
.
Name
=
"btSystemKnopf"
;
this
.
btSystemKnopf
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
37
);
this
.
btSystemKnopf
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
37
);
...
...
This diff is collapsed.
Click to expand it.
Wetterstation/Form1.cs
+
7
−
7
View file @
72e6c315
...
@@ -149,23 +149,23 @@ namespace Wetterstation
...
@@ -149,23 +149,23 @@ namespace Wetterstation
try
try
{
{
dynamic
weatherData
=
JsonConvert
.
DeserializeObject
(
message
.
ToString
());
dynamic
weatherData
=
JsonConvert
.
DeserializeObject
(
message
.
ToString
());
lbForecastImage1
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage1
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
0
].
icon1
+
"_2x"
);
}));
if
(
weatherData
[
0
].
icon1
!=
null
)
lbForecastImage1
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage1
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
0
].
icon1
+
"_2x"
);
}));
lbForecastTemp1
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp1
.
Text
=
weatherData
[
0
].
temp
+
" °C"
;
}));
lbForecastTemp1
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp1
.
Text
=
weatherData
[
0
].
temp
+
" °C"
;
}));
lbForecastDay1
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay1
.
Text
=
getDayFromDateString
(
weatherData
[
0
].
from
.
ToString
());
}));
lbForecastDay1
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay1
.
Text
=
getDayFromDateString
(
weatherData
[
0
].
from
.
ToString
());
}));
lbForecastImage2
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage2
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
1
].
icon1
+
"_2x"
);
}));
if
(
weatherData
[
1
].
icon1
!=
null
)
lbForecastImage2
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage2
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
1
].
icon1
+
"_2x"
);
}));
lbForecastTemp2
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp2
.
Text
=
weatherData
[
1
].
temp
+
" °C"
;
}));
lbForecastTemp2
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp2
.
Text
=
weatherData
[
1
].
temp
+
" °C"
;
}));
lbForecastDay2
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay2
.
Text
=
getDayFromDateString
(
weatherData
[
1
].
from
.
ToString
());
}));
lbForecastDay2
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay2
.
Text
=
getDayFromDateString
(
weatherData
[
1
].
from
.
ToString
());
}));
lbForecastImage3
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage3
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
2
].
icon1
+
"_2x"
);
}));
if
(
weatherData
[
2
].
icon1
!=
null
)
lbForecastImage3
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage3
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
2
].
icon1
+
"_2x"
);
}));
lbForecastTemp3
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp3
.
Text
=
weatherData
[
2
].
temp
+
" °C"
;
}));
lbForecastDay1
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay1
.
Text
=
getDayFromDateString
(
weatherData
[
0
].
from
.
ToString
());
}));
lbForecastTemp3
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp3
.
Text
=
weatherData
[
2
].
temp
+
" °C"
;
}));
lbForecastDay1
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay1
.
Text
=
getDayFromDateString
(
weatherData
[
0
].
from
.
ToString
());
}));
lbForecastDay3
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay3
.
Text
=
getDayFromDateString
(
weatherData
[
2
].
from
.
ToString
());
}));
lbForecastDay3
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay3
.
Text
=
getDayFromDateString
(
weatherData
[
2
].
from
.
ToString
());
}));
lbForecastImage4
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage4
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
3
].
icon1
+
"_2x"
);
}));
if
(
weatherData
[
3
].
icon1
!=
null
)
lbForecastImage4
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage4
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
3
].
icon1
+
"_2x"
);
}));
lbForecastTemp4
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp4
.
Text
=
weatherData
[
3
].
temp
+
" °C"
;
}));
lbForecastTemp4
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp4
.
Text
=
weatherData
[
3
].
temp
+
" °C"
;
}));
lbForecastDay4
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay4
.
Text
=
getDayFromDateString
(
weatherData
[
3
].
from
.
ToString
());
}));
lbForecastDay4
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay4
.
Text
=
getDayFromDateString
(
weatherData
[
3
].
from
.
ToString
());
}));
lbForecastImage5
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage5
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
4
].
icon1
+
"_2x"
);
}));
if
(
weatherData
[
4
].
icon1
!=
null
)
lbForecastImage5
.
Invoke
(
new
Action
(()
=>
{
lbForecastImage5
.
Image
=
global
::
Wetterstation
.
Properties
.
Resources
.
ResourceManager
.
GetObject
(
"_"
+
weatherData
[
4
].
icon1
+
"_2x"
);
}));
lbForecastTemp5
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp5
.
Text
=
weatherData
[
4
].
temp
+
" °C"
;
}));
lbForecastTemp5
.
Invoke
(
new
Action
(()
=>
{
lbForecastTemp5
.
Text
=
weatherData
[
4
].
temp
+
" °C"
;
}));
lbForecastDay5
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay5
.
Text
=
getDayFromDateString
(
weatherData
[
4
].
from
.
ToString
());
}));
lbForecastDay5
.
Invoke
(
new
Action
(()
=>
{
lbForecastDay5
.
Text
=
getDayFromDateString
(
weatherData
[
4
].
from
.
ToString
());
}));
}
}
...
@@ -199,7 +199,7 @@ namespace Wetterstation
...
@@ -199,7 +199,7 @@ namespace Wetterstation
public
void
updateSettings2Mqtt
()
public
void
updateSettings2Mqtt
()
{
{
Console
.
WriteLine
(
JsonConvert
.
SerializeObject
(
WeatherstationSettings
).
ToString
());
Console
.
WriteLine
(
JsonConvert
.
SerializeObject
(
WeatherstationSettings
).
ToString
());
this
.
msgPublish
(
WeatherstationSettings
.
mqtt_topic_backend
+
WeatherstationSettings
.
frontendId
+
"/
settings"
,
JsonConvert
.
SerializeObject
(
WeatherstationSettings
).
ToString
());
this
.
msgPublish
(
WeatherstationSettings
.
mqtt_topic_backend
+
"
settings"
,
JsonConvert
.
SerializeObject
(
WeatherstationSettings
).
ToString
());
}
}
private
void
BtSystemKnopf_Click
(
object
sender
,
EventArgs
e
)
private
void
BtSystemKnopf_Click
(
object
sender
,
EventArgs
e
)
...
...
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