Example #1
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public MainWindowViewModel()
        {
            // set beginning page
            this._currentPage = Identifiers.Pages.RenameIt;

            // set change page command
            this._menuTitleButtonCommand = new Commands.RelayCommand(this.onTitleButtonClick, true);
        }
        public CardViewTemplate(SleepTasks sleepTask)
        {
            PageId = sleepTask.PageId;

            Grid grid = new Grid
            {
                Padding         = new Thickness(0, 1, 1, 1),
                RowSpacing      = 1,
                ColumnSpacing   = 1,
                BackgroundColor = Color.FromHex("E3E3E3"),
                VerticalOptions = LayoutOptions.FillAndExpand,
                RowDefinitions  =
                {
                    new RowDefinition {
                        Height = new GridLength(100, GridUnitType.Auto)
                    },
                    new RowDefinition {
                        Height = new GridLength(30, GridUnitType.Absolute)
                    }
                },
                ColumnDefinitions =
                {
                    new ColumnDefinition {
                        Width = new GridLength(4, GridUnitType.Absolute)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(100, GridUnitType.Absolute)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(100, GridUnitType.Absolute)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(50, GridUnitType.Absolute)
                    }
                }
            };

            grid.Children.Add(new CardStatusView(sleepTask.Strategy), 0, 1, 0, 2);
            grid.Children.Add(new Image()
            {
                Source        = sleepTask.PageImage,
                HeightRequest = 100,
                WidthRequest  = 100,
                Aspect        = Aspect.AspectFill
            }, 1, 2, 0, 1);
            grid.Children.Add(new CardDetailsView(sleepTask.PageTitle, sleepTask.PageDescription), 2, 5, 0, 1);
            grid.Children.Add(new CardButtonView(sleepTask.PageButton), 1, 5, 1, 2);

            Content = grid;
        }
Example #3
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public RenameItViewModel()
        {
            // create lists
            this.VideoItems    = new ObservableCollection <Directory.ItemViewModel>();
            this.SubtitleItems = new ObservableCollection <Directory.ItemViewModel>();

            // pass mutator functions to button view model which contain the command
            this._directroyButtonCommand  = new Commands.RelayCommand(this.directoryButtonClick, true);
            this._previewButtonCommand    = new Commands.RelayCommand(this.previewButtonClick, true);
            this._confirmButtonCommand    = new Commands.RelayCommand(this.confirmButtonClick, true);
            this._optionsButtonCommand    = new Commands.RelayCommand(this.optionsButtonClick, true);
            this._extensionsButtonCommand = new Commands.RelayCommand(this.extensionsButtonClick, true);
            this._videoTitleCommand       = new Commands.RelayCommand(this.videoTitleButtonClick, true);
            this._subtitleTitleCommand    = new Commands.RelayCommand(this.subtitleTitleButtonClick, true);

            // current sub page
            this._currentSubPage = Identifiers.Pages.Options;
        }
Example #4
0
 /// <summary>
 /// Changes to the extensions subpage
 /// </summary>
 private void extensionsButtonClick()
 {
     this.CurrentSubPage = Identifiers.Pages.Extensions;
 }
Example #5
0
 /// <summary>
 /// Changes to the options subpage
 /// </summary>
 private void optionsButtonClick()
 {
     this.CurrentSubPage = Identifiers.Pages.Options;
 }