Example #1
0
 public void Add(CStringer item)
 {
     Data.Add(item);
     ItemsCount++;
     SubItemsCount = item.Items.Count();
 }
Example #2
0
 public void ClearSubItems()
 {
     temp = new CStringer();
     SubItemsCount = Data[0].Items.Count();
 }
Example #3
0
 public LiteCGraph(Chart chart, Control parent, Collection<LiteCParameter> yields)
 {
     yieldtexts = yields;
     foreach (LiteCParameter x in yields)
     {
         yieldserials.Add(x.Name.Split('.')[1]);
     }
     ichart = chart;
     AppPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
     LiteCConfig cfg = new LiteCConfig("Users.xml");
     users = cfg.ReadStringer();
     ichart.MouseDoubleClick += ichart_MouseDoubleClick;
 }
Example #4
0
 public LiteCGraph(Chart chart, Control parent)
 {
     ichart = chart;
     AppPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
     LiteCConfig cfg = new LiteCConfig("Users.xml");
     users = cfg.ReadStringer();
 }
Example #5
0
 public void Merge()
 {
     Data.Add(temp);
     temp = new CStringer();
     ItemsCount++;
     SubItemsCount = Data[0].Items.Count();
 }
Example #6
0
        private CStringer ExecuteReaderC(string connection, string query)
        {
            DataTable dt = new DataTable();
            CStringer result = new CStringer();
            try
            {
                SQLiteConnection cnn = new SQLiteConnection(connection);
                cnn.Open();
                SQLiteCommand mycommand = new SQLiteCommand(query, cnn);
                SQLiteDataReader reader = mycommand.ExecuteReader();
                dt.Load(reader);
                reader.Close();
                cnn.Close();

                foreach (DataColumn x in dt.Columns)
                    foreach (DataRow row in dt.Rows)
                        if ((row[x.ColumnName] != System.DBNull.Value))
                            result.Add((string)row[x.ColumnName].ToString());

            }
            catch (SQLiteException e) { MessageBox.Show(e.Message); }
            return result;
        }
Example #7
0
        public CStringer ReadStringer()
        {
            CStringer result = new CStringer();

            XmlReaderSettings xmlsettings = new XmlReaderSettings();
            xmlsettings.ConformanceLevel = ConformanceLevel.Fragment;
            xmlsettings.IgnoreWhitespace = true;
            xmlsettings.IgnoreComments = true;
            XmlNode xNode;
            XmlDocument xmlDoc = new XmlDocument();
            try
            {
                XmlReader reader = XmlReader.Create(xmlPath + xmlfilename, xmlsettings);
                xmlDoc.Load(reader);
                reader.Close();
            }
            catch (XmlException xe) { LogException(xe.Message); }

            xNode = xmlDoc.SelectSingleNode("Config");
            foreach (XmlNode x in xNode.ChildNodes)
                result.Add(x.InnerText);

            return result;
        }