// Decompiled with JetBrains decompiler
// Type: SE0085.StCl.scWOPriority
// Assembly: SE0085StCl, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
// MVID: 2F536775-F65D-4A2A-A94A-55B55F096E84
// Assembly location: C:\Users\Abishek\Downloads\SchneiderCode_Breaker_09292016\Breaker Schedule-20160930T014118Z\Breaker Schedule\Solution for gathering Breaker Data\DMS\bin\Debug\SE0085StCl.dll

using Microsoft.VisualBasic.CompilerServices;
using System;

namespace SE0085.StCl
{
  public class scWOPriority
  {
    private int _PKPriorityID;
    private int _PriorityLvl;
    private string _PriorityDesc;
    private int _PriorityAlert;
    private bool _PriorityActive;
    private TimeSpan _ResponseTime;
    private string _ResponsedB;

    public int PKPriorityID
    {
      get
      {
        return this._PKPriorityID;
      }
      set
      {
        this._PKPriorityID = value;
      }
    }

    public int PriorityLvl
    {
      get
      {
        return this._PriorityLvl;
      }
      set
      {
        this._PriorityLvl = value;
      }
    }

    public string PriorityDesc
    {
      get
      {
        return this._PriorityDesc;
      }
      set
      {
        this._PriorityDesc = value;
      }
    }

    public int PriorityAlert
    {
      get
      {
        return this._PriorityAlert;
      }
      set
      {
        this._PriorityAlert = value;
      }
    }

    public bool PriorityActive
    {
      get
      {
        return this._PriorityActive;
      }
      set
      {
        this._PriorityActive = value;
      }
    }

    public TimeSpan ResponseTime
    {
      get
      {
        return this._ResponseTime;
      }
      set
      {
        this._ResponseTime = value;
      }
    }

    public string SetResponsedB
    {
      get
      {
        return this._ResponsedB;
      }
      set
      {
        this._ResponsedB = value;
        string[] strArray = value.Split(':');
        if (strArray.Length == 4)
          this._ResponseTime = new TimeSpan(Conversions.ToInteger(strArray[0]), Conversions.ToInteger(strArray[1]), Conversions.ToInteger(strArray[2]), Conversions.ToInteger(strArray[3]));
        else if (strArray.Length == 3)
          this._ResponseTime = new TimeSpan(Conversions.ToInteger(strArray[0]), Conversions.ToInteger(strArray[1]), Conversions.ToInteger(strArray[2]), 0);
        else if (strArray.Length == 2)
          this._ResponseTime = new TimeSpan(Conversions.ToInteger(strArray[0]), Conversions.ToInteger(strArray[1]), 0);
        else if (strArray.Length == 1)
          this._ResponseTime = new TimeSpan(Conversions.ToInteger(strArray[0]), 0, 0);
        Console.WriteLine(this._ResponseTime.ToString());
        Console.WriteLine("Days: " + Conversions.ToString(this._ResponseTime.Days));
        Console.WriteLine("Hours: " + Conversions.ToString(this._ResponseTime.Hours));
        Console.WriteLine("Minutes: " + Conversions.ToString(this._ResponseTime.Minutes));
        Console.WriteLine("Seconds: " + Conversions.ToString(this._ResponseTime.Seconds));
      }
    }

    public scWOPriority()
    {
      this._PKPriorityID = 0;
      this._PriorityLvl = 0;
      this._PriorityDesc = "";
      this._PriorityAlert = 0;
      this._ResponseTime = new TimeSpan(4, 0, 0);
    }

    public override string ToString()
    {
      return this._PriorityDesc;
    }
  }
}
