public void Initialize(HiClockRoot aRoot) { FRoot = aRoot; this.AddWeakEventListener(FRoot, FRoot_PropChanged); FShellService.Value.ShellContent = FHiClockMainViewModel.Value.View; FHiClockMainViewModel.Value.AboutView = FAboutViewModel.Value.View; FHiClockMainViewModel.Value.ExitSettingCommand = FExitSettingCommand; FHiClockMainViewModel.Value.SetAutoStartCommand = FSetAutoStartCommand; FHiClockMainViewModel.Value.CurrentVersion = GetVersion(); FHiClockMainViewModel.Value.Root = aRoot; FAboutViewModel.Value.CurrentVersion = GetVersion(); }
public void Update(HiClockRoot aRoot) { if (aRoot != null) { if (aRoot.AlarmFrequencyList.HasElement()) { this.AlarmFrequencyList.AddRange(aRoot.AlarmFrequencyList); } this.SelectedFrequency = aRoot.SelectedFrequency; if (aRoot.DurationList.HasElement()) { this.DurationList.AddRange(aRoot.DurationList); } this.SelectedDuration = aRoot.SelectedDuration; this.TurnOnRadio = aRoot.TurnOnRadio; this.RadioUri = aRoot.RadioUri; this.ImageLocation = aRoot.ImageLocation; this.CurrentImageIndex = aRoot.CurrentImageIndex; if (aRoot.RefreshFrequencyList.HasElement()) { this.RefreshFrequencyList.AddRange(aRoot.RefreshFrequencyList); } this.RefreshScreenFrequency = aRoot.RefreshScreenFrequency; this.IsAutoStart = aRoot.IsAutoStart; } }
public ModuleController(CompositionContainer aContainer) { FContainer = aContainer; FRoot = new HiClockRoot(); FMainController = FContainer.GetExportedValue<HiClockMainController>(); }