Example #1
0
 public void SetSkin(FormulaSkin fs)
 {
     if (fs != null)
     {
         fs.Bind(this);
     }
 }
Example #2
0
 private void NotifyFormulaSkin()
 {
     if (Context != null && Context.Instance is FormulaSkin)
     {
         FormulaSkin fs = (FormulaSkin)Context.Instance;
         fs.RefreshCollectionValue();
     }
 }
Example #3
0
        public void SetSkin(string Skin)
        {
            FormulaSkin skinByName = FormulaSkin.GetSkinByName(Skin);

            if (skinByName != null)
            {
                this.SetSkin(skinByName);
            }
        }
Example #4
0
        public static FormulaSkin GetSkinByName(string SkinName)
        {
            FormulaSkin fs = (FormulaSkin)htSkins[SkinName];

            if (fs == null)
            {
                Type t = typeof(FormulaSkin);
                try
                {
                    fs = (FormulaSkin)t.InvokeMember(SkinName, BindingFlags.Static | BindingFlags.Public | BindingFlags.GetProperty, null, null, null);
                }
                catch
                {
                    fs = null;
                }
                if (fs == null)
                {
                    string s = FormulaHelper.SkinRoot + SkinName;
                    if (File.Exists(s))
                    {
                        InitSerializer();
                        try
                        {
                            fs = (FormulaSkin)xs.Deserialize(File.OpenRead(s));
                        }
                        catch
                        {
                            fs = null;
                        }
                    }
                }
                if (fs != null)
                {
                    htSkins[SkinName] = fs;
                }
            }
            return(fs);
        }
Example #5
0
 private void ChartControl_BeforeApplySkin(object sender, Easychart.Finance.FormulaSkin fs)
 {
     //fs.AxisY.Format = "R2";
     //fs.ShowXAxisInLastArea = true;
 }