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
| #define DotNetRuntimeExe "NDP461-KB3102436-x86-x64-AllOS-ENU.exe" | |
| [CustomMessages] | |
| InstallingDotNetFramework=Installing .NET Framework. This might take a few minutes... | |
| DotNetFrameworkFailedToLaunch=Failed to launch .NET Framework Installer with error "%1". Please fix the error then run this installer again. | |
| DotNetFrameworkFailed1602=.NET Framework installation was cancelled. This installation can continue, but be aware that this application may not run unless the .NET Framework installation is completed successfully. | |
| DotNetFrameworkFailed1603=A fatal error occurred while installing the .NET Framework. Please fix the error, then run the installer again. | |
| DotNetFrameworkFailed5100=Your computer does not meet the requirements of the .NET Framework. Please consult the documentation. | |
| DotNetFrameworkFailedOther=The .NET Framework installer exited with an unexpected status code "%1". Please review any other messages shown by the installer to determine whether the installation completed successfully, and abort this |
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 static bool IsInDesignMode() | |
| { | |
| if (LicenseManager.UsageMode == LicenseUsageMode.Designtime) | |
| return true; | |
| if (Process.GetCurrentProcess().ProcessName == "devenv") return true; | |
| return 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
| public class RadioGroupBox : GroupBox | |
| { | |
| public event EventHandler SelectedChanged = delegate { }; | |
| int _selected; | |
| public int Selected | |
| { | |
| get | |
| { | |
| return _selected; |
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 static void SendACommandToAutoCAD(string command) | |
| { | |
| MgdAcDocument doc = MgdApplication.DocumentManager.MdiActiveDocument; | |
| if(doc == null) | |
| { | |
| MessageBox.Show("当前无活动文档,请新建或切换至活动文档后再执行命令", "无法获取活动文档", MessageBoxButtons.OK, MessageBoxIcon.Stop); | |
| return; | |
| } | |
| // 根据是否有命令运行决定esc的数量 | |
| string esc = ""; |
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
| worksheet.TrimLastEmptyRows(); | |
| public static void TrimLastEmptyRows(this ExcelWorksheet worksheet) | |
| { | |
| while (worksheet.IsLastRowEmpty()) | |
| worksheet.DeleteRow(worksheet.Dimension.End.Row); | |
| } | |
| public static bool IsLastRowEmpty(this ExcelWorksheet worksheet) | |
| { |
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
| void split(const string& s, vector<string>& tokens, const string& delimiters = " ") | |
| { | |
| string::size_type lastPos = s.find_first_not_of(delimiters, 0); | |
| string::size_type pos = s.find_first_of(delimiters, lastPos); | |
| while (string::npos != pos || string::npos != lastPos) { | |
| tokens.push_back(s.substr(lastPos, pos - lastPos));//use emplace_back after C++11 | |
| lastPos = s.find_first_not_of(delimiters, pos); | |
| pos = s.find_first_of(delimiters, lastPos); | |
| } | |
| } |
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.Net.Sockets; | |
| using System.Net; | |
| using System.IO; | |
| using System.Threading; | |
| using System.Windows.Forms; | |
| using Westwind.Utilities; | |
| namespace Westwind.WebConnection |
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.Text; | |
| using System.Threading; | |
| namespace Clearcove.Logging | |
| { | |
| public sealed class Logger | |
| { | |
| #region Log File Writing |
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
| namespace System.Runtime.CompilerServices { | |
| sealed class CallerMemberNameAttribute : Attribute { } | |
| } |
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
| import logging | |
| import threading | |
| import os | |
| import subprocess | |
| logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO) | |
| class LogPipe(threading.Thread): |