Exemple #1
0
 public void OpenWait()
 {
     Close();
     Open();
     events.Interactable(true);
     TimeView.StartTime();
 }
        public void VerifyThatNewAttendanceRecordIsDisplayed()
        {
            LoginPage loginpage = new LoginPage();

            PageFactory.InitElements(driver, loginpage);

            AdminView admin = new AdminView();

            PageFactory.InitElements(driver, admin);

            TimeView timetab = new TimeView();

            PageFactory.InitElements(driver, timetab);

            loginpage.LoginAsAdmin();

            timetab.TimeTabClick();
            timetab.AttendanceTabClick();
            timetab.EmployeeRecordSelect();
            timetab.FillUpTheForm(EmployeeName);


            Assert.That(timetab.SelectValueFromTable(1), Is.EqualTo(Resource.PunchInValue));

            timetab.AddAttendanceRecordClick();
            timetab.PunchInForm();
            Assert.That(timetab.SelectValueFromTable(3), Is.EqualTo(Resource.PunchInNote));

            timetab.DeleteEmployeeAttendance();
        }
        private void Initialize(ILevelControllerOptions options)
        {
            // Constructs all the in-level components, then stores the ones that'll be needed later in member variables.
            // Done this way rather than directly initializing the member variables because this way if they're reordered,
            // the compiler will complain if something's being constructed before its dependency.
            var surface    = GeodesicSphereFactory.Build(options);
            var simulation = new SimulationController(surface, options);

            var cameraController = new CameraController(options);

            var meshManager      = new MeshManager(surface);
            var cursorTracker    = new CursorTracker(cameraController.Camera, meshManager);
            var fieldManipulator = new FieldManipulator(surface, cursorTracker, options);

            var colorMapView     = new ColorMapView(surface, meshManager.Mesh, options);
            var particleMapView  = new ParticleMapView(surface, options);
            var rawValuesView    = new RawValuesView(cursorTracker);
            var timeDilationView = new TimeView(50, options.Timestep);
            var latLongGridView  = new LatLongGridView(options.Radius);

            _simulationController = simulation;
            _colorMapView         = colorMapView;
            _particleMapView      = particleMapView;
            _rawValuesView        = rawValuesView;
            _timeView             = timeDilationView;
            _latLongGridView      = latLongGridView;
            _cameraController     = cameraController;
            _cursorTracker        = cursorTracker;
            _fieldManipulator     = fieldManipulator;
        }
    public TimeController(TimeModel model, TimeView view)
    {
        _model = model;
        _view  = view;

        RegisterController();

        _view.StartTimer();
    }
Exemple #5
0
 public Time(Window window, BandicamUtil bandicamUtil)
 {
     timeView         = new TimeView(this, bandicamUtil);
     this.Owner       = window;
     this.DataContext = timeView;
     InitializeComponent();
     this.Left = 0;
     this.Top  = 0;
 }
Exemple #6
0
 public void InitData()
 {
     dailyReward   = LoadResourceController.GetDailyRewardDataCollection();
     dataPlayer    = GameMgr.Ins.dataPlayer.playerDailyReward;
     dataMoney     = GameMgr.Ins.dataPlayer.playerMoney;
     currentDay    = dataPlayer.GetCurrentDay();
     dataCondition = dataPlayer.GetDailyRewardElementData();
     timeView      = Instantiate(timeView, timeViewParents);
 }
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Exemple #8
0
    private async Task CreateTimeMVCAsync()
    {
        TimeModel timeModel = TimeFactory.Instance.CreateTimeModel();
        TimeView  timeView  = await TimeFactory.Instance.CreateTimeView(_view.GameAreaView);

        _timeController = TimeFactory.Instance.CreateTimeController(timeModel, timeView);

        _timeController.TimeFinish += OnTimeFinish;
        TimeRestart += _timeController.OnTimeRestart;
        RoundFinish += _timeController.OnRoundFinish;
    }
Exemple #9
0
    void InitializeTimeRecordView(GameObject viewGameObject, TimeRecord record)
    {
        TimeView view = new TimeView(viewGameObject.transform);

        view.FirstText.text  = record.FirstTimerString;
        view.SecondText.text = record.SecondTimerString;

        view.deleteButton.onClick.AddListener(
            () =>
        {
            del = record.Index;
            deleteThisTime(del);
            //Debug.Log("pri");
        }

            );
    }
        public void VerifyThatNewUserIsCreatedAndCanLogIn()
        {
            LoginPage loginpage = new LoginPage();

            PageFactory.InitElements(driver, loginpage);

            PIMView pimview = new PIMView();

            PageFactory.InitElements(driver, pimview);

            AdminView admin = new AdminView();

            PageFactory.InitElements(driver, admin);

            loginpage.LoginAsAdmin();

            pimview.OpenPIMView();
            pimview.AddBtnClick();
            pimview.FillUpThePIMForm();
            var firstUserName = pimview.FirstNameUuid;

            pimview.SubmitThePIMForm();

            admin.OpenAdminView();
            admin.AddBtnClick();
            admin.FillUpTheForm(firstUserName);
            var u = admin.NewUserUuid;

            admin.SubmitTheForm();
            Thread.Sleep(1000);


            admin.OpenWelcomeDropDown();
            admin.LogoutClick();

            TimeView dashboard = new TimeView();

            PageFactory.InitElements(driver, dashboard);
            loginpage.LoginAsNewUser(u);
            Assert.That(dashboard.IsPageDisplayed, Is.True);
        }
    private void Accounts()
    {
        AccountsDialog.SetActive(true);
        TimeView timeView = Time.GetComponent <TimeView>();

        timeView.Pause();
        int starNum = 1;

        if (_round.StarStep >= Step.GetComponent <StepView>().Step)
        {
            ++starNum;
        }
        if (_round.StarTime >= timeView.Second)
        {
            ++starNum;
        }
        Record record = new Record(SelectRoundIndex, starNum, (int)timeView.Second, Step.GetComponent <StepView>().Step);

        ConfigManager.SaveRecord(record);
        AccountsDialog.GetComponent <AccountsDialogView>().SetInfo(_round, record);
    }
Exemple #12
0
        private void cboView_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (cboView.SelectedIndex)
            {
            case 0:     //Years
                trkTimeSlider.Maximum = enddate.Year;
                trkTimeSlider.Minimum = startdate.Year;
                view = TimeView.Years;
                break;

            case 1:     //Months
                trkTimeSlider.Minimum = 0;
                trkTimeSlider.Maximum = (startdate.Year + enddate.Year) * 12;
                view = TimeView.Months;
                break;

            case 2:     //Days
                trkTimeSlider.Minimum = 0;
                trkTimeSlider.Maximum = (startdate.Year + enddate.Year) * 365;
                view = TimeView.Days;
                break;
            }
        }
        public void SetupWindow()
        {
            foreach (UIView view in Subviews) {
                view.RemoveFromSuperview ();
            }
            header = new WeekTopView (this);
            HeaderView = new UIView(header.Frame);
            HeaderView.AddSubview(header);
            UILabel alldayLabel = null;
            if(allDayView != null)
            {
                allDayView.Frame = allDayView.Frame.SetLocation(new PointF(0,HeaderView.Frame.Height));
                HeaderView.Frame = HeaderView.Frame.AddSize(0,allDayView.Frame.Height);
                header.Frame = HeaderView.Frame;
                HeaderView.AddSubview(allDayView);

                UIFont timeFont = UIFont.BoldSystemFontOfSize (consts.FONT_SIZE);
                //alldayLabel = new UILabel(new RectangleF(consts.HORIZONTAL_OFFSET,(allDayView.Frame.Height - consts.FONT_SIZE - 9f)/2 + allDayView.Frame.Y,50,consts.FONT_SIZE + 4f));
                //alldayLabel.Font = timeFont;
                //alldayLabel.TextColor = UIColor.Black;
                //alldayLabel.Text = "all-day";
                //alldayLabel.TextAlignment = UITextAlignment.Right;
            }

            rowHeader = new TimeView ();
            gridView = new GridLineView ();
            myScrollView = new ScrollViewWithHeader (Frame, HeaderView, rowHeader, gridView, true);

            AddSubview (myScrollView);
            if(alldayLabel != null)
                AddSubview(alldayLabel);
        }
Exemple #14
0
 private void Awake()
 {
     model = new TimeModel();
     view  = GetComponent <TimeView>();
 }
Exemple #15
0
 private void Start()
 {
     _inst = this;
     events.WaitTimeEnd            += StopTime;
     events.SkipTimeInLuckyNumbers += SkipTime;
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="optimizeAndEditPage">Parent page.</param>
        /// <param name="timeView">Time view.</param>
        public SelectionManager(OptimizeAndEditPage optimizeAndEditPage)
        {
            _optimizeAndEditPage = optimizeAndEditPage;
            _timeView = optimizeAndEditPage.TimeView;
            _mapView = optimizeAndEditPage.MapView;
            _ordersView = optimizeAndEditPage.OrdersView;
            _routesView = optimizeAndEditPage.RoutesView;

            // Set callback for checking selection possibility.
            _mapView.mapCtrl.CanSelectCallback = _CanSelect;

            _CreateCollectionsInMultiCollectionBinding();

            _InitEventHandlers();

            _selectionChanger = new SelectionChanger(_optimizeAndEditPage);
        }
Exemple #17
0
        void ReleaseDesignerOutlets()
        {
            if (AnimLogoImageView != null)
            {
                AnimLogoImageView.Dispose();
                AnimLogoImageView = null;
            }

            if (NameLabel != null)
            {
                NameLabel.Dispose();
                NameLabel = null;
            }

            if (TypeLabel != null)
            {
                TypeLabel.Dispose();
                TypeLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (LocationLabel != null)
            {
                LocationLabel.Dispose();
                LocationLabel = null;
            }

            if (StartButton != null)
            {
                StartButton.Dispose();
                StartButton = null;
            }

            if (Slider != null)
            {
                Slider.Dispose();
                Slider = null;
            }

            if (MapPlaceHolderView != null)
            {
                MapPlaceHolderView.Dispose();
                MapPlaceHolderView = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TimeView != null)
            {
                TimeView.Dispose();
                TimeView = null;
            }
        }
Exemple #18
0
 public TimeController CreateTimeController(TimeModel timeModel, TimeView timeView)
 {
     return(new TimeController(timeModel, timeView));
 }