예제 #1
0
		public MainPage ()
		{
            this.BindingContext = this;
            this.ViewModel = new MyTabViewModel();
            UIChanger = new MyUIChanger();
            ViewModel.Items = System.Linq.Enumerable.Select(AppSettings.TR.GetDivisionTypes(), (Arr, idx) => new MyTabItem { Title = Arr, Index = idx });
        }
예제 #2
0
 public WordForWordUC(object Parameter)
 {
     dynamic c = Parameter;
     Division = c.Division;
     Selection = c.Selection;
     this.BindingContext = this;
     this.ViewModel = new VirtualizingWrapPanelAdapter();
     UIChanger = new MyUIChanger();
 }
예제 #3
0
        public WordForWordUC(object Parameter)
        {
            dynamic c = Parameter;

            Division            = c.Division;
            Selection           = c.Selection;
            this.BindingContext = this;
            this.ViewModel      = new VirtualizingWrapPanelAdapter();
            UIChanger           = new MyUIChanger();
        }
예제 #4
0
        public MainPage()
        {
            this.BindingContext = this;
            this.ViewModel      = new MyTabViewModel();
            UIChanger           = new MyUIChanger();
            List <MyTabItem> items = null;

            items = System.Linq.Enumerable.Select(AppSettings.TR.GetDivisionTypes(), (Arr, idx) => new MyTabItem {
                Title = Arr, Index = idx + 1
            }).ToList();
            items.Insert(0, new MyTabItem {
                IsBookmarks = true, Title = ISQV.Xam.UWP.Resources.AppResources.Bookmarks_Text, Index = 0
            });
            ViewModel.Items = items;
            InitializeComponent();
        }
예제 #5
0
        public MainPage()
        {
            this.DataContext = this;
            this.ViewModel = new MyTabViewModel();
            UIChanger = new MyUIChanger();
            this.InitializeComponent();
#if STORETOOLKIT
            AppBarButton RenderButton = new AppBarButton() { Icon = new SymbolIcon(Symbol.Camera), Label = new Windows.ApplicationModel.Resources.ResourceLoader().GetString("Render/Label") };
            RenderButton.Click += RenderPngs_Click;
            (this.BottomAppBar as CommandBar).PrimaryCommands.Add(RenderButton);
#endif
#if WINDOWS_PHONE_APP
            this.NavigationCacheMode = NavigationCacheMode.Required;
#endif
            gestRec = new Windows.UI.Input.GestureRecognizer();
            gestRec.GestureSettings = Windows.UI.Input.GestureSettings.HoldWithMouse | Windows.UI.Input.GestureSettings.Hold | Windows.UI.Input.GestureSettings.Tap | Windows.UI.Input.GestureSettings.DoubleTap | Windows.UI.Input.GestureSettings.RightTap;
            gestRec.Holding += OnHolding;
            gestRec.RightTapped += OnRightTapped;
            gestRec.Tapped += OnTapped;
        }
예제 #6
0
        public WordForWordUC(object Parameter)
        {
            dynamic c = Parameter;

            Division            = c.Division;
            Selection           = c.Selection;
            this.BindingContext = this;
            this.ViewModel      = new VirtualizingWrapPanelAdapter();
            UIChanger           = new MyUIChanger();
            InitializeComponent();
            WidthLimiterConverter.BindingContext = this;
            MainGrid.SizeChanged += OnSizeChanged;

            WidthLimiterConverter.TopLevelMaxValue = UIChanger.MaxWidth;
            double curWidth = UIChanger.MaxWidth;

            AppSettings.TR.GetRenderedQuranText(AppSettings.bShowTransliteration ? XMLRender.ArabicData.TranslitScheme.RuleBased : XMLRender.ArabicData.TranslitScheme.None, String.Empty, String.Empty, Division.ToString(), Selection.ToString(), !AppSettings.bShowTranslation ? "None" : AppSettings.ChData.IslamData.Translations.TranslationList[AppSettings.iSelectedTranslation].FileName, AppSettings.bShowW4W ? "0" : "4", AppSettings.bUseColoring ? "0" : "1").ContinueWith((x) => {
                this.ViewModel.RenderModels = VirtualizingWrapPanelAdapter.GroupRenderModels(System.Linq.Enumerable.Select(x.Result.Items, (Arr) => new MyRenderItem((XMLRender.RenderArray.RenderItem)Arr)).ToList(), curWidth);
            });
        }
예제 #7
0
        public MainPage()
        {
            this.DataContext = this;
            this.ViewModel   = new MyTabViewModel();
            UIChanger        = new MyUIChanger();
            this.InitializeComponent();
#if STORETOOLKIT
            AppBarButton RenderButton = new AppBarButton()
            {
                Icon = new SymbolIcon(Symbol.Camera), Label = new Windows.ApplicationModel.Resources.ResourceLoader().GetString("Render/Label")
            };
            RenderButton.Click += RenderPngs_Click;
            (this.BottomAppBar as CommandBar).PrimaryCommands.Add(RenderButton);
#endif
#if WINDOWS_PHONE_APP
            this.NavigationCacheMode = NavigationCacheMode.Required;
#endif
            gestRec = new Windows.UI.Input.GestureRecognizer();
            gestRec.GestureSettings = Windows.UI.Input.GestureSettings.HoldWithMouse | Windows.UI.Input.GestureSettings.Hold | Windows.UI.Input.GestureSettings.Tap | Windows.UI.Input.GestureSettings.DoubleTap | Windows.UI.Input.GestureSettings.RightTap;
            gestRec.Holding        += OnHolding;
            gestRec.RightTapped    += OnRightTapped;
            gestRec.Tapped         += OnTapped;
        }
        public WordForWordUC()
        {
            this.DataContext = this;
            this.ViewModel = new VirtualizingWrapPanelAdapter();
            UIChanger = new MyUIChanger();
            this.InitializeComponent();

            MainGrid.SizeChanged += OnSizeChanged;
#if WINDOWS_APP
            AppBarButton BackButton = new AppBarButton() { Icon = new SymbolIcon(Symbol.Back), Label = new Windows.ApplicationModel.Resources.ResourceLoader().GetString("Back/Label") };
            BackButton.Click += Back_Click;
            (this.BottomAppBar as CommandBar).PrimaryCommands.Add(BackButton);
#endif
#if STORETOOLKIT
            AppBarButton RenderButton = new AppBarButton() { Icon = new SymbolIcon(Symbol.Camera), Label = new Windows.ApplicationModel.Resources.ResourceLoader().GetString("Render/Label") };
            RenderButton.Click += RenderPngs_Click;
            (this.BottomAppBar as CommandBar).PrimaryCommands.Add(RenderButton);
#endif
            gestRec = new Windows.UI.Input.GestureRecognizer();
            gestRec.GestureSettings = Windows.UI.Input.GestureSettings.HoldWithMouse | Windows.UI.Input.GestureSettings.Hold | Windows.UI.Input.GestureSettings.RightTap | Windows.UI.Input.GestureSettings.Tap;
            gestRec.Holding += OnHolding;
            gestRec.RightTapped += OnRightTapped;
            gestRec.Tapped += OnTapped;
        }