質問編集履歴
3
bindeingtext変数をtextView1に訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,8 +33,7 @@
|
|
33
33
|
IPlatformInfoInterface platformInfo = DependencyService.Get<IPlatformInfoInterface>();
|
34
34
|
|
35
35
|
// 取得したオブジェクトを使う
|
36
|
-
//LabelOS.Text = platformInfo.OsVersion;
|
37
|
-
textView.
|
36
|
+
textView.textView1 = platformInfo.GetDBtable();
|
38
37
|
}
|
39
38
|
```
|
40
39
|
|
2
コード表示機能使用
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,18 +3,16 @@
|
|
3
3
|
ツール:Visual Studio 2017 Community
|
4
4
|
|
5
5
|
PCLインターフェース
|
6
|
-
|
6
|
+
```
|
7
7
|
public interface IPlatformInfoInterface
|
8
8
|
{
|
9
9
|
// モデル名を取得するメソッド
|
10
10
|
string GetDBtable();
|
11
|
+
```
|
11
12
|
|
12
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
13
13
|
|
14
|
-
|
15
|
-
|
16
14
|
MainActivity.cs
|
17
|
-
|
15
|
+
```
|
18
16
|
var textView = FindViewById<TextView>(Resource.Id.textView1);
|
19
17
|
public string GetDBtable()
|
20
18
|
{
|
@@ -24,13 +22,12 @@
|
|
24
22
|
{
|
25
23
|
textView.Text += sqlReader[0].ToString() + ":" + sqlReader[1].ToString() + System.Environment.NewLine;
|
26
24
|
}
|
27
|
-
|
25
|
+
```
|
28
26
|
|
29
27
|
|
30
|
-
|
31
|
-
|
32
28
|
MainPage.xaml.cs
|
29
|
+
```
|
33
|
-
|
30
|
+
InitializeComponent();
|
34
31
|
|
35
32
|
// DependencyServiceから、IPlatformInfoオブジェクトを取得する
|
36
33
|
IPlatformInfoInterface platformInfo = DependencyService.Get<IPlatformInfoInterface>();
|
@@ -39,19 +36,17 @@
|
|
39
36
|
//LabelOS.Text = platformInfo.OsVersion;
|
40
37
|
textView.BindingContext = platformInfo.GetDBtable();
|
41
38
|
}
|
39
|
+
```
|
42
40
|
|
43
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
44
41
|
|
45
|
-
|
46
|
-
|
47
42
|
MainPage.xaml
|
48
|
-
|
43
|
+
```
|
49
44
|
<Label
|
50
45
|
x:Name="textView1"
|
51
46
|
text=""
|
52
47
|
VerticalOptions="Center"
|
53
48
|
HorizontalOptions="Center" />
|
54
|
-
|
49
|
+
```
|
55
50
|
|
56
51
|
|
57
52
|
テーブルデータは列項目2つ
|
1
改行訂正
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,18 +3,18 @@
|
|
3
3
|
ツール:Visual Studio 2017 Community
|
4
4
|
|
5
5
|
PCLインターフェース
|
6
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
6
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
7
7
|
public interface IPlatformInfoInterface
|
8
8
|
{
|
9
9
|
// モデル名を取得するメソッド
|
10
10
|
string GetDBtable();
|
11
11
|
|
12
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
12
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
13
13
|
|
14
14
|
|
15
15
|
|
16
16
|
MainActivity.cs
|
17
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
17
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
18
18
|
var textView = FindViewById<TextView>(Resource.Id.textView1);
|
19
19
|
public string GetDBtable()
|
20
20
|
{
|
@@ -24,13 +24,13 @@
|
|
24
24
|
{
|
25
25
|
textView.Text += sqlReader[0].ToString() + ":" + sqlReader[1].ToString() + System.Environment.NewLine;
|
26
26
|
}
|
27
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
27
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
28
28
|
|
29
29
|
|
30
30
|
|
31
31
|
|
32
32
|
MainPage.xaml.cs
|
33
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
33
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ InitializeComponent();
|
34
34
|
|
35
35
|
// DependencyServiceから、IPlatformInfoオブジェクトを取得する
|
36
36
|
IPlatformInfoInterface platformInfo = DependencyService.Get<IPlatformInfoInterface>();
|
@@ -40,18 +40,18 @@
|
|
40
40
|
textView.BindingContext = platformInfo.GetDBtable();
|
41
41
|
}
|
42
42
|
|
43
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
43
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
44
44
|
|
45
45
|
|
46
46
|
|
47
47
|
MainPage.xaml
|
48
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
48
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
49
49
|
<Label
|
50
50
|
x:Name="textView1"
|
51
51
|
text=""
|
52
52
|
VerticalOptions="Center"
|
53
53
|
HorizontalOptions="Center" />
|
54
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
54
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
55
55
|
|
56
56
|
|
57
57
|
テーブルデータは列項目2つ
|