public CustomPropertyCells(System.DateTime value) { var current_culture = System.Globalization.CultureInfo.CurrentCulture; string formatted_dt = value.ToString(current_culture); this.Value = $"DATETIME(\"{formatted_dt}\")"; this.Type = 5; }
public CustomPropertyCells(System.DateTime value) { var current_culture = System.Globalization.CultureInfo.CurrentCulture; string formatted_dt = value.ToString(current_culture); this.Value = string.Format("DATETIME(\"{0}\")", formatted_dt); this.Type = 5; }
public UserDefinedCell(string name, string value, string prompt) { UserDefinedCellsHelper.CheckValidName(name); if (value == null) { throw new System.ArgumentNullException(nameof(value)); } this.Name = name; this.Value = value; this.Prompt = prompt; }
public static CellData[] Combine(string[] formulas, string[] results) { int n = results.Length; if (formulas.Length != results.Length) { throw new System.ArgumentException("Array Lengths must match"); } var combined_data = new ShapeSheet.CellData[n]; for (int i = 0; i < n; i++) { combined_data[i] = new ShapeSheet.CellData(formulas[i], results[i]); } return(combined_data); }
public CustomPropertyCells(ShapeSheet.FormulaLiteral value) { this.Value = value; this.Type = 2; }
public CustomPropertyCells(bool value) { this.Value = value ? "TRUE" : "FALSE"; this.Type = 3; }
public CustomPropertyCells(ShapeSheet.CellValueLiteral value) { this.Value = value; this.Type = 2; }
public CustomPropertyCells(float value) { this.Value = value; this.Type = 2; }
public CustomPropertyCells(double value) { this.Value = value; this.Type = 2; }
public CustomPropertyCells(string value) { this.Value = value; this.Type = 0; }
public static ShapeSheet.CellData <bool> ToBool(this ShapeSheet.CellData <double> cd) { return(new ShapeSheet.CellData <bool>(cd.Formula, Convert.DoubleToBool(cd.Result))); }
public static ShapeSheet.CellData <int> ToInt(this ShapeSheet.CellData <double> cd) { return(new ShapeSheet.CellData <int>(cd.Formula, (int)cd.Result)); }
public static void Set(IVisio.Shape shape, string name, ShapeSheet.CellData value, ShapeSheet.CellData prompt) { UserDefinedCellHelper.Set(shape, name, value.Formula.Value, prompt.Formula.Value); }