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 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); }; }
public OneToTwoPage() { this.InitializeComponent(); Current = this; LeftFrame.Navigate(typeof(MyNewsPage.NewsListViewPage)); RightFrame.Navigate(typeof(MyNewsPage.NewsContentPage)); }
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 void ShowAuxilliaryPane(AuxiliaryPane pane, int width = 235, bool openleft = false) { LoggingHandler.Log($"Showing pane --> {pane}"); if (SelectedAuxiliaryPane == pane) { HideAuxilliaryPane(); return; } if (SelectedAuxiliaryPane != AuxiliaryPane.None) { HideAuxilliaryPane(false); } switch (pane) { case AuxiliaryPane.Settings: RightFrame.Navigate(new SettingsPage(this)); break; case AuxiliaryPane.QueueManagement: RightFrame.Navigate(new QueueManagement(this)); break; case AuxiliaryPane.Search: RightFrame.Navigate(new SearchPage(this)); break; case AuxiliaryPane.Notifications: RightFrame.Navigate(new NotificationPage(this)); break; case AuxiliaryPane.TrackInfo: RightFrame.Navigate(new TrackInfoPage(this)); break; case AuxiliaryPane.Lyrics: RightFrame.Navigate(new LyricsPage(this)); break; default: return; } if (!openleft) { DockPanel.SetDock(RightFrame, Dock.Right); } else { DockPanel.SetDock(RightFrame, Dock.Left); } RightFrame.Visibility = Visibility.Visible; var sb = InterfaceUtils.GetDoubleAnimation(0, width, TimeSpan.FromMilliseconds(100), new PropertyPath("Width")); sb.Begin(RightFrame); SelectedAuxiliaryPane = pane; RightFrame.NavigationService.RemoveBackEntry(); }
//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(); }
public MainFrame(Game game, int x, int y, int w, int h, string text, Color backColor) : base(game, x, y, w, h, text, backColor) { rightFrame = new RightFrame(game, widthDisplay - ConstantFrame.RIGHT_PANEL_WIDTH, y, ConstantFrame.RIGHT_PANEL_WIDTH, h, "", ConstantFrame.COLOR_RIGHT_FRAME ); this.Add(rightFrame); bottomFrameList = new List<BottomFrame>(); }
private void DirectoryTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e) { if (RightFrame.Content is PasswordMenager && (RightFrame.Content as PasswordMenager).CurrentlyEdited != null) { (RightFrame.Content as PasswordMenager).CancelButtonClick(null, null); } if (DirectoryTree.SelectedItem == null) { RightFrame.Navigate(null); } if (DirectoryTree.SelectedItem is AbstractDirectoryTreeItem) { var selected = (DirectoryTree.SelectedItem as AbstractDirectoryTreeItem); RightFrame.Navigate(selected.GetPage()); RightFrame.DataContext = selected.CreateDataContext(); } }
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)); } }
private void HotelPageRight_OnClick(object sender, RoutedEventArgs e) { RightFrame.Navigate(typeof(HotelPage)); }
private void House_Click(object sender, RoutedEventArgs e) { RightFrame.Navigate(typeof(StatusFrame)); }
private void NavigateRightFrame(Type pageType, object parameter) { LeavePageEventHandler?.Invoke(); LeavePageEventHandler = null; RightFrame.Navigate(pageType, parameter); }
public MainPage() { InitializeComponent(); RightPart = RightFrame; LeftPart = LeftPivot; PageStack.Next("Right", "Right", typeof(BlankPage), null); SystemNavigationManager.GetForCurrentView().BackRequested += (sender, el) => { el.Handled = true; if (PageStack.CanGoBack) { PageStack.Back(); } }; var leftChanged = Observable .FromEventPattern <SizeChangedEventArgs>(LeftPivot, nameof(LeftPivot.SizeChanged)) .ObserveOnCoreDispatcher() .Subscribe(x => { var headerpanel = FindVisualChildren <PivotHeaderPanel>(LeftPivot).ToList(); var totalwidth = LeftPivot.ActualWidth; headerpanel[0].Width = totalwidth; var items = FindVisualChildren <PivotHeaderItem>(headerpanel[0]).ToList(); for (var i = 0; i < items.Count; i++) { items[i].Width = totalwidth / items.Count - 1; } }); var rightChanged = Observable .FromEventPattern <SizeChangedEventArgs>(RightFrame, nameof(RightFrame.SizeChanged)) .ObserveOnCoreDispatcher() .Subscribe(x => { if (RootGrid.ActualWidth > 600) { LeftPivot.Width = 500; LeftPivot.Visibility = Visibility.Visible; RightFrame.Visibility = Visibility.Visible; RightFrame.SetValue(RelativePanel.RightOfProperty, LeftPivot); LeftPivot.SetValue(RelativePanel.AlignBottomWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignTopWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignLeftWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignRightWithPanelProperty, false); RightFrame.SetValue(RelativePanel.AlignBottomWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignTopWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignRightWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignLeftWithPanelProperty, false); } else { LeftPivot.Width = double.NaN; if (RightFrame.CanGoBack) { LeftPivot.Visibility = Visibility.Visible; RightFrame.Visibility = Visibility.Collapsed; } else { LeftPivot.Visibility = Visibility.Collapsed; RightFrame.Visibility = Visibility.Visible; } LeftPivot.SetValue(RelativePanel.AlignBottomWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignTopWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignLeftWithPanelProperty, true); LeftPivot.SetValue(RelativePanel.AlignRightWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignBottomWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignTopWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignRightWithPanelProperty, true); RightFrame.SetValue(RelativePanel.AlignLeftWithPanelProperty, true); } }); _events = new List <IDisposable> { leftChanged, rightChanged }; }
private void txtTallySetup_PreviewMouseDown(object sender, MouseButtonEventArgs e) { RightFrame.Navigate(new PTallySetup()); }
private void txtReceiptOffset_PreviewMouseDown(object sender, MouseButtonEventArgs e) { RightFrame.Navigate(new PReceiptOffset()); }
private void txtSyncProcess_PreviewMouseDown(object sender, MouseButtonEventArgs e) { RightFrame.Navigate(new pSync()); }