Exemplo n.º 1
0
        private void BindSemester()
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                //objEWA.OrgId = Session["OrgId"].ToString();
                //objEWA.CourseId = ddlCourse.SelectedValue.ToString();
                //objEWA.BranchId = ddlBranch.SelectedValue.ToString();
                objEWA.ClassId = ClassId.ToString();;
                DataSet ds = objBL.BindSemester_BL(objEWA);

                ddlSemester.DataSource = ds;
                if (ds.Tables[0].Rows.Count != 0)
                {
                    ddlSemester.DataTextField  = "SemesterName";
                    ddlSemester.DataValueField = "SemesterId";
                    ddlSemester.DataBind();
                }
                else
                {
                    ddlSemester.Items.Clear();
                }

                ddlSemester.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Exemplo n.º 2
0
        private void FatchTest()
        {
            try
            {
                EWA_UploadResult objEWA = new EWA_UploadResult();
                BL_UploadResult  objBL  = new BL_UploadResult();
                objEWA.OrgId      = Session["OrgId"].ToString();
                objEWA.CourseId   = CourseId.ToString();
                objEWA.BranchId   = BranchId.ToString();
                objEWA.ClassId    = ClassId.ToString();
                objEWA.SemesterId = ddlSemester.SelectedValue.ToString();

                DataSet ds = objBL.FatchTest_BL(objEWA);

                ddlTest.DataSource = ds;
                if (ds.Tables[0].Rows.Count != 0)
                {
                    ddlTest.DataTextField  = "TestName";
                    ddlTest.DataValueField = "TestId";
                    ddlTest.DataBind();
                }
                else
                {
                    ddlTest.Items.Clear();
                }

                ddlTest.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0"));
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
Exemplo n.º 3
0
        private void StudentFrm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dataSet1.StudentsTBL' table. You can move, or remove it, as needed.
            this.studentsTBLTableAdapter.Fill(this.dataSet1.StudentsTBL);

            LabelClassName.Text = ClassName;
            LabelClassId.Text   = ClassId.ToString();
        }
Exemplo n.º 4
0
        /// <param name="apiKey"></param>
        /// <returns></returns>
        public string GetMarketHashName(string apiKey)
        {
            var handler = new SteamEconomyHandler(apiKey);
            var data    = new Dictionary <string, string> {
                { ClassId.ToString(), InstanceId.ToString() }
            };
            AssetClassInfo info = handler.GetAssetClassInfo(Convert.ToUInt32(AppId), data);

            return(info.MarketHashName);
        }
Exemplo n.º 5
0
        public void CopyConstructorTest()
        {
            var className = "MyClass";

            var classId  = new ClassId(className);
            var classId2 = new ClassId(className);

            Assert.AreEqual("1", classId.ToString(), "Original");
            Assert.AreEqual("1", classId2.ToString(), "Copied");
        }
Exemplo n.º 6
0
        public void ToStringTest()
        {
            var classId  = new ClassId("wiggle");
            var expected = "1";
            var actual   = classId.ToString();

            Assert.AreEqual(expected, actual);

            var classId2 = new ClassId("wazzup!");

            expected = "2";
            actual   = classId2.ToString();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 7
0
        public void CompareToTest()
        {
            var classId  = new ClassId("a");
            var classId2 = new ClassId("b");
            var classId3 = new ClassId(Convert.ToInt32(classId2.ToString()));

            var actual = classId.CompareTo(classId2);

            Assert.AreEqual(-1, actual, "Input ClassId:<{0}>. Input Compare ClassId:<{1}>.", classId, classId2);

            actual = classId2.CompareTo(classId);
            Assert.AreEqual(1, actual, "Input ClassId:<{0}>. Input Compare ClassId:<{1}>.", classId2, classId);

            actual = classId2.CompareTo(classId3);
            Assert.AreEqual(0, actual, "Input ClassId:<{0}>. Input Compare ClassId:<{1}>.", classId2, classId3);
        }
Exemplo n.º 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());

            //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);
            }
        }
        public string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "moduleid": // Int
                return(ModuleId.ToString(strFormat, formatProvider));

            case "namespaceid": // Int
                return(NamespaceId.ToString(strFormat, formatProvider));

            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "memberid": // Int
                return(MemberId.ToString(strFormat, formatProvider));

            case "maintype": // Int
                if (MainType == null)
                {
                    return("");
                }
                ;
                return(((int)MainType).ToString(strFormat, formatProvider));

            case "subtype": // Int
                if (SubType == null)
                {
                    return("");
                }
                ;
                return(((int)SubType).ToString(strFormat, formatProvider));

            case "name": // NVarChar
                return(PropertyAccess.FormatString(Name, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "isdeprecated": // Int
                return(IsDeprecated.ToString(strFormat, formatProvider));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "lastmodifiedbyuserid": // Int
                if (LastModifiedByUserID == null)
                {
                    return("");
                }
                ;
                return(((int)LastModifiedByUserID).ToString(strFormat, formatProvider));

            case "lastmodifiedondate": // DateTime
                if (LastModifiedOnDate == null)
                {
                    return("");
                }
                ;
                return(((DateTime)LastModifiedOnDate).ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                return("");

                break;
            }
        }
Exemplo n.º 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());

            //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);
            }
        }
Exemplo n.º 11
0
        internal override string GetPowerShellCommand()
        {
            var sb = new System.Text.StringBuilder();

            sb.Append($"[Reflection.Assembly]::LoadFile('{Assembly.GetExecutingAssembly().Location}'); ");
            sb.Append($"[Microsoft.Win32.TaskScheduler.TaskService]::RunComHandlerAction([GUID]('{ClassId.ToString("D")}'), '{Data?.Replace("'", "''") ?? string.Empty}'); ");
            return(sb.ToString());
        }
Exemplo n.º 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());

            //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);
            }
        }
Exemplo n.º 13
0
 public override string ToString()
 {
     return(ClassId.ToString() + " " + LogicalName);
 }
Exemplo n.º 14
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "memberid": // Int
                return(MemberId.ToString(strFormat, formatProvider));

            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "membertype": // Int
                return(MemberType.ToString(strFormat, formatProvider));

            case "membername": // VarChar
                return(PropertyAccess.FormatString(MemberName, strFormat));

            case "declaration": // VarChar
                if (Declaration == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Declaration, strFormat));

            case "documentation": // NVarCharMax
                if (Documentation == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Documentation, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "appearedinversion": // VarChar
                return(PropertyAccess.FormatString(AppearedInVersion, strFormat));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "isdeprecated": // Bit
                return(IsDeprecated.ToString());

            case "deprecationmessage": // NVarChar
                if (DeprecationMessage == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecationMessage, strFormat));

            case "documentationid": // Int
                if (DocumentationId == null)
                {
                    return("");
                }
                ;
                return(((int)DocumentationId).ToString(strFormat, formatProvider));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "fullname": // VarChar
                return(PropertyAccess.FormatString(FullName, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 15
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "namespaceid": // Int
                return(NamespaceId.ToString(strFormat, formatProvider));

            case "componentid": // Int
                if (ComponentId == null)
                {
                    return("");
                }
                ;
                return(((int)ComponentId).ToString(strFormat, formatProvider));

            case "classname": // NVarChar
                return(PropertyAccess.FormatString(ClassName, strFormat));

            case "declaration": // NVarChar
                if (Declaration == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Declaration, strFormat));

            case "documentation": // NVarCharMax
                if (Documentation == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Documentation, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "appearedinversion": // VarChar
                return(PropertyAccess.FormatString(AppearedInVersion, strFormat));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "isdeprecated": // Bit
                return(IsDeprecated.ToString());

            case "deprecationmessage": // NVarChar
                if (DeprecationMessage == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecationMessage, strFormat));

            case "documentationid": // Int
                if (DocumentationId == null)
                {
                    return("");
                }
                ;
                return(((int)DocumentationId).ToString(strFormat, formatProvider));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "fullname": // NVarChar
                return(PropertyAccess.FormatString(FullName, strFormat));

            case "isabstract": // Bit
                return(IsAbstract.ToString());

            case "isansiclass": // Bit
                return(IsAnsiClass.ToString());

            case "isarray": // Bit
                return(IsArray.ToString());

            case "isautoclass": // Bit
                return(IsAutoClass.ToString());

            case "isautolayout": // Bit
                return(IsAutoLayout.ToString());

            case "isbeforefieldinit": // Bit
                return(IsBeforeFieldInit.ToString());

            case "isbyreference": // Bit
                return(IsByReference.ToString());

            case "isclass": // Bit
                return(IsClass.ToString());

            case "isdefinition": // Bit
                return(IsDefinition.ToString());

            case "isenum": // Bit
                return(IsEnum.ToString());

            case "isexplicitlayout": // Bit
                return(IsExplicitLayout.ToString());

            case "isfunctionpointer": // Bit
                return(IsFunctionPointer.ToString());

            case "isgenericinstance": // Bit
                return(IsGenericInstance.ToString());

            case "isgenericparameter": // Bit
                return(IsGenericParameter.ToString());

            case "isimport": // Bit
                return(IsImport.ToString());

            case "isinterface": // Bit
                return(IsInterface.ToString());

            case "isnested": // Bit
                return(IsNested.ToString());

            case "isnestedassembly": // Bit
                return(IsNestedAssembly.ToString());

            case "isnestedprivate": // Bit
                return(IsNestedPrivate.ToString());

            case "isnestedpublic": // Bit
                return(IsNestedPublic.ToString());

            case "isnotpublic": // Bit
                return(IsNotPublic.ToString());

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 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());

            //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);
            }
        }
Exemplo n.º 17
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);
            }
        }
Exemplo n.º 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();

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

                default:
                    return string.Empty;

            }
        }
Exemplo n.º 19
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);
            }
        }
Exemplo n.º 20
0
        private static string GetDotabuffName(ClassId classId)
        {
            switch (classId)
            {
            case ClassId.CDOTA_Unit_Hero_DoomBringer:
                return("doom");

            case ClassId.CDOTA_Unit_Hero_Furion:
                return("natures-prophet");

            case ClassId.CDOTA_Unit_Hero_Magnataur:
                return("magnus");

            case ClassId.CDOTA_Unit_Hero_Necrolyte:
                return("necrophos");

            case ClassId.CDOTA_Unit_Hero_Nevermore:
                return("shadow-fiend");

            case ClassId.CDOTA_Unit_Hero_Obsidian_Destroyer:
                return("outworld-devourer");

            case ClassId.CDOTA_Unit_Hero_Rattletrap:
                return("clockwerk");

            case ClassId.CDOTA_Unit_Hero_Shredder:
                return("timbersaw");

            case ClassId.CDOTA_Unit_Hero_SkeletonKing:
                return("wraith-king");

            case ClassId.CDOTA_Unit_Hero_Wisp:
                return("io");

            case ClassId.CDOTA_Unit_Hero_Zuus:
                return("zeus");

            case ClassId.CDOTA_Unit_Hero_Windrunner:
                return("windranger");

            case ClassId.CDOTA_Unit_Hero_Life_Stealer:
                return("lifestealer");

            case ClassId.CDOTA_Unit_Hero_Treant:
                return("treant-protector");

            case ClassId.CDOTA_Unit_Hero_MonkeyKing:
                return("monkey-king");

            case ClassId.CDOTA_Unit_Hero_AbyssalUnderlord:
                return("underlord");
            }

            var name    = classId.ToString().Substring("CDOTA_Unit_Hero_".Length).Replace("_", string.Empty);
            var newName = new StringBuilder(name[0].ToString());

            foreach (var ch in name.Skip(1))
            {
                if (char.IsUpper(ch))
                {
                    newName.Append('-');
                }
                newName.Append(ch);
            }

            return(newName.ToString().ToLower());
        }
Exemplo n.º 21
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);
            }
        }