Exemplo n.º 1
0
        /// <summary>
        /// Konstruktor.
        /// </summary>
        public UndoRedoManager()
        {
            this.undoStack = new RollingStack <IUndoableRedoable>(50);
            this.redoStack = new RollingStack <IUndoableRedoable>(50);

            //this.UndoRedoDepth = 3;
            this.ClearRedoablesAfterAdd = true;

            this.canUndo = IsUndoAvailable();
            this.canRedo = IsRedoAvailable();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            CommandProcessor processor = new CommandProcessor(true);

            ElevatorGroup group = new ElevatorGroup(3, 12);

            RollingStack <int?> stack = new RollingStack <int?>(50);

            Console.WriteLine($"Rolling Stack:\tMaxSize: {stack.MaxSize}\tSize: {stack.Size}\tCount: {stack.Count()}");
            for (int i = 1; i <= 55; i++)
            {
                if (stack.Push(i))
                {
                    Console.WriteLine("Stack trimmed.");
                }
                Console.WriteLine($"Rolling Stack:\tMaxSize: {stack.MaxSize}\tSize: {stack.Size}\tCount: {stack.Count()}");
            }

            for (int i = 1; i <= 55; i++)
            {
                int?   val = stack.Pop();
                string s;
                if (val == null)
                {
                    s = "null";
                }
                else
                {
                    s = val.ToString();
                }

                Console.WriteLine(s);
            }


            var files = JArray.Parse(
                System.IO.File.ReadAllText(
                    "C:\\Go\\src\\gitlab.hylandqa.net\\skelemen\\cryptanalysis\\output\\report.json"));
            //JsonConvert.DeserializeObject<Models.Files>(System.IO.File.ReadAllText("C:\\Go\\src\\gitlab.hylandqa.net\\skelemen\\cryptanalysis\\output\\report.json"));
            IEnumerable <Models.File> list = files.ToObject <IEnumerable <Models.File> >();

            //list.GetEnumerator().MoveNext()
            foreach (Models.File file in list)
            {
                Console.WriteLine(file.Path);
            }

            Console.WriteLine("Finished.");
            Console.ReadKey();
        }