public CountTotal() : base("總共已賺取的 Kudosu") { DescriptionText.AddText("基於使用者對圖譜審核的貢獻量. 請看 "); DescriptionText.AddLink("這個頁面", "https://osu.ppy.sh/wiki/Kudosu"); DescriptionText.AddText(" 以獲得更多資訊."); }
private void DescriptionText_Enter(object sender, EventArgs e) { if (DescriptionText.Text.Equals("Description")) { DescriptionText.Clear(); } }
private void GetValidFields(ItemResult r) { if (IDSpinner.Enabled && IDSpinner.Value > 0 && !IDSpinner.Controls[1].Text.Equals(string.Empty)) { r.IDValue = IDSpinner.Value; } if (OwnerCombo.Enabled && OwnerCombo.SelectedIndex >= 0) { r.OwnerValue = OwnerCombo.SelectedItem.ToString(); } if (TypeCombo.Enabled && TypeCombo.SelectedIndex >= 0) { r.TypeValue = TypeCombo.SelectedItem.ToString(); } if (SerialText.Enabled && !SerialText.Text.Equals(string.Empty)) { r.SerialValue = SerialText.Text; } if (PlatformCombo.Enabled && PlatformCombo.SelectedIndex >= 0) { r.PlatformValue = PlatformCombo.SelectedItem.ToString(); } if (DescriptionText.Enabled && !DescriptionText.Equals(string.Empty)) { r.DescriptionValue = DescriptionText.Text; } }
public override void Write() { _worldPacket.WritePackedGuid(QuestGiverGUID); _worldPacket.WritePackedGuid(InformUnit); _worldPacket.WriteUInt32(QuestID); _worldPacket.WriteInt32(QuestPackageID); _worldPacket.WriteUInt32(PortraitGiver); _worldPacket.WriteUInt32(PortraitGiverMount); _worldPacket.WriteUInt32(PortraitTurnIn); _worldPacket.WriteUInt32(QuestFlags[0]); // Flags _worldPacket.WriteUInt32(QuestFlags[1]); // FlagsEx _worldPacket.WriteUInt32(SuggestedPartyMembers); _worldPacket.WriteInt32(LearnSpells.Count); _worldPacket.WriteInt32(DescEmotes.Count); _worldPacket.WriteInt32(Objectives.Count); _worldPacket.WriteInt32(QuestStartItemID); _worldPacket.WriteInt32(QuestSessionBonus); foreach (uint spell in LearnSpells) { _worldPacket.WriteUInt32(spell); } foreach (QuestDescEmote emote in DescEmotes) { _worldPacket.WriteUInt32(emote.Type); _worldPacket.WriteUInt32(emote.Delay); } foreach (QuestObjectiveSimple obj in Objectives) { _worldPacket.WriteUInt32(obj.Id); _worldPacket.WriteInt32(obj.ObjectID); _worldPacket.WriteInt32(obj.Amount); _worldPacket.WriteUInt8(obj.Type); } _worldPacket.WriteBits(QuestTitle.GetByteCount(), 9); _worldPacket.WriteBits(DescriptionText.GetByteCount(), 12); _worldPacket.WriteBits(LogDescription.GetByteCount(), 12); _worldPacket.WriteBits(PortraitGiverText.GetByteCount(), 10); _worldPacket.WriteBits(PortraitGiverName.GetByteCount(), 8); _worldPacket.WriteBits(PortraitTurnInText.GetByteCount(), 10); _worldPacket.WriteBits(PortraitTurnInName.GetByteCount(), 8); _worldPacket.WriteBit(AutoLaunched); _worldPacket.WriteBit(false); // unused in client _worldPacket.WriteBit(StartCheat); _worldPacket.WriteBit(DisplayPopup); _worldPacket.FlushBits(); Rewards.Write(_worldPacket); _worldPacket.WriteString(QuestTitle); _worldPacket.WriteString(DescriptionText); _worldPacket.WriteString(LogDescription); _worldPacket.WriteString(PortraitGiverText); _worldPacket.WriteString(PortraitGiverName); _worldPacket.WriteString(PortraitTurnInText); _worldPacket.WriteString(PortraitTurnInName); }
private void SetupChildComponents() { craftMenuMainLayer = GetComponentInParent <CraftMenuMainLayer>(); descriptionText = GetComponentInChildren <DescriptionText>(); craftMenuCraftLayer = GetComponentInChildren <CraftMenuCraftLayer>(); craftMenuCraftLayer.SetParentMenu(this); }
// Use this for initialization public void Makeit() { NameText = this.transform.GetChild(0); DescriptionText = this.transform.GetChild(2); Attack = this.transform.GetChild(3); Health = this.transform.GetChild(4); Cost = this.transform.GetChild(5); if (Name != null) { NameText.GetComponent <Text>().text = Name; } if (Description != null) { DescriptionText.GetComponent <Text>().text = Description; } if (cost >= 0) { Cost.GetComponent <Text>().text = cost.ToString(); } if (health != 0) { Health.GetComponent <Text>().text = health.ToString(); Attack.GetComponent <Text>().text = attack.ToString(); } else { Health.GetComponent <Text>().text = null; Attack.GetComponent <Text>().text = null; } }
internal CommitDialog( WindowOwner owner, Func < CommitDialog, BranchName, IEnumerable <CommitFile>, string, bool, CommitDialogViewModel> CommitDialogViewModelProvider, BranchName branchName, IEnumerable <CommitFile> files, string commitMessage, bool isMerging) { Owner = owner; InitializeComponent(); viewModel = CommitDialogViewModelProvider( this, branchName, files, commitMessage, isMerging); DataContext = viewModel; if (string.IsNullOrWhiteSpace(viewModel.Subject)) { SubjectText.Focus(); } else { DescriptionText.Focus(); } }
public CountTotal() : base("总共获得的Kudosu") { DescriptionText.AddText("基于你对游戏谱面制作的贡献有多少,查看"); DescriptionText.AddLink("这个链接", "https://osu.ppy.sh/wiki/Kudosu"); DescriptionText.AddText("以获得更多信息."); }
void ReleaseDesignerOutlets() { if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (ForecastsTableView != null) { ForecastsTableView.Dispose(); ForecastsTableView = null; } if (IconImage != null) { IconImage.Dispose(); IconImage = null; } if (LocationText != null) { LocationText.Dispose(); LocationText = null; } if (TempText != null) { TempText.Dispose(); TempText = null; } }
public CountTotal() : base("Total Kudosu Earned") { DescriptionText.AddText("Based on how much of a contribution the user has made to beatmap moderation. See "); DescriptionText.AddLink("this page", "https://osu.ppy.sh/wiki/Kudosu"); DescriptionText.AddText(" for more information."); }
private void ClearButton_Click(object sender, EventArgs e) { ProductCodeText.Clear(); DescriptionText.Clear(); PriceValue.Value = 75; VATText.Clear(); TotalText.Clear(); }
internal void ClearCache() { // When the ShowNonPublic settings changes we have to clear our whole namespace cache. Some // namespaces may contain only internal types, so this would cause them to be added or removed. m_namespaces = null; m_description = null; }
public override void ViewDidLoad() { View = new UniversalView(); base.ViewDidLoad(); InitializeComponent(); Title = "Details"; FlowerImage.SetImage( new NSUrl(Vm.ImageUri.AbsoluteUri), UIImage.FromBundle("flower_256_magenta.png")); this.SetBinding( () => Vm.Model.Name) .WhenSourceChanges( () => { // iOS is quite primitive and requires layout recalculation when the content // of UI elements changes. This is a good place to do that. NameText.Text = Vm.Model.Name; NameText.SizeToFit(); NameText.Frame = new CGRect(140, 75, 170, NameText.Bounds.Height); }); this.SetBinding( () => Vm.Model.Description) .WhenSourceChanges( () => { DescriptionText.Text = Vm.Model.Description; DescriptionText.SizeToFit(); DescriptionText.Frame = new CGRect(0, 0, 300, DescriptionText.Bounds.Height); Scroll.ContentSize = new CGSize(300, DescriptionText.Bounds.Height); Scroll.SetNeedsLayout(); }); SeeCommentButton.Clicked += (s, e) => { // iOS is the only framework where we decided to split the comments // on a different page. This is a good example that you can easily // have different UI experience even though the ViewModel and Model are the same var controller = Vm.Model.Comments.GetController( CreateCommentCell, BindCommentCell); controller.Title = "Comments"; var addCommentButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, null); addCommentButton.SetCommand("Clicked", Vm.AddCommentCommand); controller.NavigationItem.SetRightBarButtonItem(addCommentButton, false); AppDelegate.MainNavigationController.PushViewController(controller, true); }; }
internal DescriptionText GetDescription(NetBrowserManager manager, NetTypeBrowserInfo type) { if (m_description == null) { m_description = GetDescriptionInternal(manager, type); Debug.Assert(m_description != null, "m_description != null"); } return(m_description); }
internal DescriptionText GetDescription(NetNamespaceBrowserInfo ns, NetTypeBrowserInfo baseType) { if (m_description == null) { m_description = GetDescriptionInternal(ns, baseType); Debug.Assert(m_description != null, "m_description != null"); } return(m_description); }
internal DescriptionText GetDescription(TypeLibraryBrowserInfo parent) { if (m_description == null) { m_description = GetDescriptionInternal(parent); Debug.Assert(m_description != null, "m_description != null"); } return(m_description); }
public override int GetHashCode() { var hashCode = Cause.GetHashCode(); hashCode = (hashCode * 397) ^ Effect.GetHashCode(); hashCode = (hashCode * 397) ^ HeaderText.GetHashCode(); hashCode = (hashCode * 397) ^ DescriptionText.GetHashCode(); hashCode = (hashCode * 397) ^ Url.GetHashCode(); return(hashCode); }
} //R private void permissionsComboBox_SelectedValueChanged(object sender, EventArgs e) { if (PermissionsComboBox.SelectedItem.ToString() == "Add a class") { addClassPanel.Visible = true; addSubjectPanel.Visible = false; EventPanel.Visible = false; addPrincipalPannel.Visible = false; { { GradeComboBox.SelectedItem = null; Letter = "AA"; NonHeadTeacherComboBox.Items.Clear(); List <string> nonHeadTeachers = teacherController.NonHeadTeachers(); nonHeadTeachers.ForEach(w => nonHeadTeacherComboBox.Items.Add(w)); NonHeadTeacherComboBox.Text = String.Empty; } } } else { if (PermissionsComboBox.SelectedItem.ToString() == "Add a subject") { addSubjectPanel.Visible = true; addClassPanel.Visible = false; addPrincipalPannel.Visible = false; EventPanel.Visible = false; } else { if (PermissionsComboBox.SelectedItem.ToString() == "Add a vice-principal") { addSubjectPanel.Visible = false; addClassPanel.Visible = false; addPrincipalPannel.Visible = true; EventPanel.Visible = false; // Load nonPrincipalTeacherComboBox { teacherController.NonPrincipalTeachers().ForEach(w => nonPrincipalTeacherComboBox.Items.Add(w)); } } } } if (PermissionsComboBox.SelectedItem.ToString() == "Add an event") { addSubjectPanel.Visible = false; addClassPanel.Visible = false; addPrincipalPannel.Visible = false; EventPanel.Visible = true; EventNameTXT.Clear(); DescriptionText.Clear(); } } //R
/// <summary> /// Make a shadow copy of the element at the current state which stays available even the element is gone. /// </summary> /// <returns>A shadow copy of the current element.</returns> public new BasicBrowseFolderDialogData GetDataCopy() { var data = new BasicBrowseFolderDialogData(); FillData(data); data.DescriptionText = GetSafeData(() => { if (DescriptionText == null) { return(null); } return(DescriptionText.GetDataCopy()); }); data.NewFolderButton = GetSafeData(() => { if (NewFolderButton == null) { return(null); } return(NewFolderButton.GetDataCopy()); }); data.OKButton = GetSafeData(() => { if (OKButton == null) { return(null); } return(OKButton.GetDataCopy()); }); data.CancelButton = GetSafeData(() => { if (CancelButton == null) { return(null); } return(CancelButton.GetDataCopy()); }); data.FolderTree = GetSafeData(() => { if (FolderTree == null) { return(null); } return(FolderTree.GetDataCopy()); }); return(data); }
void ReleaseDesignerOutlets() { if (AddToCartButton != null) { AddToCartButton.Dispose(); AddToCartButton = null; } if (AmountText != null) { AmountText.Dispose(); AmountText = null; } if (CancelButton != null) { CancelButton.Dispose(); CancelButton = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (HotDogImageView != null) { HotDogImageView.Dispose(); HotDogImageView = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (PriceLabel != null) { PriceLabel.Dispose(); PriceLabel = null; } if (ShortDescriptionLabel != null) { ShortDescriptionLabel.Dispose(); ShortDescriptionLabel = null; } }
private void DrawText(SpriteBatch spriteBatch) { // Draw the text within the node itself, and position it in the center within each row var rows = DescriptionText.Split('\n'); var drawLocation = new Vector2(0, Location.Y - _nodeFont.MeasureString(DescriptionText).Y / 2 + Size.Y / 2); foreach (var row in rows) { drawLocation.X = Location.X - _nodeFont.MeasureString(row).X / 2 + Size.X / 2; spriteBatch.DrawString(_nodeFont, row, drawLocation, Color.Black * Opacity); drawLocation.Y += _nodeFont.MeasureString(row).Y; } }
public UICitySelector() : base(UIDialogStyle.Standard, true) { this.Opacity = 0.9f; CityListBoxBackground = new UIImage(UITextBox.StandardBackground); this.Add(CityListBoxBackground); CityDescriptionBackground = new UIImage(UITextBox.StandardBackground); this.Add(CityDescriptionBackground); var script = this.RenderScript("cityselector.uis"); this.DialogSize = (Point)script.GetControlProperty("DialogSize"); var cityThumbBG = new UIImage(thumbnailBackgroundImage); cityThumbBG.Position = (Vector2)script.GetControlProperty("CityThumbnailBackgroundPosition"); this.Add(cityThumbBG); CityThumb = new UIImage(); CityThumb.Position = (Vector2)script.GetControlProperty("CityThumbnailPosition"); this.Add(CityThumb); CityDescriptionSlider.AttachButtons(CityDescriptionScrollUpButton, CityDescriptionDownButton, 1); DescriptionText.AttachSlider(CityDescriptionSlider); OkButton.Disabled = true; OkButton.OnButtonClick += new ButtonClickDelegate(OkButton_OnButtonClick); CancelButton.OnButtonClick += new ButtonClickDelegate(CancelButton_OnButtonClick); this.Caption = (string)script["TitleString"]; /** Parse the list styles **/ listStyleNormal = script.Create <UIListBoxTextStyle>("CityListBoxColors", CityListBox.FontStyle); listStyleBusy = script.Create <UIListBoxTextStyle>("CityListBoxColorsBusy", CityListBox.FontStyle); listStyleFull = script.Create <UIListBoxTextStyle>("CityListBoxColorsFull", CityListBox.FontStyle); listStyleReserved = script.Create <UIListBoxTextStyle>("CityListBoxColorsReserved", CityListBox.FontStyle); UpdateItems(); CityListBox.OnChange += new ChangeDelegate(CityListBox_OnChange); NetworkFacade.Controller.OnNewCityServer += new OnNewCityServerDelegate(Controller_OnNewCityServer); NetworkFacade.Controller.OnCityServerOffline += new OnCityServerOfflineDelegate(Controller_OnCityServerOffline); }
//implemented methods public override void InputFormFields() { base.InputFormFields(); if (testCreationMode == CreateTestModes.CreateManualTest) { NumberOfItemsText.Wait(3).Clear(); NumberOfItemsText.SendKeys("" + Data.NumberOfItems); } ExpandOptional(); if (Data.Description != null) { DescriptionText.Wait(3).Clear(); DescriptionText.SendKeys(Data.Description); } }
void ReleaseDesignerOutlets() { if (ButtonFavorites != null) { ButtonFavorites.Dispose(); ButtonFavorites = null; } if (ButtonShopList != null) { ButtonShopList.Dispose(); ButtonShopList = null; } if (ConditionText != null) { ConditionText.Dispose(); ConditionText = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (DetailImage != null) { DetailImage.Dispose(); DetailImage = null; } if (IngredientsList != null) { IngredientsList.Dispose(); IngredientsList = null; } if (NameRecipe != null) { NameRecipe.Dispose(); NameRecipe = null; } }
void ReleaseDesignerOutlets() { if (ChoosePictureButton != null) { ChoosePictureButton.Dispose(); ChoosePictureButton = null; } if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (ItemImage != null) { ItemImage.Dispose(); ItemImage = null; } if (ItemText != null) { ItemText.Dispose(); ItemText = null; } if (TakePictureButton != null) { TakePictureButton.Dispose(); TakePictureButton = null; } if (LatitudeLabel != null) { LatitudeLabel.Dispose(); LatitudeLabel = null; } if (LongitudeLabel != null) { LongitudeLabel.Dispose(); LongitudeLabel = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.Title = "Add item"; var s = new UIBarButtonItem() { Title = "Save" }; this.AddBindings(new Dictionary <object, string> () { { s, "Clicked SaveCommand" }, }); NavigationItem.SetRightBarButtonItem(s, false); var set = this.CreateBindingSet <AddItemView, AddItemViewModel> (); set.Bind(ItemText).To(item => item.ItemName); set.Bind(DescriptionText).To(item => item.Description); set.Bind(LongitudeLabel).To(item => item.Longitude).WithConversion("LongitudeCoordinate"); set.Bind(LatitudeLabel).To(item => item.Latitude).WithConversion("LatitudeCoordinate"); set.Bind(ItemImage).To(vm => vm.PictureBytes).WithConversion("InMemoryImage"); set.Apply(); //this.CreateBinding(TakePictureButton).To((AddItemViewModel item) => item.SaveCommand).Apply(); this.AddBindings(new Dictionary <object, string> () { { TakePictureButton, "TouchUpInside TakePictureCommand" }, { ChoosePictureButton, "TouchUpInside ChoosePictureCommand" }, }); var g = new UITapGestureRecognizer(() => { ItemText.ResignFirstResponder(); DescriptionText.ResignFirstResponder(); }); View.AddGestureRecognizer(g); }
void ReleaseDesignerOutlets() { if (DescriptionText != null) { DescriptionText.Dispose(); DescriptionText = null; } if (PageTitle != null) { PageTitle.Dispose(); PageTitle = null; } if (RememberText != null) { RememberText.Dispose(); RememberText = null; } }
public void ToStream(XmlWriter s, Managers.TagManager tag, TI.Definition owner) { s.WriteStartElement("entry"); int type_index = TypeIndex.Value; if (type_index >= 0) { var types = (owner as multiplayer_object_type_list_group).TypeList; s.WriteAttributeString("typeIndex", type_index.ToString()); s.WriteAttributeString("typeName", types[type_index].Name.ToString()); } if (!DescriptionText.Handle.IsNull) { s.WriteAttributeString("desc", DescriptionText.ToString()); } if (!HeaderText.Handle.IsNull) { s.WriteAttributeString("header", HeaderText.ToString()); } if (!HelpText.Handle.IsNull) { s.WriteAttributeString("help", HelpText.ToString()); } if (!Icon.Handle.IsNull) { s.WriteAttributeString("icon", Icon.ToString()); } #if false if (Unknown10.Value > 0) { s.WriteAttributeString("unk10", Unknown10.ToString()); } if (Unknown14.Value > 0) { s.WriteAttributeString("unk14", Unknown14.ToString()); } #endif s.WriteEndElement(); }
private async void SaveFunc() { if (!UrlText.Equals("") && !NameText.Equals("") && !DescriptionText.Equals("")) { using (var db = new PrototypingContext()) { Prototype findPrototype = db.Prototypes.Single(p => p.PrototypeId == prototype.PrototypeId); findPrototype.Url = UrlText; findPrototype.Name = NameText; findPrototype.Description = DescriptionText; db.Prototypes.Update(findPrototype); db.SaveChanges(); } GoBackFunc(); } else { var message = new MessageDialog("Please fill in all the fields."); await message.ShowAsync(); } }
//Enter request information in the send request form internal void AddRequstInformation() { // Populating the data from Excel ExcelLib.PopulateInCollection(Base.ExcelPath, "Send Request"); string tenant = ExcelLib.ReadData(2, "Tenant"); string type = ExcelLib.ReadData(2, "Type"); //choose tenant from dropdown list TenantText.Click(); Driver.WaitForElementClickable(Driver.driver, By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant)), 5); Driver.driver.FindElement(By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant))).Click(); //choose type from dropdown list SelectElement select2 = new SelectElement(TypeDropdown); select2.SelectByText(type); //enter description DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description")); //upload files ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files")); }