static void ActionType01() { Name testName = new Name("Peter"); ShowValue showMethod = testName.DisplayToWindow; showMethod(); }
public static void Main() { Name testName = new Name("Koani"); ShowValue showMethod = testName.DisplayToWindow; showMethod(); }
public void EX1_1() { Name testName = new Name("Koani"); ShowValue showMethod = testName.DisplayToConsole; showMethod(); }
public TFluent SetShowValue(bool show) { OpenXmlElement dataLabel = this.element.GetOrCreateDataLabelAdjust(); ShowValue showValue = dataLabel.GetFirstChild <ShowValue>() ?? dataLabel.AppendChild(new ShowValue()); showValue.Val = show; return(this.result); }
/// <summary> /// 속성들을 Xml Attribute로 생성합니다. /// </summary> /// <param name="writer">Attribute를 쓸 Writer</param> public override void GenerateXmlAttributes(System.Xml.XmlWriter writer) { base.GenerateXmlAttributes(writer); if (Id.IsNotWhiteSpace()) { writer.WriteAttributeString("Id", Id); } if (Value.HasValue) { writer.WriteAttributeString("Value", Value.ToString()); } if (ShowValue.HasValue) { writer.WriteAttributeString("ShowValue", ShowValue.GetHashCode().ToString()); } if (EditMode.HasValue) { writer.WriteAttributeString("EditMode", EditMode.GetHashCode().ToString()); } if (Color.HasValue) { writer.WriteAttributeString("Color", Color.Value.ToHexString()); } if (Alpha.HasValue) { writer.WriteAttributeString("Alpha", Alpha.ToString()); } if (_border != null) { _border.GenerateXmlAttributes(writer); } if (Radius.HasValue) { writer.WriteAttributeString("Radius", Radius.ToString()); } if (Sides.HasValue) { writer.WriteAttributeString("Sides", Sides.ToString()); } if (_link != null) { _link.GenerateXmlAttributes(writer); } if (ToolText.IsNotWhiteSpace()) { writer.WriteAttributeString("ToolText", ToolText); } }
void Update() { if (UI.UIHover) { return; } Selectable selected = Master.INSTANCE.Selected; // Resets the selection UI. foreach (Transform child in selection.transform) { Destroy(child.gameObject); } // If nothing is selected, then get turn off the selection pane and return. if (selected == null) { selection.GetComponent <Image>().enabled = false; return; } // Makes sure the selection pane is turned on if something is selected. selection.GetComponent <Image>().enabled = true; // This is the y coordinate of each component, it increases by 10 between each class // and 22 between each component in the class. int y = 0; // Loops through each class registered for the UI. foreach (Type clazz in classes) { y += 10; // Gets the instance of the current class in the selected object. var component = selected.GetComponent(clazz); if (component == null) { component = selected.GetComponentInChildren(clazz); } // If the selected object actually has that class. if (component != null) { // Gets each property with the show value in that class. PropertyInfo[] values = ShowValue.getValues(clazz); foreach (PropertyInfo value in values) { y += 22; drawValues(value, component, y); } } } }
protected override void ProcessRecord() { var control = new PsSlider(); SetControlProps(control); control.Label = Label; control.ValueField = ValueField; control.ValueFormat = ValueFormat; control.OnChange = OnChange; if (ShowValue.IsPresent) { control.ShowValue = ShowValue.ToBool(); } if (Vertical.IsPresent) { control.Vertical = Vertical.ToBool(); } if (Value.HasValue) { control.Value = Value.Value; } if (Min.HasValue) { control.Min = Min.Value; } if (Max.HasValue) { control.Max = Max.Value; } if (Step.HasValue) { control.Step = Step.Value; } WriteObject(control); }
/// <summary> /// 속성들을 Xml Attribute로 생성합니다. /// </summary> /// <param name="writer">Attribute를 쓸 Writer</param> public override void GenerateXmlAttributes(XmlWriter writer) { base.GenerateXmlAttributes(writer); if (ShowValue.HasValue) { writer.WriteAttributeString("showValue", ShowValue.GetHashCode().ToString()); } if (ValueBelowPivot.HasValue) { writer.WriteAttributeString("valueBelowPivot", ValueBelowPivot.GetHashCode().ToString()); } if (ShowGagueLabels.HasValue) { writer.WriteAttributeString("ShowGagueLabels", ShowGagueLabels.GetHashCode().ToString()); } if (GaugeFillMix.IsNotWhiteSpace()) { writer.WriteAttributeString("GaugeFillMix", GaugeFillMix); } if (GaugeFillRatio.IsNotWhiteSpace()) { writer.WriteAttributeString("GaugeFillRatio", GaugeFillRatio); } if (GaugeFillColor.HasValue) { writer.WriteAttributeString("GaugeFillColor", GaugeFillColor.Value.ToHexString()); } if (_border != null) { _border.GenerateXmlAttributes(writer); } if (_axis != null) { _axis.GenerateXmlAttributes(writer); } }
/// <summary> /// Копировать данные из элемента /// </summary> protected override void CopyFrom(Element srcElem) { base.CopyFrom(srcElem); DynamicText dynamicText = (DynamicText)srcElem; ToolTip = dynamicText.ToolTip; UnderlineOnHover = dynamicText.UnderlineOnHover; BackColorOnHover = dynamicText.BackColorOnHover; BorderColorOnHover = dynamicText.BorderColorOnHover; ForeColorOnHover = dynamicText.ForeColorOnHover; ShowValue = dynamicText.ShowValue; InCnlNum = dynamicText.InCnlNum; CtrlCnlNum = dynamicText.CtrlCnlNum; Action = dynamicText.Action; }
private void FillSeriesLabels(OpenXmlCompositeElement seriesItem, Column dataColumn) { var labels = seriesItem.FirstElement <DataLabels>(); if (labels == null) { return; } TextProperties defaultTextProperties = labels.FirstElement <TextProperties>(); ChartShapeProperties defaultChartShapeProperties = labels.FirstElement <ChartShapeProperties>(); NumberingFormat defaultNumberingFormat = labels.FirstElement <NumberingFormat>(); ShowLegendKey defaultShowLegendKey = labels.FirstElement <ShowLegendKey>(); ShowValue defaultShowValue = labels.FirstElement <ShowValue>(); ShowCategoryName defaultShowCategoryName = labels.FirstElement <ShowCategoryName>(); ShowSeriesName defaultShowSeriesName = labels.FirstElement <ShowSeriesName>(); ShowPercent defaultShowPercent = labels.FirstElement <ShowPercent>(); ShowBubbleSize defaultShowBubbleSize = labels.FirstElement <ShowBubbleSize>(); ShowLeaderLines defaultShowLeaderLines = labels.FirstElement <ShowLeaderLines>(); DLblsExtension defaultDLblsExtension = labels.FirstElement <DLblsExtension>(); for (int rowNo = 0; rowNo < dataColumn.Data.Count; rowNo++) { if (dataColumn.Data[rowNo] != null) { DataLabel dl = labels.Elements <DataLabel>().FirstOrDefault(l => l.Index != null && l.Index.Val != null && l.Index.Val.Value == rowNo); //if (dl != null) //{ // Delete delete = dl.FirstElement<Delete>(); // if (delete == null || !delete.Val) // { // var tp = dl.FirstElement<TextProperties>(); // if (tp != null) // { // textProperties = tp.CloneNode(true) as TextProperties; // } // labels.RemoveChild<DataLabel>(dl); // dl = null; // } //} if (dl == null) { var newDataLabel = new DataLabel(); DocumentFormat.OpenXml.Drawing.Charts.Index index = new DocumentFormat.OpenXml.Drawing.Charts.Index() { Val = new UInt32Value((uint)rowNo) }; newDataLabel.Index = index; if (defaultNumberingFormat != null) { newDataLabel.Append(defaultNumberingFormat.CloneNode(true)); } if (defaultChartShapeProperties != null) { newDataLabel.Append(defaultChartShapeProperties.CloneNode(true)); } if (defaultTextProperties != null) { newDataLabel.Append(defaultTextProperties.CloneNode(true)); } newDataLabel.Append(defaultShowLegendKey.CloneNode(true)); newDataLabel.Append(defaultShowValue.CloneNode(true)); newDataLabel.Append(defaultShowCategoryName.CloneNode(true)); newDataLabel.Append(defaultShowSeriesName.CloneNode(true)); newDataLabel.Append(defaultShowPercent.CloneNode(true)); newDataLabel.Append(defaultShowBubbleSize.CloneNode(true)); if (defaultShowLeaderLines != null) { newDataLabel.Append(defaultShowLeaderLines.CloneNode(true)); } if (defaultDLblsExtension != null) { newDataLabel.Append(defaultDLblsExtension.CloneNode(true)); } DataLabel lastDataLabel = labels.Elements <DataLabel>().LastOrDefault(l => l.Index != null && l.Index.Val != null && l.Index.Val.Value < rowNo); if (lastDataLabel != null) { labels.InsertAfter(newDataLabel, lastDataLabel); } else { labels.InsertAt(newDataLabel, 0); } } } } }
/// <summary> /// 속성들을 Xml Attribute로 생성합니다. /// </summary> /// <param name="writer">Attribute를 쓸 Writer</param> public override void GenerateXmlAttributes(System.Xml.XmlWriter writer) { base.GenerateXmlAttributes(writer); if (Id.IsNotWhiteSpace()) { writer.WriteAttributeString("Id", Id); } if (Value.HasValue) { writer.WriteAttributeString("Value", Value.ToString()); } if (ShowValue.HasValue) { writer.WriteAttributeString("ShowValue", ShowValue.GetHashCode().ToString()); } if (ValueX.HasValue) { writer.WriteAttributeString("ValueX", ValueX.ToString()); } if (ValueY.HasValue) { writer.WriteAttributeString("ValueY", ValueY.ToString()); } if (EditMode.HasValue) { writer.WriteAttributeString("EditMode", EditMode.GetHashCode().ToString()); } if (_border != null) { _border.GenerateXmlAttributes(writer); } if (BgColor.IsNotWhiteSpace()) { writer.WriteAttributeString("BgColor", BgColor); } if (Radius.HasValue) { writer.WriteAttributeString("Radius", Radius.ToString()); } if (BaseWidth.HasValue) { writer.WriteAttributeString("BaseWidth", BaseWidth.ToString()); } if (TopWidth.HasValue) { writer.WriteAttributeString("TopWidth", TopWidth.ToString()); } if (RearExtension.HasValue) { writer.WriteAttributeString("RearExtension", RearExtension.ToString()); } if (ToolText.IsNotWhiteSpace()) { writer.WriteAttributeString("ToolText", ToolText); } if (_link != null) { _link.GenerateXmlAttributes(writer); } }