http://converter.telerik.com/
源码来自SharpDevelop(对应软件自带解决方案转码工具)
http://www.icsharpcode.net/OpenSource/SD/Download/Default.aspx#SharpDevelop5x
http://converter.telerik.com/
源码来自SharpDevelop(对应软件自带解决方案转码工具)
http://www.icsharpcode.net/OpenSource/SD/Download/Default.aspx#SharpDevelop5x
出处:http://www.fmddlmyy.cn/text6.html
这是一篇程序员写给程序员的趣味读物。所谓趣味是指可以比较轻松地了解一些原来不清楚的概念,增进知识,类似于打RPG游戏的升级。整理这篇文章的动机是两个问题:
我很早前就发现Unicode、Unicode big endian和UTF-8编码的txt文件的开头会多出几个字节,分别是FF、FE(Unicode),FE、FF(Unicode big endian),EF、BB、BF(UTF-8)。但这些标记是基于什么标准呢?
查了查相关资料,总算将这些问题弄清楚了,顺带也了解了一些Unicode的细节。写成一篇文章,送给有过类似疑问的朋友。本文在写作时尽量做到通俗易懂,但要求读者知道什么是字节,什么是十六进制。
RowCount
GridView.RowCount Property | WinForms Controls | DevExpress Help
This property overrides the BaseView.RowCount property to increment its value in the following cases:
- the new item row is shown at the bottom (the View’s GridOptionsView.NewItemRowPosition property is set to the NewItemRowPosition.Bottom value);
- the new item row is hidden (the View’s GridOptionsView.NewItemRowPosition property is set to the NewItemRowPosition.None value) and a newly added row is being edited.
NoteDetail pattern Views do not contain data and they are never displayed within XtraGrid. So, the RowCount member must not be invoked for these Views. The RowCount member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.
- GridControl.MainView – returns the top most View in a grid;
- GridControl.FocusedView – returns the focused View;
- GridControl.DefaultView – returns the currently maximized View;
- the sender parameter of View specific events;
- GetDetailView – returns a detail clone View for a specific master row.
DataRowCount
BaseView.DataRowCount Property | WinForms Controls | DevExpress Help
Note that data rows can be hidden within collapsed groups when data grouping is applied. The DataRowCount property returns the total number of data rows regardless of whether they are within collapsed groups or not. Also, the property’s return value is not always the same as the number of records within the associated data source. When data filtering is applied, the DataRowCount property returns the number of rows that match the filter condition.
NoteDetail pattern Views do not contain data and they are never displayed within XtraGrid. So, the DataRowCount member must not be invoked for these Views. The DataRowCount member can only be used with real Views that are displayed within the Grid Control. The real Views with which an end-user interacts at runtime can be accessed using the following methods.
- GridControl.MainView – returns the top most View in a grid;
- GridControl.FocusedView – returns the focused View;
- GridControl.DefaultView – returns the currently maximized View;
- the sender parameter of View specific events;
- GridView.GetDetailView – returns a detail clone View for a specific master row.
试比较:
Private Sub GridView1_MouseDown(sender As Object, e As MouseEventArgs) Handles GridView1.MouseDown Dim view As GridView = TryCast(sender, GridView) Dim hitInfo As GridHitInfo = view.CalcHitInfo(e.Location) Select Case hitInfo.HitTest Case GridHitTest.Column SelectColumn(view, hitInfo) Case Else ' view.OptionsSelection.MultiSelect = False view.OptionsSelection.MultiSelectMode = GridMultiSelectMode.RowSelect End Select End Sub Private Sub SelectColumn(ByRef View As GridView, ByRef hitinfo As GridHitInfo) '全选列(不排列) View.OptionsSelection.MultiSelect = True View.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect View.OptionsCustomization.AllowSort = False View.ClearSelection() View.SelectCells(New GridCell(0, hitinfo.Column), New GridCell(View.DataRowCount - 1, hitinfo.Column)) View.OptionsCustomization.AllowSort = True End Sub
1、打开注册表
2、定位到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
3、在右侧删除PendingFileRenameOperations项
来源:http://jingyan.baidu.com/article/a24b33cd52a0b919fe002bae.html
遇到一个问题。addhandler 与 handels的区别是什么
举例:如下语句运行成功
Private Sub 供货商IDSearchLookUpEdit_TextChanged(sender As Object, e As EventArgs) Handles 供货商IDSearchLookUpEdit.TextChanged MsgBox(sender.name, MsgBoxStyle.OkCancel, "测试") End Sub
如下语句不成功
Private Sub 主界面_Load(sender As Object, e As EventArgs) Handles MyBase.Load AddHandler 供货商IDSearchLookUpEdit.TextChanged, AddressOf 供货商IDSearchLookUpEdit_TextChanged end sub Private Sub 供货商IDSearchLookUpEdit_TextChanged(sender As Object, e As EventArgs) 'Handles 供货商IDSearchLookUpEdit.TextChanged MsgBox(sender.name, MsgBoxStyle.OkCancel, "测试") End Sub
如图所示,在弹出时,自动对焦到红框区域。
Private Sub 商品查找品牌RepositoryItemTreeListLookUpEdit_Popup(sender As Object, e As EventArgs) Handles 商品查找品牌RepositoryItemTreeListLookUpEdit.Popup Dim editor As TreeListLookUpEdit = CType(sender, TreeListLookUpEdit) editor.Properties.TreeList.ShowFindPanel() End Sub
Private Sub 商品查找商品RepositoryItemSearchLookUpEdit_Popup(sender As Object, e As EventArgs) Handles 商品查找商品RepositoryItemSearchLookUpEdit.Popup Dim editor As SearchLookUpEdit = CType(sender, SearchLookUpEdit) editor.Properties.View.ShowFindPanel() End Sub
备份下载地址:链接: http://pan.baidu.com/s/1dF4oTfr 密码: dx4h
使用方法:完成之后在项目中引用安装目录中的ChnCharInfo.dll即可
实现汉字转拼音demo(原创)
Imports Microsoft.International.Converters.PinYinConverter Module Demo Public Enum 拼音格式 首字母 = 0 全拼 = 1 End Enum Public Function 获取拼音码(ByVal inputText As String, Optional 拼音格式 As 拼音格式 = 拼音格式.首字母) As String if inputText is Nothing or inputText="" then return Nothing end if Dim PY As String = "" For Each Cha In inputText.Trim() Try Dim chinesechar As ChineseChar = New ChineseChar(Cha) Select Case 拼音格式 Case 拼音格式.首字母 PY += chinesechar.Pinyins(0).Substring(0, 1).ToLower Case 拼音格式.全拼 PY += chinesechar.Pinyins(0).ToLower End Select Catch ex As System.NotSupportedException PY += Cha ‘遇到非中文字符,直接原样返回 Catch ex As Exception MsgBox(ex.Message) End Try Next Return PY End Function End Module
多音字不知如何处理,比如:蹲(dūn、cún )的结果为cún
在安装完DexExpress后,启动VS2015每次创建新项目都弹出“未能正确加载“RoslynPackage”包”的对话框,解决方法如下:
1、删除以下文件夹%appdata%\Local\Microsoft\VisualStudio\14.0\ComponentModelCache (以防万一,请做好备份)
2、删除以下文件夹%appdata%\Local\Microsoft\VisualStudio\14.0\Extensions (以防万一,请做好备份)。P.S.无法删除的话就删除文件夹内的文件。
3、重新打开VS2015,程序自动扫描已安装的扩展并重新生成新的文件夹
实现功能:
a.ShowLine 参数:设置下划线是否可见
b.LineColor参数:设置下划线颜色
c.LineWidth参数:设置下划线粗细
d.LineOffset参数:设置下划线偏移量
Imports System.ComponentModel <ToolboxBitmap(GetType(System.Windows.Forms.TextBox))> Public Class TextBoxEx Inherits System.Windows.Forms.TextBox Protected _lineColor As Color = Color.Black Protected _lineWidth As Integer = 1 Protected _lineOffset As Integer = 3 Protected _showLine As Boolean = False Protected WithEvents Line As New Control() <DefaultValue(GetType(Color), "Black")> <Description("下划线颜色")> Public Property LineColor As Color Get Return _lineColor End Get Set(value As Color) If _lineColor <> value Then _lineColor = value RaiseEvent LineColorChanged(Me, Nothing) End If End Set End Property <DefaultValue(1)> <Description("下划线宽度")> Public Property LineWidth As Integer Get Return _lineWidth End Get Set(value As Integer) If _lineWidth <> value Then _lineWidth = value RaiseEvent LineWidthChanged(Me, Nothing) End If End Set End Property <DefaultValue(3)> <Description("下划线偏移量")> Public Property LineOffset As Integer Get Return _lineOffset End Get Set(value As Integer) If _lineOffset <> value Then _lineOffset = value RaiseEvent LineOffsetChanged(Me, Nothing) End If End Set End Property <DefaultValue(False)> <Description("指示控件是否显示下划线")> Public Property ShowLine As Boolean Get Return _showLine End Get Set(value As Boolean) _showLine = value RaiseEvent ShowLineChanged(Me, Nothing) End Set End Property ''' <summary> ''' 在 TextBoxEx.LineColor 属性值发生更改时发生 ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> ''' <remarks></remarks> Public Event LineColorChanged(ByVal sender As Object, e As EventArgs) ''' <summary> ''' 在 TextBoxEx.LineWidth 属性值发生更改时发生 ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> ''' <remarks></remarks> Public Event LineWidthChanged(ByVal sender As Object, e As EventArgs) ''' <summary> ''' 在 TextBoxEx.ShowLine 属性值发生更改时发生 ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> ''' <remarks></remarks> Public Event ShowLineChanged(ByVal sender As Object, e As EventArgs) ''' <summary> ''' 在 TextBoxEx.LineOffset 属性值发生更改时发生 ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> ''' <remarks></remarks> Public Event LineOffsetChanged(ByVal sender As Object, e As EventArgs) Public Sub onLineWidthChanged(ByVal sender As Object, e As EventArgs) Handles Me.LineWidthChanged, Me.LineOffsetChanged, Me.LineColorChanged If Me.ShowLine Then rePosLine() End If End Sub Public Sub onShowLineChanged() Handles Me.ShowLineChanged If Me.ShowLine Then BorderStyle = BorderStyle.None BackColor = Color.FromKnownColor(KnownColor.Control) rePosLine() Else BorderStyle = BorderStyle.Fixed3D BackColor = Color.FromKnownColor(KnownColor.Window) If Not IsNothing(Line) Then Line.Visible = False End If End If End Sub Protected Overrides Sub OnParentChanged(e As EventArgs) MyBase.OnParentChanged(e) If Me.ShowLine Then rePosLine() End If End Sub Protected Overrides Sub OnLocationChanged(e As EventArgs) MyBase.OnLocationChanged(e) If Me.ShowLine Then rePosLine() End If End Sub Protected Sub rePosLine() If Not IsNothing(Me.Parent) Then If Not Me.Parent.Controls.Contains(Line) Then Me.Parent.Controls.Add(Line) End If Line.Width = Me.Width Line.Height = Me.LineWidth Line.BackColor = Me.LineColor Line.Location = New Point(Me.Location.X, Me.Location.Y + Me.Height + Me.LineOffset) Line.Visible = True Line.BringToFront() End If End Sub Protected Overrides Sub Dispose(disposing As Boolean) MyBase.Dispose(disposing) If disposing Then If Not IsNothing(Line) Then Line.Dispose() End If End If End Sub Protected Overrides Sub OnLayout(levent As LayoutEventArgs) MyBase.OnLayout(levent) If Me.ShowLine Then rePosLine() End If End Sub End Class
学会制作片头后,接下来我们来学习如何制作个性化按钮。案例下载链接:http://pan.baidu.com/s/18qgJ8 密码: khrq