private void onWikiPageChange(ValueChangedEvent <APIWikiPage> e) { if (e.NewValue == null) { return; } TabControl.Clear(); Current.Value = null; TabControl.AddItem(IndexPageString); if (e.NewValue.Path == index_path) { Current.Value = IndexPageString; return; } if (e.NewValue.Subtitle != null) { TabControl.AddItem(e.NewValue.Subtitle); } TabControl.AddItem(e.NewValue.Title); Current.Value = e.NewValue.Title; }
public ChangelogHeader() { TabControl.AddItem(listing_string); Current.ValueChanged += e => { if (e.NewValue == listing_string) { ListingSelected?.Invoke(); } }; Build.BindValueChanged(e => { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue.DisplayVersion); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue.DisplayVersion); Current.Value = e.NewValue.DisplayVersion; } else { Current.Value = listing_string; } }); }
public TestBreadcrumbControlHeader() { ContentSidePadding = 10; TabControl.AddItem("tab1"); TabControl.AddItem("tab2"); TabControl.Current.Value = "tab2"; }
public WikiHeader() { TabControl.AddItem(IndexPageString); Current.Value = IndexPageString; WikiPageData.BindValueChanged(onWikiPageChange); Current.BindValueChanged(onCurrentChange); }
public ProfileHeader() { User.ValueChanged += e => updateDisplay(e.NewValue); TabControl.AddItem("info"); TabControl.AddItem("modding"); centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Expanded = visible.NewValue, true); }
public ProfileHeader() { ContentSidePadding = UserProfileOverlay.CONTENT_X_MARGIN; User.ValueChanged += e => updateDisplay(e.NewValue); TabControl.AddItem("資訊"); TabControl.AddItem("摸圖"); centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Expanded = visible.NewValue, true); }
public ProfileHeader() : base(OverlayColourScheme.Green) { BackgroundHeight = 150; User.ValueChanged += e => updateDisplay(e.NewValue); TabControl.AddItem("info"); TabControl.AddItem("modding"); centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Expanded = visible.NewValue, true); }
public ProfileHeader() { ContentSidePadding = UserProfileOverlay.CONTENT_X_MARGIN; User.ValueChanged += e => updateDisplay(e.NewValue); TabControl.AddItem(LayoutStrings.HeaderUsersShow); // todo: pending implementation. // TabControl.AddItem(LayoutStrings.HeaderUsersModding); centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Expanded = visible.NewValue, true); }
public NewsHeader() { TabControl.AddItem(front_page_string); Current.BindValueChanged(e => { if (e.NewValue == front_page_string) { ShowFrontPage?.Invoke(); } }); article.BindValueChanged(onArticleChanged, true); }
public NewsHeader() { TabControl.AddItem(front_page_string); Current.ValueChanged += e => { if (e.NewValue == front_page_string) { ShowFrontPage?.Invoke(); } }; Post.ValueChanged += showPost; }
private void onArticleChanged(ValueChangedEvent <string> e) { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue); Current.Value = e.NewValue; } else { Current.Value = front_page_string; } }
public CloudsuHeader() { TabControl.AddItem("Best Performance"); // TabControl.AddItem("Other"); Current.ValueChanged += e => { if (e.NewValue == "Other") { ShowOtherPage.Invoke(); } else { ShowBestPerformancePage.Invoke(); } title.Tab = e.NewValue; }; ruleset.ValueChanged += e => title.Ruleset = e.NewValue.Name; }
private void showBuild(ValueChangedEvent <APIChangelogBuild> e) { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue.ToString()); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue.ToString()); Current.Value = e.NewValue.ToString(); updateCurrentStream(); } else { Current.Value = ListingString; currentStream.Value = null; } }
private void showPost(ValueChangedEvent <string> e) { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue); Current.Value = e.NewValue; title.IsReadingPost = true; } else { Current.Value = front_page_string; title.IsReadingPost = false; } }
public ChangelogHeader() { TabControl.AddItem(listing_string); TabControl.Current.ValueChanged += e => { if (e.NewValue == listing_string) { ListingSelected?.Invoke(); } }; Current.ValueChanged += showBuild; Streams.Current.ValueChanged += e => { if (e.NewValue?.LatestBuild != null && e.NewValue != Current.Value?.UpdateStream) { Current.Value = e.NewValue.LatestBuild; } }; }
public ChangelogHeader() { TabControl.AddItem(ListingString); Current.ValueChanged += e => { if (e.NewValue == ListingString) { ListingSelected?.Invoke(); } }; Build.ValueChanged += showBuild; currentStream.ValueChanged += e => { if (e.NewValue?.LatestBuild != null && !e.NewValue.Equals(Build.Value?.UpdateStream)) { Build.Value = e.NewValue.LatestBuild; } }; }
private void showBuild(ValueChangedEvent <APIChangelogBuild> e) { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue.ToString()); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue.ToString()); Current.Value = e.NewValue.ToString(); updateCurrentStream(); title.Version = e.NewValue.UpdateStream.DisplayName; } else { Current.Value = listing_string; Streams.Current.Value = null; title.Version = null; } }
private void showBuild(ValueChangedEvent <APIChangelogBuild> e) { if (e.OldValue != null) { TabControl.RemoveItem(e.OldValue.ToString()); } if (e.NewValue != null) { TabControl.AddItem(e.NewValue.ToString()); TabControl.Current.Value = e.NewValue.ToString(); Streams.Current.Value = Streams.Items.FirstOrDefault(s => s.Name == e.NewValue.UpdateStream.Name); title.Version = e.NewValue.UpdateStream.DisplayName; } else { TabControl.Current.Value = listing_string; Streams.Current.Value = null; title.Version = null; } }
public static void Test() { TabControl tab = Gui.Instance.CreateWidget <TabControl>("TabControl", new IntCoord(120, 420, 200, 100), Align.Default, "Main"); tab.EventTabChangeSelect += new TabControl.HandleTabChangeSelect(tab_EventTabChangeSelect); TabItem item = tab.AddItem("sheet1"); tab.AddItem("sheet2"); //, "2"); tab.InsertItemAt(0, "insert sheet1"); tab.InsertItemAt(0, "insert sheet2"); //, "2"); tab.SmoothShow = !tab.SmoothShow; tab.ButtonAutoWidth = !tab.ButtonAutoWidth; tab.ButtonDefaultWidth = tab.ButtonDefaultWidth + 80; int width = tab.GetButtonWidthAt(0); width = tab.GetButtonWidth(item); tab.SetButtonWidthAt(0, 82); tab.SetButtonWidth(item, 62); width = tab.GetButtonWidthAt(0); width = tab.GetButtonWidth(item); tab.BeginToItemSelected(); tab.BeginToItem(item); tab.BeginToItemAt(0); string name = tab.GetItemName(item); name = tab.GetItemNameAt(0); tab.SetItemNameAt(0, "new name0"); name = tab.GetItemNameAt(0); //object data = tab.GetItemDataAt(0) as string; //tab.SetItemDataAt(0, "0"); //data = tab.GetItemDataAt(0) as string; //tab.ClearItemDataAt(0); //data = tab.GetItemDataAt(0) as string; uint index = tab.IndexSelected; tab.IndexSelected = 0; TabItem find = tab.FindItemWith("new name0"); find = tab.FindItemWith("new name00"); index = tab.FindItemIndexWith("sheet1"); index = tab.FindItemIndexWith("sheet11"); index = tab.GetItemIndex(item); item = tab.GetItemAt(0); //TabItem test start /*item.SetItemSelected(); * name = item.ItemName; * item.ItemName = "new item name"; * item.ButtonWidth = item.ButtonWidth + 1;*/ /*data = item.ItemData as string; * item.ItemData = "new data"; * data = tab.GetItemData(item) as string; * data = tab.GetItemDataAt(0) as string; * data = item.ItemData as string; * item.ItemData = null; * data = item.ItemData as string;*/ //TabItem test end tab.RemoveItem(item); item = null; tab.AddItem("add item"); uint count = tab.ItemCount; }
public NewsHeader() { TabControl.AddItem(front_page_string); article.BindValueChanged(onArticleChanged, true); }
public TestBreadcrumbControlHeader() { TabControl.AddItem("tab1"); TabControl.AddItem("tab2"); TabControl.Current.Value = "tab2"; }
public TestStringTabControlHeader() { TabControl.AddItem("tab1"); TabControl.AddItem("tab2"); }
public void AddItem(string value) { TabControl.AddItem(value); Current.Value = TabControl.Items.LastOrDefault(); }
public TestHeader() { TabControl.AddItem(items[0]); Current.Value = items[0]; }