mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Simplify names
This commit is contained in:
parent
bf8b5ab4db
commit
3992add566
6 changed files with 12 additions and 12 deletions
|
@ -149,7 +149,7 @@ protected override void OnPaint(PaintEventArgs e)
|
|||
}
|
||||
|
||||
// Calculate the position at which to display the RadioButton.
|
||||
Int32 offset = (ContentRectangle.Height - RadioButtonRenderer.GetGlyphSize(e.Graphics, buttonState).Height) / 2;
|
||||
int offset = (ContentRectangle.Height - RadioButtonRenderer.GetGlyphSize(e.Graphics, buttonState).Height) / 2;
|
||||
Point imageLocation = new Point(ContentRectangle.Location.X + 4, ContentRectangle.Location.Y + offset);
|
||||
|
||||
// If the item is selected and the RadioButton paints with partial
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace ShareX.HelpersLib
|
|||
{
|
||||
public static class ObjectExtensions
|
||||
{
|
||||
private static readonly MethodInfo CloneMethod = typeof(Object).GetMethod("MemberwiseClone", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
private static readonly MethodInfo CloneMethod = typeof(object).GetMethod("MemberwiseClone", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
public static bool IsPrimitive(this Type type)
|
||||
{
|
||||
|
@ -41,12 +41,12 @@ public static bool IsPrimitive(this Type type)
|
|||
return type.IsValueType && type.IsPrimitive;
|
||||
}
|
||||
|
||||
public static Object Copy(this Object originalObject)
|
||||
public static object Copy(this object originalObject)
|
||||
{
|
||||
return InternalCopy(originalObject, new Dictionary<Object, Object>(new ReferenceEqualityComparer()));
|
||||
return InternalCopy(originalObject, new Dictionary<object, object>(new ReferenceEqualityComparer()));
|
||||
}
|
||||
|
||||
private static Object InternalCopy(Object originalObject, IDictionary<Object, Object> visited)
|
||||
private static object InternalCopy(object originalObject, IDictionary<object, object> visited)
|
||||
{
|
||||
if (originalObject == null) return null;
|
||||
Type typeToReflect = originalObject.GetType();
|
||||
|
@ -92,11 +92,11 @@ private static void CopyFields(object originalObject, IDictionary<object, object
|
|||
|
||||
public static T Copy<T>(this T original)
|
||||
{
|
||||
return (T)Copy((Object)original);
|
||||
return (T)Copy((object)original);
|
||||
}
|
||||
}
|
||||
|
||||
public class ReferenceEqualityComparer : EqualityComparer<Object>
|
||||
public class ReferenceEqualityComparer : EqualityComparer<object>
|
||||
{
|
||||
public override bool Equals(object x, object y)
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ private interface ITaskbarList4
|
|||
|
||||
// ITaskbarList3
|
||||
[PreserveSig]
|
||||
void SetProgressValue(IntPtr hwnd, UInt64 ullCompleted, UInt64 ullTotal);
|
||||
void SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
|
||||
|
||||
[PreserveSig]
|
||||
void SetProgressState(IntPtr hwnd, TaskbarProgressBarStatus tbpFlags);
|
||||
|
|
|
@ -125,7 +125,7 @@ public void PrintPage(PrintPageEventArgs e)
|
|||
// append c to line if not NewLine or Eos
|
||||
if ((c != NewLine) && (c != Eos))
|
||||
{
|
||||
Char ch = Convert.ToChar(c);
|
||||
char ch = Convert.ToChar(c);
|
||||
line.Append(ch);
|
||||
|
||||
// if ch is whitespace, remember pos and continue
|
||||
|
|
|
@ -91,7 +91,7 @@ public int AddFileIcon(string filePath)
|
|||
if (!File.Exists(filePath)) throw new FileNotFoundException("File does not exist");
|
||||
|
||||
// Split it down so we can get the extension
|
||||
string[] splitPath = filePath.Split(new Char[] { '.' });
|
||||
string[] splitPath = filePath.Split(new char[] { '.' });
|
||||
string extension = (string)splitPath.GetValue(splitPath.GetUpperBound(0));
|
||||
|
||||
//Check that we haven't already got the extension, if we have, then
|
||||
|
|
|
@ -45,8 +45,8 @@ public class ListViewEx : ListView
|
|||
private struct NMHDR
|
||||
{
|
||||
public IntPtr hwndFrom;
|
||||
public Int32 idFrom;
|
||||
public Int32 code;
|
||||
public int idFrom;
|
||||
public int code;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
|
|
Loading…
Reference in a new issue