old mode 100755
new mode 100644
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// View的方法 |
| | | /// </summary> |
| | | /// <param name="frame">父控件</param> |
| | | /// <param name="text1">父控件</param> |
| | | /// <param name="text2">显示选择View数量</param> |
| | | ///<param name="stateVuale">之前的状态值</param> |
| | | /// <param name="action">返回回调</param> |
| | | /// <returns></returns> |
| | | public void FLayoutView(FrameLayout frame, int text1, int text2, string stateVuale, Action<int> action) |
| | | { |
| | | int i = 2; |
| | | frameLayout.Y = Application.GetRealHeight(603 - (44 * i)); |
| | | frameLayout.Height = Application.GetRealHeight(44 * i); |
| | | frame.AddChidren(frameLayout); |
| | | frame.AddChidren(btnCancel); |
| | | btnOn.TextID = text1; |
| | | btnOff.TextID = text2; |
| | | frameLayout.AddChidren(btnOn); |
| | | frameLayout.AddChidren(btnLine); |
| | | frameLayout.AddChidren(btnOff); |
| | | //取消点击事件 |
| | | btnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | |
| | | ///显示之前状态 |
| | | if (stateVuale != "") |
| | | { |
| | | if (stateVuale == btnOn.Text) |
| | | { |
| | | btnOn.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | else if (stateVuale == btnOff.Text) |
| | | { |
| | | btnOff.TextColor = CSS.CSS_Color.textConfirmColor; |
| | | } |
| | | |
| | | } |
| | | |
| | | //点击事件 |
| | | btnOn.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | action(btnOn.TextID); |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | //点击事件 |
| | | btnOff.MouseUpEventHandler += (sender3, e3) => |
| | | { |
| | | action(btnOff.TextID); |
| | | frame.RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | ///// <summary> |