Esempio n. 1
0
        /// <summary>
        /// Should be called right after instantiation.
        /// </summary>
        /// <param name="level">The level to interact with.</param>
        public void OnLevelInit(Level level)
        {
            this.level = level;
            SimplePool.Preload(Resources.Load <GameObject> (GamePaths.CursorPrefab));
            inverseCommands = new DropoutStack <IWorldCommand> (Settings.MaxCursorUndoStackSize);

            SetMode("buildFloor");
        }
Esempio n. 2
0
 public InputImageViewModel(MainWindow window, Image image, UpdatableImage updatableImage, Uri defaultBitmap, Button toGrayscaleButton, Button browseImageButton, Button saveImageButton, Button undoButton, Button defaultButton,
                            TextBlock errorMessageTextBlock) : base(errorMessageTextBlock)
 {
     bitmapsBuffer          = new DropoutStack <ImageSource>(IMAGES_MEMORY);
     this.window            = window;
     this.image             = image;
     this.updatableImage    = updatableImage;
     this.defaultBitmap     = defaultBitmap;
     this.toGrayscaleButton = toGrayscaleButton;
     this.browseImageButton = browseImageButton;
     this.saveImageButton   = saveImageButton;
     this.undoButton        = undoButton;
     this.defaultButton     = defaultButton;
 }
Esempio n. 3
0
        public void Start()
        {
            Console.WriteLine("===========DropoutStack Demo==========");
            int stackCapacity        = 5;
            int inputCount           = 4;
            DropoutStack <int> stack = new DropoutStack <int>(stackCapacity);

            for (int i = 0; i < inputCount; i++)
            {
                stack.Push(i);
            }
            while (stack.Count > 0)
            {
                Console.WriteLine(stack.Pop());
            }
        }
Esempio n. 4
0
 public UptimeMonitor(Server server) : base(server, "UptimeMonitor")
 {
     _stack = new DropoutStack <string>(10);
 }
 public void Setup()
 {
     _testStack = new DropoutStack <int>(20);
     _testStack.HasItemsChanged += _testStack_HasItemsChanged;
     _hasItemsChangedFiredCount  = 0;
 }