| | |
| | | int XX = this.X + this.m_SeekBarPadding;
|
| | | //当前滑条所在的大致百分比
|
| | | int tempValue = this.Progress - this.m_MinValue;
|
| | | if (tempValue < 0) { tempValue = 0; }
|
| | | decimal persent = (decimal)tempValue / (this.m_MaxValue - this.m_MinValue);
|
| | | if (tempValue < 0) { tempValue = 0; } |
| | | decimal persent = (decimal)tempValue / ((this.m_MaxValue - this.m_MinValue) == 0 ? 1 : (this.m_MaxValue - this.m_MinValue));
|
| | | //当前滑条所在的大致位置
|
| | | XX += (int)((this.Width - this.m_SeekBarPadding * 2) * persent);
|
| | | //因为要居中,所以减掉自定义控件的宽度的一般
|
| | |
| | | if (server != null) |
| | | { |
| | | OnAppConfig.Instance.GlobalRegion = server; |
| | | OnAppConfig.Instance.RequestHttpsHost = server.regionUrl; |
| | | SetServerText(); |
| | | } |
| | | } |
| | |
| | | if (server != null) |
| | | { |
| | | OnAppConfig.Instance.GlobalRegion = server; |
| | | OnAppConfig.Instance.RequestHttpsHost = server.regionUrl; |
| | | SetServerText(); |
| | | } |
| | | } |
| | |
| | | //当前滑条所在的大致百分比 |
| | | int tempValue = this.Progress - this.m_MinValue; |
| | | if (tempValue < 0) { tempValue = 0; } |
| | | decimal persent = (decimal)tempValue / (this.m_MaxValue - this.m_MinValue); |
| | | decimal persent = (decimal)tempValue / ((this.m_MaxValue - this.m_MinValue) == 0 ? 1 : (this.m_MaxValue - this.m_MinValue)); |
| | | //当前滑条所在的大致位置 |
| | | XX += (int)((this.Width - this.m_SeekBarPadding * 2) * persent); |
| | | //因为要居中,所以减掉自定义控件的宽度的一般 |