From: Manika Shrivastava Date: Fri, 22 Sep 2023 09:20:09 +0000 (+0530) Subject: Create EAP Page Popup X-Git-Tag: accepted/tizen/unified/20231102.175746^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5c5debdbf90ee94ce03d13007fc2031c0dc0a04;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-wifi.git Create EAP Page Popup This patch resolves jira https://code.sec.samsung.net/jira/browse/TEIGHT-5165 Change-Id: Ibb61bfba30efe01096de7f5f9453fa1d56e37d2c Signed-off-by: Manika Shrivastava --- diff --git a/SettingWiFi/SettingWiFi/model/AP.cs b/SettingWiFi/SettingWiFi/model/AP.cs index 5a6b954..3c458c2 100755 --- a/SettingWiFi/SettingWiFi/model/AP.cs +++ b/SettingWiFi/SettingWiFi/model/AP.cs @@ -198,6 +198,15 @@ namespace SettingWiFi return false; } + public bool IsEap() + { + if (secType == WiFiSecurityType.Eap) + { + return true; + } + return false; + } + public bool IsConnected() { if(state == WiFiState.Connected) diff --git a/SettingWiFi/SettingWiFi/view/EapInfoInputPage.cs b/SettingWiFi/SettingWiFi/view/EapInfoInputPage.cs new file mode 100644 index 0000000..f3ac4d0 --- /dev/null +++ b/SettingWiFi/SettingWiFi/view/EapInfoInputPage.cs @@ -0,0 +1,264 @@ +using SettingWiFi.res.locale; +using Tizen.NUI; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Components; +using static SettingWiFi.Logger; + +namespace SettingWiFi +{ + internal class EapInfoInputPage : DialogPage + { + private EapItem mAddItem; + EapInfoSource mInfoSource; + + private TextField mValueField; + private RadioButton[] mRadioButtons; + private RadioButtonGroup mGroup; + private string mTitle; + private int mCount; + private string mImagesPath; + private string[] mOptionNames; + private int mSelectedIndex; + + internal EapInfoInputPage(EapItem item, EapInfoSource infoSource) + { + Debug("EapInfoInputPage"); + mAddItem = item; + mInfoSource = infoSource; + mGroup = new RadioButtonGroup(); + mImagesPath = Resources.GetPath() + "/images/"; + } + + internal void CreateComponents(string title, string value) + { + mTitle = title; + var infoView = new RecyclerViewItem() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Vertical, + }, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.WrapContent, + }; + mValueField = new TextField() + { + WidthSpecification = 600, + PlaceholderText = value, + }; + + infoView.Add(mValueField); + + var okButton = new Button() + { + Text = Resources.IDS_WIFI_SK2_OK, + }; + okButton.Clicked += OnOkClicked; + + Content = new AlertDialog() + { + Title = title, + Content = infoView, + Actions = new View[] { okButton }, + }; + } + + internal void CreateRadioComponents(string title, string[] options) + { + Debug("CreateRadioComponents" + title); + mTitle = title; + mOptionNames = options; + mCount = options.Length; + mRadioButtons = new RadioButton[mCount]; + getSelectedIndex(); + + var optionView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Vertical, + }, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.WrapContent, + }; + + var okButton = new Button() + { + Text = Resources.IDS_WIFI_SK2_OK, + }; + okButton.Clicked += OnRadioOkClicked; + + CreateRadioOptions(optionView); + mRadioButtons[mSelectedIndex].IsSelected = true; + Content = new AlertDialog() + { + Title = mTitle, + Content = optionView, + Actions = new View[] { okButton }, + }; + } + + private void getSelectedIndex() + { + Debug(""); + mSelectedIndex = 0; + if (mTitle == Resources.IDS_ST_BUTTON_EAP_METHOD) + { + switch (mAddItem.Eapmethod) + { + case "PEAP": + mSelectedIndex = 0; + break; + case "TLS": + mSelectedIndex = 1; + break; + case "TTLS": + mSelectedIndex = 2; + break; + case "SIM": + mSelectedIndex = 3; + break; + case "AKA": + mSelectedIndex = 4; + break; + } + } + else if (mTitle == Resources.IDS_ST_BUTTON_PHASE_AUTHENTICATION) + { + switch (mAddItem.Phaseauthentication) + { + case "None ": + mSelectedIndex = 0; + break; + case "MSCHAPV2": + mSelectedIndex = 1; + break; + case "GTC": + mSelectedIndex = 2; + break; + } + } + else if (mTitle == Resources.IDS_ST_BUTTON_USER_CERTIFICATE) + { + switch (mAddItem.Usercertificate) + { + case "None": + mSelectedIndex = 0; + break; + case "Wifiserver": + mSelectedIndex = 1; + break; + case "Wificonv": + mSelectedIndex = 2; + break; + case "WL3-server": + mSelectedIndex = 3; + break; + } + } + } + private void CreateRadioOptions(View optionView) + { + for (int i = 0; i < mCount; i++) + { + int index = i; + var childView = new View() + { + Layout = new GridLayout() + { + GridOrientation = GridLayout.Orientation.Horizontal, + Columns = 2, + Rows = 1, + ColumnSpacing = 10, + }, + }; + mRadioButtons[i] = new RadioButton(); + var buttonStyle = mRadioButtons[i].Style; + CreateRadioButtonStyle(buttonStyle); + mRadioButtons[i].SelectedChanged += (object sender, SelectedChangedEventArgs args) => + { + OnSelectionChanged(sender, args, index); + }; + mRadioButtons[i].ApplyStyle(buttonStyle); + mRadioButtons[i].Size = new Size(48, 48); + mRadioButtons[i].Icon.Size = new Size(48, 48); + mGroup.Add(mRadioButtons[i]); + var nameLabel = new TextLabel(mOptionNames[i]); + nameLabel.WidthSpecification = 150; + childView.Add(nameLabel); + childView.Add(mRadioButtons[i]); + optionView.Add(childView); + } + } + void CreateRadioButtonStyle(ButtonStyle buttonStyle) + { + Debug(""); + buttonStyle.Icon.Opacity = new Selector + { + Normal = 1.0f, + Selected = 1.0f, + Disabled = 0.4f, + DisabledSelected = 0.4f + }; + buttonStyle.Icon.BackgroundImage = ""; + + buttonStyle.Icon.ResourceUrl = new Selector + { + Normal = mImagesPath + "controller_btn_radio_off.png", + Selected = mImagesPath + "controller_btn_radio_on.png", + Disabled = mImagesPath + "controller_btn_radio_off.png", + DisabledSelected = mImagesPath + "controller_btn_radio_on.png", + }; + } + + void OnSelectionChanged(object sender, SelectedChangedEventArgs e, int i) + { + Debug($"{i}th RadioButton's IsSelected is changed to {e.IsSelected}."); + if (e.IsSelected) + { + mSelectedIndex = i; + Debug("Selected index: " + mSelectedIndex); + } + } + + private void OnRadioOkClicked(object source, ClickedEventArgs args) + { + Debug("OnRadioOkClicked"); + mInfoSource.Clear(); + UpdateInfo(mTitle, mOptionNames[mSelectedIndex]); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); + } + private void OnOkClicked(object sender, ClickedEventArgs e) + { + Debug("OnOkClicked " + mValueField.Text + " : " + mTitle); + mInfoSource.Clear(); + UpdateInfo(mTitle, mValueField.Text); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); + } + + private void UpdateInfo(string fieldName, string value) + { + Debug("UpdateInfo"); + + if (fieldName == Resources.IDS_ST_BUTTON_EAP_METHOD) + { + Debug("Eap method: Updating value to " + value + " from " + mAddItem.Eapmethod); + mAddItem.Eapmethod = value; + mInfoSource.ShowEapInfo(); + } + else if (fieldName == Resources.IDS_ST_BUTTON_PHASE_AUTHENTICATION) + { + Debug("Phase 2 authentication: Updating value to " + value + " from " + mAddItem.Phaseauthentication); + mAddItem.Phaseauthentication = value; + mInfoSource.ShowEapInfo(); + } + else if (fieldName == Resources.IDS_ST_BUTTON_USER_CERTIFICATE) + { + Debug("User Certificate: Updating value to " + value + " from " + mAddItem.Usercertificate); + mAddItem.Usercertificate = value; + mInfoSource.ShowEapInfo(); + } + } + } +} + diff --git a/SettingWiFi/SettingWiFi/view/EapInfoSource.cs b/SettingWiFi/SettingWiFi/view/EapInfoSource.cs new file mode 100644 index 0000000..19ba4d6 --- /dev/null +++ b/SettingWiFi/SettingWiFi/view/EapInfoSource.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using Tizen.NUI.Components; +using static SettingWiFi.Logger; + +namespace SettingWiFi +{ + public class EapInfoSource : ObservableCollection + { + private WiFi mWifi; + private EapItem mEapItem; + public EapInfoSource(WiFi wifi, EapItem item) + { + mWifi = wifi; + mEapItem = item; + } + + internal void ShowEapInfo() + { + Debug("ShowEapInfo"); + Add(new EapInfoText(Resources.IDS_ST_BUTTON_EAP_METHOD, mEapItem.Eapmethod, null)); + Add(new EapInfoText(Resources.IDS_ST_BUTTON_PHASE_AUTHENTICATION, mEapItem.Phaseauthentication, null)); + Add(new EapInfoText(Resources.IDS_ST_BUTTON_USER_CERTIFICATE, mEapItem.Usercertificate, null)); + } + } + + public class EapItem + { + public EapItem() + { + Debug(""); + } + + public EapItem(string eapmethod, string phaseauthentication, string usercertificate) + { + Eapmethod = eapmethod; + Phaseauthentication = phaseauthentication; + Usercertificate = usercertificate; + } + public string Eapmethod + { + get; + set; + } + + public string Phaseauthentication + { + get; + set; + } + + public string Usercertificate + { + get; + set; + } + } + + public class EapInfoText : INotifyPropertyChanged + { + private string mInfoTitle; + private string mInfoValue; + public Predicate mUpdater; + + public event PropertyChangedEventHandler PropertyChanged; + + + public EapInfoText(string title, string value, Predicate updater) + { + InfoTitle = title; + InfoValue = value; + mUpdater = updater; + } + + private void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + public string InfoTitle + { + get + { + return mInfoTitle; + } + set + { + mInfoTitle = value; + OnPropertyChanged("InfoTitle"); + } + } + + public string InfoValue + { + get + { + return mInfoValue; + } + set + { + mInfoValue = value; + OnPropertyChanged("InfoValue"); + } + } + } +} + diff --git a/SettingWiFi/SettingWiFi/view/EapPage.cs b/SettingWiFi/SettingWiFi/view/EapPage.cs new file mode 100644 index 0000000..ba7d621 --- /dev/null +++ b/SettingWiFi/SettingWiFi/view/EapPage.cs @@ -0,0 +1,476 @@ +using System; +using Tizen.NUI; +using Tizen.NUI.BaseComponents; +using Tizen.NUI.Binding; +using Tizen.NUI.Components; +using static SettingWiFi.Logger; + +namespace SettingWiFi +{ + internal class EapPage : ContentPage + { + private AP mAp; + private WiFi mWifi; + private EapItem mEapItem; + private TextField mPasswordField; + private TextField mIdentityField; + private Button mConnectButton; + + EapInfoSource mEapDetailsInfoSource; + CollectionView mEapDetailsCollection; + + internal EapPage(WiFi wifi) + { + Debug("EapPage"); + mWifi = wifi; + mEapItem = new EapItem("PEAP", Resources.IDS_ST_BODY_NONE, Resources.IDS_ST_BODY_NONE); + } + + internal void CreateComponents(AP ap) + { + mEapDetailsInfoSource = new EapInfoSource(mWifi, mEapItem); + mAp = ap; + + var appBar = new AppBar() + { + Title = mAp.Essid, + }; + + AppBarStyle appBarStyle = (AppBarStyle)ThemeManager.GetStyle("Tizen.NUI.Components.AppBar"); + Button backButton = new Button(((AppBarStyle)appBarStyle).BackButton); + + backButton.Clicked += OnBackClicked; + appBar.NavigationContent = backButton; + + View eapView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Vertical, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.MatchParent, + }; + + View mDetailsView = new ScrollableBase() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Vertical, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.MatchParent, + ScrollingDirection = ScrollableBase.Direction.Vertical, + HideScrollbar = false, + }; + + mEapDetailsCollection = new CollectionView() + { + ItemsSource = mEapDetailsInfoSource, + ItemsLayouter = new LinearLayouter(), + ItemTemplate = CreateItemTemplate(), + IsGrouped = false, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.MatchParent, + }; + + mEapDetailsInfoSource.ShowEapInfo(); + + View infoCollection = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Vertical, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.MatchParent, + Padding = new Extents(16, 0, 0, 0), + }; + + TextLabel identity = new TextLabel(Resources.IDS_WIFI_BODY_IDENTITY); + Margin = new Extents(0, 0, 10, 20); + infoCollection.Add(identity); + + infoCollection.Add(CreateIdentityEntryItem()); + infoCollection.Add(CreateUnderline()); + + TextLabel label = new TextLabel(Resources.IDS_WIFI_HEADER_PASSWORD); + Margin = new Extents(0, 0, 30, 20); + infoCollection.Add(label); + + infoCollection.Add(CreatePasswordEntryItem()); + infoCollection.Add(CreateUnderline()); + + View childView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Horizontal, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + Padding = new Extents(110, 0, 10, 8), + }; + + var cancelButton = new Button() + { + Text = Resources.IDS_WIFI_SK_CANCEL, + WidthSpecification = 252, + HeightSpecification = 48, + BackgroundColor = Color.White, + TextColor = new Color("#FF6200"), + BorderlineColor = new Color("#FF6200"), + BorderlineWidth = 2, + }; + cancelButton.Clicked += OnCancelClicked; + + mConnectButton = new Button() + { + Text = Resources.IDS_WIFI_SK_OK, + WidthSpecification = 252, + HeightSpecification = 48, + Margin = new Extents(160, 0, 0, 0).SpToPx(), + }; + mConnectButton.IsEnabled = false; + mConnectButton.Clicked += OnConnectClicked; + + childView.Add(cancelButton); + childView.Add(mConnectButton); + + mDetailsView.Add(mEapDetailsCollection); + mDetailsView.Add(infoCollection); + eapView.Add(mDetailsView); + eapView.Add(childView); + + AppBar = appBar; + Content = eapView; + } + + private void OnBackClicked(object source, ClickedEventArgs args) + { + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); + } + + private DataTemplate CreateItemTemplate() + { + return new DataTemplate(() => + { + DefaultLinearItem item = new DefaultLinearItem() + { + WidthSpecification = LayoutParamPolicies.MatchParent, + }; + item.Label.SetBinding(TextLabel.TextProperty, "InfoTitle"); + item.Label.HorizontalAlignment = HorizontalAlignment.Begin; + item.SubLabel.SetBinding(TextLabel.TextProperty, "InfoValue"); + item.SubLabel.HorizontalAlignment = HorizontalAlignment.Begin; + item.IsSelectable = false; + item.Clicked += OnInfoItemClicked; + return item; + }); + } + + private void OnCancelClicked(object source, ClickedEventArgs args) + { + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); + } + + private void OnConnectClicked(object source, ClickedEventArgs args) + { + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop(); + } + + private void OnInfoItemClicked(object sender, ClickedEventArgs e) + { + Debug("OnInfoItemClicked"); + DefaultLinearItem infoItem = (DefaultLinearItem)sender; + var info = infoItem.BindingContext as EapInfoText; + if (info == null) + { + Error("Info null"); + } + else + { + Debug("Item Clicked: " + info.InfoTitle); + if (info.InfoTitle == Resources.IDS_ST_BUTTON_EAP_METHOD) + { + OnEapMethodClicked(sender, e); + } + else if (info.InfoTitle == Resources.IDS_ST_BUTTON_PHASE_AUTHENTICATION) + { + OnPhase2AuthenticationClicked(sender, e); + } + else if (info.InfoTitle == Resources.IDS_ST_BUTTON_USER_CERTIFICATE) + { + OnUserCertificateClicked(sender, e); + } + else + { + Debug("Not a valid field"); + } + } + } + + public void OnEapMethodClicked(object source, ClickedEventArgs e) + { + Debug("OnEapMethodClicked"); + + string[] options = new string[] + { + "PEAP", + "TLS", + "TTLS", + "SIM", + "AKA" + }; + + var page = new EapInfoInputPage(mEapItem, mEapDetailsInfoSource); + page.CreateRadioComponents(Resources.IDS_ST_BUTTON_EAP_METHOD, options); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(page); + } + + public void OnPhase2AuthenticationClicked(object source, ClickedEventArgs e) + { + Debug("OnPhase2AuthenticationClicked"); + + string[] options = new string[] + { + "None", + "MSCHAPV2", + "GTC" + }; + + var page = new EapInfoInputPage(mEapItem, mEapDetailsInfoSource); + page.CreateRadioComponents(Resources.IDS_ST_BUTTON_PHASE_AUTHENTICATION, options); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(page); + } + + public void OnUserCertificateClicked(object source, ClickedEventArgs e) + { + Debug("OnUserCertificateClicked"); + + string[] options = new string[] + { + "None", + "Wifiserver", + "Wificonv", + "WL3-server" + }; + + var page = new EapInfoInputPage(mEapItem, mEapDetailsInfoSource); + page.CreateRadioComponents(Resources.IDS_ST_BUTTON_USER_CERTIFICATE, options); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(page); + } + + private View CreatePasswordEntryItem() + { + View passwordEntryView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Horizontal, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + HeightSpecification = 35, + }; + + mPasswordField = CreatePasswordField(); + mPasswordField.TextChanged += OnTextChanged; + + passwordEntryView.Add(mPasswordField); + passwordEntryView.Add(GetCrossButton()); + passwordEntryView.Add(GetEyeButton()); + + return passwordEntryView; + } + + private View CreateIdentityEntryItem() + { + View identityEntryView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Horizontal, + HorizontalAlignment = HorizontalAlignment.Begin, + }, + HeightSpecification = 35, + }; + + mIdentityField = CreateIdentityField(); + + identityEntryView.Add(mIdentityField); + + return identityEntryView; + } + + private View CreateUnderline() + { + return new View() + { + BorderlineColor = new Color("#FF6200"), + BorderlineWidth = 1, + WidthSpecification = 530, + HeightSpecification = 1, + }; + } + + private void OnTextChanged(object sender, TextField.TextChangedEventArgs e) + { + try + { + Debug("Password field changed"); + mConnectButton.IsEnabled = mPasswordField.Text.Length >= Constants.MIN_PASSWORD_LENGTH ? true : false; + } + catch (Exception ex) + { + Debug("Exception: " + ex.Message); + } + } + + internal TextField CreatePasswordField() + { + Debug("+"); + var passwordField = new TextField() + { + WidthSpecification = 534, + HeightSpecification = 35, + BackgroundColor = Color.White, + PlaceholderText = Resources.IDS_WIFI_HEADER_PASSWORD, + }; + + InputMethod inputSetting = new InputMethod + { + PanelLayout = InputMethod.PanelLayoutType.Password, + }; + PropertyMap p1 = inputSetting.OutputMap; + passwordField.InputMethodSettings = p1; + + mPasswordField = passwordField; + UpdateHiddenProperty(true); + + return passwordField; + } + + internal TextField CreateIdentityField() + { + Debug("+"); + var identityField = new TextField() + { + WidthSpecification = 534, + HeightSpecification = 35, + BackgroundColor = Color.White, + PlaceholderText = Resources.IDS_WIFI_BODY_IDENTITY, + }; + + InputMethod inputSetting = new InputMethod + { + PanelLayout = InputMethod.PanelLayoutType.Password, + }; + PropertyMap p1 = inputSetting.OutputMap; + identityField.InputMethodSettings = p1; + + mIdentityField = identityField; + + return identityField; + } + + private Button GetCrossButton() + { + string crossIconImagePath = "/images/cross_icon.png"; + Button crossButton = CreateButton(crossIconImagePath); + crossButton.Clicked += OnCrossButtonClicked; + + return crossButton; + } + + private Button GetEyeButton() + { + string eyeIconImagePath = "/images/eye_icon.png"; + Button eyeButton = CreateButton(eyeIconImagePath); + eyeButton.Clicked += OnEyeButtonClicked; + eyeButton.IsSelectable = true; + + return eyeButton; + } + + private void OnEyeButtonClicked(object sender, ClickedEventArgs e) + { + Debug("+"); + Button button = (Button)sender; + var hiddenInput = mPasswordField.GetHiddenInput(); + + if (button.IsSelected) + { + Debug("Show Password Selected"); + UpdateHiddenProperty(false); + } + else + { + Debug("Show Password UnSelected"); + UpdateHiddenProperty(true); + } + + } + + private void OnCrossButtonClicked(object sender, ClickedEventArgs e) + { + Debug("+"); + Button button = (Button)sender; + mPasswordField.Text = ""; + } + + private Button CreateButton(string iconImagePath) + { + int buttonSize = 48; + + ButtonStyle style = new ButtonStyle() + { + IsSelectable = true, + CornerRadius = 50, + BackgroundColor = GetDefaultColorSelector(), + }; + + Button button = new Button(style) + { + WidthSpecification = buttonSize, + HeightSpecification = buttonSize, + IconURL = Resources.GetPath() + iconImagePath, + IsSelectable = false, + }; + + return button; + } + + private void UpdateHiddenProperty(bool hide) + { + Debug("+"); + var hiddenInput = new Tizen.NUI.Text.HiddenInput(); + if (hide) + { + hiddenInput.Mode = HiddenInputModeType.ShowLastCharacter; + hiddenInput.SubstituteCharacter = '*'; + hiddenInput.SubstituteCount = 0; + hiddenInput.ShowLastCharacterDuration = 1000; + } + else + { + hiddenInput.Mode = HiddenInputModeType.HideNone; + } + mPasswordField.SetHiddenInput(hiddenInput); + mPasswordField.Text = mPasswordField.Text; + } + + private Selector GetDefaultColorSelector() + { + return new Selector() + { + Normal = new Color("#FFFFFF"), + Focused = new Color("#17234D"), + Pressed = new Color("#FF6200"), + Disabled = new Color("#CACACA"), + }; + } + } +} + diff --git a/SettingWiFi/SettingWiFi/view/MainPage.cs b/SettingWiFi/SettingWiFi/view/MainPage.cs index 4cd55a3..543a9f3 100755 --- a/SettingWiFi/SettingWiFi/view/MainPage.cs +++ b/SettingWiFi/SettingWiFi/view/MainPage.cs @@ -374,6 +374,14 @@ namespace SettingWiFi return page; } + private ContentPage CreateEapPage(AP ap) + { + Debug("CreateEapPage"); + var page = new EapPage(mWifi); + page.CreateComponents(ap); + return page; + } + private DialogPage CreateConnectPage(AP ap) { Debug("+"); @@ -511,6 +519,11 @@ namespace SettingWiFi { ConnectOpenAP(device); } + else if (device.IsEap()) + { + var mEapPage = CreateEapPage(device); + NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(mEapPage); + } else { var mConnectPage = CreateConnectPage(device); diff --git a/SettingWiFi/SettingWiFi/view/Resources.cs b/SettingWiFi/SettingWiFi/view/Resources.cs index 159b938..500d58a 100755 --- a/SettingWiFi/SettingWiFi/view/Resources.cs +++ b/SettingWiFi/SettingWiFi/view/Resources.cs @@ -123,6 +123,9 @@ static public string IDS_ST_BODY_IPV6 = "IPv6"; static public string IDS_ST_BODY_NETWORK_PREFIX_LENGTH = "Network prefix length"; static public string IDS_ST_BUTTON_SECURITY_ABB = "Security"; + static public string IDS_ST_BUTTON_EAP_METHOD = "EAP method"; + static public string IDS_ST_BUTTON_PHASE_AUTHENTICATION = "Phase 2 authentication"; + static public string IDS_ST_BUTTON_USER_CERTIFICATE = "User certificate"; static public string IDS_WIFI_CERTIFICATE_SEARCH_RESULTS = "Certificate Search Results"; static public string IDS_WIFI_NO_CERTIFICATE_FOUND = "No certificate found."; static public string IDS_WIFI_AFTER_YOU_INSTALL_THEY_WILL_BE_SHOWN_HERE = "After you install, they will be shown here."; diff --git a/packaging/org.tizen.cssetting-wifi-1.1.5.rpk b/packaging/org.tizen.cssetting-wifi-1.1.5.rpk index 27a889d..91b72c1 100644 Binary files a/packaging/org.tizen.cssetting-wifi-1.1.5.rpk and b/packaging/org.tizen.cssetting-wifi-1.1.5.rpk differ