Beispiel #1
0
        public ManualViewModel(IMapper mapper, Fanuc fanuc, ManualService mSrv)
        {
            this._fanuc  = fanuc;
            this._mapper = mapper;
            this._mSrv   = mSrv;

            _AddCmd    = new RelayCommand(OnAdd);
            _DeleteCmd = new RelayCommand(OnDelete);
            _OpenCmd   = new RelayCommand(OnOpen);

            Manuals = _mSrv.GetManuals();
            if (Manuals.Count != 0)
            {
                SelManual = Manuals.First();
            }
        }
Beispiel #2
0
        public void manual_should_be_added()
        {
            var domainName = Fixture.Create <DomainName>();
            var serviceId  = Fixture.Create <ServiceId>();
            var label      = Fixture.Create <ManualLabel>();
            var recordset  = new RecordSet(Fixture.CreateMany <Record>(10));

            var manualService = new ManualService(serviceId, label, recordset);

            Assert(new Scenario()
                   .Given(domainName, new DomainWasCreated(domainName))
                   .When(new AddManual(domainName, serviceId, label, recordset))
                   .Then(domainName,
                         new ManualWasAdded(domainName, serviceId, label, recordset),
                         new RecordSetWasUpdated(domainName, manualService.GetRecords())));
        }
Beispiel #3
0
        public ManualAddViewModel(IMapper mapper, Fanuc fanuc, ManualService mSrv)
        {
            this._fanuc  = fanuc;
            this._mapper = mapper;
            this._mSrv   = mSrv;

            CancelCmd  = new RelayCommand(OnCancelCmd);
            ConfirmCmd = new RelayCommand(OnConfirmCmd);

            Messenger.Default.Register <string>(this, "SetManualFilePathMsg", msg =>
            {
                System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog();
                if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK || file.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
                {
                    Manual.Path = System.IO.Path.GetFullPath(file.FileName);
                }
            });
        }
Beispiel #4
0
        public ManualWasAdded(
            DomainName domainName,
            ServiceId serviceId,
            ManualLabel label,
            RecordSet recordSet)
        {
            DomainName        = domainName;
            SecondLevelDomain = domainName.SecondLevelDomain;
            TopLevelDomain    = domainName.TopLevelDomain.Value;

            ServiceId = serviceId;

            Records = recordSet
                      .Select(r => new RecordData(r))
                      .ToArray();

            var service = new ManualService(serviceId, label, recordSet);

            ServiceType  = service.Type.Value;
            ServiceLabel = service.Label;
        }
Beispiel #5
0
 protected void GoToManualService() // Clicar no serviço manual
 {
     ImplicitWait();
     ManualService = Driver.FindElement(By.XPath("/html/body/aside/nav/div[2]/ul/li[8]/a"));
     ManualService.Click();
 }