Exemplo n.º 1
0
        private void buttonGenerate_Click(object sender, System.EventArgs e)
        {
            _sequenceMgr = new CyclesManager();

            var sequences = _sequenceMgr.ParseItems(12 * 60 * 60 * 1000);
            var xml       = _sequenceMgr.OutputXML(sequences);

            richTextBox1.Text = xml;
        }
Exemplo n.º 2
0
        private void InitCycleSelector()
        {
            cyclesSelect.Items.Clear();

            foreach (Path cycle in Cycles)
            {
                cyclesSelect.Items.Add(CyclesManager.ConvertToString(cycle, Graph.Oriented));
            }

            cyclesSelect.SelectedIndex = 0;
        }
Exemplo n.º 3
0
        private void RenderCyclesSelect()
        {
            cyclesSelect.Items.Clear();

            foreach (Path cycle in CurrentStepNode.Value.Cycles)
            {
                cyclesSelect.Items.Add(CyclesManager.ConvertToString(cycle, Graph.Oriented));
            }


            cyclesSelect.SelectedIndex = cyclesSelect.Items.Count - 1;
            cyclesSelect.Enabled       = cyclesSelect.Items.Count > 0;
        }
Exemplo n.º 4
0
        private void AddCycle(int cycleStart, int cycleEnd)
        {
            Path cycle = GetPathBack(cycleStart, true);


            CyclesManager.NormalizeCycle(cycle);


            bool exist = IsCycleExist(cycle);

            if (!exist)
            {
                AddCycle(cycle);
            }

            if (SaveSteps)
            {
                List <int> toSelect = new List <int>(cycle.Vertices);
                toSelect.Add(toSelect.First());
                AddFoundCycleStep(cycleEnd, cycleStart, toSelect, exist);
            }
        }
Exemplo n.º 5
0
 protected bool IsCycleExist(Path cycle)
 {
     return(CyclesManager.IsCycleInList(Cycles, cycle, Oriented));
 }