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;
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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;
 }
Esempio n. 7
0
 public CustomPropertyCells(ShapeSheet.CellValueLiteral value)
 {
     this.Value = value;
     this.Type  = 2;
 }
Esempio n. 8
0
 public CustomPropertyCells(bool value)
 {
     this.Value = value ? "TRUE" : "FALSE";
     this.Type  = 3;
 }
Esempio n. 9
0
 public CustomPropertyCells(float value)
 {
     this.Value = value;
     this.Type  = 2;
 }
Esempio n. 10
0
 public CustomPropertyCells(double value)
 {
     this.Value = value;
     this.Type  = 2;
 }
Esempio n. 11
0
 public CustomPropertyCells(string value)
 {
     this.Value = value;
     this.Type  = 0;
 }
Esempio n. 12
0
 public static ShapeSheet.CellData <bool> ToBool(this ShapeSheet.CellData <double> cd)
 {
     return(new ShapeSheet.CellData <bool>(cd.Formula, Convert.DoubleToBool(cd.Result)));
 }
Esempio n. 13
0
 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);
 }