Exemple #1
0
        private static DBmanager _instance = null; //Singleton pattern

        public static DBmanager Instance()         //Lazy Load initiation
        {
            if (_instance == null)
            {
                _instance = new DBmanager();
            }
            return(_instance);
        }
Exemple #2
0
        public Chart()
        {
            string fullpath  = DBmanager.Instance().Index;
            string fullpath2 = DBmanager.Instance().OUTPUT;
            //Read HTML from file
            var    content = File.ReadAllText(fullpath);
            string _write  = "var data = google.visualization.arrayToDataTable([";

            _write += "['Date', 'Balance'],";
            content = content.Replace("var data = google.visualization.arrayToDataTable([]);", ChartRepresenation(_write));
            File.WriteAllText(fullpath2, content);
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            startInfo.FileName  = "cmd.exe";
            startInfo.Arguments = "/c" + "\"" + fullpath2 + "\"";
            System.Diagnostics.Process.Start(startInfo);
        }