Selling C# WinForms Theme/Language Config System

Tutti mi chiedono perché ho imparato questa lingua
Süper Üye
Katılım
17 Mar 2016
Mesajlar
634
Çözümler
5
Tepki puanı
112
Ödüller
11
10 HİZMET YILI
--- CONFIG SYSTEM ---
This config system works like html and css style

What are the features of this Config System/What can you change and add with it?
Attributes:
  • Text
    CSS:
    text="Hello"
    text="Merhaba"
    text="Ciao"
  • Back Color
    CSS:
    backColor="rgb(0,0,0)"
    backColor="rgba(200,0,0,0)"
    backColor="black"
  • Fore Color
  • CSS:
    foreColor="rgb(0,0,0)"
    foreColor="rgba(200,0,0,0)"
    foreColor="black"
  • Flat Style
    CSS:
    flatStyle="flat"
    or
    flatStyle="standard"
    or
    flatStyle="popup"
    or
    flatStyle="system"
  • Flat Appearances
    CSS:
    flatAppearanceBorderColor="rgb(), rgba() or color name"
    CSS:
    flatAppearanceBorderSize="3"
    CSS:
    flatAppearanceMouseDownBackColor="rgb(), rgba() or color name"
    CSS:
    flatAppearanceMouseOverBackColor="rgb, rgba, color name"
  • Fill Color(for Guna, Siticone etc)
    CSS:
    fillColor="rgb(0,0,0)"
    fillColor="rgba(100,0,0,0)"
    fillColor="lime"
  • Hover State Fill Color/Fore Color
  • CSS:
    hoverStateFillColor="rgb(193,0,0)"
    hoverStateFillColor="rgba(100,193,0,0)"
    CSS:
    hoverStateForeColor="rgb(0,0,0)"
    hoverStateForeColor="rgba(31,0,0,0)"
    hoverStateForeColor="orange"
  • Custom Border Color
    CSS:
    customBorderColor="rgb(255,255,255)"
    customBorderColor="rgba(150,255,255,255)"
    customBorderColor="indianred"
  • Custom Border Thickness
    CSS:
    customBorderThickness="left,top,right,bottom"
    for example
    customBorderThickness="3,0,3,0"
  • Animated
    CSS:
    animated="true"
    animated="false"
  • Image
    CSS:
    image="url(https://xxxxxx.com/yyy.jpg)"
    image="https://xxxxxx.com/yyy.jpg"
  • Image Align
    CSS:
    imageAlign="left"
    imageAlign="right"
  • Background Image/Layout
    Bash:
    backgroundImage="url(https://xxxxx.com/yyy.png)"
    backgroundImage="https://xxxxx.com/yyy.png"
    CSS:
    backgroundImageLayout="stretch"
    backgroundImageLayout="zoom"
    backgroundImageLayout="center"
    backgroundImageLayout="tile"
  • Dock Style
    CSS:
    dockStyle="top"
    dockStyle="bottom"
    dockStyle="left"
    dockStyle="right"
  • Size Mode
    CSS:
    sizeMode="normal"
    sizeMode="stretchImage"
    sizeMode="autoSize"
    sizeMode="centerImage"
    sizeMode="zoom"
  • Image Size
    CSS:
    imageSize="width,height"
    for example
    imageSize="120,60"
  • Border Size
    CSS:
    borderSize="1"
  • Border Radius
    CSS:
    borderRadius="10"
  • Pressed Depth
    CSS:
    pressedDepth="3"
  • Class System
    CSS:
    <style>
    .XXX{
        attributes="xxx"
    }
    </style>
    ---------------------------------------
    <config for="form1">
    <control
    name="label1"
    class="redColor"
    />
    <control
    name="label2"
    class="redColor"
    />
    </config>
    <style>
    .redColor{
        foreColor="rgb(193,0,0)"
    }
    </style>

Usages and examples
U should create a Element like this
HTML:
<config for="yourFormName"> ..... </config>
After this decleration, we can control the form objects as follows:
HTML:
<control name="panel1" backColor="rgb(193,0,0)"  .... add more attributes />
Every
<control attribute must end with />
And u can style the all wanted Form objects with class, for example: You should open an style element out of the <config></config> element.
HTML:
<config for="form1">
<control name="panel1" class="panels" />
</config>
<style>
.panels{
backColor="rgba(200,0,0,0)"
attributeName="xxxxx"
}
</style>


You can also ignore the form objects you want from being shaped by the user:
  1. Select the form object
  2. Go to the properties and find AccessibleDescription and add attribute like that
Also you can ignore specific attributes like these
HTML:
<ignoreText>
<ignoreBackColor>
<ignoreForeColor>
<ignoreFlatStyle>
<ignoreFlatAppearanceBorderColor>
<ignoreFlatAppearanceBorderSize>
<ignoreFlatAppearanceMouseDownBackColor>
<ignoreFlatAppearanceMouseOverBackColor>
<ignoreFillColor>
<ignoreHoverStateFillColor>
<ignoreHoverStateForeColor>
<ignoreCustomBorderThickness>
<ignoreBorderRadius>
<ignoreCustomBorderColor>
<ignoreAnimated>
<ignorePressedDepth>
<ignoreImage>
<ignoreImageSize>
<ignoreImageAlign>
<ignoreBackgroundImage>
<ignoreBackgroundImageLayout>
<ignoreDockStyle>
<ignoreSizeMode>
There is my example config that i use for my project:
HTML:
<config for="form1">
<control
name="Content"
class="photoSettings"
customBorderColor="red"
customBorderThickness="0,0,3,3"
/>
<control
name="Refresh"
borderRadius="10"
fillColor="rgb(43,41,41)"
hoverStateFillColor="rgb(54,54,54)"
image="url(https://cdn0.iconfinder.com/data/icons/glyphpack/41/refresh-512.png)"
imageAlign="right"
text="Refresh"
/>
<control
name="TopPanel"
dockStyle="top"
customBorderColor="red"
customBorderThickness="3,3,3,0"
/>
<control
name="guna2Panel1"
backColor="transparent"
customBorderColor="red"
customBorderThickness="3,0,0,3"
/>
</config>
<style>
.transparentBackg{
backColor="transparent"
}
.photoSettings{
backgroundImage="url(https://images.hdqwalls.com/wallpapers/warrior-tv-series-2019-mw.jpg)"
backgroundImageLayout="stretch"
fillColor="rgba(180,0,0,0)"
}
</style>
And this is the result:



You should start the config in load event like this:
C#:
Config helper = new Config();
helper.Initialize(Application.StartupPath + @"\Config.txt" , this, "form1");
And you can refresh the config with this code:
C#:
helper.RefreshTheme();

Price = 10$ Life Time
Contact(Discord) = Cromeflex