private void BackButton_Click(object sender, RoutedEventArgs e) { if (BackClicked != null) { BackClicked.Invoke(sender, e); } }
private void OnBackClicked() { Hide(); ResetNameInputField(); BackClicked?.Invoke(); }
private void SetupToolbar() { var toolbar = _view.FindViewById <Toolbar>(Resource.Id.toolbarsingleview); toolbar.SetNavigationIcon(Resource.Mipmap.arrow_back); toolbar.NavigationIcon.SetColorFilter(Resources.GetColor(Resource.Color.ddfWhite), PorterDuff.Mode.SrcAtop); toolbar.NavigationOnClick += (sender, args) => BackClicked?.Invoke(this, EventArgs.Empty); }
private void OnBackClicked() { BackClicked.SafeRaise(); }
public override void OnBackPressed() { BackClicked?.Invoke(this, EventArgs.Empty); }
private TabControl CreateAdvancedControlsTab() { TabControl advancedControls = new TabControl(); BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor; advancedControls.TabBar.BorderColor = ActiveTheme.Instance.SecondaryTextColor; advancedControls.TabBar.Margin = new BorderDouble(0, 0); advancedControls.TabBar.Padding = new BorderDouble(0, 2); int textSize = 16; // this means we are in compact view and so we will make the tabs text a bit smaller textSize = 14; TextImageButtonFactory advancedControlsButtonFactory = new TextImageButtonFactory(); advancedControlsButtonFactory.fontSize = 14; advancedControlsButtonFactory.invertImageLocation = false; backButton = advancedControlsButtonFactory.Generate(LocalizedString.Get("Back"), StaticData.Instance.LoadIcon("icon_arrow_left_32x32.png", 32, 32)); backButton.ToolTipText = "Switch to Queue, Library and History".Localize(); backButton.Margin = new BorderDouble(right: 3); backButton.VAnchor = VAnchor.ParentBottom; backButton.Cursor = Cursors.Hand; backButton.Click += (s, e) => BackClicked?.Invoke(this, null); advancedControls.TabBar.AddChild(backButton); advancedControls.TabBar.AddChild(new HorizontalSpacer()); GuiWidget manualPrinterControls = new ManualPrinterControls(); ScrollableWidget manualPrinterControlsScrollArea = new ScrollableWidget(true); manualPrinterControlsScrollArea.ScrollArea.HAnchor |= HAnchor.ParentLeftRight; manualPrinterControlsScrollArea.AnchorAll(); manualPrinterControlsScrollArea.AddChild(manualPrinterControls); RGBA_Bytes unselectedTextColor = ActiveTheme.Instance.TabLabelUnselected; if (ActiveSliceSettings.Instance.PrinterSelected) { sliceSettingsWidget = new SliceSettingsWidget(); } else { sliceSettingsWidget = new NoSettingsWidget(); } var sliceSettingsTabPage = new TabPage(sliceSettingsWidget, "Settings".Localize().ToUpper()); var sliceSettingPopOut = new PopOutTextTabWidget(sliceSettingsTabPage, SliceSettingsTabName, new Vector2(590, 400), textSize); advancedControls.AddTab(sliceSettingPopOut); var controlsTabPage = new TabPage(manualPrinterControlsScrollArea, "Controls".Localize().ToUpper()); var controlsPopOut = new PopOutTextTabWidget(controlsTabPage, ControlsTabName, new Vector2(400, 300), textSize); advancedControls.AddTab(controlsPopOut); #if !__ANDROID__ MenuOptionSettings.sliceSettingsPopOut = sliceSettingPopOut; MenuOptionSettings.controlsPopOut = controlsPopOut; #endif var optionsControls = new PrinterConfigurationScrollWidget(); advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(optionsControls, "Options".Localize().ToUpper()), "Options Tab", textSize, ActiveTheme.Instance.PrimaryTextColor, new RGBA_Bytes(), unselectedTextColor, new RGBA_Bytes())); // Make sure we are on the right tab when we create this view { string selectedTab = UserSettings.Instance.get(ThirdPanelTabView_AdvancedControls_CurrentTab); advancedControls.SelectTab(selectedTab); advancedControls.TabBar.TabIndexChanged += (sender, e) => { string selectedTabName = advancedControls.TabBar.SelectedTabName; if (!string.IsNullOrEmpty(selectedTabName)) { UserSettings.Instance.set(ThirdPanelTabView_AdvancedControls_CurrentTab, selectedTabName); } }; } return(advancedControls); }
private void OnBackClicked() { BackClicked?.Invoke(this, EventArgs.Empty); }
private void BackButton_Click(object sender, EventArgs e) { BackClicked?.Invoke(this, e); }