public MainWindow() { InitializeComponent(); ProcType = eProcType.ProcString; txtFormula.DataContext = this; txtResult.DataContext = this; DataContext = this; var prefs = new UserPreferences(); this.Height = prefs.WindowHeight; this.Width = prefs.WindowWidth; this.Top = prefs.WindowTop; this.Left = prefs.WindowLeft; this.WindowState = prefs.WindowState; }
public Processor CreateProcessor(eProcType tp) { Processor p = null; switch (tp) { case eProcType.ProcCS: p = new CSProcessor(); break; case eProcType.ProcDataTable: p = new DataTableProcessor(); break; default: p = new StringProcessor(); break; } return(p); }