コード例 #1
0
        public DomainFacade(IStorageProvider storageProvider, string baseUri, ILanguageContainerService languageContainerService)
        {
            _storageProvider         = storageProvider;
            LanguageContainerService = languageContainerService;
            TryRestoreLanguageName();

            _grid             = new Grid();
            _toolManager      = new ToolManager();
            _historyManager   = new HistoryManager();
            _hintsProvider    = new HintsProvider();
            _storageManager   = new StorageManager(storageProvider);
            _shareManager     = new ShareManager(baseUri);
            _pasteManager     = new PasteManager();
            _solver           = new BruteForceSolver();
            _gridGenerator    = new PredefinedGridGenerator();
            _colorManager     = new ColorManager();
            _gameTimerManager = new GameTimerManager();

            _modalStateManager = new();
            _modalStateManager.OnModalStateChanged += HandleModalStateChanged;
            SetModalState(ModalState.Loading);

            Load();
            StartAutoSave(TimeSpan.FromSeconds(2));
        }
コード例 #2
0
 public string GetRawPaste(string id)
 {
     return(PasteManager.GetPaste(id).PasteData);
 }
コード例 #3
0
        public ActionResult DisplayPaste(string id)
        {
            Paste p = PasteManager.GetPaste(id);

            return(View("DisplayPage", p));
        }
コード例 #4
0
        public string Index(Paste p)
        {
            string pasteId = PasteManager.StorePaste(p);

            return(Request.Url.Scheme + "://" + Request.Url.Authority + "/Home/DisplayPaste/" + pasteId);
        }