コード例 #1
0
        private void Cycle(object sender, EventArgs eventArgs)
        {
            List <bool> stop = new List <bool>();

            foreach (var enumPage in PageFactory.PageDictionary)
            {
                List <AncillaryAbstractClass> lista;
                if (enumPage.Value.DocumentText.Length > 10)
                {
                    if (MainFactory.GetMainClass(enumPage.Key).CanScrool())
                    {
                        enumPage.Value.Document.Body.ScrollIntoView(false);
                    }
                    bool ready = MainFactory.GetMainClass(enumPage.Key).AmReady();
                    if (!ready)
                    {
                        lista = MainFactory.GetMainClass(enumPage.Key).GetData(enumPage.Value.DocumentText);
                    }
                    stop.Add(ready);
                }
                if (stop.All(x => x))
                {
                    //todo  save data(lista)
                    //Restart();
                }
            }
        }
コード例 #2
0
        public void TestRun()
        {
            Program program = MainFactory.NewProgram(MockBootstrapper, MockRunner);

            program.Run();
            Assert.IsTrue(program.Bootstrapper.IsDone);
            Assert.IsTrue(program.Runner.IsDone);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: efeather/ModuleTest
 static void Main(string[] args)
 {
     using (var mainFactory = new MainFactory())
     {
         var app = mainFactory.Application;
         app.Start();
         Console.Read();
     }
 }
コード例 #4
0
        public void TestNewProgram()
        {
            Program program = MainFactory.NewProgram(CompositeBootstrapper, Runner);

            Assert.IsNotNull(program);
            Assert.IsInstanceOf(typeof(ProgramClass), program);
            ProgramClass programImpl = (ProgramClass)program;

            Assert.AreEqual(CompositeBootstrapper, programImpl.Bootstrapper);
        }
コード例 #5
0
        public void EndOfGame()
        {
            timerTiempo.Stop();
            Info.Text = "Fin de partida";

            MainFactory.EndGame(game).Process(time);

            foreach (var btn in TlpPrincipal.Controls.OfType <Button>())
            {
                btn.Enabled = false;
            }
        }
コード例 #6
0
        /// <summary>
        /// Используется для отображения уроков.
        /// </summary>
        /// <param name="lessonOnDay"></param>
        internal void ShowLessonOnDay(List <LessonOnDay> lessonOnDay)
        {
            var linearLayout = FindViewById <LinearLayout>(Resource.Id.liner_layout);

            linearLayout.RemoveAllViews();

            var mainFactory = new MainFactory(this);

            foreach (var item in lessonOnDay)
            {
                linearLayout.AddView(mainFactory.CreateLinearLessonOnDays(item));
            }
        }
コード例 #7
0
        public AgencyContext(ServerModel server)
        {
            CryptographyProvider = new RSACryptography();


            Server = server;

            MainFactory = new MainFactory();
            MainFactory.RegisterTypes();

            RegisteredUsers = new RegisteredUsers();
            RegisteredUsers.RegisterUsers();
        }
コード例 #8
0
        public Context(Dictionary <string, object> mainConfig)
        {
            if (_instance != null)
            {
                throw new Exception("More than one singletone");
            }

            fastJSON.JSON.Parameters.UseEscapedUnicode = true;
            _instance            = this;
            CryptographyProvider = new RSACryptography();
            NetworkManager       = new NetworkManager(mainConfig);
            NetworkManager.Activate();
            MainFactory = new MainFactory();
            MainFactory.RegisterTypes();
        }
コード例 #9
0
        private void Cycle(object sender, EventArgs eventArgs)
        {
            List <AncillaryAbstractClass> lista;

            if (w.DocumentText.Length > 10)
            {
                if (MainFactory.GetMainClass(ee).CanScrool())
                {
                    w.Document.Body.ScrollIntoView(false);
                }
                bool ready = MainFactory.GetMainClass(ee).AmReady();
                if (!ready)
                {
                    lista = MainFactory.GetMainClass(ee).GetData(w.DocumentText);
                }
            }
        }
コード例 #10
0
        private void OnCheckButtonClicked(object sender, EventArgs e)
        {
            var cardTrio = mainPanelDrawer.SelectedTrio;

            var player = MainFactory.DemandPlayer(game, Location, Width).GetPlayer();

            if (game.Check(cardTrio, player))
            {
                game.RefreshCards(cardTrio);
                DrawMainPanel();
                if (game.LevelCompleted())
                {
                    EndOfGame();
                }
            }
            DrawInfo();
            SetCheckButton();
        }
コード例 #11
0
ファイル: FactoryTest.cs プロジェクト: kmietek/PiotexIsABot
 public void GetObjTest()
 {
     var obj = MainFactory.GetMainClass(EnumPages.Friends);
 }
コード例 #12
0
 public override void LoadAsset()
 {
     var assetFactory = MainFactory.GetAssetFactory();
     var go           = assetFactory.LoadPlayer(_theParam.NewCharactor.GetAssetName());
 }
コード例 #13
0
 public MainController(MainFactory mFactory)
 {
     _mainfactory = mFactory;
 }
コード例 #14
0
 private void Start()
 {
     MainFactory.GetCharactorFactory().CreatePlayer("Cube", 4);
 }