This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private const int MaxLen = 7; | |
txtSerial1.MaxLength = MaxLen; | |
txtSerial2.MaxLength = MaxLen; | |
txtSerial3.MaxLength = MaxLen; | |
txtSerial4.MaxLength = MaxLen; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void cmbDocumnetType_VisualListItemFormatting(object sender, VisualItemFormattingEventArgs args) | |
{ | |
args.VisualItem.Font = cmbDocumnetType.Font; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string GetImei() | |
{ | |
var permissionCheck = ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadPhoneState); | |
if (permissionCheck == Permission.Denied) | |
{ | |
ActivityCompat.RequestPermissions(this, new[] { Manifest.Permission.ReadPhoneState }, 0); | |
} | |
var mTelephonyMgr = (TelephonyManager)GetSystemService(TelephonyService); | |
if (Build.VERSION.SdkInt >= BuildVersionCodes.O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void FuncInvoke() | |
{ | |
var del = (Func<int, bool, int>)Delegate.CreateDelegate(typeof(Func<int, bool, int>), Obj, Method); | |
var arg0 = (int)Args[0]; | |
var arg1 = (bool)Args[1]; | |
del(arg0, arg1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void button1_Click(object sender, EventArgs e) | |
{ | |
// Declare a Resource Manager instance. | |
ResourceManager LocRM = new ResourceManager("CultureTest.Language", typeof(Form1).Assembly); | |
// Assign the string for the "strMessage" key to a message box. | |
MessageBox.Show(LocRM.GetString("Hello")); | |
} | |
private void button2_Click(object sender, EventArgs e) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- download Node.js from https://nodejs.org/en/download/ and install it. | |
2- npm install -g npm@latest | |
3- npm i -g create-react-app | |
4- in VSCODE instal this ext: | |
- Simple React Snippets | |
- Prettier | |
- Eslint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum TestEnum | |
{ | |
A, | |
B, | |
C | |
} | |
var t = ~TestEnum.A; // t = ~1; | |
var t = ~TestEnum.B; // t = ~1; | |
var t = ~TestEnum.C; // t = ~1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public KeyboardLayoutType LayoutType | |
{ | |
get | |
{ | |
return this.layoutType; | |
} | |
set | |
{ | |
if (!Enum.IsDefined(typeof (KeyboardLayoutType), (object) value)) | |
throw new ArgumentException("Invalid LayoutType. When setting the LayoutType property, it must be a valid member of the KeyboardLayoutType enumeration!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Text; | |
using System.Web.Http; | |
namespace SignGenApi.Controllers | |
{ | |
public class SignController : ApiController | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
namespace ConsoleApp1 |