Ejemplo n.º 1
0
        static void Bootstrap(IRepository repository)
        {
            //setup Library
            var library = new Model.Library(repository.GetUsers(), repository.GetBooks());

            //setup controller
            var commandProcessors = new List <ICommandProcessor>
            {
                new AddBookCommandProcessor(library, repository),
                new AddUserCommandProcessor(library, repository),
                new BorrowBookCommandProcessor(library, repository),
                new ReturnBookCommandProcessor(library, repository)
            };

            _libraryController = new LibraryController(commandProcessors);

            //setup view
            var views    = new List <IView>();
            var helpView = new HelpView(commandProcessors, views, "show help");

            views.AddRange(
                new IView[] {
                new BookView(library.Books, "show books"),
                new UserView(library.Users, "show users"),
                new UserView(library.BadUsers, "show bad users"),
                helpView
            });
            _libraryView = new LibraryView(library, views, helpView);
        }
Ejemplo n.º 2
0
        public async Task HelpViewModel_LoadBrowserUri_HasInternetConnection_NavigatesToUrl()
        {
            //------------Setup for test--------------------------
            const string uri           = "http://community.warewolf.io/";
            var          networkHelper = new Mock <INetworkHelper>();
            var          task          = new Task <bool>(() => true);

            task.RunSynchronously();
            networkHelper.Setup(m => m.HasConnectionAsync(It.IsAny <string>()))
            .Returns(task);
            var        helpViewWrapper = new Mock <IHelpViewWrapper>();
            WebBrowser webBrowser      = new WebBrowser();

            helpViewWrapper.SetupGet(m => m.WebBrowser).Returns(webBrowser);
            helpViewWrapper.Setup(m => m.Navigate(It.IsAny <string>())).Verifiable();
            var      helpViewModel = new HelpViewModel(networkHelper.Object, helpViewWrapper.Object, false);
            HelpView helpView      = new HelpView();

            helpViewWrapper.SetupGet(m => m.HelpView).Returns(helpView);
            //------------Execute Test---------------------------
            await helpViewModel.LoadBrowserUri(uri);

            //------------Assert Results-------------------------
            helpViewWrapper.Verify(m => m.Navigate(It.IsAny <string>()), Times.Once());
            Assert.IsNotNull(helpViewModel.Uri);
            Assert.IsNull(helpViewModel.ResourcePath);
        }
Ejemplo n.º 3
0
        public MainView(IThemeProvider themeProvider)
        {
            if (themeProvider == null)
            {
                throw new ArgumentNullException(nameof(themeProvider));
            }


            InitializeComponent();

            this.messenger = new Messenger(this);

            this.settingsView = new SettingsView(themeProvider, messenger);
            this.settingsView.Show(this.dockPanel, DockState.DockLeft);
            this.dockPanel.DockLeftPortion = 400;

            var helpContentIndexProvider = new HelpContentIndexProvider();
            var helpContentIndex         = helpContentIndexProvider.GetIndex();
            var helpRepository           = new HelpRepository(helpContentIndex, GetType().Assembly);
            var helpView = new HelpView(this.messenger, this.outputView, helpRepository, Topics.Home);

            helpView.Show(this.dockPanel, DockState.DockRight);
            helpView.DockState = DockState.DockRightAutoHide;

            this.outputView = new OutputView(themeProvider, messenger);
            this.outputView.Show(this.dockPanel, DockState.Document);

            this.messenger.Register <Export>(OnExportRequested);
        }
Ejemplo n.º 4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            this.Bind(ViewModel.Email, EmailLabel.Rx().Text());
            this.Bind(ViewModel.IsSynced, SyncedView.Rx().IsVisible());
            this.Bind(ViewModel.WorkspaceName, WorkspaceLabel.Rx().Text());
            this.Bind(ViewModel.DurationFormat, DurationFormatLabel.Rx().Text());
            this.Bind(ViewModel.IsRunningSync, SyncingView.Rx().IsVisible());
            this.Bind(ViewModel.DateFormat, DateFormatLabel.Rx().Text());
            this.Bind(ViewModel.BeginningOfWeek, BeginningOfWeekLabel.Rx().Text());
            this.Bind(ViewModel.IsFeedbackSuccessViewShowing, SendFeedbackSuccessView.Rx().AnimatedIsVisible());
            this.BindVoid(ViewModel.LoggingOut, () =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            });

            this.Bind(HelpView.Rx().Tap(), ViewModel.OpenHelpView);
            this.Bind(LogoutButton.Rx().Tap(), ViewModel.TryLogout);
            this.Bind(AboutView.Rx().Tap(), ViewModel.OpenAboutView);
            this.Bind(FeedbackView.Rx().Tap(), ViewModel.SubmitFeedback);
            this.Bind(DateFormatView.Rx().Tap(), ViewModel.SelectDateFormat);
            this.Bind(WorkspaceView.Rx().Tap(), ViewModel.PickDefaultWorkspace);
            this.Bind(DurationFormatView.Rx().Tap(), ViewModel.SelectDurationFormat);
            this.BindVoid(ManualModeSwitch.Rx().Changed(), ViewModel.ToggleManualMode);
            this.Bind(BeginningOfWeekView.Rx().Tap(), ViewModel.SelectBeginningOfWeek);
            this.Bind(CalendarSettingsView.Rx().Tap(), ViewModel.OpenCalendarSettingsAction);
            this.BindVoid(SendFeedbackSuccessView.Rx().Tap(), ViewModel.CloseFeedbackSuccessView);
            this.Bind(NotificationSettingsView.Rx().Tap(), ViewModel.OpenNotificationSettingsAction);
            this.Bind(TwentyFourHourClockSwitch.Rx().Changed(), ViewModel.ToggleUseTwentyFourHourClock);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);

            if (!ViewModel.CalendarSettingsEnabled)
            {
                hideCalendarSettingsSection();
            }

            ViewModel.IsManualModeEnabled
            .FirstAsync()
            .Subscribe(isEnabled => ManualModeSwitch.SetState(isEnabled, false))
            .DisposedBy(DisposeBag);

            ViewModel.UseTwentyFourHourFormat
            .FirstAsync()
            .Subscribe(useTwentyFourHourFormat => TwentyFourHourClockSwitch.SetState(useTwentyFourHourFormat, false))
            .DisposedBy(DisposeBag);
        }
        private void HelpMenuItem_Click(object sender, RoutedEventArgs e)
        {
            //Set HomePage as home screen.
            HelpView help = new HelpView();

            ContentControl.Content = help;
        }
Ejemplo n.º 6
0
 // * Mostra la schermata Help
 public void MostraHelp()
 {
     if (!gioco.StatoGioco || pausa)
     {
         HelpView help = new HelpView();
         help.Show();
     }
 }
Ejemplo n.º 7
0
        private void BackToProgram_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Uri j = new Uri("http://asdfasdfkljhflakjshlsdf.dog/");

            HelpView.Navigate(j);

            Frame.Navigate(typeof(MainPage));
        }
Ejemplo n.º 8
0
        private void Current_Closed(object sender, EventArgs e)
        {
            Uri j = new Uri("http://asdfasdfkljhflakjshlsdf.dog/");

            HelpView.Navigate(j);

            Frame.Navigate(typeof(MainPage));
        }
Ejemplo n.º 9
0
        private void Refresh()
        {
            this.RaisePropertyChanged(nameof(VersionInfos));
            this.RaisePropertyChanged(nameof(Logs));

            AppLogger.Flush();
            HelpView.SendScrollToEndLog();
        }
Ejemplo n.º 10
0
        private void OpenHelp()
        {
            var helpWindow = new HelpView
            {
                DataContext = _helpViewModel ?? (_helpViewModel = new HelpViewModel()),
                Owner       = Application.Current.MainWindow
            };

            helpWindow.Show();
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            if (args.Any(x => x == "-h"))
            {
                HelpView.ShowHelp();
                Environment.Exit(0);
            }

            DownloadPresenterFactory.DownloadPresenter(args)
            .DownloadFiles();
        }
Ejemplo n.º 12
0
        private async void AddHelpView(SettingView view)
        {
            MakeButtonInactive();
            using (UserDialogs.Instance.Loading("loading"))
            {
                await Task.Delay(1);

                PageTitle.Text = "Help";
                ContentStackLayout.Children.Clear();
                var view2 = new HelpView();
                ContentStackLayout.Children.Add(view2);
            }
        }
Ejemplo n.º 13
0
        public ActionResult Query(HelpView r)
        {
            string id   = User.Identity.GetUserId();
            var    user = _context.Users.Where(u => u.Id == id).FirstOrDefault();
            var    h    = new Helprequest()
            {
                Status = 'R', Description = r.Description, Title = r.Title, Time = DateTime.Now, User = user
            };

            _context.Helprequests.Add(h);
            _context.SaveChanges();
            return(RedirectToAction("Index", "Home"));
        }
Ejemplo n.º 14
0
        public void Begin(RenderWindow _window)
        {
            window = _window;
            view   = new HelpView(this, _window);

            view.StartAnimation();

            while (isPlaying && window.IsOpen())
            {
                window.DispatchEvents();
                view.Update();
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Builds the model.
        /// </summary>
        /// <param name="hv">The hv.</param>
        /// <returns></returns>
        public static Help BuildModel(HelpView hv)
        {
            Help help = new Help()
            {
                Id             = hv.Id,
                Texto          = hv.Texto,
                DataExpiracao  = hv.DataExpiracao,
                DataPublicacao = hv.DataPublicacao,
                AvisoGeral     = hv.AvisoGeral
            };

            return(help);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Builds the model view.
        /// </summary>
        /// <param name="h">The h.</param>
        /// <returns></returns>
        public static HelpView BuildModelView(Help h)
        {
            HelpView helpView = new HelpView()
            {
                Id             = h.Id,
                Role           = h.Role.Id,
                Texto          = h.Texto,
                DataExpiracao  = h.DataExpiracao,
                DataPublicacao = h.DataExpiracao,
                AvisoGeral     = h.AvisoGeral
            };

            return(helpView);
        }
Ejemplo n.º 17
0
        public ActionResult Incluir(HelpView view)
        {
            if (!ModelState.IsValid)
            {
                ViewBag.Role = new SelectList(roleDAO.List(), "Id", "Description");
                return(View(view));
            }

            Help help = HelpFactory.BuildModel(view);

            help.Role = roleDAO.GetById(view.Role);
            helpDAO.Add(help);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Show the help window
 /// </summary>
 /// <param name="parameter"></param>
 protected override void ExecuteAction(object parameter)
 {
     if (_helpView == null)
     {
         _helpView = new HelpView();
     }
     if (_helpView.IsVisible)
     {
         _helpView.Focus();
     }
     else
     {
         _helpView.Show();
     }
     _helpView.Closing += HelpViewOnClosing;
 }
Ejemplo n.º 19
0
        private void OpenHelp(object obj)
        {
            if (_helpView == null)
            {
                _logger.Info("show help view");
                _helpView         = Container.Resolve <HelpView>();
                _helpView.Closed += delegate { _helpView = null; };
                _helpView.Show();
            }
            else
            {
                _logger.Warn("help view already open");
                _logger.Info("push view in foreground");

                _helpView.Focus();
            }
        }
Ejemplo n.º 20
0
        public void HelpViewModel_Handle_TabClosedMessageContextIsAnotherInstance_IsNotDisposed()
        {
            //------------Setup for test--------------------------
            var        helpViewWrapper = new Mock <IHelpViewWrapper>();
            WebBrowser webBrowser      = new WebBrowser();

            helpViewWrapper.SetupGet(m => m.WebBrowser).Returns(webBrowser);
            helpViewWrapper.Setup(m => m.Navigate(It.IsAny <string>())).Verifiable();
            var      helpViewModel = new HelpViewModel(null, helpViewWrapper.Object, false);
            HelpView helpView      = new HelpView();

            helpViewWrapper.SetupGet(m => m.HelpView).Returns(helpView);
            //------------Execute Test---------------------------
            helpViewModel.Handle(new TabClosedMessage(new HelpViewModel()));
            //------------Assert Results-------------------------
            Assert.IsFalse(helpViewModel.HelpViewDisposed);
        }
Ejemplo n.º 21
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            this.Bind(ViewModel.Email, EmailLabel.BindText());
            this.Bind(ViewModel.IsSynced, SyncedView.BindIsVisible());
            this.Bind(ViewModel.WorkspaceName, WorkspaceLabel.BindText());
            this.Bind(ViewModel.DurationFormat, DurationFormatLabel.BindText());
            this.Bind(ViewModel.IsRunningSync, SyncingView.BindIsVisible());
            this.Bind(ViewModel.DateFormat, DateFormatLabel.BindText());
            this.Bind(ViewModel.IsManualModeEnabled, ManualModeSwitch.BindIsOn());
            this.Bind(ViewModel.BeginningOfWeek, BeginningOfWeekLabel.BindText());
            this.Bind(ViewModel.UseTwentyFourHourFormat, TwentyFourHourClockSwitch.BindIsOn());
            this.BindVoid(ViewModel.LoggingOut, () =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            });
            this.Bind(ViewModel.IsFeedbackSuccessViewShowing, SendFeedbackSuccessView.BindAnimatedIsVisible());

            this.Bind(HelpView.Tapped(), ViewModel.OpenHelpView);
            this.Bind(LogoutButton.Tapped(), ViewModel.TryLogout);
            this.Bind(AboutView.Tapped(), ViewModel.OpenAboutView);
            this.Bind(FeedbackView.Tapped(), ViewModel.SubmitFeedback);
            this.Bind(DateFormatView.Tapped(), ViewModel.SelectDateFormat);
            this.Bind(WorkspaceView.Tapped(), ViewModel.PickDefaultWorkspace);
            this.BindVoid(ManualModeView.Tapped(), ViewModel.ToggleManualMode);
            this.Bind(DurationFormatView.Tapped(), ViewModel.SelectDurationFormat);
            this.Bind(BeginningOfWeekView.Tapped(), ViewModel.SelectBeginningOfWeek);
            this.Bind(TwentyFourHourClockView.Tapped(), ViewModel.ToggleUseTwentyFourHourClock);
            this.BindVoid(SendFeedbackSuccessView.Tapped(), ViewModel.CloseFeedbackSuccessView);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);
        }
 private void ShowHelp(Context context)
 {
     if (string.IsNullOrEmpty(context.WorkFlow.Properties["HelpFile"].ToString(context)))
     {
         return;
     }
     try
     {
         var stream = Workflow.GetFileStream(context.WorkFlow.Properties["HelpFile"].ToString(context));
         if (stream != null)
         {
             var view = new HelpView(stream);
             view.ShowDialog();
             stream.Close();
         }
     }
     catch (Exception e)
     {
         Log.Error("Show help error", e);
     }
 }
Ejemplo n.º 23
0
        public Help()
        {
            this.InitializeComponent();



            Window.Current.SizeChanged += Current_SizeChanged;



            Uri j = new Uri("http://www.essentialsoftwareproducts.org/essential-time-lapse-video/");

            HelpView.Navigate(j);
            HelpView.Visibility = Visibility.Visible;
            HelpView.Width      = Window.Current.Bounds.Width;
            HelpView.Height     = Window.Current.Bounds.Height - 80;

            /*	Window.Current.Closed += (ss, ee) =>
             *      {
             *              Frame.Navigate(typeof(MainPage));
             *      };
             */
        }
Ejemplo n.º 24
0
        public HelpPage()
        {
            this.InitializeComponent();

            ApplicationView.GetForCurrentView().Title = "Version " + GetAppVersion() + " ";


            Window.Current.SizeChanged += Current_SizeChanged;



            Uri j = new Uri("http://www.essentialsoftwareproducts.org/essential-time-keeper/");

            HelpView.Navigate(j);
            HelpView.Visibility = Visibility.Visible;
            HelpView.Width      = Window.Current.Bounds.Width;
            HelpView.Height     = Window.Current.Bounds.Height - 80;

            /*	Window.Current.Closed += (ss, ee) =>
             *      {
             *              Frame.Navigate(typeof(MainPage));
             *      };
             */
        }
Ejemplo n.º 25
0
        public ViewRegistry(ITextUI ui)
        {
            TextClient GetGame() => ui.Game;

            ui.RegisterMainView(Exception     = new ExceptionView(), "exception");
            ui.RegisterMainView(Auth          = new AuthView(), "auth", "authentication", "login");
            ui.RegisterMainView(Home          = new HomeView(CommandContext.HOME.Set(), 60, 2, GetGame), "home");
            ui.RegisterSideView(GameModes     = new ListView(" # Game Modes", () => ui.Game.ActiveGameModes.Select(gm => ui.Game.Resources.GetMetadata(gm)).Where(gm => gm.PermissionLevel <= ui.Game.PermissionLevel).Select(gm => (FormattedString)gm.Name), CommandContext.HOME.Set(), 25), "modes", "gamemodes", "game modes");
            ui.RegisterSideView(Settings      = new SettingsView(GetGame), "settings", "options");
            ui.RegisterSideView(Friends       = new ListView(" # Friends", () => ui.Game.Friends.Values.Select(f => f.ToDisplay()), CommandContext.HOME.Set(), 22), "friends", "friendlist", "friend list");
            ui.RegisterSideView(Notifications = new ListView(" # Notifications", () => ui.Game.PendingFriendRequests.Keys.Select(fr => (FormattedString)string.Format("FR {0}", fr)).Concat(ui.Game.PendingPartyInvitations.Keys.Select(pi => (FormattedString)string.Format("PI {0}", pi))), CommandContext.HOME.Set(), 23), "notifications");
            ui.RegisterSideView(Party         = new PartyView(CommandContext.HOME.Set().And(c => ui.Game.Party != null), GetGame), "party");
            ui.RegisterMainView(Game          = new GameView(CommandExtensions.IsInLobbyOrGame, 60, 20, GetGame), "game");
            ui.RegisterSideView(Players       = new ListView(" # Players", () => ui.Game.GameState.Players.Select(ps => (FormattedString)(ps.Dead ? "" : ui.Game.GameState.ToName(ps.ID, true))), CommandExtensions.IsInLobbyOrGame, 25), "players", "playerlist", "player list");
            ui.RegisterSideView(Roles         = new ListView(" # Roles", () => ui.Game.GameState.Roles.Select(r => ui.Game.Resources.Of(r)), CommandExtensions.IsInLobbyOrGame, 25), "roles", "rolelist", "role list");
            ui.RegisterSideView(Graveyard     = new ListView(" # Graveyard", () => ui.Game.GameState.Graveyard.Select(ps => ui.Game.GameState.ToName(ps, true)), CommandExtensions.IsInGame, 40), "graveyard", "deaths");
            ui.RegisterSideView(Team          = new ListView(" # Team", () => ui.Game.GameState.Team.Select(ps => !ps.Dead || ps.Role == Role.DISGUISER ? ui.Game.GameState.ToName(ps, true) : ""), CommandExtensions.IsInGame, 40), "team", "teammates");
            ui.RegisterSideView(LastWill      = new WillView(CommandExtensions.IsInGame), "lw", "dn", "lastwill", "deathnote", "last will", "death note");
            ui.RegisterSideView(Winners       = new ListView(" # Winners", () => ui.Game.GameState.Winners.Select(p => (FormattedString)ui.Game.GameState.ToName(p, true)), CommandContext.GAME_END.Set(), 25), "winners", "winnerlist", "winner list");
            ui.RegisterSideView(MyLastWill    = new EditableWillView(CommandExtensions.IsInGame), "mlw", "mylastwill", "my lastwill", "my last will");
            ui.RegisterSideView(MyDeathNote   = new EditableWillView(context => CommandExtensions.IsInGame(context) && ui.Game.GameState.Role.HasDeathNote()), "mdn", "mydeathnote", "my deathnote", "my death note");
            ui.RegisterSideView(MyForgedWill  = new EditableWillView(context => CommandExtensions.IsInGame(context) && ui.Game.GameState.Role == Role.FORGER), "mfw", "myforgedwill", "my forgedwill", "my forged will");
            ui.RegisterSideView(Help          = new HelpView(ui.Commands, () => ui.CommandContext, 40, 1), "?", "h", "help");
        }
        public ChildWindowsManager()
        {
            Messenger.Default.Register <COMSettingsMessage>(
                this,
                msg =>
            {
                if (msg.IsShow)
                {
                    var comWindow = new COMSettingsView();
                    comWindow.ShowDialog();
                }
            });

            Messenger.Default.Register <HelpMessage>(
                this,
                msg =>
            {
                if (msg.IsShow)
                {
                    var helpWindow = new HelpView();
                    helpWindow.Show();
                }
            });
        }
Ejemplo n.º 27
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            GroupSimilarTimeEntriesLabel.Text = Resources.GroupTimeEntries;
            YourProfileCellLabel.Text         = Resources.YourProfile;
            WorkspaceCellLabel.Text           = Resources.Workspace;
            FormatSettingsHeaderLabel.Text    = Resources.FormatSettings;
            DateFormatCellLabel.Text          = Resources.DateFormat;
            Use24HourClockCellLabel.Text      = Resources.Use24HourClock;
            DurationFormatCellLabel.Text      = Resources.DurationFormat;
            FirstDayOfTheWeekCellLabel.Text   = Resources.FirstDayOfTheWeek;
            ManualModeCellLabel.Text          = Resources.ManualMode;
            ManualModeDescriptionLabel.Text   = Resources.ManualModeDescription;
            CalendarSettingsCellLabel.Text    = Resources.CalendarSettingsTitle;
            SmartAlertCellLabel.Text          = Resources.SmartAlerts;
            SubmitFeedbackCellLabel.Text      = Resources.SubmitFeedback;
            AboutCellLabel.Text          = Resources.About;
            HelpCellLabel.Text           = Resources.Help;
            LoggingOutLabel.Text         = Resources.LoggingOutSecurely;
            SyncingLabel.Text            = Resources.Syncing;
            SyncedLabel.Text             = Resources.SyncCompleted;
            FeedbackToastTitleLabel.Text = Resources.DoneWithExclamationMark.ToUpper();
            FeedbackToastTextLabel.Text  = Resources.ThankYouForTheFeedback;
            LogoutButton.SetTitle(Resources.SignOutOfToggl, UIControlState.Normal);

            prepareViews();

            Title             = ViewModel.Title;
            VersionLabel.Text = ViewModel.Version;

            LoggingOutView.Hidden          = true;
            SendFeedbackSuccessView.Hidden = true;

            ViewModel.Email
            .Subscribe(EmailLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsSynced
            .Subscribe(SyncedView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.WorkspaceName
            .Subscribe(WorkspaceLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.DurationFormat
            .Subscribe(DurationFormatLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsRunningSync
            .Subscribe(SyncingView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.DateFormat
            .Subscribe(DateFormatLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.BeginningOfWeek
            .Subscribe(BeginningOfWeekLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsFeedbackSuccessViewShowing
            .Subscribe(SendFeedbackSuccessView.Rx().AnimatedIsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.LoggingOut
            .Subscribe(_ =>
            {
                LoggingOutView.Hidden = false;
                SyncingView.Hidden    = true;
                SyncedView.Hidden     = true;
            })
            .DisposedBy(DisposeBag);

            HelpView.Rx()
            .BindAction(ViewModel.OpenHelpView)
            .DisposedBy(DisposeBag);

            LogoutButton.Rx()
            .BindAction(ViewModel.TryLogout)
            .DisposedBy(DisposeBag);

            AboutView.Rx()
            .BindAction(ViewModel.OpenAboutView)
            .DisposedBy(DisposeBag);

            FeedbackView.Rx()
            .BindAction(ViewModel.SubmitFeedback)
            .DisposedBy(DisposeBag);

            DateFormatView.Rx()
            .BindAction(ViewModel.SelectDateFormat)
            .DisposedBy(DisposeBag);

            WorkspaceView.Rx()
            .BindAction(ViewModel.PickDefaultWorkspace)
            .DisposedBy(DisposeBag);

            DurationFormatView.Rx()
            .BindAction(ViewModel.SelectDurationFormat)
            .DisposedBy(DisposeBag);

            ManualModeSwitch.Rx().Changed()
            .Subscribe(ViewModel.ToggleManualMode)
            .DisposedBy(DisposeBag);

            GroupSimilarTimeEntriesSwitch.Rx()
            .BindAction(ViewModel.ToggleTimeEntriesGrouping)
            .DisposedBy(DisposeBag);

            BeginningOfWeekView.Rx()
            .BindAction(ViewModel.SelectBeginningOfWeek)
            .DisposedBy(DisposeBag);

            CalendarSettingsView.Rx()
            .BindAction(ViewModel.OpenCalendarSettings)
            .DisposedBy(DisposeBag);

            SendFeedbackSuccessView.Rx().Tap()
            .Subscribe(ViewModel.CloseFeedbackSuccessView)
            .DisposedBy(DisposeBag);

            NotificationSettingsView.Rx()
            .BindAction(ViewModel.OpenNotificationSettings)
            .DisposedBy(DisposeBag);

            TwentyFourHourClockSwitch.Rx().Changed()
            .Subscribe(ViewModel.ToggleTwentyFourHourSettings.Inputs)
            .DisposedBy(DisposeBag);

            UIApplication.Notifications
            .ObserveWillEnterForeground((sender, e) => startAnimations())
            .DisposedBy(DisposeBag);

            if (!ViewModel.CalendarSettingsEnabled)
            {
                hideCalendarSettingsSection();
            }

            ViewModel.IsManualModeEnabled
            .FirstAsync()
            .Subscribe(isEnabled => ManualModeSwitch.SetState(isEnabled, false))
            .DisposedBy(DisposeBag);

            ViewModel.IsGroupingTimeEntries
            .FirstAsync()
            .Subscribe(isGrouping => GroupSimilarTimeEntriesSwitch.SetState(isGrouping, false))
            .DisposedBy(DisposeBag);

            ViewModel.UseTwentyFourHourFormat
            .FirstAsync()
            .Subscribe(useTwentyFourHourFormat => TwentyFourHourClockSwitch.SetState(useTwentyFourHourFormat, false))
            .DisposedBy(DisposeBag);
        }
Ejemplo n.º 28
0
        void ReleaseDesignerOutlets()
        {
            if (AboutCellLabel != null)
            {
                AboutCellLabel.Dispose();
                AboutCellLabel = null;
            }

            if (AboutView != null)
            {
                AboutView.Dispose();
                AboutView = null;
            }

            if (BeginningOfWeekLabel != null)
            {
                BeginningOfWeekLabel.Dispose();
                BeginningOfWeekLabel = null;
            }

            if (BeginningOfWeekView != null)
            {
                BeginningOfWeekView.Dispose();
                BeginningOfWeekView = null;
            }

            if (CalendarSectionTopConstraint != null)
            {
                CalendarSectionTopConstraint.Dispose();
                CalendarSectionTopConstraint = null;
            }

            if (CalendarSettingsCellLabel != null)
            {
                CalendarSettingsCellLabel.Dispose();
                CalendarSettingsCellLabel = null;
            }

            if (CalendarSettingsSection != null)
            {
                CalendarSettingsSection.Dispose();
                CalendarSettingsSection = null;
            }

            if (CalendarSettingsView != null)
            {
                CalendarSettingsView.Dispose();
                CalendarSettingsView = null;
            }

            if (DateFormatCellLabel != null)
            {
                DateFormatCellLabel.Dispose();
                DateFormatCellLabel = null;
            }

            if (DateFormatLabel != null)
            {
                DateFormatLabel.Dispose();
                DateFormatLabel = null;
            }

            if (DateFormatView != null)
            {
                DateFormatView.Dispose();
                DateFormatView = null;
            }

            if (DurationFormatCellLabel != null)
            {
                DurationFormatCellLabel.Dispose();
                DurationFormatCellLabel = null;
            }

            if (DurationFormatLabel != null)
            {
                DurationFormatLabel.Dispose();
                DurationFormatLabel = null;
            }

            if (DurationFormatView != null)
            {
                DurationFormatView.Dispose();
                DurationFormatView = null;
            }

            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (EmailView != null)
            {
                EmailView.Dispose();
                EmailView = null;
            }

            if (FeedbackToastTextLabel != null)
            {
                FeedbackToastTextLabel.Dispose();
                FeedbackToastTextLabel = null;
            }

            if (FeedbackToastTitleLabel != null)
            {
                FeedbackToastTitleLabel.Dispose();
                FeedbackToastTitleLabel = null;
            }

            if (FeedbackView != null)
            {
                FeedbackView.Dispose();
                FeedbackView = null;
            }

            if (FirstDayOfTheWeekCellLabel != null)
            {
                FirstDayOfTheWeekCellLabel.Dispose();
                FirstDayOfTheWeekCellLabel = null;
            }

            if (FormatSettingsHeaderLabel != null)
            {
                FormatSettingsHeaderLabel.Dispose();
                FormatSettingsHeaderLabel = null;
            }

            if (FormatSettingsTitle != null)
            {
                FormatSettingsTitle.Dispose();
                FormatSettingsTitle = null;
            }

            if (HelpCellLabel != null)
            {
                HelpCellLabel.Dispose();
                HelpCellLabel = null;
            }

            if (HelpView != null)
            {
                HelpView.Dispose();
                HelpView = null;
            }

            if (LoggingOutActivityIndicatorView != null)
            {
                LoggingOutActivityIndicatorView.Dispose();
                LoggingOutActivityIndicatorView = null;
            }

            if (LoggingOutIndicator != null)
            {
                LoggingOutIndicator.Dispose();
                LoggingOutIndicator = null;
            }

            if (LoggingOutLabel != null)
            {
                LoggingOutLabel.Dispose();
                LoggingOutLabel = null;
            }

            if (LoggingOutView != null)
            {
                LoggingOutView.Dispose();
                LoggingOutView = null;
            }

            if (LogoutButton != null)
            {
                LogoutButton.Dispose();
                LogoutButton = null;
            }

            if (LogoutContainerView != null)
            {
                LogoutContainerView.Dispose();
                LogoutContainerView = null;
            }

            if (LogoutVerticalOffsetConstraint != null)
            {
                LogoutVerticalOffsetConstraint.Dispose();
                LogoutVerticalOffsetConstraint = null;
            }

            if (ManualModeCellLabel != null)
            {
                ManualModeCellLabel.Dispose();
                ManualModeCellLabel = null;
            }

            if (ManualModeDescriptionLabel != null)
            {
                ManualModeDescriptionLabel.Dispose();
                ManualModeDescriptionLabel = null;
            }

            if (ManualModeSwitch != null)
            {
                ManualModeSwitch.Dispose();
                ManualModeSwitch = null;
            }

            if (ManualModeView != null)
            {
                ManualModeView.Dispose();
                ManualModeView = null;
            }

            if (NotificationSettingsView != null)
            {
                NotificationSettingsView.Dispose();
                NotificationSettingsView = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (SendFeedbackSuccessView != null)
            {
                SendFeedbackSuccessView.Dispose();
                SendFeedbackSuccessView = null;
            }

            if (SmartAlertCellLabel != null)
            {
                SmartAlertCellLabel.Dispose();
                SmartAlertCellLabel = null;
            }

            if (SubmitFeedbackCellLabel != null)
            {
                SubmitFeedbackCellLabel.Dispose();
                SubmitFeedbackCellLabel = null;
            }

            if (SyncedIcon != null)
            {
                SyncedIcon.Dispose();
                SyncedIcon = null;
            }

            if (SyncedLabel != null)
            {
                SyncedLabel.Dispose();
                SyncedLabel = null;
            }

            if (SyncedView != null)
            {
                SyncedView.Dispose();
                SyncedView = null;
            }

            if (SyncingActivityIndicatorView != null)
            {
                SyncingActivityIndicatorView.Dispose();
                SyncingActivityIndicatorView = null;
            }

            if (SyncingIndicator != null)
            {
                SyncingIndicator.Dispose();
                SyncingIndicator = null;
            }

            if (SyncingLabel != null)
            {
                SyncingLabel.Dispose();
                SyncingLabel = null;
            }

            if (SyncingView != null)
            {
                SyncingView.Dispose();
                SyncingView = null;
            }

            if (TopConstraint != null)
            {
                TopConstraint.Dispose();
                TopConstraint = null;
            }

            if (TwentyFourHourClockSwitch != null)
            {
                TwentyFourHourClockSwitch.Dispose();
                TwentyFourHourClockSwitch = null;
            }

            if (TwentyFourHourClockView != null)
            {
                TwentyFourHourClockView.Dispose();
                TwentyFourHourClockView = null;
            }

            if (Use24HourClockCellLabel != null)
            {
                Use24HourClockCellLabel.Dispose();
                Use24HourClockCellLabel = null;
            }

            if (VersionLabel != null)
            {
                VersionLabel.Dispose();
                VersionLabel = null;
            }

            if (WorkspaceCellLabel != null)
            {
                WorkspaceCellLabel.Dispose();
                WorkspaceCellLabel = null;
            }

            if (WorkspaceLabel != null)
            {
                WorkspaceLabel.Dispose();
                WorkspaceLabel = null;
            }

            if (WorkspaceView != null)
            {
                WorkspaceView.Dispose();
                WorkspaceView = null;
            }

            if (YourProfileCellLabel != null)
            {
                YourProfileCellLabel.Dispose();
                YourProfileCellLabel = null;
            }

            if (GroupSimilarTimeEntriesLabel != null)
            {
                GroupSimilarTimeEntriesLabel.Dispose();
                GroupSimilarTimeEntriesLabel = null;
            }

            if (GroupSimilarTimeEntriesSwitch != null)
            {
                GroupSimilarTimeEntriesSwitch.Dispose();
                GroupSimilarTimeEntriesSwitch = null;
            }
        }
Ejemplo n.º 29
0
        void ReleaseDesignerOutlets()
        {
            if (AboutView != null)
            {
                AboutView.Dispose();
                AboutView = null;
            }

            if (BeginningOfWeekLabel != null)
            {
                BeginningOfWeekLabel.Dispose();
                BeginningOfWeekLabel = null;
            }

            if (BeginningOfWeekView != null)
            {
                BeginningOfWeekView.Dispose();
                BeginningOfWeekView = null;
            }

            if (DateFormatLabel != null)
            {
                DateFormatLabel.Dispose();
                DateFormatLabel = null;
            }

            if (DateFormatView != null)
            {
                DateFormatView.Dispose();
                DateFormatView = null;
            }

            if (DurationFormatLabel != null)
            {
                DurationFormatLabel.Dispose();
                DurationFormatLabel = null;
            }

            if (DurationFormatView != null)
            {
                DurationFormatView.Dispose();
                DurationFormatView = null;
            }

            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (EmailView != null)
            {
                EmailView.Dispose();
                EmailView = null;
            }

            if (FeedbackView != null)
            {
                FeedbackView.Dispose();
                FeedbackView = null;
            }

            if (FormatSettingsTitle != null)
            {
                FormatSettingsTitle.Dispose();
                FormatSettingsTitle = null;
            }

            if (LoggingOutActivityIndicatorView != null)
            {
                LoggingOutActivityIndicatorView.Dispose();
                LoggingOutActivityIndicatorView = null;
            }

            if (LoggingOutIndicator != null)
            {
                LoggingOutIndicator.Dispose();
                LoggingOutIndicator = null;
            }

            if (LoggingOutLabel != null)
            {
                LoggingOutLabel.Dispose();
                LoggingOutLabel = null;
            }

            if (LoggingOutView != null)
            {
                LoggingOutView.Dispose();
                LoggingOutView = null;
            }

            if (LogoutButton != null)
            {
                LogoutButton.Dispose();
                LogoutButton = null;
            }

            if (LogoutContainerView != null)
            {
                LogoutContainerView.Dispose();
                LogoutContainerView = null;
            }

            if (LogoutVerticalOffsetConstraint != null)
            {
                LogoutVerticalOffsetConstraint.Dispose();
                LogoutVerticalOffsetConstraint = null;
            }

            if (ManualModeSwitch != null)
            {
                ManualModeSwitch.Dispose();
                ManualModeSwitch = null;
            }

            if (ManualModeView != null)
            {
                ManualModeView.Dispose();
                ManualModeView = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (SyncedIcon != null)
            {
                SyncedIcon.Dispose();
                SyncedIcon = null;
            }

            if (SyncedLabel != null)
            {
                SyncedLabel.Dispose();
                SyncedLabel = null;
            }

            if (SyncedView != null)
            {
                SyncedView.Dispose();
                SyncedView = null;
            }

            if (SyncingActivityIndicatorView != null)
            {
                SyncingActivityIndicatorView.Dispose();
                SyncingActivityIndicatorView = null;
            }

            if (HelpView != null)
            {
                HelpView.Dispose();
                HelpView = null;
            }

            if (SyncingIndicator != null)
            {
                SyncingIndicator.Dispose();
                SyncingIndicator = null;
            }

            if (SyncingLabel != null)
            {
                SyncingLabel.Dispose();
                SyncingLabel = null;
            }

            if (SyncingView != null)
            {
                SyncingView.Dispose();
                SyncingView = null;
            }

            if (TopConstraint != null)
            {
                TopConstraint.Dispose();
                TopConstraint = null;
            }

            if (TwentyFourHourClockSwitch != null)
            {
                TwentyFourHourClockSwitch.Dispose();
                TwentyFourHourClockSwitch = null;
            }

            if (TwentyFourHourClockView != null)
            {
                TwentyFourHourClockView.Dispose();
                TwentyFourHourClockView = null;
            }

            if (VersionLabel != null)
            {
                VersionLabel.Dispose();
                VersionLabel = null;
            }

            if (WorkspaceLabel != null)
            {
                WorkspaceLabel.Dispose();
                WorkspaceLabel = null;
            }

            if (WorkspaceView != null)
            {
                WorkspaceView.Dispose();
                WorkspaceView = null;
            }
        }
Ejemplo n.º 30
0
 public HelpViewWrapper(HelpView view)
 {
     HelpView = view;
 }