TutorialPageCompleted() public method

Go to next step of the tutorial.
public TutorialPageCompleted ( ) : void
return void
Exemplo n.º 1
0
        void ShowTutorialPage()
        {
            string slide_image_path = Path.Combine(NSBundle.MainBundle.ResourcePath, "Pixmaps", "tutorial-slide-" + Controller.TutorialCurrentPage + ".png");

            SlideImage = new NSImage(slide_image_path)
            {
                Size = new SizeF(350, 200)
            };
            SlideImageView = new NSImageView()
            {
                Image = SlideImage,
                Frame = new RectangleF(215, Frame.Height - 350, 350, 200)
            };
            ContentView.AddSubview(SlideImageView);
            switch (Controller.TutorialCurrentPage)
            {
            case 1:
            {
                Header             = Properties_Resources.WhatsNext;
                Description        = Properties_Resources.CmisSyncCreates;
                SkipTutorialButton = new NSButton()
                {
                    Title = Properties_Resources.SkipTutorial
                };
                ContinueButton = new NSButton()
                {
                    Title = Properties_Resources.Continue
                };
                SkipTutorialButton.Activated += delegate
                {
                    Controller.TutorialSkipped();
                };
                ContinueButton.Activated += delegate
                {
                    Controller.TutorialPageCompleted();
                };
                ContentView.AddSubview(SlideImageView);
                Buttons.Add(ContinueButton);
                Buttons.Add(SkipTutorialButton);
                break;
            }

            case 2:
            {
                Header         = Properties_Resources.Synchronization;
                Description    = Properties_Resources.DocumentsAre;
                ContinueButton = new NSButton()
                {
                    Title = Properties_Resources.Continue
                };
                ContinueButton.Activated += delegate
                {
                    Controller.TutorialPageCompleted();
                };
                Buttons.Add(ContinueButton);
                break;
            }

            case 3:
            {
                Header         = Properties_Resources.StatusIcon;
                Description    = Properties_Resources.StatusIconShows;
                ContinueButton = new NSButton()
                {
                    Title = Properties_Resources.Continue
                };
                ContinueButton.Activated += delegate
                {
                    Controller.TutorialPageCompleted();
                };
                Buttons.Add(ContinueButton);
                break;
            }

            case 4:
            {
                Header             = Properties_Resources.AddFolders;
                Description        = Properties_Resources.YouCan;
                StartupCheckButton = new NSButton()
                {
                    Frame = new RectangleF(190, Frame.Height - 400, 300, 18),
                    Title = Properties_Resources.Startup,
                    State = NSCellStateValue.On
                };
                StartupCheckButton.SetButtonType(NSButtonType.Switch);
                FinishButton = new NSButton()
                {
                    Title = Properties_Resources.Finish
                };
                StartupCheckButton.Activated += delegate
                {
                    Controller.StartupItemChanged(StartupCheckButton.State == NSCellStateValue.On);
                };
                FinishButton.Activated += delegate
                {
                    Controller.TutorialPageCompleted();
                };
                ContentView.AddSubview(StartupCheckButton);
                Buttons.Add(FinishButton);
                break;
            }
            }
        }
Exemplo n.º 2
0
        private void LoadTutorialWFP()
        {
            switch (Controller.TutorialCurrentPage)
            {
            // First page of the tutorial.
            case 1:
            {
                // UI elements.
                Header      = Properties_Resources.WhatsNext;
                Description = String.Format(Properties_Resources.CmisSyncCreates, Properties_Resources.ApplicationName);

                System.Uri  resourceLocater = new System.Uri("/DataSpaceSync;component/SetupTutorialFirstWPF.xaml", System.UriKind.Relative);
                UserControl LoadXAML        = Application.LoadComponent(resourceLocater) as UserControl;

                slide_image     = LoadXAML.FindName("slide_image") as WPF.Image;
                continue_button = LoadXAML.FindName("continue_button") as Button;
                cancel_button   = LoadXAML.FindName("cancel_button") as Button;

                ContentCanvas.Children.Add(LoadXAML);

                // Actions.
                cancel_button.Click += delegate {
                    Controller.TutorialSkipped();
                };

                continue_button.Click += delegate {
                    Controller.TutorialPageCompleted();
                };

                break;
            }

            // Second page of the tutorial.
            case 2:
            {
                // UI elements.
                Header      = Properties_Resources.Synchronization;
                Description = Properties_Resources.DocumentsAre;

                System.Uri  resourceLocater = new System.Uri("/DataSpaceSync;component/SetupTutorialSecondWPF.xaml", System.UriKind.Relative);
                UserControl LoadXAML        = Application.LoadComponent(resourceLocater) as UserControl;

                slide_image     = LoadXAML.FindName("slide_image") as WPF.Image;
                continue_button = LoadXAML.FindName("continue_button") as Button;

                ContentCanvas.Children.Add(LoadXAML);

                // Actions.
                continue_button.Click += delegate {
                    Controller.TutorialPageCompleted();
                };

                break;
            }

            // Third page of the tutorial.
            case 3:
            {
                // UI elements.
                Header      = Properties_Resources.StatusIcon;
                Description = String.Format(
                    Properties_Resources.StatusIconShows,
                    Properties_Resources.ApplicationName);

                System.Uri  resourceLocater = new System.Uri("/DataSpaceSync;component/SetupTutorialThirdWPF.xaml", System.UriKind.Relative);
                UserControl LoadXAML        = Application.LoadComponent(resourceLocater) as UserControl;

                slide_image     = LoadXAML.FindName("slide_image") as WPF.Image;
                continue_button = LoadXAML.FindName("continue_button") as Button;

                ContentCanvas.Children.Add(LoadXAML);

                // Actions.
                continue_button.Click += delegate {
                    Controller.TutorialPageCompleted();
                };

                break;
            }

            // Fourth page of the tutorial.
            case 4:
            {
                // UI elements.
                Header      = String.Format(Properties_Resources.AddFolders, Properties_Resources.ApplicationName);
                Description = Properties_Resources.YouCan;

                System.Uri  resourceLocater = new System.Uri("/DataSpaceSync;component/SetupTutorialFourthWPF.xaml", System.UriKind.Relative);
                UserControl LoadXAML        = Application.LoadComponent(resourceLocater) as UserControl;

                slide_image     = LoadXAML.FindName("slide_image") as WPF.Image;
                continue_button = LoadXAML.FindName("continue_button") as Button;
                check_box       = LoadXAML.FindName("check_box") as WPF.CheckBox;

                ContentCanvas.Children.Add(LoadXAML);

                // Actions.
                check_box.Click += delegate {
                    Controller.StartupItemChanged(check_box.IsChecked.Value);
                };

                continue_button.Click += delegate {
                    Controller.TutorialPageCompleted();
                };

                break;
            }
            }
        }
Exemplo n.º 3
0
        private void ShowTutorialPage()
        {
            switch (Controller.TutorialCurrentPage)
            {
            case 1:
            {
                Header      = CmisSync.Properties_Resources.WhatsNext;
                Description = CmisSync.Properties_Resources.CmisSyncCreates;

                Button skip_tutorial_button = new Button(CmisSync.Properties_Resources.SkipTutorial);
                skip_tutorial_button.Clicked += delegate {
                    Controller.TutorialSkipped();
                };

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-1.png");

                Add(slide);

                AddButton(skip_tutorial_button);
                AddButton(continue_button);
            }
            break;

            case 2:
            {
                Header      = CmisSync.Properties_Resources.Synchronization;
                Description = CmisSync.Properties_Resources.DocumentsAre;

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-2.png");

                Add(slide);
                AddButton(continue_button);
            }
            break;

            case 3:
            {
                Header      = CmisSync.Properties_Resources.StatusIcon;
                Description = CmisSync.Properties_Resources.StatusIconShows;

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-3.png");

                Add(slide);
                AddButton(continue_button);
            }
            break;

            case 4:
            {
                Header      = Properties_Resources.AddFolders;
                Description = Properties_Resources.YouCan;

                Image slide = UIHelpers.GetImage("tutorial-slide-4.png");

                Button finish_button = new Button(CmisSync.Properties_Resources.Finish);
                finish_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };


                CheckButton check_button = new CheckButton(CmisSync.Properties_Resources.Startup)
                {
                    Active = true
                };

                check_button.Toggled += delegate {
                    Controller.StartupItemChanged(check_button.Active);
                };

                Add(slide);
                AddOption(check_button);
                AddButton(finish_button);
            }
            break;
            }
        }
Exemplo n.º 4
0
 partial void OnContinue(MonoMac.Foundation.NSObject sender)
 {
     Controller.TutorialPageCompleted();
 }
Exemplo n.º 5
0
        private void ShowTutorialPage()
        {
            switch (Controller.TutorialCurrentPage)
            {
            case 1:
            {
                Header      = CmisSync.Properties_Resources.ResourceManager.GetString("WhatsNext", CultureInfo.CurrentCulture);
                Description = CmisSync.Properties_Resources.ResourceManager.GetString("CmisSyncCreates", CultureInfo.CurrentCulture);

                Button skip_tutorial_button = new Button("Skip Tutorial");
                skip_tutorial_button.Clicked += delegate {
                    Controller.TutorialSkipped();
                };

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-1.png");

                Add(slide);

                AddButton(skip_tutorial_button);
                AddButton(continue_button);
            }
            break;

            case 2:
            {
                Header      = "Sharing files with others";
                Description = "All files added to the server are automatically synced to your " +
                              "local folder.";

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-2.png");

                Add(slide);
                AddButton(continue_button);
            }
            break;

            case 3:
            {
                Header      = "The status icon is here to help";
                Description = "It shows the syncing progress, provides easy access to " +
                              "your folders and let's you view recent changes.";

                Button continue_button = new Button(continueText);
                continue_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };

                Image slide = UIHelpers.GetImage("tutorial-slide-3.png");

                Add(slide);
                AddButton(continue_button);
            }
            break;

            case 4:
            {
                Header      = "Adding repository folders to CmisSync";
                Description = "           " +
                              "           ";

                Image slide = UIHelpers.GetImage("tutorial-slide-4.png");

                Button finish_button = new Button("Finish");
                finish_button.Clicked += delegate {
                    Controller.TutorialPageCompleted();
                };


                CheckButton check_button = new CheckButton("Add CmisSync to startup items")
                {
                    Active = true
                };

                check_button.Toggled += delegate {
                    Controller.StartupItemChanged(check_button.Active);
                };

                Add(slide);
                AddOption(check_button);
                AddButton(finish_button);
            }
            break;
            }
        }