This file contains 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
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file and a complete list of statements and | |
## options, please have a look in the Monit manual. |
This file contains 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
Trace.AutoFlush = true; | |
var logFileName = "Log" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + ".txt"; | |
var logFilePath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), logFileName); | |
var _logFileStream = new FileStream(logFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite, 4096, FileOptions.Asynchronous); | |
var _streamWriter = new StreamWriter(_logFileStream); | |
Trace.Listeners.Add(new TextWriterTraceListener(_streamWriter)); |
This file contains 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 abstract class AsyncOperationBase<TResult, TError> | |
{ | |
public UInt32 Id { get; private set; } | |
AsyncOpStatus Status { get; private set; } | |
TError Error { get; private set; } | |
public void Cancel(); | |
public event Action<AsyncOpStatus> OnCompleted = delegate {}; | |
public event Action<float> OnProgress = delegate {}; | |
private void SetResult(TResult result) |
This file contains 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
[System.Runtime.InteropServices.DllImport("user32.dll")] | |
private static extern bool SetProcessDPIAware(); | |
//rf |
This file contains 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
@ECHO off | |
Echo Please run as administrator | |
setlocal | |
cd /d %~dp0 | |
set csDir=%cd%\Program.cs | |
powershell ^ | |
set-executionpolicy remotesigned; ^ | |
$source = Get-Content -Raw -Path %csDir%; ^ | |
Add-Type -TypeDefinition "$source"; ^ | |
[Program]::Main() |
This file contains 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 TMPro; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; |
This file contains 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.IO; | |
using UnityEditor; | |
using UnityEngine; | |
namespace Autogramma.CombApp.Editor | |
{ | |
public class ScriptableObjectCreator | |
{ | |
[MenuItem("Assets/Create/SO")] | |
public static void CreateAsset() |
This file contains 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 UnityEngine; | |
using UnityEditor; | |
public static class ScriptableObjectUtility | |
{ | |
/// <summary> | |
// This makes it easy to create, name and place unique new ScriptableObject asset files. | |
/// </summary> | |
public static T CreateAsset<T>(string path, string name = null) where T : ScriptableObject | |
{ |
This file contains 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 Microsoft.Win32; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Xml.Serialization; |
This file contains 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
if $(ConfigurationName) == Release ( | |
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /ndebug /target:winexe /out:$(TargetDir)$(TargetName)1$(TargetExt) $(TargetPath) $(TargetDir)DotNetZip.dll /targetplatform:v2,C:\Windows\Microsoft.NET\Framework\v2.0.50727 | |
del $(TargetPath) /Q /S | |
del $(TargetDir)DotNetZip.dll /Q /S | |
del $(TargetDir)DotNetZip.xml /Q /S | |
rename "$(TargetDir)$(TargetName)1$(TargetExt)" "$(TargetFileName)" | |
) |