Пример #1
0
        void PostPutFile(Node.Method m, string filename)
        {
            Document doc;

            using (FileStream fs = new FileStream(filename, FileMode.Open))
            {
                doc = Document.FromStream(fs);
            }
            if (m == Node.Method.Put)
            {
                KeySelection ks = new KeySelection(GetKeys());
                ks.ShowDialog();
                if (ks.Selection == "")
                {
                    return;
                }
                doc.id = ks.Selection;
            }
            OpenNode.PostDocument(doc, curLog, Guid.NewGuid().ToString());
        }
Пример #2
0
 public DijkstraAlgorithm(Agent agent, Model model, Node.Method fovMethod)
 {
     this.agent = agent;
     this.model = model;
     this.fovMethod = fovMethod;
     open = new List<Node>();
     closed = new List<Node>();
     neighbors = new List<Node>();
 }
Пример #3
0
 public AStarAlgorithm(Agent agent, Model model, Node.Method heuristicMethod, Node.Method fovMethod)
 {
     this.agent = agent;
     this.model = model;
     this.heuristicMethod = heuristicMethod;
     this.fovMethod = fovMethod;
     open = new List<Node>();
     closed = new List<Node>();
     neighbors = new List<Node>();
 }
Пример #4
0
 public void setHeuristicMethod(Node.Method method)
 {
     this.heuristicMethod = method;
 }
Пример #5
0
 public void setFieldOfViewMethod(Node.Method method)
 {
     this.fieldOfViewMethod = method;
 }