Esempio n. 1
0
File: Watcher.cs Progetto: hpie/hpie
        public void CustomData(string dataName, string dataValue)
        {
            if (!this.Started)
                return;

            Event e = new Event("ctD", this.SessionId, this.FlowNumber);

            e.Add("nm", dataName);
            e.Add("vl", dataValue);

            this._array.Add(e);
        }
Esempio n. 2
0
File: Watcher.cs Progetto: hpie/hpie
        public void Start(string appId, string appVer, bool enabled = true)
        {
            if (this.Started || !Config.Enabled)
                return;

            Event e = new Event("strApp", this.SessionId);

            Config.AppId = appId;
            Config.AppVer = appVer;

            // Get os + hardware config
            OperatingSystem.OperatingSystem osInfo = OperatingSystem.OperatingSystem.GetOperatingSystemInfo();
            Hardware.Hardware hwInfo = osInfo.Hardware;

            e.Add("ID", this.UniqueId);
            e.Add("aid", appId);
            e.Add("aver", appVer);

            e.Add("osv", osInfo.Version);
            e.Add("ossp", osInfo.ServicePack);
            e.Add("osar", osInfo.Architecture);
            e.Add("osjv", osInfo.JavaVersion);
            e.Add("osnet", osInfo.FrameworkVersion);
            e.Add("osnsp", osInfo.FrameworkSP);
            e.Add("oslng", osInfo.Lcid);
            e.Add("osscn", hwInfo.ScreenResolution);

            e.Add("cnm", hwInfo.CPUName);
            e.Add("car", hwInfo.CPUArchitecture);
            e.Add("cbr", hwInfo.CPUBrand);
            e.Add("cfr", hwInfo.CPUFrequency);
            e.Add("ccr", hwInfo.CPUCores);
            e.Add("mtt", hwInfo.MemoryTotal);
            e.Add("mfr", hwInfo.MemoryFree);
            e.Add("dtt", hwInfo.DiskTotal);
            e.Add("dfr", hwInfo.DiskFree);

            this._array.Add(e);

            this._started = true;
        }
Esempio n. 3
0
File: Watcher.cs Progetto: hpie/hpie
        public void Uninstall()
        {
            if (!this.Started)
                return;

            Event e = new Event("ust", this.SessionId, this.FlowNumber);

            e.Add("aid", Config.AppId);
            e.Add("aver", Config.AppVer);

            this._array.Add(e);
        }
Esempio n. 4
0
File: Watcher.cs Progetto: hpie/hpie
        public void License(Licenses l)
        {
            if (!this.Started)
                return;

            Event e = new Event("ctD", this.SessionId, this.FlowNumber);

            e.Add("nm", "License");

            string licenseType = "";
            switch (l)
            {
                case Licenses.Free:
                    {
                        licenseType = "F";
                        break;
                    }
                case Licenses.Trial:
                    {
                        licenseType = "T";
                        break;
                    }
                case Licenses.Demo:
                    {
                        licenseType = "D";
                        break;
                    }
                case Licenses.Registered:
                    {
                        licenseType = "R";
                        break;
                    }
                case Licenses.Cracked:
                    {
                        licenseType = "C";
                        break;
                    }
            }

            e.Add("vl", licenseType);

            this._array.Add(e);
        }
Esempio n. 5
0
File: Watcher.cs Progetto: hpie/hpie
        public void Log(string logMessage)
        {
            if (!this.Started)
                return;

            Event e = new Event("lg", this.SessionId, this.FlowNumber);

            e.Add("ms", logMessage);

            this._array.Add(e);
        }
Esempio n. 6
0
File: Watcher.cs Progetto: hpie/hpie
        public void Exception(Exception ex)
        {
            if (!this.Started)
                return;

            Event e = new Event("exC", this.SessionId, this.FlowNumber);

            e.Add("msg", ex.Message);
            e.Add("stk", ex.StackTrace);
            e.Add("src", ex.Source);
            e.Add("tgs", ex.TargetSite);

            this._array.Add(e);
        }
Esempio n. 7
0
File: Watcher.cs Progetto: hpie/hpie
        public void Exception(string exceptionMsg, string stackTrace, string exceptionSrc, string targetSite)
        {
            if (!this.Started)
                return;

            Event e = new Event("exC", this.SessionId, this.FlowNumber);

            e.Add("msg", exceptionMsg);
            e.Add("stk", stackTrace);
            e.Add("src", exceptionSrc);
            e.Add("tgs", targetSite);

            this._array.Add(e);
        }
Esempio n. 8
0
File: Watcher.cs Progetto: hpie/hpie
        public void EventValue(string categoryName, string eventName, string eventValue)
        {
            if (!this.Started)
                return;

            Event e = new Event("evV", this.SessionId, this.FlowNumber);

            e.Add("ca", categoryName);
            e.Add("nm", eventName);
            e.Add("vl", eventValue);

            this._array.Add(e);
        }
Esempio n. 9
0
File: Watcher.cs Progetto: hpie/hpie
        public void EventPeriod(string categoryName, string eventName, int eventDuration, bool eventCompleted)
        {
            if (!this.Started)
                return;

            Event e = new Event("evP", this.SessionId, this.FlowNumber);

            e.Add("ca", categoryName);
            e.Add("nm", eventName);
            e.Add("tm", eventDuration);
            e.Add("ec", (eventCompleted) ? (1) : (0));

            this._array.Add(e);
        }
Esempio n. 10
0
File: Events.cs Progetto: hpie/hpie
 public int IndexOf(Event eventData)
 {
     return this.InnerList.IndexOf(eventData);
 }
Esempio n. 11
0
File: Events.cs Progetto: hpie/hpie
 public bool Contains(Event eventData)
 {
     return this.InnerList.Contains(eventData);
 }
Esempio n. 12
0
File: Events.cs Progetto: hpie/hpie
 public int Add(Event eventData)
 {
     return this.InnerList.Add(eventData);
 }