public FrameManagerBase() { // FrameManager = this; // SystemNavigationManager.GetForCurrentView().BackRequested += FrameManagerBase_BackRequested; ; FrameHelpers.action += () => { if (RightFrame == null) { return(false); } if (RightFrame.CanGoBack) { RightFrame.GoBack(); RightFrameContentChange?.Invoke(this, RightFrame.CanGoBack); } else if (LeftFrame.CanGoBack) { LeftFrame.GoBack(); LeftFrameContentChange?.Invoke(this, LeftFrame.CanGoBack); } else { return(false); } SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = RightFrame.CanGoBack || LeftFrame.CanGoBack ? AppViewBackButtonVisibility.Visible : SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility == AppViewBackButtonVisibility.Visible ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed; return(true); }; }
private async void PinAirline(ItemAir obj) { ItemsComparison = new ObservableCollection <ItemAir>(MockData()); ItemsComparison.Remove(ItemsComparison.Where(i => i.Id == obj.Id).Single()); ItemsCompaPin.Clear(); ItemsCompaPin.Add(obj); uint duration = 200; if (IsOriginalPostion) { LeftList.ItemsSource = ItemsComparison; RightList.ItemsSource = ItemsCompaPin; ChangeState(); await Task.WhenAll( LeftFrame.TranslateTo(124, 0, duration, Easing.CubicIn), RightFrame.TranslateTo(-124, 0, duration, Easing.CubicIn) ); } else { RightList.ItemsSource = ItemsComparison; LeftList.ItemsSource = ItemsCompaPin; ChangeState(); await Task.WhenAll( LeftFrame.TranslateTo(0, 0, duration, Easing.CubicIn), RightFrame.TranslateTo(0, 0, duration, Easing.CubicIn) ); } }
public OneToTwoPage() { this.InitializeComponent(); Current = this; LeftFrame.Navigate(typeof(MyNewsPage.NewsListViewPage)); RightFrame.Navigate(typeof(MyNewsPage.NewsContentPage)); }
public ContentPage() { this.InitializeComponent(); LeftFrame.Navigate(typeof(DiaryListVIewPage)); //RightFrame.Navigate(typeof(DiaryContentPage)); current = this; }
public void Print() { switch (mode) { case 1: string picture = new string(LeftFrame.ToCharArray()[0], 2) + Color + new string(RightFrame.ToCharArray()[0], 2); picture = picture + " " + Text + " " + picture; Console.WriteLine(picture); break; case 2: TestOperation(); if (Color == "" ^ operation == "spacing") { picture = new string(LeftFrame.ToCharArray()[0], 2) + Color + new string(RightFrame.ToCharArray()[0], 2); } else if (Color == "" && operation == "spacing") { picture = new string(LeftFrame.ToCharArray()[0], 3) + Color + new string(RightFrame.ToCharArray()[0], 3); } else { picture = new string(LeftFrame.ToCharArray()[0], 1) + Color + new string(RightFrame.ToCharArray()[0], 1); } picture = picture + " " + Text + " " + picture; Console.WriteLine(picture); break; } }
//public int LeftFrameWidth = 0; public MainPage() { Size size = GetDeviceResolution(); DeviceWidth = (int)size.Width / 2; //LeftFrameWidth = (int)size.Width / 4; this.InitializeComponent(); LeftFrame.Navigate(typeof(ListViewPage)); //RightFrame.Navigate(typeof(DiaryContentPage)); current = this; RightFrame.Navigate(typeof(RemindContentPage), "1"); }
private void HotelPageLeft_OnClick(object sender, RoutedEventArgs e) { LeftFrame.Navigate(typeof(HotelPage)); if (RightSyncIsChecked) { RightFrame.Navigate(typeof(HotelPage)); } else if (RightInvertedIsChecked) { RightFrame.Navigate(typeof(GuestPage)); } }
public AppWindow() { InitializeComponent(); restoreLocation = this.Location; restoreSize = this.Size = new Size(900, 600); this.BackColor = this.DarkColor; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = Properties.Resources.Icon; this.StartPosition = FormStartPosition.CenterScreen; this.Text = "IDPs Biometric Enumeration"; //this.MinimumSize = this.Size; //RegisterToMoveWindow(this); maximizedChanged = new EventHandler(DefaultEventHandler); //container container = new Container(this); this.Controls.Add(container); //titleBar titleBar = new TitleBar(this); this.Controls.Add(titleBar); RegisterToMoveWindow(titleBar); this.TitleBar.RefreshTitleBar(true, true, false); //left panel pnlLeft = new LeftPanel(this); this.Controls.Add(pnlLeft); //statusBar statusBar = new StatusBar(this); //this.Controls.Add(statusBar); //topFrame topFrame = new TopFrame(this); this.Controls.Add(topFrame); //bottomFrame bottomFrame = new BottomFrame(this); this.Controls.Add(bottomFrame); //leftFrame leftFrame = new LeftFrame(this); this.Controls.Add(leftFrame); //rightFrame rightFrame = new RightFrame(this); this.Controls.Add(rightFrame); //login form Body.Controls.Add(new LoginForm(this)); FitToScreen(); }
protected override async void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); LeftFrame.Navigate(typeof(TaskList)); await CurrentApp.WaitForInitializingAsync(); // navigate right frame to about page by default // this might be override by input actions NavigateRightFrame(typeof(AboutPage), null); // run start up actions CurrentApp.StupActionManager.Do(); // release loading view LoadingView.Visibility = Visibility.Collapsed; // handle startup dialog // await TryShowStartUpDialogAsync(); }
public FirstLandscapePage() { this.InitializeComponent(); Callouts.SetTitle = (string title) => { if (!title.Contains("Taminations")) { title = "Taminations - " + title; } Title.Text = title; }; Callouts.LevelButtonAction = (string level) => { Dictionary <string, string> intent = new Dictionary <string, string>(); intent["level"] = level; FrameUtilities.Navigate(RightFrame, typeof(CallListPage), intent); }; Callouts.AboutAction = () => { FrameUtilities.Navigate(RightFrame, typeof(AboutPage), new Dictionary <string, string>()); }; Callouts.LevelSettingsAction = () => { FrameUtilities.Navigate(RightFrame, typeof(SettingsPage), new Dictionary <string, string>()); }; Callouts.CallSelected = (string link) => { Dictionary <string, string> intent = new Dictionary <string, string>(); intent["link"] = link; this.Navigate(typeof(SecondLandscapePage), intent); }; Callouts.SequencerAction = () => { this.Navigate(typeof(SequencerLandscapePage), new Dictionary <string, string>()); }; Back.Visibility = Visibility.Collapsed; LeftFrame.Navigate(typeof(LevelPage)); if (PageUtilities.intents.ContainsKey(typeof(CallListPage))) { RightFrame.Navigate(typeof(CallListPage)); } else { RightFrame.Navigate(typeof(AboutPage)); } }
/// <summary> /// Page Load Event handler /// </summary> /// <param name="sender">Control</param> /// <param name="e">EventArgs e</param> protected void Page_Load(object sender, EventArgs e) { try { if (Session["UserID"] != null && Session["MaxSensitivity"] != null && Request.QueryString["TabID"] != null) { int userId = Convert.ToInt16(Session["UserID"].ToString()); int sensitivity = Convert.ToInt16(Session["MaxSensitivity"].ToString()); int tabId = Convert.ToInt16(Request.QueryString["TabID"].ToString()); switch (tabId) { case 328: // case 329: LeftFrame.LoadMenuNews(tabId); Page.RegisterClientScriptBlock("LoadPage", "<script>ShowLeftMenu();</script>"); Page.RegisterClientScriptBlock("Load", "<script>ShowRight();</script>"); break; case 322: Page.RegisterClientScriptBlock("LoadPage", "<script>top.frameSet2.cols='0,*';</script>"); break; default: LeftFrame.LoadMenu(tabId, userId, sensitivity); Page.RegisterClientScriptBlock("LoadPage", "<script>ShowLeftMenu();</script>"); break; } } } catch (Exception ex) { throw; } }