Exemple #1
0
        public string Create(string tableName, FiveMinutes fiveMinutes)
        {
            var builder = new StringBuilder();

            builder.Append(string.Format("INSERT INTO {0} VALUES", tableName));

            AppendValues(fiveMinutes, builder);
            builder.Append(", ");

            builder.Remove(builder.Length - 2, 2);
            return(builder.ToString());
        }
Exemple #2
0
        private void AppendValues(FiveMinutes fiveMinutes, StringBuilder builder)
        {
            builder.Append("(");
            builder.Append(fiveMinutes.Datum);
            builder.Append(", ");

            this.appendConsum(builder, fiveMinutes.Consum);
            this.appendProduct(builder, fiveMinutes.Production1);
            builder.Append(", ");
            this.appendProduct(builder, fiveMinutes.Production2);
            builder.Append(", ");
            this.appendProduct(builder, fiveMinutes.Production3);
            builder.Append(", ");
            this.appendProduct(builder, fiveMinutes.Production4);
            builder.Append(", ");
            this.appendProduct(builder, fiveMinutes.Production5);
            builder.Append(", ");
            this.appendProduct(builder, fiveMinutes.Production6);

            builder.Append(")");
        }
Exemple #3
0
 public override string ToString()
 {
     return($"{OneMinute.ToString("0.00", CultureInfo.InvariantCulture)} {FiveMinutes.ToString("0.00", CultureInfo.InvariantCulture)} {FifteenMinutes.ToString("0.00", CultureInfo.InvariantCulture)}");
 }
        void ReleaseDesignerOutlets()
        {
            if (APIKeyInput != null)
            {
                APIKeyInput.Dispose();
                APIKeyInput = null;
            }

            if (APISecretInput != null)
            {
                APISecretInput.Dispose();
                APISecretInput = null;
            }

            if (FiveMinutes != null)
            {
                FiveMinutes.Dispose();
                FiveMinutes = null;
            }

            if (FiveSecond != null)
            {
                FiveSecond.Dispose();
                FiveSecond = null;
            }

            if (OneMinute != null)
            {
                OneMinute.Dispose();
                OneMinute = null;
            }

            if (OpenAtStartupCheckBox != null)
            {
                OpenAtStartupCheckBox.Dispose();
                OpenAtStartupCheckBox = null;
            }

            if (RefreshOff != null)
            {
                RefreshOff.Dispose();
                RefreshOff = null;
            }

            if (TenMinutes != null)
            {
                TenMinutes.Dispose();
                TenMinutes = null;
            }

            if (TenSecond != null)
            {
                TenSecond.Dispose();
                TenSecond = null;
            }

            if (ThirtySecond != null)
            {
                ThirtySecond.Dispose();
                ThirtySecond = null;
            }

            if (TwoHalfMinutes != null)
            {
                TwoHalfMinutes.Dispose();
                TwoHalfMinutes = null;
            }
        }