Common.cs 1.4 KB
using System;

namespace Asa
{
    internal class Common
    {
        public static Camera.VisionLib visionLib;
        public static log4net.ILog log;
        //public static string path_temp = Environment.CurrentDirectory + "\\aa.temp";

        //public static void log_temp(string s)
        //{
        //    System.IO.File.AppendAllText(path_temp, "\r\n" + s);
        //}
    }

    //internal class CameraRegion
    //{
    //    public string CameraName { set; get; } = "";
    //    public string RegionName { set; get; } = "";
    //    public int X { set; get; } = 0;
    //    public int Y { set; get; } = 0;
    //    public int Width { set; get; } = 0;
    //    public int Height { set; get; } = 0;
    //    public float Ratio { set; get; } = 0;

    //    public override string ToString()
    //    {
    //        string s = string.Format("{0} X:{1} Y:{2} W:{3} H:{4} R:{5}", RegionName, X, Y, Width, Height, Ratio);
    //        return s;
    //    }

    //    public CameraRegion Clone()
    //    {
    //        CameraRegion node = new();
    //        System.Reflection.PropertyInfo[] info1 = node.GetType().GetProperties();
    //        System.Reflection.PropertyInfo[] info2 = GetType().GetProperties();
    //        for (int i = 0; i < info1.Length; i++)
    //            info1[i].SetValue(node, info2[i].GetValue(this));
    //        return node;
    //    }
    //}
}