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.ComponentModel; | |
| using System.Reflection; | |
| using Abp.Application.Services.Dto; | |
| namespace Abp.Extensions | |
| { | |
| public static class EnumExtensions | |
| { |
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.IO; | |
| using System.Runtime.Serialization; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| namespace Abp.Extensions | |
| { | |
| public static class ObjectExtensions | |
| { | |
| public static T Dereference<T>(this object obj) |
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
| string typeName = typeof(IEntityTypeConfiguration<>).Name; | |
| var assembly = Assembly.GetExecutingAssembly(); | |
| assembly.GetTypes() | |
| .Where(w => w.GetTypeInfo().ImplementedInterfaces.Any(a => a.Name == typeName)) | |
| .ToList() | |
| .ForEach(item => | |
| { | |
| dynamic instance = item.FullName; | |
| builder.ApplyConfiguration(assembly.CreateInstance(instance)); |
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 static DateTime dt1970 = new DateTime(1970, 1, 1); | |
| private static Random rnd = new Random(); | |
| private static readonly int __staticMachine = ((0x00ffffff & Environment.MachineName.GetHashCode()) + | |
| #if NETSTANDARD1_5 || NETSTANDARD1_6 | |
| 1 | |
| #else | |
| AppDomain.CurrentDomain.Id | |
| #endif | |
| ) & 0x00ffffff; | |
| private static readonly int __staticPid = Process.GetCurrentProcess().Id; |
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 partial class WaitForm : DevExpress.XtraWaitForm.WaitForm | |
| { | |
| private static WaitForm waitForm; | |
| /// <summary> | |
| /// 标识等待窗口是否关闭 | |
| /// </summary> | |
| private static bool isClose = false; |
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
| use [table_name] | |
| go | |
| CREATE TABLE #tablespaceinfo | |
| ( | |
| nameinfo VARCHAR(500) , | |
| rowsinfo BIGINT , | |
| reserved VARCHAR(20) , | |
| datainfo VARCHAR(20) , | |
| index_size VARCHAR(20) , | |
| unused VARCHAR(20) |
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
| 查看此文:https://www.cnblogs.com/yongzhi/articles/1187149.html | |
| 同时看评论的图片帮助理解。 |
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 class LicenseInfo | |
| { | |
| public LicenseInfo() | |
| { | |
| KeySn = ""; | |
| Date = DateTime.MinValue; | |
| RegLimitDays = 0; | |
| UseLimitDays = 0; | |
| Offset = 0; | |
| } |
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.IO; | |
| using System.IO.Compression; | |
| using System.Net; | |
| using System.Net.Security; | |
| using System.Security.Cryptography.X509Certificates; | |
| using System.Text; | |
| using System.Web; | |
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 showMultiTiff(string tiffFileName){ | |
| FileStream tifFS = new FileStream( tiffFileName , FileMode.Open , FileAccess.Read ) ; | |
| Image gim = Image.FromStream( tifFS ) ; | |
| FrameDimension gfd = new FrameDimension(gim.FrameDimensionsList[0]); | |
| int pageCount = gim.GetFrameCount( gfd ) ;//全体のページ数を得る | |
| System.Diagnostics.Debug.WriteLine(pageCount); | |
| Graphics g = pictureBox1.CreateGraphics(); | |
| for(int i=0;i<pageCount;i++){ | |
| gim.SelectActiveFrame(gfd, i); | |
| g.DrawImage(gim, 0,0, pictureBox1.Width, pictureBox1.Height);//PictureBoxに表示してます |