/// <summary>
 /// Initializes a new instance of the X12EnvelopeSettings class.
 /// </summary>
 /// <param name="controlStandardsId">The controls standards id.</param>
 /// <param name="useControlStandardsIdAsRepetitionCharacter">The value
 /// indicating whether to use control standards id as repetition
 /// character.</param>
 /// <param name="senderApplicationId">The sender application
 /// id.</param>
 /// <param name="receiverApplicationId">The receiver application
 /// id.</param>
 /// <param name="controlVersionNumber">The control version
 /// number.</param>
 /// <param name="interchangeControlNumberLowerBound">The interchange
 /// control number lower bound.</param>
 /// <param name="interchangeControlNumberUpperBound">The interchange
 /// control number upper bound.</param>
 /// <param name="rolloverInterchangeControlNumber">The value indicating
 /// whether to rollover interchange control number.</param>
 /// <param name="enableDefaultGroupHeaders">The value indicating
 /// whether to enable default group headers.</param>
 /// <param name="groupControlNumberLowerBound">The group control number
 /// lower bound.</param>
 /// <param name="groupControlNumberUpperBound">The group control number
 /// upper bound.</param>
 /// <param name="rolloverGroupControlNumber">The value indicating
 /// whether to rollover group control number.</param>
 /// <param name="groupHeaderAgencyCode">The group header agency
 /// code.</param>
 /// <param name="groupHeaderVersion">The group header version.</param>
 /// <param name="transactionSetControlNumberLowerBound">The transaction
 /// set control number lower bound.</param>
 /// <param name="transactionSetControlNumberUpperBound">The transaction
 /// set control number upper bound.</param>
 /// <param name="rolloverTransactionSetControlNumber">The value
 /// indicating whether to rollover transaction set control
 /// number.</param>
 /// <param name="overwriteExistingTransactionSetControlNumber">The
 /// value indicating whether to overwrite existing transaction set
 /// control number.</param>
 /// <param name="groupHeaderDateFormat">The group header date format.
 /// Possible values include: 'NotSpecified', 'CCYYMMDD',
 /// 'YYMMDD'</param>
 /// <param name="groupHeaderTimeFormat">The group header time format.
 /// Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS',
 /// 'HHMMSSdd', 'HHMMSSd'</param>
 /// <param name="usageIndicator">The usage indicator. Possible values
 /// include: 'NotSpecified', 'Test', 'Information',
 /// 'Production'</param>
 /// <param name="functionalGroupId">The functional group id.</param>
 /// <param name="transactionSetControlNumberPrefix">The transaction set
 /// control number prefix.</param>
 /// <param name="transactionSetControlNumberSuffix">The transaction set
 /// control number suffix.</param>
 public X12EnvelopeSettings(int controlStandardsId, bool useControlStandardsIdAsRepetitionCharacter, string senderApplicationId, string receiverApplicationId, string controlVersionNumber, int interchangeControlNumberLowerBound, int interchangeControlNumberUpperBound, bool rolloverInterchangeControlNumber, bool enableDefaultGroupHeaders, int groupControlNumberLowerBound, int groupControlNumberUpperBound, bool rolloverGroupControlNumber, string groupHeaderAgencyCode, string groupHeaderVersion, int transactionSetControlNumberLowerBound, int transactionSetControlNumberUpperBound, bool rolloverTransactionSetControlNumber, bool overwriteExistingTransactionSetControlNumber, X12DateFormat groupHeaderDateFormat, X12TimeFormat groupHeaderTimeFormat, UsageIndicator usageIndicator, string functionalGroupId = default(string), string transactionSetControlNumberPrefix = default(string), string transactionSetControlNumberSuffix = default(string))
 {
     ControlStandardsId = controlStandardsId;
     UseControlStandardsIdAsRepetitionCharacter = useControlStandardsIdAsRepetitionCharacter;
     SenderApplicationId   = senderApplicationId;
     ReceiverApplicationId = receiverApplicationId;
     ControlVersionNumber  = controlVersionNumber;
     InterchangeControlNumberLowerBound = interchangeControlNumberLowerBound;
     InterchangeControlNumberUpperBound = interchangeControlNumberUpperBound;
     RolloverInterchangeControlNumber   = rolloverInterchangeControlNumber;
     EnableDefaultGroupHeaders          = enableDefaultGroupHeaders;
     FunctionalGroupId                            = functionalGroupId;
     GroupControlNumberLowerBound                 = groupControlNumberLowerBound;
     GroupControlNumberUpperBound                 = groupControlNumberUpperBound;
     RolloverGroupControlNumber                   = rolloverGroupControlNumber;
     GroupHeaderAgencyCode                        = groupHeaderAgencyCode;
     GroupHeaderVersion                           = groupHeaderVersion;
     TransactionSetControlNumberLowerBound        = transactionSetControlNumberLowerBound;
     TransactionSetControlNumberUpperBound        = transactionSetControlNumberUpperBound;
     RolloverTransactionSetControlNumber          = rolloverTransactionSetControlNumber;
     TransactionSetControlNumberPrefix            = transactionSetControlNumberPrefix;
     TransactionSetControlNumberSuffix            = transactionSetControlNumberSuffix;
     OverwriteExistingTransactionSetControlNumber = overwriteExistingTransactionSetControlNumber;
     GroupHeaderDateFormat                        = groupHeaderDateFormat;
     GroupHeaderTimeFormat                        = groupHeaderTimeFormat;
     UsageIndicator = usageIndicator;
     CustomInit();
 }
 partial void RefreshClicked(NSButton sender)
 {
     if (RefreshButtonClicked != null)
     {
         UsageIndicator.StartAnimation(this);
         RefreshButtonClicked(this, EventArgs.Empty);
     }
 }
 // Shared initialization code
 private void Initialize()
 {
     // Default values
     UsageIndicator.StartAnimation(this);
     PeakUsageLabel.StringValue    = InitialValue;
     OffPeakUsageLabel.StringValue = InitialValue;
     TotalUsageLabel.StringValue   = InitialValue;
     PeriodBeganLabel.StringValue  = InitialValue;
     PeriodEndedLabel.StringValue  = InitialValue;
 }
        public void UpdateUsage(UsageInformation usageInformation)
        {
            float usage = usageInformation.PeakUsage / (float)Allowance;

            PeakUsageLabel.StringValue    = string.Format("{0:f2} GB / {1:f2} GB", usageInformation.PeakUsage, Allowance);
            OffPeakUsageLabel.StringValue = string.Format("{0:f2} GB", usageInformation.OffPeakUsage);
            TotalUsageLabel.StringValue   = string.Format("{0:f2} GB", usageInformation.Usage);

            PeriodBeganLabel.StringValue = usageInformation.StartDate.ToLongDateString();
            PeriodEndedLabel.StringValue = usageInformation.EndDate.ToLongDateString();

            UsageIndicator.StopAnimation(this);

            UpdateIconTint(usage);
            NotifyUser(usageInformation);
        }
Exemple #5
0
        internal static string ToSerializedValue(this UsageIndicator value)
        {
            switch (value)
            {
            case UsageIndicator.NotSpecified:
                return("NotSpecified");

            case UsageIndicator.Test:
                return("Test");

            case UsageIndicator.Information:
                return("Information");

            case UsageIndicator.Production:
                return("Production");
            }
            return(null);
        }
Exemple #6
0
        void ReleaseDesignerOutlets()
        {
            if (UsageIndicator != null)
            {
                UsageIndicator.Dispose();
                UsageIndicator = null;
            }

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

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

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

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

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