Example #1
0
        public void AddUserAction()
        {
            NavigationParameters param = new NavigationParameters {
                { "request", new UserParameter(Mode.Add, null) }
            };

            _addUserView = _shellService.ShowShell(nameof(AddUserView), 450, 520, param);
            _eventAggregator.GetEvent <UserAddOrEditEvent>()
            .Subscribe(UserAddedEventHandler, ThreadOption.UIThread);
        }
        private void SelectCustomer(object obj)
        {
            CustomerMonitoringViewModel customerViewModel = obj as CustomerMonitoringViewModel;

            if (customerViewModel != null)
            {
                var parameters = new NavigationParameters();
                parameters.Add("Customer", customerViewModel._customer);
                _shellService.ShowShell("Monitoring", parameters);
            }
        }
Example #3
0
        public void AddDeviceAction()
        {
            NavigationParameters param;

            param = new NavigationParameters {
                { "request", new DeviceParameter(Mode.Add, null) }
            };

            _eventAggregator.GetEvent <DeviceAddedOrEditedEvent>().Subscribe(DeviceAddedEventHandler, ThreadOption.UIThread);
            _addDeviceView = _shellService.ShowShell(nameof(AddDeviceView), 450, 520, param);
            //todo change
            SelectedDevice = null;
        }
        public void PutWorkItemTypeExecute()
        {
            Int64 startTicks = Log.EVENT("Enter", Common.LOG_CATEGORY);

            // TODO(crhodes)
            // What do we want to happen here?
            // Let's start with creating a new window and loading a UI that will serve two purposes
            // 1. Create new WorkItems
            // 2. Update existing WorkItem

            _shellService.ShowShell();


            //DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_V1_Modal_Host,
            //    "MVVM View First (View is passed ViewModel) Modal",
            //    600, 450,
            //    //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT,
            //    DxThemedWindowHost.ShowWindowMode.Modal,  Container. new CreateWorkItemMain());

            //EventAggregator.GetEvent<Core.Events.WorkItemTracking.GetArtifactLinkTypesEvent>().Publish(
            //    new Core.Events.WorkItemTracking.GetArtifactLinkTypesEventArgs()
            //    {
            //        Organization = _collectionMainViewModel.SelectedCollection.Organization,
            //        Project = _contextMainViewModel.Context.SelectedProject
            //    });

            Log.EVENT("Exit", Common.LOG_CATEGORY, startTicks);
        }
Example #5
0
        public void SendResponseAction()
        {
            NavigationParameters param;

            param = new NavigationParameters {
                { "request", SelectedRequest.GetId() }
            };
            _eventAggregator.GetEvent <SendResponseEvent>().Subscribe(SendResponseHandler, ThreadOption.UIThread);

            _sendResponseView = _shellService.ShowShell(nameof(SendResponseView), 450, 400, param);
        }
        private void LocateAlarm(object obj)
        {
            var info = obj as AlarmInfo;

            if (info == null)
            {
                return;
            }
            var principal    = Thread.CurrentPrincipal as SystemPrincipal;
            var agentId      = principal.Identity.Id;
            var customerList = _customerService.GetCustomersBy(agentId);
            var parameters   = new NavigationParameters();
            var customer     = customerList.FirstOrDefault(c => c.Id == info.CustomerId);

            if (customer == null)
            {
                Logger.Log($"告警定位时,该客户(id={info.CustomerId})不存在!", Category.Warn, Priority.High);
                throw new Exception($"该客户(id={info.CustomerId})不存在!");
            }
            parameters.Add("Customer", customer);
            _shellService.ShowShell("Monitoring", parameters);
            //_regionManager.RequestNavigate(KnownRegionNames.MainRegion, "Monitoring", parameters);
        }
Example #7
0
 private void OpenShell(string viewName)
 {
     _shellService.ShowShell(viewName, null);
 }
Example #8
0
 void OpenShell(string viewName)
 {
     _service.ShowShell(viewName);
 }
 private void OpenShell(string viewName) => _service.ShowShell(viewName);
Example #10
0
 public void OpenDeviceListViewAction()
 {
     _shellService.ShowShell(nameof(DeviceListView));
 }
 private void ExecuteShowShellCommand()
 {
     shellService.ShowShell <MainWindow>();
 }