Exemplo n.º 1
0
        /// <summary>
        /// Creates a tag given its name, tag type, and its status (whether it be active or inactive).
        /// </summary>
        /// <param name="name">The name of the tag.</param>
        /// <param name="description">The description of the tag.</param>
        /// <param name="tagType">The type of tag.</param>
        /// <param name="active">The status of the tag.</param>
        public MacroTag(string name, string description, MacroTagType tagType, bool active)
        {
            SetDefaultValues();

            Name        = name;
            Description = description;
            Type        = tagType;
            Active      = active;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a tag given its name, tag type, and its status (whether it be active or inactive).
        /// </summary>
        /// <param name="macroParser"></param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="description">The description of the tag.</param>
        /// <param name="macroTagType">The type of tag.</param>
        /// <param name="active">The status of the tag.</param>
        public MacroTag(MacroParser macroParser, string name, string description, MacroTagType macroTagType, bool active)
        {
            _macroParser = macroParser;

            SetDefaultValues();

            Name        = name;
            Description = description;
            Type        = macroTagType;
            Active      = active;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates a tag given its name, tag type, and its status (whether it be active or inactive).
        /// </summary>
        /// <param name="macroParser"></param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="description">The description of the tag.</param>
        /// <param name="macroTagType">The type of tag.</param>
        /// <param name="enable">The status of the tag.</param>
        public MacroTag(MacroParser macroParser, string name, string description, MacroTagType macroTagType, bool enable)
        {
            _macroParser = macroParser;

            SetDefaultValues();

            Name        = name;
            Description = description;
            Type        = macroTagType;
            Enable      = enable;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Creates a tag given its name, tag type, date/time format value, and its status.
        /// </summary>
        /// <param name="macroParser"></param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="description">The description of the tag.</param>
        /// <param name="MacroTagType">The type of tag.</param>
        /// <param name="dateTimeFormatValue">The date/time format value.</param>
        /// <param name="active">The status of the tag.</param>
        public MacroTag(MacroParser macroParser, string name, string description, MacroTagType MacroTagType, string dateTimeFormatValue, bool active)
        {
            _macroParser = macroParser;

            SetDefaultValues();

            Name                = name;
            Description         = description;
            Type                = MacroTagType;
            DateTimeFormatValue = dateTimeFormatValue;
            Enable              = active;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Creates a tag given its name, tag type, and "Time of Day" properties.
        /// </summary>
        /// <param name="macroParser"></param>
        /// <param name="name">The name of the tag.</param>
        /// <param name="description">The description of the tag.</param>
        /// <param name="macroTagType">The type of tag.</param>
        /// <param name="dateTimeFormatValue">The date/time format value.</param>
        /// <param name="timeRangeMacro1Start">The start time for Macro 1.</param>
        /// <param name="timeRangeMacro1End">The end time for Macro 1.</param>
        /// <param name="timeRangeMacro1Macro">The macro for Macro1.</param>
        /// <param name="timeRangeMacro2Start">The start time for Macro 2.</param>
        /// <param name="timeRangeMacro2End">The end time for Macro 2.</param>
        /// <param name="timeRangeMacro2Macro">The macro for Macro 2.</param>
        /// <param name="timeRangeMacro3Start">The start time for Macro 3.</param>
        /// <param name="timeRangeMacro3End">The end time for Macro 3.</param>
        /// <param name="timeRangeMacro3Macro">The macro for Macro 3.</param>
        /// <param name="timeRangeMacro4Start">The start time for Macro 4.</param>
        /// <param name="timeRangeMacro4End">The end time for Macro 4.</param>
        /// <param name="timeRangeMacro4Macro">The macro for Macro 4</param>
        /// <param name="active">Determines the status of the tag (whether it be active or inactive).</param>
        /// <param name="notes">Notes.</param>
        public MacroTag(MacroParser macroParser, string name, string description, MacroTagType macroTagType,
                        string dateTimeFormatValue,
                        DateTime timeRangeMacro1Start,
                        DateTime timeRangeMacro1End,
                        string timeRangeMacro1Macro,
                        DateTime timeRangeMacro2Start,
                        DateTime timeRangeMacro2End,
                        string timeRangeMacro2Macro,
                        DateTime timeRangeMacro3Start,
                        DateTime timeRangeMacro3End,
                        string timeRangeMacro3Macro,
                        DateTime timeRangeMacro4Start,
                        DateTime timeRangeMacro4End,
                        string timeRangeMacro4Macro,
                        bool active, string notes)
        {
            _macroParser = macroParser;

            Name        = name;
            Description = description;
            Type        = macroTagType;

            DateTimeFormatValue = dateTimeFormatValue;

            TimeRangeMacro1Start = timeRangeMacro1Start;
            TimeRangeMacro1End   = timeRangeMacro1End;

            TimeRangeMacro2Start = timeRangeMacro2Start;
            TimeRangeMacro2End   = timeRangeMacro2End;

            TimeRangeMacro3Start = timeRangeMacro3Start;
            TimeRangeMacro3End   = timeRangeMacro3End;

            TimeRangeMacro4Start = timeRangeMacro4Start;
            TimeRangeMacro4End   = timeRangeMacro4End;

            TimeRangeMacro1Macro = timeRangeMacro1Macro;
            TimeRangeMacro2Macro = timeRangeMacro2Macro;
            TimeRangeMacro3Macro = timeRangeMacro3Macro;
            TimeRangeMacro4Macro = timeRangeMacro4Macro;

            Active = active;

            Notes = notes;
        }
Exemplo n.º 6
0
        private void ComboBoxType_SelectedIndexChanged(object sender, EventArgs e)
        {
            labelDateTimeFormatValue.Enabled   = false;
            textBoxDateTimeFormatValue.Enabled = false;

            groupBoxTimeRange.Enabled = false;

            labelMacro1.Enabled = false;
            dateTimePickerMacro1Start.Enabled = false;
            dateTimePickerMacro1End.Enabled   = false;
            textBoxMacro1Macro.Enabled        = false;

            labelMacro2.Enabled = false;
            dateTimePickerMacro2Start.Enabled = false;
            dateTimePickerMacro2End.Enabled   = false;
            textBoxMacro2Macro.Enabled        = false;

            labelMacro3.Enabled = false;
            dateTimePickerMacro3Start.Enabled = false;
            dateTimePickerMacro3End.Enabled   = false;
            textBoxMacro3Macro.Enabled        = false;

            labelMacro4.Enabled = false;
            dateTimePickerMacro4Start.Enabled = false;
            dateTimePickerMacro4End.Enabled   = false;
            textBoxMacro4Macro.Enabled        = false;

            MacroTagType tagType = (MacroTagType)comboBoxType.SelectedIndex;

            if (tagType.Equals(MacroTagType.DateTimeFormat) ||
                tagType.Equals(MacroTagType.DateTimeFormatExpression))
            {
                labelDateTimeFormatValue.Enabled   = true;
                textBoxDateTimeFormatValue.Enabled = true;
            }

            if (tagType.Equals(MacroTagType.TimeRange))
            {
                groupBoxTimeRange.Enabled = true;

                labelMacro1.Enabled = true;
                dateTimePickerMacro1Start.Enabled = true;
                dateTimePickerMacro1End.Enabled   = true;
                textBoxMacro1Macro.Enabled        = true;

                labelMacro2.Enabled = true;
                dateTimePickerMacro2Start.Enabled = true;
                dateTimePickerMacro2End.Enabled   = true;
                textBoxMacro2Macro.Enabled        = true;

                labelMacro3.Enabled = true;
                dateTimePickerMacro3Start.Enabled = true;
                dateTimePickerMacro3End.Enabled   = true;
                textBoxMacro3Macro.Enabled        = true;

                labelMacro4.Enabled = true;
                dateTimePickerMacro4Start.Enabled = true;
                dateTimePickerMacro4End.Enabled   = true;
                textBoxMacro4Macro.Enabled        = true;
            }
        }