add Activate() for activating circle object.
fix some tct code and add naviframe tc.
Change-Id: Idd150d89168986d1f2bf9127f98d6318003c0d1a
Signed-off-by: Jeongkyun <jk.pu@samsung.com>
var surface = new CircleSurface(conformant);
- DateTimeSelector datetime = new CircleDateTimeSelector(conformant, surface)
+ var datetime = new CircleDateTimeSelector(conformant, surface)
{
MinimumDateTime = new DateTime(2015, 1, 1),
MaximumDateTime = DateTime.Now,
DateTime = DateTime.Now
};
+ ((IRotaryActionWidget)datetime).Activate();
layout.SetContent(datetime);
var surface = new CircleSurface(conformant);
- DateTimeSelector datetime = new CircleDateTimeSelector(conformant, surface)
+ var datetime = new CircleDateTimeSelector(conformant, surface)
{
DateTime = DateTime.Now,
Style = "timepicker/circle"
};
-
+ ((IRotaryActionWidget)datetime).Activate();
layout.SetContent(datetime);
Button btn = new Button(layout)
var surface = new CircleSurface(conformant);
- DateTimeSelector datetime = new CircleDateTimeSelector(conformant, surface)
+ var datetime = new CircleDateTimeSelector(conformant, surface)
{
DateTime = DateTime.Now,
Style = "timepicker/circle",
IsEnabled = false
};
-
+ ((IRotaryActionWidget)datetime).Activate();
layout.SetContent(datetime);
Button btn = new Button(layout)
Conformant conformant = new Conformant(window);
conformant.Show();
- Layout layout = new Layout(window);
+ var naviframe = new Naviframe(window);
+ conformant.SetContent(naviframe);
+ Layout layout = new Layout(naviframe);
layout.SetTheme("layout", "circle", "datetime");
- conformant.SetContent(layout);
-
var surface = new CircleSurface(conformant);
- DateTimeSelector datetime = new CircleDateTimeSelector(conformant, surface)
+ DateTimeSelector datetime = new CircleDateTimeSelector(naviframe, surface)
{
DateTime = DateTime.Now,
Style = "timepicker/circle",
MarkerColor = Color.Pink,
MarkerRadius = 100,
};
-
+ ((IRotaryActionWidget)datetime).Activate();
layout.SetContent(datetime);
Button btn = new Button(layout)
layout.SetPartText("elm.text", "Set time");
+ naviframe.Push(layout, null, "empty");
+
datetime.DateTimeChanged += (object sender, DateChangedEventArgs e) =>
{
Log.Debug(TestName, "Old DateTime={0}", e.OldDate.ToString());
VerticalScrollBackgroundColor = Color.Pink,
VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible,
};
-
+ ((IRotaryActionWidget)list).Activate();
conformant.SetContent(list);
GenItemClass defaultClass = new GenItemClass("default")
VerticalScrollBarLineWidth = 30,
};
list.Show();
-
+ ((IRotaryActionWidget)list).Activate();
list.Move(0, 0);
list.Resize(360, 360);
list.Lower();
conformant.SetContent(naviframe);
- var surface = new CircleSurface(naviframe);
+ var surface = new CircleSurface(conformant);
var list = new CircleGenList(naviframe, surface)
{
VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
IsEnabled = false,
};
-
+ ((IRotaryActionWidget)list).Activate();
var item = naviframe.Push(list);
item.Style = "empty";
VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
};
list.Show();
-
+ ((IRotaryActionWidget)list).Activate();
list.Move(0, 0);
list.Resize(360, 360);
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+using ElmSharp.Wearable;
+
+namespace ElmSharp.Test.TC
+{
+ public class CircleProgressBarTest5 : TestCaseBase
+ {
+ public override string TestName => "CircleProgressBarTest5";
+ public override string TestDescription => "To test Disabled property of CircleProgressBar";
+
+ public override void Run(Window window)
+ {
+ Log.Debug(TestName, "CircleProgressBar run");
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+
+ Naviframe naviframe = new Naviframe(window);
+ naviframe.Show();
+ conformant.SetContent(naviframe);
+
+ var surface = new CircleSurface(conformant);
+ CircleProgressBar pb1 = new CircleProgressBar(naviframe, surface)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ Value = 0,
+ Maximum = 100,
+ Minimum = 0,
+ };
+ pb1.Show();
+ naviframe.Push(pb1, null, "empty");
+
+ Label lb1 = new Label(window)
+ {
+ Text = string.Format("S {0} %", pb1.Value),
+ };
+
+ lb1.Resize(window.ScreenSize.Width, window.ScreenSize.Height);
+ lb1.Move(160, window.ScreenSize.Height / 2 - 40);
+ lb1.Show();
+
+ EcoreMainloop.AddTimer(0.05, () =>
+ {
+ if (pb1.Value == pb1.Maximum/2)
+ {
+ // Test purpose : set disable
+ pb1.IsEnabled = false;
+ }
+
+ if (pb1.Value == pb1.Maximum)
+ {
+ EcoreMainloop.RemoveTimer(pb1);
+ }
+
+ pb1.Value += 1;
+ lb1.Text = string.Format("S {0} %", pb1.Value);
+
+ return true;
+ });
+ }
+ }
+}
VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
};
+ ((IRotaryActionWidget)circleScroller).Activate();
circleScroller.Show();
conformant.SetContent(circleScroller);
Box box = new Box(window)
VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible,
HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto,
};
+ ((IRotaryActionWidget)circleScroller).Activate();
circleScroller.Show();
circleScroller.Move(0, 0);
circleScroller.Resize(360, 360);
Conformant conformant = new Conformant(window);
conformant.Show();
- Naviframe naviframe = new Naviframe(conformant);
+ Naviframe naviframe = new Naviframe(window);
+ naviframe.Show();
+ conformant.SetContent(naviframe);
- var surface = new CircleSurface(naviframe);
+ var surface = new CircleSurface(conformant);
CircleScroller circleScroller = new CircleScroller(naviframe, surface)
{
AlignmentX = -1,
HorizontalScrollBarLineWidth = 15,
HorizontalScrollBackgroundLineWidth = 15,
};
+ ((IRotaryActionWidget)circleScroller).Activate();
circleScroller.Show();
- naviframe.Push(circleScroller);
- naviframe.Show();
- conformant.SetContent(naviframe);
+ naviframe.Push(circleScroller, null , "empty");
+
Box box = new Box(window)
{
VerticalScrollBarRadius = 170,
VerticalScrollBackgroundRadius = 170,
};
+ ((IRotaryActionWidget)circleScroller).Activate();
circleScroller.Show();
circleScroller.Move(0, 0);
circleScroller.Resize(360, 360);
Value = 25,
Step = 5,
};
+ ((IRotaryActionWidget)circleSlider).Activate();
circleSlider.Show();
conformant.SetContent(circleSlider);
Value = 3,
Step = 0.5,
};
+ ((IRotaryActionWidget)circleSlider).Activate();
circleSlider.Show();
conformant.SetContent(circleSlider);
Label label1 = new Label(window)
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using ElmSharp.Wearable;
+
+namespace ElmSharp.Test.TC
+{
+ public class CircleSliderTest3 : TestCaseBase
+ {
+ public override string TestName => "CircleSliderTest3";
+ public override string TestDescription => "To test basic operation of CircleSlider";
+
+ public override void Run(Window window)
+ {
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+
+ Naviframe naviframe = new Naviframe(window);
+ naviframe.Show();
+ conformant.SetContent(naviframe);
+
+ var surface = new CircleSurface(conformant);
+ CircleSlider circleSlider = new CircleSlider(naviframe, surface)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ Minimum = 0,
+ Maximum = 20,
+ Value = 5,
+ Step = 0.5,
+ };
+ ((IRotaryActionWidget)circleSlider).Activate();
+ circleSlider.Show();
+ naviframe.Push(circleSlider, null, "empty");
+
+ Label label1 = new Label(window)
+ {
+ Text = string.Format("{0:F1}", circleSlider.Value),
+ Color = Color.White,
+ };
+
+ label1.Resize(window.ScreenSize.Width, window.ScreenSize.Height);
+ label1.Move(170, window.ScreenSize.Height / 2 - 20);
+ label1.Show();
+
+ circleSlider.ValueChanged += (s, e) =>
+ {
+ label1.Text = string.Format("{0:F1}", circleSlider.Value);
+ };
+
+ }
+ }
+}
WeightX = 1,
WeightY = 1
};
+ ((IRotaryActionWidget)spn1).Activate();
spn1.AddSpecialValue(50, "50 match !!!!");
layout.SetContent(spn1);
var surface = new CircleSurface(conformant);
CircleSpinner spn1 = new CircleSpinner(conformant, surface)
{
- Text = "Slider Test",
+ Text = "Spinner Test",
LabelFormat = "%d Value",
Style = "circle",
AngleRatio = 3.0,
MarkerColor = Color.Pink,
MarkerRadius = 100,
};
+ ((IRotaryActionWidget)spn1).Activate();
spn1.AddSpecialValue(50, "50 match !!!!");
layout.SetContent(spn1);
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using ElmSharp.Wearable;
+
+namespace ElmSharp.Test.TC
+{
+ class CircleSpinnerTest3 : TestCaseBase
+ {
+ public override string TestName => "CircleSpinnerTest3";
+ public override string TestDescription => "To test basic operation of Circle Spinner";
+
+ public override void Run(Window window)
+ {
+ Log.Debug(TestName, "CircleSpinnerTest run");
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+
+ Naviframe naviframe = new Naviframe(window);
+ naviframe.Show();
+ conformant.SetContent(naviframe);
+
+ Layout layout = new Layout(naviframe);
+ layout.SetTheme("layout", "circle", "spinner");
+
+ var surface = new CircleSurface(conformant);
+ CircleSpinner spn1 = new CircleSpinner(naviframe, surface)
+ {
+ Text = "Spinner Test",
+ LabelFormat = "%d Value",
+ Style = "circle",
+ AngleRatio = 3.0,
+ Minimum = 0,
+ Maximum = 360,
+ Value = 0,
+ Step = 10,
+ Interval = 0.5,
+ AlignmentX = -1,
+ AlignmentY = 1,
+ WeightX = 1,
+ WeightY = 1
+ };
+ ((IRotaryActionWidget)spn1).Activate();
+ spn1.AddSpecialValue(50, "50 match !!!!");
+ layout.SetContent(spn1);
+
+ Button btn = new Button(layout) {
+ Text = "OK",
+ Style = "bottom",
+ };
+
+ layout.SetPartContent("elm.swallow.btn", btn);
+ layout.SetPartText("elm.text", "Set value");
+
+ naviframe.Push(layout, null, "empty");
+ }
+ }
+}