public void Add(CStringer item) { Data.Add(item); ItemsCount++; SubItemsCount = item.Items.Count(); }
public void ClearSubItems() { temp = new CStringer(); SubItemsCount = Data[0].Items.Count(); }
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; }
public LiteCGraph(Chart chart, Control parent) { ichart = chart; AppPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); LiteCConfig cfg = new LiteCConfig("Users.xml"); users = cfg.ReadStringer(); }
public void Merge() { Data.Add(temp); temp = new CStringer(); ItemsCount++; SubItemsCount = Data[0].Items.Count(); }
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; }
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; }