public async Task <Result> Initialize(IDeviceFragment deviceFragment)
        {
            if (deviceFragment is IGraphicalMenu graphicalMenu)
            {
                DisplayHeight = graphicalMenu.DisplayHeight;
                DisplayWidth  = graphicalMenu.DisplayWidth;
                CellHeight    = graphicalMenu.CellHeight;
                CellWidth     = graphicalMenu.CellWidth;
                GraphicalMenuSlotViewModels.Clear();
                var heightInSlots = DisplayHeight / CellHeight;
                var widthInSlots  = DisplayWidth / CellWidth;
                GraphicalMenuSlotViewModelsArray = new GraphicalMenuSlotViewModel[heightInSlots][];

                for (int i = 0; i < heightInSlots; i++)
                {
                    GraphicalMenuSlotViewModelsArray[i] = new GraphicalMenuSlotViewModel[widthInSlots];
                    for (int j = 0; j < widthInSlots; j++)
                    {
                        var element = new GraphicalMenuSlotViewModel(i, j);
                        GraphicalMenuSlotViewModels.Add(element);
                        GraphicalMenuSlotViewModelsArray[i][j] = element;
                    }
                }
            }
            return(Result.Create(true));
        }
예제 #2
0
 public async Task <Result> Initialize(IDeviceFragment deviceFragment)
 {
     this._oscilloscopeModel = deviceFragment as IOscilloscopeModel;
     this.OscilloscopeJournalViewModel.Initialize(this._oscilloscopeModel.OscilloscopeJournal);
     this.OscilloscopeJournalViewModel.SetParentOscilloscopeModel(this._oscilloscopeModel, this);
     return(Result.Create(true));
 }
예제 #3
0
        public async Task <Result> Initialize(IDeviceFragment deviceFragment)
        {
            IUniconJournal uniconJournal = deviceFragment as IUniconJournal;

            _uniconJournal            = uniconJournal;
            JournalParametersNameList = new List <string>();
            foreach (IJournalParameter journalParameter in uniconJournal.RecordTemplate.JournalParameters)
            {
                if (journalParameter is IComplexJournalParameter)
                {
                    foreach (ISubJournalParameter subJournalParameter in (journalParameter as IComplexJournalParameter)
                             .ChildJournalParameters)
                    {
                        JournalParametersNameList.Add(subJournalParameter.Name);
                    }
                }
                else
                {
                    JournalParametersNameList.Add(journalParameter.Name);
                }
            }

            Table = new DynamicDataTable(JournalParametersNameList, null, true);
            RaisePropertyChanged(nameof(Table));
            RaisePropertyChanged(nameof(JournalParametersNameList));
            return(Result.Create(true));
        }
예제 #4
0
 public async Task <Result> Initialize(IDeviceFragment deviceFragment)
 {
     if (deviceFragment is IFileBrowser fileBrouser)
     {
         _fileBrowser = fileBrouser;
     }
     return(Result.Create(true));
 }
        public IFragmentEditorViewModel CreateFragmentEditorViewModel(IDeviceFragment deviceFragment)
        {
            IFragmentEditorViewModel fragmentEditorViewModel = _container.Resolve <IFragmentEditorViewModel>(deviceFragment.StrongName +
                                                                                                             ApplicationGlobalNames.CommonInjectionStrings.EDITOR_VIEWMODEL);

            fragmentEditorViewModel.Initialize(deviceFragment);
            return(fragmentEditorViewModel);
        }
예제 #6
0
        public async Task <Result> Initialize(IDeviceFragment deviceFragment)
        {
            this._oscilloscopeModel = deviceFragment as IOscilloscopeModel;
            this.OscilloscopeJournalEditorViewModel = this._fragmentEditorViewModelFactory.CreateFragmentEditorViewModel(this._oscilloscopeModel.OscilloscopeJournal) as IUniconJournalEditorViewModel;
            this.OscillogramLoadingParametersEditorViewModel.Model = this._oscilloscopeModel.OscillogramLoadingParameters;
            this.OscillogramLoadingParametersEditorViewModel.SetAvailableParameters(this._oscilloscopeModel.OscilloscopeJournal.RecordTemplate.JournalParameters);

            this.CountingTemplateEditorViewModel.Model = this._oscilloscopeModel.CountingTemplate.RecordTemplate;
            return(Result.Create(true));
        }
 public async Task <Result> Initialize(IDeviceFragment deviceFragment)
 {
     if (deviceFragment is IGraphicalMenu graphicalMenu)
     {
         DisplayHeight = graphicalMenu.DisplayHeight;
         DisplayWidth  = graphicalMenu.DisplayWidth;
         CellHeight    = graphicalMenu.CellHeight;
         CellWidth     = graphicalMenu.CellWidth;
     }
     return(Result.Create(true));
 }
        public async Task <Result> Initialize(IDeviceFragment deviceFragment)
        {
            IUniconJournal settingJournal = deviceFragment as IUniconJournal;

            if (deviceFragment == null)
            {
                return(Result.Create(false));
            }
            this._uniconJournal = settingJournal;
            this.Name           = settingJournal.Name;
            this.JournalRecordTemplateEditorViewModel.Model = this._uniconJournal.RecordTemplate;
            if (this._uniconJournal.JournalLoadingSequence != null)
            {
                this.SelectedJournalLoadingSequenceEditorViewModel = this.JournalLoadingSequenceEditorViewModels
                                                                     .First((model => model.StrongName.Contains(this._uniconJournal.JournalLoadingSequence.StrongName)));
                this.SelectedJournalLoadingSequenceEditorViewModel.Model = this._uniconJournal.JournalLoadingSequence;
            }
            return(Result.Create(true));
        }
예제 #9
0
 public async Task <Result> Initialize(IDeviceFragment deviceFragment)
 {
     return(Result.Create(true));
 }
예제 #10
0
 public async Task <Result> Initialize(IDeviceFragment deviceFragment)
 {
     Model = deviceFragment as IFileBrowser;
     return(Result.Create(true));
 }