Debug("ConnectPage");
mWifi = wifi;
}
-
internal void CreateComponents(AP ap)
{
mAp = ap;
- var connectView = new View()
+ var connectView = new RecyclerViewItem()
{
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
},
- WidthSpecification = 200,
- HeightSpecification = 100,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.WrapContent,
};
- var passwordItem = new DefaultLinearItem();
- var wpsButtonItem = new DefaultLinearItem();
+ var passwordItem = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ IsSelectable = false,
+ };
+ passwordItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
var passwordField = new TextField()
{
- WidthSpecification = 400,
- BackgroundColor = Color.Grey,
+ WidthSpecification = 600,
+ BackgroundColor = Color.Silver,
PlaceholderText = Resources.IDS_WIFI_HEADER_PASSWORD,
};
hiddenInput.ShowLastCharacterDuration = 1000;
passwordField.SetHiddenInput(hiddenInput);
+ passwordItem.Add(passwordField);
+
var wpsButton = new Button()
{
Text = Resources.IDS_WIFI_OPT_WPS,
};
wpsButton.Clicked += OnWpsClicked;
- passwordItem.Add(passwordField);
- //wpsButtonItem.Add(wpsButton);
-
- connectView.Add(passwordItem);
- //connectView.Add(wpsButtonItem);
+ connectView.Add(passwordField);
+ connectView.Add(wpsButton);
var cancelButton = new Button()
{
mWifi = wifi;
}
- internal void CreateComponents(AP ap)
+ public void CreateComponents(AP ap)
{
mAp = ap;
- var view = new View()
+ var view = new RecyclerViewItem()
{
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
},
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.WrapContent,
};
- var messageItem = new DefaultLinearItem();
- var progressItem = new DefaultLinearItem();
-
string timeout = "2";
- TextLabel text = new TextLabel(String.Format(Resources.IDS_WIFI_POP_PRESS_WPS_ON_YOUR_WI_FI_ACCESS_POINT_WITHIN_PD_MINUTES, timeout))
+ var messageItem = new DefaultLinearItem()
{
- Size = new Size(1000, 700),
- HorizontalAlignment = HorizontalAlignment.Begin,
- PointSize = 12.0f,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = String.Format(Resources.IDS_WIFI_POP_PRESS_WPS_ON_YOUR_WI_FI_ACCESS_POINT_WITHIN_PD_MINUTES, timeout),
+ IsSelectable = false,
};
+ messageItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
var progress = new Progress()
{
CurrentValue = 0,
TrackColor = Color.White,
ProgressColor = Color.Navy,
- Size = new Size(400, 50),
- WidthSpecification = 400,
};
- messageItem.Add(text);
- progressItem.Add(progress);
-
view.Add(messageItem);
- view.Add(progressItem);
+ view.Add(progress);
int timeCnt = 60 * 2;
var timer = new Timer(1000);
mWifi = wifi;
}
- internal void CreateComponents(AP ap, string pin)
+ public void CreateComponents(AP ap, string pin)
{
mAp = ap;
- var view = new View()
+ var view = new RecyclerViewItem()
{
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
},
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.WrapContent,
};
- var messageItem = new DefaultLinearItem();
- var progressItem = new DefaultLinearItem();
-
string timeout = "2";
- TextLabel text = new TextLabel(String.Format(Resources.IDS_ST_BODY_ENTER_THE_P1SS_PIN_ON_YOUR_WI_FI_ROUTER_THE_SETUP_CAN_TAKE_UP_TO_P2SD_MINUTES_TO_COMPLETE, pin, timeout))
+ var messageItem = new DefaultLinearItem()
{
- Size = new Size(1000, 700),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = String.Format(Resources.IDS_ST_BODY_ENTER_THE_P1SS_PIN_ON_YOUR_WI_FI_ROUTER_THE_SETUP_CAN_TAKE_UP_TO_P2SD_MINUTES_TO_COMPLETE, pin, timeout),
+ IsSelectable = false,
};
- text.HorizontalAlignment = HorizontalAlignment.Begin;
- text.PointSize = 12.0f;
+ messageItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
var progress = new Progress()
{
CurrentValue = 0,
TrackColor = Color.White,
ProgressColor = Color.Navy,
- Size = new Size(400, 50),
- WidthSpecification = 400,
};
- messageItem.Add(text);
- progressItem.Add(progress);
-
view.Add(messageItem);
- view.Add(progressItem);
+ view.Add(progress);
int timeCnt = 60 * 2;
var timer = new Timer(1000);
checkConnection();
if (isConnected)
{
- Debug(Resources.IDS_WIFI_SBODY_CONNECTED_M_STATUS);
Navigator.Pop();
return false;
}
{
mAp = ap;
- var view = new View()
+ var view = new RecyclerViewItem()
{
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
},
- WidthSpecification = 200,
- HeightSpecification = 100,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.WrapContent,
+ };
+
+ var pbsButtonItem = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ pbsButtonItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
+
+ var pinButtonItem = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
};
+ pinButtonItem.Label.HorizontalAlignment = HorizontalAlignment.Begin;
var pbsButton = new Button()
{
Text = Resources.IDS_WIFI_BUTTON_WPS_BUTTON,
+ BackgroundColor = Color.Silver,
+ WidthSpecification = 600,
};
pbsButton.Clicked += OnButtonMethodClicked;
var pinButton = new Button()
{
Text = Resources.IDS_WIFI_SK_WPS_PIN,
+ BackgroundColor = Color.Silver,
+ WidthSpecification = 600,
};
pinButton.Clicked += OnPinMethodClicked;
+ var cancelButton = new Button()
+ {
+ Text = Resources.IDS_WIFI_SK_CANCEL,
+ };
+ cancelButton.Clicked += OnCancelClicked;
+
+ pbsButtonItem.Add(pbsButton);
+ pinButtonItem.Add(pinButton);
+
+ view.Add(pbsButtonItem);
+ view.Add(pinButtonItem);
+
Content = new AlertDialog()
{
Title = Resources.IDS_WIFI_HEADER_SELECT_WPS_METHOD_ABB,
Content = view,
- Actions = new View[] { pbsButton, pinButton },
+ Actions = new View[] { cancelButton },
};
}
+ private void OnCancelClicked(object source, ClickedEventArgs args)
+ {
+ Navigator.Pop();
+ }
+
private void OnButtonMethodClicked(object source, ClickedEventArgs args)
{
var page = new WpsButtonWaitPage(mWifi);