コード例 #1
0
ファイル: MathGate.cs プロジェクト: fielddaylab/coolIt
        public MathGate(XPathNavigator navigator)
        {
            List <MathGateProblem> problemList = new List <MathGateProblem>();

            navigator.MoveToChild("Name", "");
            this.name = navigator.Value;

            navigator.MoveToNext("ID", "");
            this.id = navigator.ValueAsInt;

            navigator.MoveToNext();
            do
            {
                MathGateProblem p = new MathGateProblem(navigator.Clone());
                problemList.Add(p);
            } while (navigator.MoveToNext("Problem", ""));
            problems = problemList.ToArray();

            navigator.MoveToNext();
            switch (navigator.Value)
            {
            case "CP_VS_HEAT_LEAK_GRAPH":
                capability = CAPABILITY.CP_VS_HEAT_LEAK_GRAPH;
                break;

            default:
                string msg = string.Format("Unexpected capability \"{0}\"", navigator.Value);
                throw new Exception(msg);
            }
        }
コード例 #2
0
ファイル: MathGate.cs プロジェクト: fielddaylab/coolIt
 public MathGate(string name, int id, MathGateProblem[] problems, CAPABILITY capability)
 {
     this.name       = name;
     this.id         = id;
     this.problems   = problems;
     this.capability = capability;
 }
コード例 #3
0
        public bool HasCapability(CAPABILITY desiredCapability)
        {
            switch (desiredCapability)
            {
            case CAPABILITY.CP_VS_HEAT_LEAK_GRAPH:
                return(webService.HasCapability(DesktopClient.CoolIt_Service.CAPABILITY.CP_VS_HEAT_LEAK_GRAPH));

            default:
                throw new Exception("Unexpected capability requested");
            }
        }
コード例 #4
0
 public bool HasCapability(CAPABILITY desiredCapability)
 {
     if (capabilities.Contains(desiredCapability))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #5
0
        public bool HasCapability(CAPABILITY requestedCapability)
        {
            CapabilityManager capMgr = getCapabilityManager();

            return(capMgr.HasCapability(requestedCapability));
        }