예제 #1
0
		public NotificationManager(ISettingsController aSettingsController){
			theCouchClient = new CouchClient(aSettingsController.Host, aSettingsController.Port, aSettingsController.Username, aSettingsController.Password);
			theCouchDatabase = theCouchClient.GetDatabase(aSettingsController.DatabaseName);
			theOptions = new ChangeOptions();
			theOptions.Heartbeat = 10000;
			theOptions.Since = GetSequence();
		}
 public SuspensionVelocityHistogramProvider(SuspensionVelocityHistogramDataExtractor suspensionVelocityHistogramDataExtractor, ILoadedLapsCache loadedLapsCache, IViewModelFactory viewModelFactory, SuspensionVelocityFilter suspensionVelocityFilter, ISettingsController settingsController)
     : base(suspensionVelocityHistogramDataExtractor, loadedLapsCache, viewModelFactory, new [] { suspensionVelocityFilter })
 {
     _suspensionVelocityHistogramDataExtractor = suspensionVelocityHistogramDataExtractor;
     _suspensionVelocityFilter = suspensionVelocityFilter;
     _settingsController       = settingsController;
 }
        /*--------------------------------------------------------------------------------------------*/
        public void SetRectLayout(float pSizeX, float pSizeY, ISettingsController pController)
        {
            Controllers.Set(OuterRadiusName, pController);

            OuterRadius = Mathf.Min(pSizeX, pSizeY) / 2;
            vRectSize   = new Vector2(pSizeX, pSizeY);
        }
예제 #4
0
        public SettingsWindow(
            CefBrowserHandler cefBrowserHandler,
            TooltipHelper tooltipHelper,
            Action itemViewUpdateTrigger,
            IPlayerItemDao playerItemDao,
            GDTransferFile[] modFilter,
            TransferStashService transferStashService,
            LanguagePackPicker languagePackPicker,
            SettingsService settings, GrimDawnDetector grimDawnDetector)
        {
            InitializeComponent();
            _controller                 = new SettingsController(settings);
            this._cefBrowserHandler     = cefBrowserHandler;
            this._tooltipHelper         = tooltipHelper;
            this._itemViewUpdateTrigger = itemViewUpdateTrigger;
            this._playerItemDao         = playerItemDao;
            this._modFilter             = modFilter;
            this._transferStashService  = transferStashService;
            _languagePackPicker         = languagePackPicker;
            _settings         = settings;
            _grimDawnDetector = grimDawnDetector;

            _controller.BindCheckbox(cbMinimizeToTray);

            _controller.BindCheckbox(cbMergeDuplicates);
            _controller.BindCheckbox(cbTransferAnyMod);
            _controller.BindCheckbox(cbSecureTransfers);
            _controller.BindCheckbox(cbShowRecipesAsItems);
            _controller.BindCheckbox(cbAutoUpdateModSettings);
            _controller.BindCheckbox(cbDisplaySkills);
            _controller.LoadDefaults();
        }
예제 #5
0
 public SettingsWindowController(IMainWindowViewModel mainWindowViewModel, IViewModelFactory viewModelFactory, ISettingsController settingsController)
 {
     _settingsController      = settingsController;
     _settingsWindowViewModel = viewModelFactory.Create <ISettingsWindowViewModel>();
     mainWindowViewModel.LapSelectionViewModel.SettingsWindowViewModel = _settingsWindowViewModel;
     BindCommands();
 }
예제 #6
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void DrawLinkIcon(Object pSelf, ISettingsController pControl, Rect pPropertyRect)
        {
            bool isSelf = ((pControl as Object) == pSelf);

            Rect iconRect = pPropertyRect;

            iconRect.x     -= 26;
            iconRect.y     += 1;
            iconRect.width  = 40;
            iconRect.height = 16;

            GUIContent labelContent = new GUIContent();

            labelContent.image   = ControlIconTex;
            labelContent.tooltip = "Controlled by " + (isSelf ? "this component" :
                                                       pControl.GetType().Name + " in \"" + pControl.name + "\"");

            GUIStyle labelStyle = new GUIStyle();

            labelStyle.imagePosition    = ImagePosition.ImageOnly;
            labelStyle.clipping         = TextClipping.Clip;
            labelStyle.padding          = new RectOffset(15, 0, 0, 0);
            labelStyle.stretchWidth     = true;
            labelStyle.stretchHeight    = true;
            labelStyle.hover.background = ControlIconHoverTex;

            bool shouldPing = EditorGUI.ToggleLeft(iconRect, labelContent, false, labelStyle);

            if (shouldPing)
            {
                EditorGUIUtility.PingObject((Object)pControl);
            }
        }
        /*--------------------------------------------------------------------------------------------*/
        public void SetRectLayout(float pSizeX, float pSizeY, ISettingsController pController)
        {
            Controllers.Set(OuterRadiusName, pController);

            OuterRadius = Mathf.Min(pSizeX, pSizeY)/2;
            vRectSize = new Vector2(pSizeX, pSizeY);
        }
 public CamberHistogramProvider(CamberHistogramExtractor camberHistogramExtractor, ILoadedLapsCache loadedLapsCache, IViewModelFactory viewModelFactory, LoadedWheelFilter loadedWheelFilter, CamberFilter camberFilter, ISettingsController settingsController) : base(camberHistogramExtractor, loadedLapsCache, viewModelFactory, new IWheelTelemetryFilter[] { loadedWheelFilter, camberFilter })
 {
     _camberHistogramExtractor = camberHistogramExtractor;
     _loadedWheelFilter        = loadedWheelFilter;
     _camberFilter             = camberFilter;
     _settingsController       = settingsController;
 }
예제 #9
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void SetRectLayout(float pSizeX, float pSizeY, ISettingsController pController)
        {
            Controllers.Set(SizeXName, pController);
            Controllers.Set(SizeYName, pController);

            SizeX = pSizeX;
            SizeY = pSizeY;
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void SetRectLayout(float pSizeX, float pSizeY, ISettingsController pController)
        {
            Controllers.Set(SizeXName, pController);
            Controllers.Set(SizeYName, pController);

            SizeX = pSizeX;
            SizeY = pSizeY;
        }
예제 #11
0
 public SettingsViewModel(ISettingsController settingsController, IGlobalVariables globalVariables, ITweetObserver observer)
 {
     GlobalVariables    = globalVariables;
     _observer          = observer;
     Settings           = settingsController.Settings;
     SettingsController = settingsController;
     LogoutCommand      = new ActionCommand(async() => await Logout());
 }
예제 #12
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void SetRectLayout(float pSizeX, float pSizeY, ISettingsController pController)
        {
            Controllers.Set(SizeXName, pController);
            Controllers.Set(SizeYName, pController);

            SizeX = (FlipLayoutDimensions ? pSizeY : pSizeX);
            SizeY = (FlipLayoutDimensions ? pSizeX : pSizeY);
        }
 private EnvironmentContainer()
 {
     UpTime = DateTime.Now;
     CurrentEventManager         = new EventAggregator();
     _calculateHashsumController = new CalculateHash();
     _saveHashToFileController   = new SaveHashToFile();
     _settingsController         = new SettingsController();
 }
예제 #14
0
        /*--------------------------------------------------------------------------------------------*/
        public bool IsControlled(string pValueName)
        {
            ISettingsController cont = Get(pValueName);

            //Debug.Log(" ============ "+pValueName+" = "+
            //	cont+" / "+(cont == null ? "---" : cont.isActiveAndEnabled+""));
            return(cont != null && cont.isActiveAndEnabled);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public override void TreeUpdate()
        {
            UpdateControl();
            UpdateGeneralSettings();

            RendererController = null;
            SliderController = null;
            Controllers.TryExpireControllers();
        }
예제 #16
0
        public SettingsCommandSet(ISettingsController logic)
        {
            _logic = logic;

            AddCommand(MakeGetSectionIdsCommand());
            AddCommand(MakeGetSectionsCommand());
            AddCommand(MakeGetSectionByIdCommand());
            AddCommand(MakeSetSectionCommand());
            AddCommand(MakeModifySectionCommand());
        }
예제 #17
0
 protected AbstractGraphPanelController(IMainWindowViewModel mainWindowViewModel, ITelemetryViewsSynchronization telemetryViewsSynchronization, ILapColorSynchronization lapColorSynchronization, ISettingsProvider settingsProvider,
                                        IGraphViewSynchronization graphViewSynchronization, ISettingsController telemetrySettings)
 {
     MainWindowViewModel            = mainWindowViewModel;
     _telemetryViewsSynchronization = telemetryViewsSynchronization;
     _lapColorSynchronization       = lapColorSynchronization;
     _settingsProvider         = settingsProvider;
     _graphViewSynchronization = graphViewSynchronization;
     _telemetrySettings        = telemetrySettings;
     _loadedLaps = new List <LapTelemetryDto>();
 }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void SetArcLayout(float pOuterRadius, float pInnerRadius, 
													float pArcAngle, ISettingsController pController)
        {
            Controllers.Set(OuterRadiusName, pController);
            Controllers.Set(InnerRadiusName, pController);
            Controllers.Set(ArcAngleName, pController);

            OuterRadius = pOuterRadius;
            InnerRadius = pInnerRadius;
            ArcAngle = pArcAngle;
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void SetArcLayout(float pOuterRadius, float pInnerRadius,
                                 float pArcDegrees, ISettingsController pController)
        {
            Controllers.Set(OuterRadiusName, pController);
            Controllers.Set(InnerRadiusName, pController);
            Controllers.Set(ArcDegreesName, pController);

            OuterRadius = pOuterRadius;
            InnerRadius = pInnerRadius;
            ArcDegrees  = pArcDegrees;
        }
 public SettingsForm(IStringResources stringResources, ISettingsController settingsController,
                     IGoogleDriveClient googleDriveClient, IFormLogger logger, ILocalizableForm mainForm,
                     ITelegramClientWrapper telegramClientWrapper)
 {
     this.stringResources       = stringResources;
     this.settingsController    = settingsController;
     this.googleDriveClient     = googleDriveClient;
     this.logger                = logger;
     this.mainForm              = mainForm;
     this.telegramClientWrapper = telegramClientWrapper;
     InitializeComponent();
 }
 public AggregatedChartsController(IEnumerable <IAggregatedChartProvider> aggregatedChartProviders, IMainWindowViewModel mainWindowViewModel, ILoadedLapsCache loadedLapsCache, IWindowService windowService, IViewModelFactory viewModelFactory,
                                   ITelemetryViewsSynchronization telemetryViewsSynchronization, ISettingsController settingsController)
 {
     _loadedLapsCache  = loadedLapsCache;
     _windowService    = windowService;
     _viewModelFactory = viewModelFactory;
     _telemetryViewsSynchronization = telemetryViewsSynchronization;
     _settingsController            = settingsController;
     _mainWindowViewModel           = mainWindowViewModel;
     _loadedLapsCache          = loadedLapsCache;
     _aggregatedChartProviders = aggregatedChartProviders.ToList();
 }
예제 #22
0
        public TweetObserver(ISettingsController settingsController, ITweetProcessor tweetProcessor, IGlobalVariables globalVariables)
        {
            Stream = Tweetinvi.Stream.CreateFilteredStream();
            _settingsController = settingsController;
            _tweetProcessor     = tweetProcessor;
            _globalVariables    = globalVariables;

            Stream.MatchingTweetReceived     += (sender, args) => StreamOnMatchingTweetReceived(args, _addTweet);
            Stream.NonMatchingTweetReceived  += (sender, args) => StreamOnNonMatchingTweetReceived(args, _addTweet);
            Stream.StreamStopped             += StreamOnStreamStopped;
            Stream.DisconnectMessageReceived += StreamOnDisconnectMessageReceived;
        }
예제 #23
0
        public SettingsViewModel(ISettingsController controller)
        {
            _controller = controller;
            Setting     = _controller.LoadSettings().GetAwaiter().GetResult() ?? new Setting();
            Themes      = new ObservableCollection <Theme>(_controller.LoadThemes().GetAwaiter().GetResult());
            var hasDark  = false;
            var hasLight = false;

            foreach (var theme in Themes)
            {
                switch (theme.Name)
                {
                case "Dark":
                    hasDark = true;
                    break;

                case "Light":
                    hasLight = true;
                    break;
                }
            }

            if (!hasDark)
            {
                Themes.Add(new Theme
                {
                    Id         = Guid.NewGuid().ToString("N"),
                    Name       = "Dark",
                    Hover      = new SolidColorBrush(Color.FromRgb(76, 76, 76)),
                    Background = new SolidColorBrush(Color.FromRgb(24, 26, 27)),
                    Foreground = new SolidColorBrush(Color.FromRgb(232, 230, 227)),
                    DarkIcons  = true
                });
            }
            if (!hasLight)
            {
                Themes.Add(new Theme
                {
                    Id         = Guid.NewGuid().ToString("N"),
                    Name       = "Light",
                    Hover      = new SolidColorBrush(Color.FromRgb(76, 76, 76)),
                    Background = new SolidColorBrush(Color.FromRgb(244, 244, 244)),
                    Foreground = new SolidColorBrush(Color.FromRgb(0, 0, 0)),
                    DarkIcons  = false
                });
            }
            if (!hasLight || !hasDark)
            {
                SaveThemes();
            }
        }
        /*--------------------------------------------------------------------------------------------*/
        public bool Unset(string pValueName, ISettingsController pController)
        {
            if ( !Application.isEditor ) {
                return false;
            }

            if ( vMap.ContainsKey(pValueName) && vMap[pValueName].Controller == pController ) {
                vMap.Remove(pValueName);
                vKeys.Remove(pValueName);
                return true;
            }

            return false;
        }
        public StringResources(ISettingsController settingsController)
        {
            this.settingsController = settingsController;
            if (settingsController.Language == SupportedLanguages.Russian || Equals(Thread.CurrentThread.CurrentUICulture, new CultureInfo("ru-RU")))
            {
                settingsController.Language = SupportedLanguages.Russian;
            }
            else
            {
                settingsController.Language = SupportedLanguages.English;
            }

            RefreshResources();
        }
        public ControllerFactory(ISettingsController settingsController, ITweetObserver tweetObserver,
                                 IRaidsController raidsController, IRaidlistController raidlistController,
                                 IBlacklistController blacklistController)
        {
            GetSettingsController  = settingsController;
            GetTweetObserver       = tweetObserver;
            GetRaidsController     = raidsController;
            GetRaidlistController  = raidlistController;
            GetBlacklistController = blacklistController;

            GetSettingsController.Load();
            GetRaidsController.Load();
            GetBlacklistController.Load();
            GetRaidlistController.Load();
        }
예제 #27
0
 public MainForm(IStringResources stringResources, IGoogleDriveClient googleDriveClient,
                 ISettingsController settingsController,
                 IMotionController motionController, IFormLogger logger,
                 ITelegramClientWrapper telegramClientWrapper)
 {
     InitializeComponent();
     Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
     this.googleDriveClient     = googleDriveClient;
     this.settingsController    = settingsController;
     this.motionController      = motionController;
     this.logger                = logger;
     this.telegramClientWrapper = telegramClientWrapper;
     this.stringResources       = stringResources;
     logger.InitForm(this);
 }
예제 #28
0
        /*--------------------------------------------------------------------------------------------*/
        public bool Unset(string pValueName, ISettingsController pController)
        {
            if (!Application.isEditor)
            {
                return(false);
            }

            if (vMap.ContainsKey(pValueName) && vMap[pValueName].Controller == pController)
            {
                vMap.Remove(pValueName);
                vKeys.Remove(pValueName);
                return(true);
            }

            return(false);
        }
예제 #29
0
		public ConverterFactory(ISettingsController aSettingsController)
		{
			IConverter musicXmlToLilypound = new Converter(aSettingsController.ToLyCommand, aSettingsController.ToLyArgs, aSettingsController.ToLyExpectedFile);
			IConverter lilypoundToPdf = new PDFConverter(aSettingsController.LilyPondCommand, aSettingsController.ToPdfArgs, aSettingsController.ToPdfExpectedFile);
			IConverter lilypoundToPostscript = new MusicXmlToPsConverter(aSettingsController.LilyPondCommand);
			IConverter postcriptToPng = new Converter(aSettingsController.ToPngCommand, aSettingsController.ToPngArgs, aSettingsController.ToPngExpectedFile);
			IConverter musicXmlToPostscript = new CombinedConverter(musicXmlToLilypound, lilypoundToPostscript);
			IConverter musicXmlToPng = new CombinedConverter(musicXmlToPostscript, postcriptToPng);
			IConverter musicXmlToPdf = new CombinedConverter(musicXmlToLilypound, lilypoundToPdf);
			IConverter lilypoundToMidi = new MIDIConverter(aSettingsController.LilyPondCommand, aSettingsController.ToMidiArgs, aSettingsController.ToMidiExpectedFile);
			IConverter musicXmlToMidi = new CombinedConverter(musicXmlToLilypound, lilypoundToMidi);
			theConverters.Add(Constants.LilyPond, musicXmlToLilypound);
			theConverters.Add(MimeType.PDF, musicXmlToPdf);
			theConverters.Add(MimeType.PNG, musicXmlToPng);
			theConverters.Add(Constants.Midi, musicXmlToMidi);
		}
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Set(string pValueName, ISettingsController pController, int pExpirationCount=1)
        {
            if ( !Application.isEditor ) {
                return;
            }

            var expCont = new ExpirableController();
            expCont.Controller = pController;
            expCont.ExpireCount = pExpirationCount;

            if ( vMap.ContainsKey(pValueName) ) {
                vMap[pValueName] = expCont;
            }
            else {
                vMap.Add(pValueName, expCont);
                vKeys.Add(pValueName);
            }
        }
        public TelegramController(ISettingsController settingsController, MonthModelController monthController)
        {
            this.monthController    = monthController;
            this.settingsController = settingsController;

            String apiKey = this.settingsController.Settings.TelegramApiKey;

            /* This checks and tries the given api key. If not valid,
             * it won't call the api. */
            if (!String.IsNullOrEmpty(apiKey))
            {
                this.bot         = new TelegramBotClient(apiKey);
                this.IsConnected = bot.TestApiAsync().Result;
            }
            else
            {
                this.IsConnected = false;
            }
        }
예제 #32
0
        public MainWindowController(ISettingsProvider settingsProvider, ITelemetryLoadController telemetryLoadController, ILapPickerController lapPickerController, IViewModelFactory viewModelFactory, IMainWindowViewModel mainWindowViewModel,
                                    ISnapshotSectionController snapshotSectionController, IMapViewController mapViewController, ITelemetryViewsSynchronization telemetryViewsSynchronization, IGraphPanelController[] graphPanelControllers, IAggregatedChartsController aggregatedChartsController, ISettingsController settingsController)
        {
            _settingsProvider              = settingsProvider;
            _telemetryLoadController       = telemetryLoadController;
            _lapPickerController           = lapPickerController;
            _viewModelFactory              = viewModelFactory;
            _mainWindowViewModel           = mainWindowViewModel;
            _snapshotSectionController     = snapshotSectionController;
            _mapViewController             = mapViewController;
            _telemetryViewsSynchronization = telemetryViewsSynchronization;
            _aggregatedChartsController    = aggregatedChartsController;
            _settingsController            = settingsController;

            _leftGraphPanelController  = graphPanelControllers.First(x => x.IsLetPanel);
            _rightGraphPanelController = graphPanelControllers.First(x => !x.IsLetPanel);

            _snapshotSectionController.MainWindowViewModel = _mainWindowViewModel;
            _mapViewController.MapViewViewModel            = _mainWindowViewModel.MapViewViewModel;
        }
예제 #33
0
        public SettingsWindow(
            CefBrowserHandler cefBrowserHandler,
            TooltipHelper tooltipHelper,
            Action itemViewUpdateTrigger,
            IPlayerItemDao playerItemDao,
            GDTransferFile[] modFilter,
            TransferStashService transferStashService,
            TransferStashService2 transferStashService2,
            LanguagePackPicker languagePackPicker,
            SettingsService settings, GrimDawnDetector grimDawnDetector, DarkMode darkModeToggler, AutomaticUpdateChecker automaticUpdateChecker)
        {
            InitializeComponent();
            _controller                 = new SettingsController(settings);
            this._cefBrowserHandler     = cefBrowserHandler;
            this._tooltipHelper         = tooltipHelper;
            this._itemViewUpdateTrigger = itemViewUpdateTrigger;
            this._playerItemDao         = playerItemDao;
            this._modFilter             = modFilter;
            this._transferStashService  = transferStashService;
            this._transferStashService2 = transferStashService2;
            _languagePackPicker         = languagePackPicker;
            _settings               = settings;
            _grimDawnDetector       = grimDawnDetector;
            _darkModeToggler        = darkModeToggler;
            _automaticUpdateChecker = automaticUpdateChecker;

            _controller.BindCheckbox(cbMinimizeToTray);

            _controller.BindCheckbox(cbTransferAnyMod);
            _controller.BindCheckbox(cbSecureTransfers);
            _controller.BindCheckbox(cbShowRecipesAsItems);
            _controller.BindCheckbox(cbHideSkills);
            _controller.LoadDefaults();

            // TODO: Write out the settingscontroller and add logic for updating showskills config

            linkCheckForUpdates.Visible = Environment.Is64BitOperatingSystem;
            pbAutomaticUpdates.Visible  = Environment.Is64BitOperatingSystem;
        }
 public MotionController(IStringResources stringResources, IFormLogger logger,
                         IGoogleDriveClient googleDriveClient,
                         ISettingsController settingsController,
                         ITelegramClientWrapper telegramClientWrapper)
 {
     this.stringResources       = stringResources;
     this.logger                = logger;
     this.googleDriveClient     = googleDriveClient;
     this.settingsController    = settingsController;
     this.telegramClientWrapper = telegramClientWrapper;
     DevicesList                = new List <string>();
     detector = new MotionDetector(
         new TwoFramesDifferenceDetector(),
         null);
     videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
     for (var i = 0; i < videoDevices.Count; i++)
     {
         DevicesList.Add(videoDevices[i].Name);
     }
     StartGoogleDriveSending();
     IsActive = false;
 }
예제 #35
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Set(string pValueName, ISettingsController pController, int pExpirationCount = 1)
        {
            if (!Application.isEditor)
            {
                return;
            }

            ExpirableController expCont;

            if (vMap.ContainsKey(pValueName))
            {
                expCont = vMap[pValueName];
            }
            else
            {
                expCont = new ExpirableController();
                vMap.Add(pValueName, expCont);
                vKeys.Add(pValueName);
            }

            expCont.Controller  = pController;
            expCont.ExpireCount = pExpirationCount;
        }
        public ApplicationController(Lazy<ShellViewModel> shellViewModelLazy,
            Lazy<SettingsViewModel> settingsViewModelLazy,
            Lazy<AboutViewModel> aboutViewModelLazy, Lazy<HelpViewModel> helpViewModelLazy,
            Lazy<LogViewModel> logViewModelLazy,
            Lazy<ShellService> shellServiceLazy, CompositionContainer compositionContainer,
            Lazy<IAccountAuthenticationService> accountAuthenticationServiceLazy,
            IShellController shellController,
            ISettingsController settingsController,
            Lazy<SystemTrayNotifierViewModel> lazySystemTrayNotifierViewModel,
            IGuiInteractionService guiInteractionService, ILogController logController)
        {
            //ViewModels
            _shellViewModel = shellViewModelLazy.Value;
            _settingsViewModel = settingsViewModelLazy.Value;
            _aboutViewModel = aboutViewModelLazy.Value;
            _helpViewModel = helpViewModelLazy.Value;
            _logViewModel = logViewModelLazy.Value;
            _systemTrayNotifierViewModel = lazySystemTrayNotifierViewModel.Value;
            //Commands
            _shellViewModel.Closing += ShellViewModelClosing;
            _exitCommand = new DelegateCommand(Close);

            //Services
            AccountAuthenticationService = accountAuthenticationServiceLazy.Value;

            _shellService = shellServiceLazy.Value;
            _shellService.ShellView = _shellViewModel.View;
            _shellService.SettingsView = _settingsViewModel.View;
            _shellService.AboutView = _aboutViewModel.View;
            _shellService.HelpView = _helpViewModel.View;
            _shellService.LogView = _logViewModel.View;
            _shellController = shellController;
            _settingsController = settingsController;
            _guiInteractionService = guiInteractionService;
            _logController = logController;
        }
예제 #37
0
        public ApplicationController(Lazy <ShellViewModel> shellViewModelLazy,
                                     Lazy <SettingsViewModel> settingsViewModelLazy,
                                     Lazy <AboutViewModel> aboutViewModelLazy, Lazy <HelpViewModel> helpViewModelLazy,
                                     Lazy <LogViewModel> logViewModelLazy,
                                     Lazy <ShellService> shellServiceLazy, CompositionContainer compositionContainer,
                                     Lazy <IAccountAuthenticationService> accountAuthenticationServiceLazy,
                                     IShellController shellController,
                                     ISettingsController settingsController,
                                     Lazy <SystemTrayNotifierViewModel> lazySystemTrayNotifierViewModel,
                                     IGuiInteractionService guiInteractionService, ILogController logController)
        {
            //ViewModels
            _shellViewModel              = shellViewModelLazy.Value;
            _settingsViewModel           = settingsViewModelLazy.Value;
            _aboutViewModel              = aboutViewModelLazy.Value;
            _helpViewModel               = helpViewModelLazy.Value;
            _logViewModel                = logViewModelLazy.Value;
            _systemTrayNotifierViewModel = lazySystemTrayNotifierViewModel.Value;
            //Commands
            _shellViewModel.Closing += ShellViewModelClosing;
            _exitCommand             = new DelegateCommand(Close);

            //Services
            AccountAuthenticationService = accountAuthenticationServiceLazy.Value;

            _shellService              = shellServiceLazy.Value;
            _shellService.ShellView    = _shellViewModel.View;
            _shellService.SettingsView = _settingsViewModel.View;
            _shellService.AboutView    = _aboutViewModel.View;
            _shellService.HelpView     = _helpViewModel.View;
            _shellService.LogView      = _logViewModel.View;
            _shellController           = shellController;
            _settingsController        = settingsController;
            _guiInteractionService     = guiInteractionService;
            _logController             = logController;
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void DrawLinkIcon(Object pSelf, ISettingsController pControl, Rect pPropertyRect)
        {
            bool isSelf = ((pControl as Object) == pSelf);

            Rect iconRect = pPropertyRect;
            iconRect.x -= 26;
            iconRect.y += 1;
            iconRect.width = 40;
            iconRect.height = 40;

            GUIContent labelContent = new GUIContent();
            labelContent.image = ControlIconTex;
            labelContent.tooltip = "Controlled by "+(isSelf ? "this component" :
                pControl.GetType().Name+" in \""+pControl.name+"\"");

            GUIStyle labelStyle = new GUIStyle();
            labelStyle.imagePosition = ImagePosition.ImageOnly;
            labelStyle.clipping = TextClipping.Clip;
            labelStyle.padding = new RectOffset(15, 0, 0, 0);
            labelStyle.stretchWidth = true;
            labelStyle.stretchHeight = true;

            bool shouldPing = EditorGUI.ToggleLeft(iconRect, labelContent, false, labelStyle);

            if ( shouldPing ) {
                EditorGUIUtility.PingObject((Object)pControl);
            }
        }
 public StoredGraphsSettingsProvider(IGraphsSettingsProvider backupProvider, ISettingsController settingsProvider)
 {
     _backupProvider   = backupProvider;
     _settingsProvider = settingsProvider;
 }
예제 #40
0
 public SettingsViewController(IntPtr handle) : base(handle)
 {
     _settingsController = App.Container.Resolve <ISettingsController> ();
 }