示例#1
0
 private void addAttributesForBehavior(XElement behaviorElement)
 {
     if (behaviorElement != null)
     {
         if (IsEnabled)
         {
             behaviorElement.Add(new XAttribute(IS_ENABLED, IsEnabled.ToString()));
         }
         if (!string.IsNullOrWhiteSpace(Title))
         {
             behaviorElement.Add(new XAttribute(TITLE, Title.ToString()));
         }
     }
 }
示例#2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("Name: ").AppendLine(Name);
            sb.Append("Enabled: ").AppendLine(IsEnabled.ToString());
            sb.Append("Panorama User: "******"Created: ").Append(Created.ToShortDateString()).Append(" ").AppendLine(Created.ToShortTimeString());
            sb.Append("Modified: ").Append(Modified.ToShortDateString()).Append(" ").AppendLine(Modified.ToShortTimeString());
            sb.AppendLine("").AppendLine("Main Settings");
            sb.Append(MainSettings);
            sb.AppendLine("").AppendLine("Panorama Settings");
            sb.Append(PanoramaSettings);
            return(sb.ToString());
        }
示例#3
0
        public override void WriteXml(XmlWriter writer)
        {
            base.WriteXml(writer);

            //{ Begin Creation info : You need not deserialize this block in ReadXml().
            // These are automatically serialized in Node.ReadXml().
            writer.WriteAttributeString("ViewModelType", ViewModel.GetType().AssemblyQualifiedName);
            writer.WriteAttributeString("Owner", Owner.Guid.ToString());
            writer.WriteAttributeString("IsInput", IsInput.ToString());
            //} End Creation Info.

            writer.WriteAttributeString("Name", Name);
            writer.WriteAttributeString("DisplayName", DisplayName);
            writer.WriteAttributeString("AllowMultipleInput", AllowMultipleInput.ToString());
            writer.WriteAttributeString("AllowMultipleOutput", AllowMultipleOutput.ToString());
            writer.WriteAttributeString("IsPortEnabled", IsPortEnabled.ToString());
            writer.WriteAttributeString("IsEnabled", IsEnabled.ToString());
        }
示例#4
0
        /// <summary>
        /// Returns a <see cref="System.String"/> that represents the current <see cref="TuxedoBerries.ScenePanel.SceneEntity"/>.
        /// </summary>
        /// <returns>A <see cref="System.String"/> that represents the current <see cref="TuxedoBerries.ScenePanel.SceneEntity"/>.</returns>
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.Append("{");
            // Name
            builder.Append("\"name\":");
            builder.Append("\"");
            builder.Append(Name);
            builder.Append("\",");
            // Full Path
            builder.Append("\"full_path\":");
            builder.Append("\"");
            builder.Append(FullPath);
            builder.Append("\",");
            // GUID
            builder.Append("\"guid\":");
            builder.Append("\"");
            builder.Append(GUID);
            builder.Append("\",");
            // SnapshotPath
            builder.Append("\"screenshot_path\":");
            builder.Append("\"");
            builder.Append(ScreenshotPath);
            builder.Append("\",");
            // IsFavorite
            builder.Append("\"is_favorite\":");
            builder.Append(IsFavorite.ToString().ToLower());
            builder.Append(",");
            // InBuild
            builder.Append("\"in_build\":");
            builder.Append(InBuild.ToString().ToLower());
            builder.Append(",");
            // IsEnabled
            builder.Append("\"is_enabled\":");
            builder.Append(IsEnabled.ToString().ToLower());
            builder.Append(",");
            // BuildIndex
            builder.Append("\"build_index\":");
            builder.Append(BuildIndex);

            builder.Append("}");
            return(builder.ToString());
        }
示例#5
0
        /// <summary>
        /// Saves the door definition
        /// </summary>
        /// <param name="writer">XML writer handle</param>
        /// <returns></returns>
        public virtual bool Save(XmlWriter writer)
        {
            try
            {
                if (writer == null)
                {
                    return(false);
                }

                writer.WriteStartElement("actor");
                writer.WriteAttributeString("isactivated", IsActivated.ToString());
                writer.WriteAttributeString("isenabled", IsEnabled.ToString());
                writer.WriteEndElement();

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
示例#6
0
        public void CreateConfigurationFile(string path)
        {
            XmlTextWriter xWriter = new XmlTextWriter(@path + @"\HueSettings.xml", Encoding.UTF8)
            {
                Formatting = Formatting.Indented
            };

            AverageColor = true;
            ColorPalette = false;
            Brightness   = 10;
            IsEnabled    = true;
            xWriter.WriteStartElement("HueSettings");
            xWriter.WriteStartElement("appConfig");
            xWriter.WriteElementString("APIKey", "");
            xWriter.WriteStartElement("HueLights");
            xWriter.WriteElementString("HueLights", "");
            xWriter.WriteEndElement();
            xWriter.WriteElementString("AverageColor", AverageColor.ToString());
            xWriter.WriteElementString("ColorPalette", ColorPalette.ToString());
            xWriter.WriteElementString("Brightness", Brightness.ToString());
            xWriter.WriteElementString("Enabled", IsEnabled.ToString());
            xWriter.WriteEndElement();
            xWriter.Close();
        }
示例#7
0
        public void SaveSettings(string path)
        {
            if (path == "")
            {
                path = StoragePath;
            }
            File.WriteAllText(@path + @"\HueSettings.xml", "");
            if (HueLights == null)
            {
                HueLights.Add("");
            }
            HueLights = HueLights.Distinct().ToList();
            XmlTextWriter xWriter = new XmlTextWriter(@path + @"\HueSettings.xml", Encoding.UTF8)
            {
                Formatting = Formatting.Indented
            };

            xWriter.WriteStartElement("HueSettings");
            xWriter.WriteStartElement("appConfig");
            xWriter.WriteElementString("APIKey", Username);
            xWriter.WriteStartElement("HueLights");
            foreach (string light in HueLights)
            {
                if (light != null)
                {
                    xWriter.WriteElementString("HueLights", light);
                }
            }
            xWriter.WriteEndElement();
            xWriter.WriteElementString("AverageColor", AverageColor.ToString());
            xWriter.WriteElementString("ColorPalette", ColorPalette.ToString());
            xWriter.WriteElementString("Brightness", Brightness.ToString());
            xWriter.WriteElementString("Enabled", IsEnabled.ToString());
            xWriter.WriteEndElement();
            xWriter.Close();
        }
示例#8
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //PICKER
            case nameof(ItemsSource):
                return(ItemsSource.OfType <object>().Select(x => x.ToString()).Aggregate((x, y) => x + "," + y));

            case nameof(SelectedItem):
                return(SelectedItem.ToString());

            case nameof(SelectedIndex):
                return(SelectedIndex.ToString());

            case nameof(Items):
                return(Items.Aggregate((x, y) => x + "," + y));

            case nameof(Title):
                return(Title);

            default:
                return(string.Empty);
            }
        }
示例#9
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //BUTTON
            case nameof(BorderColor):
                return(BorderColor.ToHex());

    #pragma warning disable CS0618 // Type or member is obsolete
            case nameof(BorderRadius):
                return(BorderRadius.ToString());

    #pragma warning restore CS0618 // Type or member is obsolete
            case nameof(BorderWidth):
                return(BorderWidth.ToString());

            case nameof(CornerRadius):
                return(CornerRadius.ToString());

            case nameof(CommandParameter):
                return(CommandParameter.ToString());

            case nameof(FontAttributes):
                return(FontAttributes.ToString());

            case nameof(FontFamily):
                return(FontFamily);

            case nameof(FontSize):
                return(FontSize.ToString());

            case nameof(TextColor):
                return(TextColor.ToHex());

            case nameof(Text):
                return(Text);

            default:
                return(string.Empty);
            }
        }
示例#10
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //ITEMSVIEW
            case nameof(ItemsSource):
                return(ItemsSource.OfType <object>().Select(x => x.ToString()).Aggregate((x, y) => x + "," + y));

            //LISTVIEW
            case nameof(HasUnevenRows):
                return(HasUnevenRows.ToString());

            case nameof(IsGroupingEnabled):
                return(IsGroupingEnabled.ToString());

            case nameof(RowHeight):
                return(RowHeight.ToString());

            case nameof(Footer):
                return(Footer.ToString());

            case nameof(Header):
                return(Header.ToString());

            case nameof(IsPullToRefreshEnabled):
                return(IsPullToRefreshEnabled.ToString());

            case nameof(IsRefreshing):
                return(IsRefreshing.ToString());

            case nameof(SelectedItem):
                return(SelectedItem.ToString());

            case nameof(SeparatorColor):
                return(SeparatorColor.ToHex());

            case nameof(this.SeparatorVisibility):
                return(SeparatorVisibility.ToString());

            default:
                return(string.Empty);
            }
        }
示例#11
0
		/// <inheritdoc cref="AbstractView.GetStringValue"/>
		public override string GetStringValue() {
			return IsEnabled.ToString();
		}
示例#12
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
                //ELEMENT
                case nameof(ClassId):
                    return ClassId.ToString();
                case nameof(AutomationId):
                    return AutomationId.ToString();
                case nameof(Id):
                    return Id.ToString();
                case nameof(StyleId):
                    return StyleId.ToString();
                //VISUAL ELEMENT
                case nameof(AnchorX):
                    return AnchorX.ToString();
                case nameof(AnchorY):
                    return AnchorY.ToString();
                case nameof(BackgroundColor):
                    return BackgroundColor.ToHex();
                case nameof(Width):
                    return this.Width.ToString();
                case nameof(Height):
                    return this.Height.ToString();
                case nameof(IsEnabled):
                    return IsEnabled.ToString();
                case nameof(WidthRequest):
                    return this.WidthRequest.ToString();
                case nameof(HeightRequest):
                    return this.HeightRequest.ToString();
                case nameof(IsFocused):
                    return IsFocused.ToString();
                case nameof(IsVisible):
                    return IsVisible.ToString();
                case nameof(InputTransparent):
                    return InputTransparent.ToString();
                case nameof(X):
                    return this.X.ToString();
                case nameof(Y):
                    return this.Y.ToString();
                case nameof(Opacity):
                    return this.Opacity.ToString();
                case nameof(TranslationX):
                    return this.TranslationX.ToString();
                case nameof(TranslationY):
                    return this.TranslationY.ToString();
                case nameof(Rotation):
                    return this.Rotation.ToString();
                case nameof(RotationX):
                    return this.RotationX.ToString();
                case nameof(RotationY):
                    return this.RotationY.ToString();
                case nameof(Scale):
                    return this.Scale.ToString();
                //VIEW
                case nameof(Margin):
                    return this.Margin.ToString();
                case nameof(VerticalOptions):
                    return this.VerticalOptions.ToString();
                case nameof(HorizontalOptions):
                    return this.HorizontalOptions.ToString();

                //PROGRESSBAR
                case nameof(Progress):
                    return this.Progress.ToString();

                default:
                    return string.Empty;

            }
        }
示例#13
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //SEARCHBAR
            case nameof(CancelButtonColor):
                return(this.CancelButtonColor.ToHex());

            case nameof(Placeholder):
                return(this.Placeholder);

            case nameof(SearchCommandParameter):
                return(SearchCommandParameter.ToString());

            case nameof(Text):
                return(Text);

            default:
                return(string.Empty);
            }
        }
示例#14
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //IMAGE
            case nameof(Source):
                switch (Source)
                {
                case FileImageSource file:
                    return(file.File);

                case UriImageSource uri:
                    return(uri.Uri.ToString());

                default:
                    return(string.Empty);
                }

            case nameof(Aspect):
                return(this.Aspect.ToString());

            case nameof(IsOpaque):
                return(this.IsOpaque.ToString());

            default:
                return(string.Empty);
            }
        }
示例#15
0
 public void WriteXml(System.Xml.XmlWriter writer)
 {
     writer.WriteAttributeString("Level", Level.ToString());
     writer.WriteAttributeString("IsEnabled", IsEnabled.ToString());
 }
示例#16
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //STEPPER
            case nameof(Maximum):
                return(Maximum.ToString());

            case nameof(Minimum):
                return(Minimum.ToString());

            case nameof(Value):
                return(Value.ToString());

            case nameof(Increment):
                return(Increment.ToString());

            default:
                return(string.Empty);
            }
        }
示例#17
0
 /// <summary>
 /// Returns a JSON representation of the current object
 /// </summary>
 /// <returns>The JSON representing the current object</returns>
 public String ToJSONString()
 {
     return
         (String.Format(@"{{""RoomID"":{0},""RoomName"":""{1}"",""BuildingID"":""{2}"",""X"":""{3}"",""Y"":""{4}"",""Width"":""{5}"",""Height"":""{6}"",""Enabled"":{7},""HasAlarm"":{8}}}",
                        RoomID, RoomName, BuildingID, XCoordinate, YCoordinate, Width, Height, IsEnabled.ToString().ToLower(), HasAlarmValue.ToString().ToLower()));
 }
示例#18
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //INPUTVIEW
            case nameof(Keyboard):
                return(this.Keyboard.ToString());

            //EDITOR
            case nameof(FontAttributes):
                return(this.FontAttributes.ToString());

            case nameof(FontFamily):
                return(this.FontFamily);

            case nameof(FontSize):
                return(this.FontSize.ToString());

            case nameof(Text):
                return(this.Text);

            case nameof(TextColor):
                return(this.TextColor.ToHex());

            default:
                return(string.Empty);
            }
        }
示例#19
0
 public void CopyPropertiesTo(XmlElement node)
 {
     node.SetAttribute("active", IsEnabled.ToString().ToLower());
     node.SetAttribute("folder", FolderPath);
     node.SetAttribute("maxAge", KeepFilesInDays.ToString());
 }