Example #1
0
        public static void SetChartOptions(FinancialChart chart)
        {
            FinancialChartType finType = chart.ChartType;

            if (finType == FinancialChartType.Kagi || finType == FinancialChartType.Renko || finType == FinancialChartType.PointAndFigure)
            {
                string frmName = typeof(frmBase).Namespace + ".frm" + finType.ToString();
                using (frmBase frm = Assembly.GetExecutingAssembly().CreateInstance(frmName) as frmBase)
                {
                    FinancialChartOptions fco = chart.Options;
                    frm.SetTargetObject(fco);
                }
            }
        }
Example #2
0
 public static void InitMasterSettingData()
 {
     Type[] types = Assembly.GetExecutingAssembly().GetTypes();
     foreach (Type type in types)
     {
         if (type.IsSubclassOf(typeof(frmBase)))
         {
             using (frmBase frm = Assembly.GetExecutingAssembly().CreateInstance(type.FullName) as frmBase)
             {
                 if (!frm.doNotLoadOrSave)
                 {
                     frm.SaveData();
                 }
             }
         }
     }
 }
Example #3
0
        public static frmBase CreateForm(string name)
        {
            frmBase frm = Assembly.GetExecutingAssembly().CreateInstance(typeof(frmBase).Namespace + ".frm" + name) as frmBase;

            return(frm);
        }