Esempio n. 1
0
        public ITUWidget CreateITUWidget()
        {
            ITUCalendar cal = new ITUCalendar();

            cal.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            cal.visible = (bool)properties["Visible"].GetValue(this);

            cal.active       = false;
            cal.dirty        = false;
            cal.alpha        = 255;
            cal.rect.x       = this.Location.X;
            cal.rect.y       = this.Location.Y;
            cal.rect.width   = this.Size.Width;
            cal.rect.height  = this.Size.Height;
            cal.color.alpha  = this.BackColor.A;
            cal.color.red    = this.BackColor.R;
            cal.color.green  = this.BackColor.G;
            cal.color.blue   = this.BackColor.B;
            cal.bound.x      = 0;
            cal.bound.y      = 0;
            cal.bound.width  = 0;
            cal.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                cal.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    cal.flags |= ITU.ITU_EXTERNAL;
                }
            }

            cal.caltype   = (int)this.CalendarType;
            cal.sunName   = this.SundayTarget;
            cal.monName   = this.MondayTarget;
            cal.tueName   = this.TuesdayTarget;
            cal.wedName   = this.WednesdayTarget;
            cal.thuName   = this.ThursdayTarget;
            cal.friName   = this.FridayTarget;
            cal.satName   = this.SaturdayTarget;
            cal.minYear   = this.MinimumYear;
            cal.maxYear   = this.MaximumYear;
            cal.year      = this.Year;
            cal.yearName  = this.YearTarget;
            cal.month     = this.Month;
            cal.monthName = this.MonthTarget;
            cal.day       = this.Day;
            cal.dayName   = this.DayTarget;

            return(cal);
        }
Esempio n. 2
0
        public ITUWidget CreateITUWidget()
        {
            ITUScrollText widget = new ITUScrollText();

            widget.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active        = false;
            widget.dirty         = false;
            widget.alpha         = 255;
            widget.rect.x        = this.Location.X;
            widget.rect.y        = this.Location.Y;
            widget.rect.width    = this.Size.Width;
            widget.rect.height   = this.Size.Height;
            widget.color.alpha   = this.ForeColor.A;
            widget.color.red     = this.ForeColor.R;
            widget.color.green   = this.ForeColor.G;
            widget.color.blue    = this.ForeColor.B;
            widget.bound.x       = 0;
            widget.bound.y       = 0;
            widget.bound.width   = 0;
            widget.bound.height  = 0;
            widget.bgColor.alpha = this.BackColor.A;
            widget.bgColor.red   = this.BackColor.R;
            widget.bgColor.green = this.BackColor.G;
            widget.bgColor.blue  = this.BackColor.B;
            widget.fontWidth     = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
            widget.fontHeight    = widget.fontWidth;
            widget.fontIndex     = this.FontIndex;

            if (base.Font.Bold)
            {
                widget.textFlags |= ITUText.ITU_TEXT_BOLD;
            }

            widget.boldSize = this.BoldSize;

            string[] texts = new string[] { this.Text, this.Text1, this.Text2, this.Text3, this.Text4, this.Text5, this.Text6, this.Text7 };
            widget.stringSet = ITU.CreateStringSetNode(texts);

            widget.width       = this.Size.Width;
            widget.scrollDelay = this.ScrollDelay;
            widget.stopDelay   = this.StopDelay;

            return(widget);
        }
Esempio n. 3
0
        public ITUWidget CreateITUWidget()
        {
            ITUAnalogClock aclk = new ITUAnalogClock();

            aclk.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            aclk.visible = (bool)properties["Visible"].GetValue(this);

            aclk.active       = false;
            aclk.dirty        = false;
            aclk.alpha        = 255;
            aclk.rect.x       = this.Location.X;
            aclk.rect.y       = this.Location.Y;
            aclk.rect.width   = this.Size.Width;
            aclk.rect.height  = this.Size.Height;
            aclk.color.alpha  = this.BackColor.A;
            aclk.color.red    = this.BackColor.R;
            aclk.color.green  = this.BackColor.G;
            aclk.color.blue   = this.BackColor.B;
            aclk.bound.x      = 0;
            aclk.bound.y      = 0;
            aclk.bound.width  = 0;
            aclk.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                aclk.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    aclk.flags |= ITU.ITU_EXTERNAL;
                }
            }

            aclk.hourName   = this.HourTarget;
            aclk.hourX      = this.HourX;
            aclk.hourY      = this.HourY;
            aclk.minuteName = this.MinuteTarget;
            aclk.minuteX    = this.MinuteX;
            aclk.minuteY    = this.MinuteY;
            aclk.secondName = this.SecondTarget;
            aclk.secondX    = this.SecondX;
            aclk.secondY    = this.SecondY;

            return(aclk);
        }
Esempio n. 4
0
        public ITUWidget CreateITUWidget()
        {
            ITUDigitalClock dclk = new ITUDigitalClock();

            dclk.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            dclk.visible = (bool)properties["Visible"].GetValue(this);

            dclk.active       = false;
            dclk.dirty        = false;
            dclk.alpha        = 255;
            dclk.rect.x       = this.Location.X;
            dclk.rect.y       = this.Location.Y;
            dclk.rect.width   = this.Size.Width;
            dclk.rect.height  = this.Size.Height;
            dclk.color.alpha  = this.BackColor.A;
            dclk.color.red    = this.BackColor.R;
            dclk.color.green  = this.BackColor.G;
            dclk.color.blue   = this.BackColor.B;
            dclk.bound.x      = 0;
            dclk.bound.y      = 0;
            dclk.bound.width  = 0;
            dclk.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                dclk.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    dclk.flags |= ITU.ITU_EXTERNAL;
                }
            }

            dclk.digitalClockFlags = this.AMPM ? ITUDigitalClock.ITU_DIGITALCLOCK_12H : 0;
            dclk.yearName          = this.YearTarget;
            dclk.monthName         = this.MonthTarget;
            dclk.dayName           = this.DayTarget;
            dclk.hourName          = this.HourTarget;
            dclk.minuteName        = this.MinuteTarget;
            dclk.secondName        = this.SecondTarget;
            dclk.weekName          = this.WeekTarget;
            dclk.colonName         = this.ColonTarget;

            return(dclk);
        }
Esempio n. 5
0
        public ITUWidget CreateITUWidget()
        {
            ITUCircleProgressBar bar = new ITUCircleProgressBar();

            bar.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            bar.visible = (bool)properties["Visible"].GetValue(this);

            bar.active       = false;
            bar.dirty        = false;
            bar.alpha        = 255;
            bar.rect.x       = this.Location.X;
            bar.rect.y       = this.Location.Y;
            bar.rect.width   = this.Size.Width;
            bar.rect.height  = this.Size.Height;
            bar.color.alpha  = this.BackColor.A;
            bar.color.red    = this.BackColor.R;
            bar.color.green  = this.BackColor.G;
            bar.color.blue   = this.BackColor.B;
            bar.bound.x      = 0;
            bar.bound.y      = 0;
            bar.bound.width  = 0;
            bar.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                bar.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    bar.flags |= ITU.ITU_EXTERNAL;
                }
            }

            bar.value        = this.Value;
            bar.progressName = this.ProgressTarget;
            bar.percentName  = this.PercentTarget;
            bar.startAngle   = this.StartAngle;
            bar.endAngle     = this.EndAngle;
            bar.maxValue     = this.MaxValue;

            return(bar);
        }
Esempio n. 6
0
        public ITUWidget CreateITUWidget()
        {
            ITURippleBackground widget = new ITURippleBackground();

            widget.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active       = false;
            widget.dirty        = false;
            widget.alpha        = 255;
            widget.rect.x       = this.Location.X;
            widget.rect.y       = this.Location.Y;
            widget.rect.width   = this.Size.Width;
            widget.rect.height  = this.Size.Height;
            widget.color.alpha  = 255;
            widget.color.red    = 0;
            widget.color.green  = 0;
            widget.color.blue   = 0;
            widget.bound.x      = 0;
            widget.bound.y      = 0;
            widget.bound.width  = 0;
            widget.bound.height = 0;
            widget.effects[(int)ITUState.ITU_STATE_SHOWING] = (ITUEffectType)this.ShowingEffect;
            widget.effects[(int)ITUState.ITU_STATE_HIDING]  = (ITUEffectType)this.HidingEffect;

            if (this.BackgroundImage != null)
            {
                widget.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    widget.flags |= ITU.ITU_EXTERNAL;
                }
            }

            widget.radius = this.Radius;
            widget.range  = this.Range;
            widget.rippleBackgroundFlags = this.Draggable ? ITURippleBackground.ITU_RIPPLEBACKGROUND_DRAGGABLE : 0;

            return(widget);
        }
Esempio n. 7
0
        public ITUWidget CreateITUWidget()
        {
            ITUPopupButton btn = new ITUPopupButton();

            btn.name   = this.Name;
            btn.flags |= this.TabStop ? ITU.ITU_TAPSTOP : 0;
            btn.flags |= this.ResponseToUpKey ? ITU.ITU_RESPONSE_TO_UP_KEY : 0;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            btn.visible = (bool)properties["Visible"].GetValue(this);

            btn.active       = false;
            btn.dirty        = false;
            btn.alpha        = this.Alpha;
            btn.tabIndex     = this.TabIndex;
            btn.rect.x       = this.Location.X;
            btn.rect.y       = this.Location.Y;
            btn.rect.width   = this.Size.Width;
            btn.rect.height  = this.Size.Height;
            btn.color.alpha  = this.BackColor.A;
            btn.color.red    = this.BackColor.R;
            btn.color.green  = this.BackColor.G;
            btn.color.blue   = this.BackColor.B;
            btn.bound.x      = 0;
            btn.bound.y      = 0;
            btn.bound.width  = 0;
            btn.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                btn.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    btn.flags |= ITU.ITU_EXTERNAL;
                }
            }

            ITUBorderWindow bwin = btn.bwin.widget as ITUBorderWindow;

            bwin.name         = "";
            bwin.visible      = true;
            bwin.active       = false;
            bwin.dirty        = false;
            bwin.alpha        = 255;
            bwin.rect.x       = 0;
            bwin.rect.y       = 0;
            bwin.rect.width   = this.Size.Width;
            bwin.rect.height  = this.Size.Height;
            bwin.color.alpha  = this.FlatAppearance.BorderColor.A;
            bwin.color.red    = this.FlatAppearance.BorderColor.R;
            bwin.color.green  = this.FlatAppearance.BorderColor.G;
            bwin.color.blue   = this.FlatAppearance.BorderColor.B;
            bwin.bound.x      = 0;
            bwin.bound.y      = 0;
            bwin.bound.width  = 0;
            bwin.bound.height = 0;
            bwin.borderSize   = this.FlatAppearance.BorderSize;

            ITUText text = btn.text.widget as ITUText;

            text.name    = "";
            text.visible = true;
            text.active  = false;
            text.dirty   = false;
            text.alpha   = 255;
            text.rect.x  = 0;
            text.rect.y  = 0;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(this.Text, this.Font);

                text.rect.width  = (int)Math.Ceiling(size.Width);
                text.rect.height = (int)Math.Ceiling(size.Height);
            }
            text.color.alpha  = this.ForeColor.A;
            text.color.red    = this.ForeColor.R;
            text.color.green  = this.ForeColor.G;
            text.color.blue   = this.ForeColor.B;
            text.bound.x      = 0;
            text.bound.y      = 0;
            text.bound.width  = 0;
            text.bound.height = 0;
            text.fontWidth    = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
            text.fontHeight   = text.fontWidth;
            text.fontIndex    = this.FontIndex;
            text.layout       = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;

            if (base.Font.Bold)
            {
                text.textFlags |= ITUText.ITU_TEXT_BOLD;
            }

            text.boldSize = this.BoldSize;

            string[] texts = new string[] { this.Text, this.Text1, this.Text2, this.Text3, this.Text4, this.Text5, this.Text6, this.Text7 };
            text.stringSet = ITU.CreateStringSetNode(texts);

            btn.bgColor.alpha    = this.BackColor.A;
            btn.bgColor.red      = this.BackColor.R;
            btn.bgColor.green    = this.BackColor.G;
            btn.bgColor.blue     = this.BackColor.B;
            btn.focusColor.alpha = this.FlatAppearance.MouseOverBackColor.A;
            btn.focusColor.red   = this.FlatAppearance.MouseOverBackColor.R;
            btn.focusColor.green = this.FlatAppearance.MouseOverBackColor.G;
            btn.focusColor.blue  = this.FlatAppearance.MouseOverBackColor.B;

            if (this.FocusImage != null)
            {
                btn.staticFocusSurf = ITU.CreateSurfaceNode(this.FocusImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    btn.flags |= ITU.ITU_EXTERNAL;
                }
            }
            btn.pressColor.alpha = this.FlatAppearance.MouseDownBackColor.A;
            btn.pressColor.red   = this.FlatAppearance.MouseDownBackColor.R;
            btn.pressColor.green = this.FlatAppearance.MouseDownBackColor.G;
            btn.pressColor.blue  = this.FlatAppearance.MouseDownBackColor.B;

            if (this.PressImage != null)
            {
                btn.staticPressSurf = ITU.CreateSurfaceNode(this.PressImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    btn.flags |= ITU.ITU_EXTERNAL;
                }
            }
            btn.pressed = 0;

            btn.flags       |= ITU.ITU_STRETCH;
            btn.totalframe   = this.TotalFrame;
            btn.incPercent   = this.IncreasePercent;
            btn.alphaPercent = this.AlphaPercent;

            btn.actions[0].action  = (ITUActionType)this.Action01.Action;
            btn.actions[0].ev      = (ITUEvent)this.Action01.Event;
            btn.actions[0].target  = this.Action01.Target;
            btn.actions[0].param   = this.Action01.Parameter;
            btn.actions[1].action  = (ITUActionType)this.Action02.Action;
            btn.actions[1].ev      = (ITUEvent)this.Action02.Event;
            btn.actions[1].target  = this.Action02.Target;
            btn.actions[1].param   = this.Action02.Parameter;
            btn.actions[2].action  = (ITUActionType)this.Action03.Action;
            btn.actions[2].ev      = (ITUEvent)this.Action03.Event;
            btn.actions[2].target  = this.Action03.Target;
            btn.actions[2].param   = this.Action03.Parameter;
            btn.actions[3].action  = (ITUActionType)this.Action04.Action;
            btn.actions[3].ev      = (ITUEvent)this.Action04.Event;
            btn.actions[3].target  = this.Action04.Target;
            btn.actions[3].param   = this.Action04.Parameter;
            btn.actions[4].action  = (ITUActionType)this.Action05.Action;
            btn.actions[4].ev      = (ITUEvent)this.Action05.Event;
            btn.actions[4].target  = this.Action05.Target;
            btn.actions[4].param   = this.Action05.Parameter;
            btn.actions[5].action  = (ITUActionType)this.Action06.Action;
            btn.actions[5].ev      = (ITUEvent)this.Action06.Event;
            btn.actions[5].target  = this.Action06.Target;
            btn.actions[5].param   = this.Action06.Parameter;
            btn.actions[6].action  = (ITUActionType)this.Action07.Action;
            btn.actions[6].ev      = (ITUEvent)this.Action07.Event;
            btn.actions[6].target  = this.Action07.Target;
            btn.actions[6].param   = this.Action07.Parameter;
            btn.actions[7].action  = (ITUActionType)this.Action08.Action;
            btn.actions[7].ev      = (ITUEvent)this.Action08.Event;
            btn.actions[7].target  = this.Action08.Target;
            btn.actions[7].param   = this.Action08.Parameter;
            btn.actions[8].action  = (ITUActionType)this.Action09.Action;
            btn.actions[8].ev      = (ITUEvent)this.Action09.Event;
            btn.actions[8].target  = this.Action09.Target;
            btn.actions[8].param   = this.Action09.Parameter;
            btn.actions[9].action  = (ITUActionType)this.Action10.Action;
            btn.actions[9].ev      = (ITUEvent)this.Action10.Event;
            btn.actions[9].target  = this.Action10.Target;
            btn.actions[9].param   = this.Action10.Parameter;
            btn.actions[10].action = (ITUActionType)this.Action11.Action;
            btn.actions[10].ev     = (ITUEvent)this.Action11.Event;
            btn.actions[10].target = this.Action11.Target;
            btn.actions[10].param  = this.Action11.Parameter;
            btn.actions[11].action = (ITUActionType)this.Action12.Action;
            btn.actions[11].ev     = (ITUEvent)this.Action12.Event;
            btn.actions[11].target = this.Action12.Target;
            btn.actions[11].param  = this.Action12.Parameter;
            btn.actions[12].action = (ITUActionType)this.Action13.Action;
            btn.actions[12].ev     = (ITUEvent)this.Action13.Event;
            btn.actions[12].target = this.Action13.Target;
            btn.actions[12].param  = this.Action13.Parameter;
            btn.actions[13].action = (ITUActionType)this.Action14.Action;
            btn.actions[13].ev     = (ITUEvent)this.Action14.Event;
            btn.actions[13].target = this.Action14.Target;
            btn.actions[13].param  = this.Action14.Parameter;
            btn.actions[14].action = (ITUActionType)this.Action15.Action;
            btn.actions[14].ev     = (ITUEvent)this.Action15.Event;
            btn.actions[14].target = this.Action15.Target;
            btn.actions[14].param  = this.Action15.Parameter;

            return(btn);
        }
Esempio n. 8
0
        public ITUWidget CreateITUWidget()
        {
            ITUWheel wheel = new ITUWheel();

            wheel.type   = ITUWidgetType.ITU_WHEEL;
            wheel.name   = this.Name;
            wheel.flags |= this.TabStop ? ITU.ITU_TAPSTOP : 0;
            wheel.flags |= this.Touchable ? ITU.ITU_TOUCHABLE : 0;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            wheel.visible = (bool)properties["Visible"].GetValue(this);

            wheel.active       = false;
            wheel.dirty        = false;
            wheel.alpha        = 255;
            wheel.tabIndex     = this.TabIndex;
            wheel.rect.x       = this.Location.X;
            wheel.rect.y       = this.Location.Y;
            wheel.rect.width   = this.Size.Width;
            wheel.rect.height  = this.Size.Height;
            wheel.color.alpha  = this.BackAlpha;
            wheel.color.red    = this.BackColor.R;
            wheel.color.green  = this.BackColor.G;
            wheel.color.blue   = this.BackColor.B;
            wheel.bound.x      = 0;
            wheel.bound.y      = 0;
            wheel.bound.width  = 0;
            wheel.bound.height = 0;

            /*
             * for (int i = 0; i < this.ItemCount / 2; i++)
             * {
             *  ITUText text = new ITUText();
             *
             *  text.flags = ITU.ITU_CLIP_DISABLED;
             *  text.name = "";
             *  text.visible = true;
             *  text.active = false;
             *  text.dirty = text.visible ? true : false;
             *  text.alpha = 255;
             *  text.rect.x = 0;
             *  text.rect.y = 0;
             *  text.rect.width = this.Size.Width;
             *  text.rect.height = this.ItemHeight;
             *  text.color.alpha = this.ForeColor.A;
             *  text.color.red = this.ForeColor.R;
             *  text.color.green = this.ForeColor.G;
             *  text.color.blue = this.ForeColor.B;
             *  text.bound.x = 0;
             *  text.bound.y = 0;
             *  text.bound.width = 0;
             *  text.bound.height = 0;
             *  text.bgColor.alpha = 0;
             *  text.bgColor.red = 0;
             *  text.bgColor.green = 0;
             *  text.bgColor.blue = 0;
             *  text.fontHeight = (int)this.Font.SizeInPoints;
             *  text.fontIndex = this.FontIndex;
             *
             *  string[] texts = new string[] { "" };
             *  text.stringSet = ITU.CreateStringSetNode(texts);
             *
             *  switch (this.TextAlign)
             *  {
             *      case ContentAlignment.BottomLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_LEFT;
             *          break;
             *
             *      case ContentAlignment.MiddleLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_LEFT;
             *          break;
             *
             *      case ContentAlignment.TopLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_LEFT;
             *          break;
             *
             *      case ContentAlignment.BottomCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_CENTER;
             *          break;
             *
             *      case ContentAlignment.MiddleCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;
             *          break;
             *
             *      case ContentAlignment.TopCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_CENTER;
             *          break;
             *
             *      case ContentAlignment.BottomRight:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_RIGHT;
             *          break;
             *
             *      case ContentAlignment.MiddleRight:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_RIGHT;
             *          break;
             *
             *      case ContentAlignment.TopRight:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_RIGHT;
             *          break;
             *
             *      default:
             *          text.layout = ITULayout.ITU_LAYOUT_DEFAULT;
             *          break;
             *  }
             *  WidgetNode node = new WidgetNode();
             *  node.widget = text;
             *  wheel.items.Add(node);
             * }
             */

            int index = 0;

            foreach (object item in this.Items)
            {
                ITUText text = new ITUText();

                text.flags         = ITU.ITU_CLIP_DISABLED;
                text.name          = "";
                text.visible       = true;
                text.active        = false;
                text.dirty         = false;
                text.alpha         = 255;
                text.rect.x        = 0;
                text.rect.y        = 0;
                text.rect.width    = this.Size.Width;
                text.rect.height   = this.ItemHeight;
                text.color.alpha   = this.ForeColor.A;
                text.color.red     = this.ForeColor.R;
                text.color.green   = this.ForeColor.G;
                text.color.blue    = this.ForeColor.B;
                text.bound.x       = 0;
                text.bound.y       = 0;
                text.bound.width   = 0;
                text.bound.height  = 0;
                text.bgColor.alpha = 0;
                text.bgColor.red   = 0;
                text.bgColor.green = 0;
                text.bgColor.blue  = 0;
                text.fontWidth     = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
                text.fontHeight    = text.fontWidth;
                text.fontIndex     = this.FontIndex;

                if (base.Font.Bold)
                {
                    text.textFlags |= ITUText.ITU_TEXT_BOLD;
                }

                text.boldSize = this.BoldSize;

                string[] texts = new string[8];

                texts[0] = item.ToString();

                if (this.Items1.Count > index)
                {
                    texts[1] = this.Items1[index].ToString();
                }

                if (this.Items2.Count > index)
                {
                    texts[2] = this.Items2[index].ToString();
                }

                if (this.Items3.Count > index)
                {
                    texts[3] = this.Items3[index].ToString();
                }

                if (this.Items4.Count > index)
                {
                    texts[4] = this.Items4[index].ToString();
                }

                if (this.Items5.Count > index)
                {
                    texts[5] = this.Items5[index].ToString();
                }

                if (this.Items6.Count > index)
                {
                    texts[6] = this.Items6[index].ToString();
                }

                if (this.Items7.Count > index)
                {
                    texts[7] = this.Items7[index].ToString();
                }

                text.stringSet = ITU.CreateStringSetNode(texts);

                switch (this.TextAlign)
                {
                case ContentAlignment.BottomLeft:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_LEFT;
                    break;

                case ContentAlignment.MiddleLeft:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_LEFT;
                    break;

                case ContentAlignment.TopLeft:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_LEFT;
                    break;

                case ContentAlignment.BottomCenter:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_CENTER;
                    break;

                case ContentAlignment.MiddleCenter:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;
                    break;

                case ContentAlignment.TopCenter:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_CENTER;
                    break;

                case ContentAlignment.BottomRight:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_RIGHT;
                    break;

                case ContentAlignment.MiddleRight:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_RIGHT;
                    break;

                case ContentAlignment.TopRight:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_RIGHT;
                    break;

                default:
                    text.layout = ITULayout.ITU_LAYOUT_DEFAULT;
                    break;
                }
                WidgetNode node = new WidgetNode();
                node.widget = text;
                wheel.items.Add(node);
                index++;
            }

            /*
             * for (int i = 0; i < this.ItemCount / 2; i++)
             * {
             *  ITUText text = new ITUText();
             *
             *  text.flags = ITU.ITU_CLIP_DISABLED;
             *  text.name = "";
             *  text.visible = true;
             *  text.active = false;
             *  text.dirty = text.visible ? true : false;
             *  text.alpha = 255;
             *  text.rect.x = 0;
             *  text.rect.y = 0;
             *  text.rect.width = this.Size.Width;
             *  text.rect.height = this.ItemHeight;
             *  text.color.alpha = this.ForeColor.A;
             *  text.color.red = this.ForeColor.R;
             *  text.color.green = this.ForeColor.G;
             *  text.color.blue = this.ForeColor.B;
             *  text.bound.x = 0;
             *  text.bound.y = 0;
             *  text.bound.width = 0;
             *  text.bound.height = 0;
             *  text.bgColor.alpha = 0;
             *  text.bgColor.red = 0;
             *  text.bgColor.green = 0;
             *  text.bgColor.blue = 0;
             *  text.fontHeight = (int)this.Font.SizeInPoints;
             *  text.fontIndex = this.FontIndex;
             *
             *  string[] texts = new string[] { "" };
             *  text.stringSet = ITU.CreateStringSetNode(texts);
             *
             *  switch (this.TextAlign)
             *  {
             *      case ContentAlignment.BottomLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_LEFT;
             *          break;
             *
             *      case ContentAlignment.MiddleLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_LEFT;
             *          break;
             *
             *      case ContentAlignment.TopLeft:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_LEFT;
             *          break;
             *
             *      case ContentAlignment.BottomCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_CENTER;
             *          break;
             *
             *      case ContentAlignment.MiddleCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;
             *          break;
             *
             *      case ContentAlignment.TopCenter:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_CENTER;
             *          break;
             *
             *      case ContentAlignment.BottomRight:
             *          text.layout = ITULayout.ITU_LAYOUT_BOTTOM_RIGHT;
             *          break;
             *
             *      case ContentAlignment.MiddleRight:
             *          text.layout = ITULayout.ITU_LAYOUT_MIDDLE_RIGHT;
             *          break;
             *
             *      case ContentAlignment.TopRight:
             *          text.layout = ITULayout.ITU_LAYOUT_TOP_RIGHT;
             *          break;
             *
             *      default:
             *          text.layout = ITULayout.ITU_LAYOUT_DEFAULT;
             *          break;
             *  }
             *  WidgetNode node = new WidgetNode();
             *  node.widget = text;
             *  wheel.items.Add(node);
             * }
             */
            wheel.focusColor.alpha  = this.FocusColor.A;
            wheel.focusColor.red    = this.FocusColor.R;
            wheel.focusColor.green  = this.FocusColor.G;
            wheel.focusColor.blue   = this.FocusColor.B;
            wheel.normalColor.alpha = this.ForeColor.A;
            wheel.normalColor.red   = this.ForeColor.R;
            wheel.normalColor.green = this.ForeColor.G;
            wheel.normalColor.blue  = this.ForeColor.B;

            wheel.tempy           = 0;
            wheel.shift_one       = 0;
            wheel.sliding         = 0;
            wheel.scal            = 0;
            wheel.moving_step     = 0;
            wheel.inside          = 0;
            wheel.slide_step      = 2; //this.Speed;
            wheel.slide_itemcount = 0; // this.SlideCount;
            wheel.idle            = 0;
            wheel.focusIndex      = this.FocusIndex;
            wheel.itemCount       = 7; // this.ItemCount;
            wheel.totalframe      = this.TotalFrame;



            if (this.Draggable)
            {
                wheel.flags |= ITU.ITU_DRAGGABLE;
            }

            wheel.fontHeight      = (int)this.Font.SizeInPoints;
            wheel.focusFontHeight = this.FocusFontHeight;

            if (this.Cycle)
            {
                wheel.cycle_tor = 1;
            }
            else
            {
                wheel.cycle_tor = 0;
            }

            wheel.cycle_arr_count = 0;
            wheel.maxci           = 0;
            wheel.minci           = 0;
            wheel.layout_ci       = 0;
            wheel.fix_count       = 0;
            wheel.focus_c         = 0;
            wheel.focus_dev       = 0;

            if (this.FontSquare)
            {
                wheel.fontsquare = 1;
            }
            else
            {
                wheel.fontsquare = 0;
            }

            for (int i = 0; i < ITU.ITU_WHEEL_CYCLE_ARR_LIMIT; i++)
            {
                wheel.cycle_arr[i] = 0;
            }

            wheel.actions[0].action  = (ITUActionType)this.Action01.Action;
            wheel.actions[0].ev      = (ITUEvent)this.Action01.Event;
            wheel.actions[0].target  = this.Action01.Target;
            wheel.actions[0].param   = this.Action01.Parameter;
            wheel.actions[1].action  = (ITUActionType)this.Action02.Action;
            wheel.actions[1].ev      = (ITUEvent)this.Action02.Event;
            wheel.actions[1].target  = this.Action02.Target;
            wheel.actions[1].param   = this.Action02.Parameter;
            wheel.actions[2].action  = (ITUActionType)this.Action03.Action;
            wheel.actions[2].ev      = (ITUEvent)this.Action03.Event;
            wheel.actions[2].target  = this.Action03.Target;
            wheel.actions[2].param   = this.Action03.Parameter;
            wheel.actions[3].action  = (ITUActionType)this.Action04.Action;
            wheel.actions[3].ev      = (ITUEvent)this.Action04.Event;
            wheel.actions[3].target  = this.Action04.Target;
            wheel.actions[3].param   = this.Action04.Parameter;
            wheel.actions[4].action  = (ITUActionType)this.Action05.Action;
            wheel.actions[4].ev      = (ITUEvent)this.Action05.Event;
            wheel.actions[4].target  = this.Action05.Target;
            wheel.actions[4].param   = this.Action05.Parameter;
            wheel.actions[5].action  = (ITUActionType)this.Action06.Action;
            wheel.actions[5].ev      = (ITUEvent)this.Action06.Event;
            wheel.actions[5].target  = this.Action06.Target;
            wheel.actions[5].param   = this.Action06.Parameter;
            wheel.actions[6].action  = (ITUActionType)this.Action07.Action;
            wheel.actions[6].ev      = (ITUEvent)this.Action07.Event;
            wheel.actions[6].target  = this.Action07.Target;
            wheel.actions[6].param   = this.Action07.Parameter;
            wheel.actions[7].action  = (ITUActionType)this.Action08.Action;
            wheel.actions[7].ev      = (ITUEvent)this.Action08.Event;
            wheel.actions[7].target  = this.Action08.Target;
            wheel.actions[7].param   = this.Action08.Parameter;
            wheel.actions[8].action  = (ITUActionType)this.Action09.Action;
            wheel.actions[8].ev      = (ITUEvent)this.Action09.Event;
            wheel.actions[8].target  = this.Action09.Target;
            wheel.actions[8].param   = this.Action09.Parameter;
            wheel.actions[9].action  = (ITUActionType)this.Action10.Action;
            wheel.actions[9].ev      = (ITUEvent)this.Action10.Event;
            wheel.actions[9].target  = this.Action10.Target;
            wheel.actions[9].param   = this.Action10.Parameter;
            wheel.actions[10].action = (ITUActionType)this.Action11.Action;
            wheel.actions[10].ev     = (ITUEvent)this.Action11.Event;
            wheel.actions[10].target = this.Action11.Target;
            wheel.actions[10].param  = this.Action11.Parameter;
            wheel.actions[11].action = (ITUActionType)this.Action12.Action;
            wheel.actions[11].ev     = (ITUEvent)this.Action12.Event;
            wheel.actions[11].target = this.Action12.Target;
            wheel.actions[11].param  = this.Action12.Parameter;
            wheel.actions[12].action = (ITUActionType)this.Action13.Action;
            wheel.actions[12].ev     = (ITUEvent)this.Action13.Event;
            wheel.actions[12].target = this.Action13.Target;
            wheel.actions[12].param  = this.Action13.Parameter;
            wheel.actions[13].action = (ITUActionType)this.Action14.Action;
            wheel.actions[13].ev     = (ITUEvent)this.Action14.Event;
            wheel.actions[13].target = this.Action14.Target;
            wheel.actions[13].param  = this.Action14.Parameter;
            wheel.actions[14].action = (ITUActionType)this.Action15.Action;
            wheel.actions[14].ev     = (ITUEvent)this.Action15.Event;
            wheel.actions[14].target = this.Action15.Target;
            wheel.actions[14].param  = this.Action15.Parameter;

            return(wheel);
        }
Esempio n. 9
0
        public ITUWidget CreateITUWidget()
        {
            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);
            ITUCurve widget = new ITUCurve();

            widget.name = this.Name;

            if (!(bool)properties["Enabled"].GetValue(this))
            {
                widget.flags &= ~ITU.ITU_ENABLED;
            }

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active       = false;
            widget.dirty        = false;
            widget.alpha        = 255;
            widget.rect.x       = this.Location.X;
            widget.rect.y       = this.Location.Y;
            widget.rect.width   = this.Size.Width;
            widget.rect.height  = this.Size.Height;
            widget.color.alpha  = this.BackColor.A;
            widget.color.red    = this.BackColor.R;
            widget.color.green  = this.BackColor.G;
            widget.color.blue   = this.BackColor.B;
            widget.bound.x      = 0;
            widget.bound.y      = 0;
            widget.bound.width  = 0;
            widget.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                widget.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    widget.flags |= ITU.ITU_EXTERNAL;
                }
            }

            widget.graidentMode        = (uint)(this.GradientMode == true ? ITU.WidgetGradientMode.Vertical : ITU.WidgetGradientMode.None);
            widget.gradientColor.alpha = this.GradientColor.A;
            widget.gradientColor.red   = this.GradientColor.R;
            widget.gradientColor.green = this.GradientColor.G;
            widget.gradientColor.blue  = this.GradientColor.B;

            Point[] points = new Point[]
            {
                this.Point00,
                this.Point01,
                this.Point02,
                this.Point03,
                this.Point04,
                this.Point05,
                this.Point06,
                this.Point07,
                this.Point08,
                this.Point09,
                this.Point10,
                this.Point11,
                this.Point12,
                this.Point13,
                this.Point14,
                this.Point15,
                this.Point16,
                this.Point17,
                this.Point18,
                this.Point19,
                this.Point20,
                this.Point21,
                this.Point22,
                this.Point23,
                this.Point24,
                this.Point25,
                this.Point26,
                this.Point27,
                this.Point28,
                this.Point29,
                this.Point30,
                this.Point31
            };

            widget.pointCount = this.PointCount < ITUCurve.ITU_CURVE_MAX_POINT_COUNT ? this.PointCount : ITUCurve.ITU_CURVE_MAX_POINT_COUNT;
            for (int i = 0; i < widget.pointCount; ++i)
            {
                widget.points[i].x = points[i].X;
                widget.points[i].y = points[i].Y;
            }
            return(widget);
        }
Esempio n. 10
0
        public ITUWidget CreateITUWidget()
        {
            ITUTrackBar tbar = new ITUTrackBar();

            tbar.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            tbar.visible = (bool)properties["Visible"].GetValue(this);

            tbar.active       = false;
            tbar.dirty        = false;
            tbar.alpha        = 255;
            tbar.rect.x       = this.Location.X;
            tbar.rect.y       = this.Location.Y;
            tbar.rect.width   = this.Size.Width;
            tbar.rect.height  = this.Size.Height;
            tbar.color.alpha  = this.BackColor.A;
            tbar.color.red    = this.BackColor.R;
            tbar.color.green  = this.BackColor.G;
            tbar.color.blue   = this.BackColor.B;
            tbar.bound.x      = 0;
            tbar.bound.y      = 0;
            tbar.bound.width  = 0;
            tbar.bound.height = 0;

            if (!this.Jumpable)
            {
                tbar.flags |= ITU.ITU_PROGRESS;
            }

            if (this.BackgroundImage != null)
            {
                tbar.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    tbar.flags |= ITU.ITU_EXTERNAL;
                }
            }

            tbar.trackerName = this.TrackerTarget;
            tbar.layout      = (ITULayout)this.Orientation;
            tbar.min         = this.Minimum;
            tbar.max         = this.Maximum;
            tbar.step        = this.Step;
            tbar.value       = this.Value;
            tbar.valueName   = this.ValueTarget;

            tbar.gap     = this.Gap;
            tbar.tipName = this.TipTarget;

            tbar.actions[0].action  = (ITUActionType)this.Action01.Action;
            tbar.actions[0].ev      = (ITUEvent)this.Action01.Event;
            tbar.actions[0].target  = this.Action01.Target;
            tbar.actions[0].param   = this.Action01.Parameter;
            tbar.actions[1].action  = (ITUActionType)this.Action02.Action;
            tbar.actions[1].ev      = (ITUEvent)this.Action02.Event;
            tbar.actions[1].target  = this.Action02.Target;
            tbar.actions[1].param   = this.Action02.Parameter;
            tbar.actions[2].action  = (ITUActionType)this.Action03.Action;
            tbar.actions[2].ev      = (ITUEvent)this.Action03.Event;
            tbar.actions[2].target  = this.Action03.Target;
            tbar.actions[2].param   = this.Action03.Parameter;
            tbar.actions[3].action  = (ITUActionType)this.Action04.Action;
            tbar.actions[3].ev      = (ITUEvent)this.Action04.Event;
            tbar.actions[3].target  = this.Action04.Target;
            tbar.actions[3].param   = this.Action04.Parameter;
            tbar.actions[4].action  = (ITUActionType)this.Action05.Action;
            tbar.actions[4].ev      = (ITUEvent)this.Action05.Event;
            tbar.actions[4].target  = this.Action05.Target;
            tbar.actions[4].param   = this.Action05.Parameter;
            tbar.actions[5].action  = (ITUActionType)this.Action06.Action;
            tbar.actions[5].ev      = (ITUEvent)this.Action06.Event;
            tbar.actions[5].target  = this.Action06.Target;
            tbar.actions[5].param   = this.Action06.Parameter;
            tbar.actions[6].action  = (ITUActionType)this.Action07.Action;
            tbar.actions[6].ev      = (ITUEvent)this.Action07.Event;
            tbar.actions[6].target  = this.Action07.Target;
            tbar.actions[6].param   = this.Action07.Parameter;
            tbar.actions[7].action  = (ITUActionType)this.Action08.Action;
            tbar.actions[7].ev      = (ITUEvent)this.Action08.Event;
            tbar.actions[7].target  = this.Action08.Target;
            tbar.actions[7].param   = this.Action08.Parameter;
            tbar.actions[8].action  = (ITUActionType)this.Action09.Action;
            tbar.actions[8].ev      = (ITUEvent)this.Action09.Event;
            tbar.actions[8].target  = this.Action09.Target;
            tbar.actions[8].param   = this.Action09.Parameter;
            tbar.actions[9].action  = (ITUActionType)this.Action10.Action;
            tbar.actions[9].ev      = (ITUEvent)this.Action10.Event;
            tbar.actions[9].target  = this.Action10.Target;
            tbar.actions[9].param   = this.Action10.Parameter;
            tbar.actions[10].action = (ITUActionType)this.Action11.Action;
            tbar.actions[10].ev     = (ITUEvent)this.Action11.Event;
            tbar.actions[10].target = this.Action11.Target;
            tbar.actions[10].param  = this.Action11.Parameter;
            tbar.actions[11].action = (ITUActionType)this.Action12.Action;
            tbar.actions[11].ev     = (ITUEvent)this.Action12.Event;
            tbar.actions[11].target = this.Action12.Target;
            tbar.actions[11].param  = this.Action12.Parameter;
            tbar.actions[12].action = (ITUActionType)this.Action13.Action;
            tbar.actions[12].ev     = (ITUEvent)this.Action13.Event;
            tbar.actions[12].target = this.Action13.Target;
            tbar.actions[12].param  = this.Action13.Parameter;
            tbar.actions[13].action = (ITUActionType)this.Action14.Action;
            tbar.actions[13].ev     = (ITUEvent)this.Action14.Event;
            tbar.actions[13].target = this.Action14.Target;
            tbar.actions[13].param  = this.Action14.Parameter;
            tbar.actions[14].action = (ITUActionType)this.Action15.Action;
            tbar.actions[14].ev     = (ITUEvent)this.Action15.Event;
            tbar.actions[14].target = this.Action15.Target;
            tbar.actions[14].param  = this.Action15.Parameter;

            return(tbar);
        }
Esempio n. 11
0
        public ITUWidget CreateITUWidget()
        {
            ITUTableListBox listbox = new ITUTableListBox();

            listbox.type   = ITUWidgetType.ITU_TABLELISTBOX;
            listbox.name   = this.Name;
            listbox.flags |= this.TabStop ? ITU.ITU_TAPSTOP : 0;
            listbox.flags |= this.HasLongPress ? ITU.ITU_HAS_LONG_PRESS : 0;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            listbox.visible = (bool)properties["Visible"].GetValue(this);

            listbox.active       = false;
            listbox.dirty        = false;
            listbox.alpha        = 255;
            listbox.tabIndex     = this.TabIndex;
            listbox.rect.x       = this.Location.X;
            listbox.rect.y       = this.Location.Y;
            listbox.rect.width   = this.Size.Width;
            listbox.rect.height  = this.Size.Height;
            listbox.color.alpha  = this.BackAlpha;
            listbox.color.red    = this.BackColor.R;
            listbox.color.green  = this.BackColor.G;
            listbox.color.blue   = this.BackColor.B;
            listbox.bound.x      = 0;
            listbox.bound.y      = 0;
            listbox.bound.width  = 0;
            listbox.bound.height = 0;

            for (int i = 0; i < this.ItemCount; i++)
            {
                object item;

                if (i < this.Items.Count)
                {
                    item = this.Items[i];
                }
                else
                {
                    item = null;
                }

                ITUScrollText text = new ITUScrollText();

                text.name          = "";
                text.visible       = true;
                text.active        = false;
                text.dirty         = false;
                text.alpha         = 255;
                text.rect.x        = 0;
                text.rect.y        = 0;
                text.rect.width    = this.Size.Width;
                text.rect.height   = this.ItemHeight;
                text.color.alpha   = this.ForeColor.A;
                text.color.red     = this.ForeColor.R;
                text.color.green   = this.ForeColor.G;
                text.color.blue    = this.ForeColor.B;
                text.bound.x       = 0;
                text.bound.y       = 0;
                text.bound.width   = 0;
                text.bound.height  = 0;
                text.bgColor.alpha = 0;
                text.bgColor.red   = 0;
                text.bgColor.green = 0;
                text.bgColor.blue  = 0;
                text.fontWidth     = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
                text.fontHeight    = text.fontWidth;
                text.fontIndex     = this.FontIndex;

                if (base.Font.Bold)
                {
                    text.textFlags |= ITUText.ITU_TEXT_BOLD;
                }

                text.boldSize = this.BoldSize;

                string[] texts = new string[1];
                if (item == null)
                {
                    texts[0] = "";
                }
                else
                {
                    texts[0] = item.ToString();
                }

                text.stringSet = ITU.CreateStringSetNode(texts);

                text.width = this.Size.Width;

                switch (this.TextAlign)
                {
                case ContentAlignment.BottomLeft:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_LEFT;
                    break;

                case ContentAlignment.MiddleLeft:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_LEFT;
                    break;

                case ContentAlignment.TopLeft:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_LEFT;
                    break;

                case ContentAlignment.BottomCenter:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_CENTER;
                    break;

                case ContentAlignment.MiddleCenter:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;
                    break;

                case ContentAlignment.TopCenter:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_CENTER;
                    break;

                case ContentAlignment.BottomRight:
                    text.layout = ITULayout.ITU_LAYOUT_BOTTOM_RIGHT;
                    break;

                case ContentAlignment.MiddleRight:
                    text.layout = ITULayout.ITU_LAYOUT_MIDDLE_RIGHT;
                    break;

                case ContentAlignment.TopRight:
                    text.layout = ITULayout.ITU_LAYOUT_TOP_RIGHT;
                    break;

                default:
                    text.layout = ITULayout.ITU_LAYOUT_DEFAULT;
                    break;
                }
                text.scrollDelay     = this.ScrollDelay;
                text.stopDelay       = this.StopDelay;
                text.scrollTextState = 1;

                WidgetNode node = new WidgetNode();
                node.widget = text;
                listbox.items.Add(node);
            }
            listbox.focusColor.alpha     = this.FocusColor.A;
            listbox.focusColor.red       = this.FocusColor.R;
            listbox.focusColor.green     = this.FocusColor.G;
            listbox.focusColor.blue      = this.FocusColor.B;
            listbox.focusFontColor.alpha = this.FocusFontColor.A;
            listbox.focusFontColor.red   = this.FocusFontColor.R;
            listbox.focusFontColor.green = this.FocusFontColor.G;
            listbox.focusFontColor.blue  = this.FocusFontColor.B;
            listbox.orgFontColor.alpha   = this.ForeColor.A;
            listbox.orgFontColor.red     = this.ForeColor.R;
            listbox.orgFontColor.green   = this.ForeColor.G;
            listbox.orgFontColor.blue    = this.ForeColor.B;
            listbox.readFontColor.alpha  = this.ReadFontColor.A;
            listbox.readFontColor.red    = this.ReadFontColor.R;
            listbox.readFontColor.green  = this.ReadFontColor.G;
            listbox.readFontColor.blue   = this.ReadFontColor.B;
            listbox.scrollDelay          = this.ScrollDelay;
            listbox.stopDelay            = this.StopDelay;
            listbox.totalframe           = this.TotalFrame;
            listbox.slidePage            = this.SlidePage;

            if (this.Draggable)
            {
                listbox.flags |= ITU.ITU_DRAGGABLE;
            }

            listbox.actions[0].action  = (ITUActionType)this.Action01.Action;
            listbox.actions[0].ev      = (ITUEvent)this.Action01.Event;
            listbox.actions[0].target  = this.Action01.Target;
            listbox.actions[0].param   = this.Action01.Parameter;
            listbox.actions[1].action  = (ITUActionType)this.Action02.Action;
            listbox.actions[1].ev      = (ITUEvent)this.Action02.Event;
            listbox.actions[1].target  = this.Action02.Target;
            listbox.actions[1].param   = this.Action02.Parameter;
            listbox.actions[2].action  = (ITUActionType)this.Action03.Action;
            listbox.actions[2].ev      = (ITUEvent)this.Action03.Event;
            listbox.actions[2].target  = this.Action03.Target;
            listbox.actions[2].param   = this.Action03.Parameter;
            listbox.actions[3].action  = (ITUActionType)this.Action04.Action;
            listbox.actions[3].ev      = (ITUEvent)this.Action04.Event;
            listbox.actions[3].target  = this.Action04.Target;
            listbox.actions[3].param   = this.Action04.Parameter;
            listbox.actions[4].action  = (ITUActionType)this.Action05.Action;
            listbox.actions[4].ev      = (ITUEvent)this.Action05.Event;
            listbox.actions[4].target  = this.Action05.Target;
            listbox.actions[4].param   = this.Action05.Parameter;
            listbox.actions[5].action  = (ITUActionType)this.Action06.Action;
            listbox.actions[5].ev      = (ITUEvent)this.Action06.Event;
            listbox.actions[5].target  = this.Action06.Target;
            listbox.actions[5].param   = this.Action06.Parameter;
            listbox.actions[6].action  = (ITUActionType)this.Action07.Action;
            listbox.actions[6].ev      = (ITUEvent)this.Action07.Event;
            listbox.actions[6].target  = this.Action07.Target;
            listbox.actions[6].param   = this.Action07.Parameter;
            listbox.actions[7].action  = (ITUActionType)this.Action08.Action;
            listbox.actions[7].ev      = (ITUEvent)this.Action08.Event;
            listbox.actions[7].target  = this.Action08.Target;
            listbox.actions[7].param   = this.Action08.Parameter;
            listbox.actions[8].action  = (ITUActionType)this.Action09.Action;
            listbox.actions[8].ev      = (ITUEvent)this.Action09.Event;
            listbox.actions[8].target  = this.Action09.Target;
            listbox.actions[8].param   = this.Action09.Parameter;
            listbox.actions[9].action  = (ITUActionType)this.Action10.Action;
            listbox.actions[9].ev      = (ITUEvent)this.Action10.Event;
            listbox.actions[9].target  = this.Action10.Target;
            listbox.actions[9].param   = this.Action10.Parameter;
            listbox.actions[10].action = (ITUActionType)this.Action11.Action;
            listbox.actions[10].ev     = (ITUEvent)this.Action11.Event;
            listbox.actions[10].target = this.Action11.Target;
            listbox.actions[10].param  = this.Action11.Parameter;
            listbox.actions[11].action = (ITUActionType)this.Action12.Action;
            listbox.actions[11].ev     = (ITUEvent)this.Action12.Event;
            listbox.actions[11].target = this.Action12.Target;
            listbox.actions[11].param  = this.Action12.Parameter;
            listbox.actions[12].action = (ITUActionType)this.Action13.Action;
            listbox.actions[12].ev     = (ITUEvent)this.Action13.Event;
            listbox.actions[12].target = this.Action13.Target;
            listbox.actions[12].param  = this.Action13.Parameter;
            listbox.actions[13].action = (ITUActionType)this.Action14.Action;
            listbox.actions[13].ev     = (ITUEvent)this.Action14.Event;
            listbox.actions[13].target = this.Action14.Target;
            listbox.actions[13].param  = this.Action14.Parameter;
            listbox.actions[14].action = (ITUActionType)this.Action15.Action;
            listbox.actions[14].ev     = (ITUEvent)this.Action15.Event;
            listbox.actions[14].target = this.Action15.Target;
            listbox.actions[14].param  = this.Action15.Parameter;

            return(listbox);
        }
Esempio n. 12
0
        /// <summary>
        /// Removes the track.
        /// </summary>
        /// <param name="track">The track.</param>
        public void DeleteTrackEntry(ITU.DatabaseWrapperObjects.Track track)
        {
            using (RENTIT21Entities context = new RENTIT21Entities())
            {
                var channels = from channel in context.Channels
                               where channel.Id == track.ChannelId
                               select channel;

                var tracks = from atrack in context.Tracks
                             where atrack.Id == track.Id
                             select atrack;

                if (tracks.Any() == false) throw new ArgumentException("The track entry is not in the database");

                Track theTrack = tracks.First();

                // If the track is associated with a channel, remove it from the channel as well
                if (channels.Any() == true)
                {
                    Channel theChannel = channels.First();
                    theChannel.Tracks.Remove(theTrack);
                }

                context.Tracks.Remove(theTrack);
                context.SaveChanges();
            }
        }
Esempio n. 13
0
        public ITUWidget CreateITUWidget()
        {
            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);
            ITUBackground widget = new ITUBackground();

            widget.name = this.Name;

            if (!(bool)properties["Enabled"].GetValue(this))
            {
                widget.flags &= ~ITU.ITU_ENABLED;
            }

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active       = false;
            widget.dirty        = false;
            widget.alpha        = 255;
            widget.rect.x       = this.Location.X;
            widget.rect.y       = this.Location.Y;
            widget.rect.width   = this.Size.Width;
            widget.rect.height  = this.Size.Height;
            widget.color.alpha  = this.BackColor.A;
            widget.color.red    = this.BackColor.R;
            widget.color.green  = this.BackColor.G;
            widget.color.blue   = this.BackColor.B;
            widget.bound.x      = 0;
            widget.bound.y      = 0;
            widget.bound.width  = 0;
            widget.bound.height = 0;
            widget.showDelay    = this.ShowDelay;
            widget.hideDelay    = this.HideDelay;
            widget.flags       |= this.AlwaysVisible ? ITU.ITU_ALWAYS_VISIBLE : 0;
            widget.flags       |= this.TransferAlpha ? ITU.ITU_TRANSFER_ALPHA : 0;
            widget.effectSteps  = this.EffectSteps;
            widget.effects[(int)ITUState.ITU_STATE_SHOWING] = (ITUEffectType)this.ShowingEffect;
            widget.effects[(int)ITUState.ITU_STATE_HIDING]  = (ITUEffectType)this.HidingEffect;

            if (this.Stretch)
            {
                widget.flags |= ITU.ITU_STRETCH;
            }
            widget.angle = this.Angle;

            widget.transformType = (ITUTransformType)this.TransformType;
            widget.transformX    = this.TransformX;
            widget.transformY    = this.TransformY;

            if (this.ExternalImage)
            {
                widget.flags |= ITU.ITU_EXTERNAL_IMAGE;
            }

            if (this.BackgroundImage != null)
            {
                widget.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    widget.flags |= ITU.ITU_EXTERNAL;
                }
            }

            widget.graidentMode        = (uint)this.GradientMode;
            widget.gradientColor.alpha = this.GradientColor.A;
            widget.gradientColor.red   = this.GradientColor.R;
            widget.gradientColor.green = this.GradientColor.G;
            widget.gradientColor.blue  = this.GradientColor.B;

            return(widget);
        }
Esempio n. 14
0
        public ITUWidget CreateITUWidget()
        {
            ITUCheckBox checkbox = new ITUCheckBox();

            checkbox.name   = this.Name;
            checkbox.flags |= this.TabStop ? ITU.ITU_TAPSTOP : 0;
            checkbox.flags |= this.ResponseToUpKey ? ITU.ITU_RESPONSE_TO_UP_KEY : 0;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            checkbox.visible = (bool)properties["Visible"].GetValue(this);

            checkbox.active       = false;
            checkbox.dirty        = false;
            checkbox.alpha        = 255;
            checkbox.tabIndex     = this.TabIndex;
            checkbox.rect.x       = this.Location.X;
            checkbox.rect.y       = this.Location.Y;
            checkbox.rect.width   = this.Size.Width;
            checkbox.rect.height  = this.Size.Height;
            checkbox.color.alpha  = this.BackColor.A;
            checkbox.color.red    = this.BackColor.R;
            checkbox.color.green  = this.BackColor.G;
            checkbox.color.blue   = this.BackColor.B;
            checkbox.bound.x      = 0;
            checkbox.bound.y      = 0;
            checkbox.bound.width  = 0;
            checkbox.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                checkbox.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    checkbox.flags |= ITU.ITU_EXTERNAL;
                }
            }

            ITUBorderWindow bwin = checkbox.bwin.widget as ITUBorderWindow;

            bwin.name         = "";
            bwin.visible      = true;
            bwin.active       = false;
            bwin.dirty        = false;
            bwin.alpha        = 255;
            bwin.rect.x       = 0;
            bwin.rect.y       = 0;
            bwin.rect.width   = this.Size.Width;
            bwin.rect.height  = this.Size.Height;
            bwin.color.alpha  = this.FlatAppearance.BorderColor.A;
            bwin.color.red    = this.FlatAppearance.BorderColor.R;
            bwin.color.green  = this.FlatAppearance.BorderColor.G;
            bwin.color.blue   = this.FlatAppearance.BorderColor.B;
            bwin.bound.x      = 0;
            bwin.bound.y      = 0;
            bwin.bound.width  = 0;
            bwin.bound.height = 0;
            bwin.borderSize   = this.FlatAppearance.BorderSize;

            ITUText text = checkbox.text.widget as ITUText;

            text.flags   = ITU.ITU_CLIP_DISABLED;
            text.name    = "";
            text.visible = true;
            text.active  = false;
            text.dirty   = false;
            text.alpha   = 255;
            text.rect.x  = 0;
            text.rect.y  = 0;

            using (Graphics cg = this.CreateGraphics())
            {
                SizeF size = cg.MeasureString(this.Text, this.Font);

                text.rect.width  = (int)Math.Ceiling(size.Width);
                text.rect.height = (int)Math.Ceiling(size.Height);
            }
            text.color.alpha  = this.ForeColor.A;
            text.color.red    = this.ForeColor.R;
            text.color.green  = this.ForeColor.G;
            text.color.blue   = this.ForeColor.B;
            text.bound.x      = 0;
            text.bound.y      = 0;
            text.bound.width  = 0;
            text.bound.height = 0;
            text.fontWidth    = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
            text.fontHeight   = text.fontWidth;
            text.fontIndex    = this.FontIndex;
            text.layout       = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;

            if (base.Font.Bold)
            {
                text.textFlags |= ITUText.ITU_TEXT_BOLD;
            }

            text.boldSize = this.BoldSize;

            string[] texts = new string[] { this.Text, this.Text1, this.Text2, this.Text3, this.Text4, this.Text5, this.Text6, this.Text7 };
            text.stringSet = ITU.CreateStringSetNode(texts);

            checkbox.bgColor.alpha    = this.BackColor.A;
            checkbox.bgColor.red      = this.BackColor.R;
            checkbox.bgColor.green    = this.BackColor.G;
            checkbox.bgColor.blue     = this.BackColor.B;
            checkbox.focusColor.alpha = this.FlatAppearance.MouseOverBackColor.A;
            checkbox.focusColor.red   = this.FlatAppearance.MouseOverBackColor.R;
            checkbox.focusColor.green = this.FlatAppearance.MouseOverBackColor.G;
            checkbox.focusColor.blue  = this.FlatAppearance.MouseOverBackColor.B;

            if (this.FocusImage != null)
            {
                checkbox.staticFocusSurf = ITU.CreateSurfaceNode(this.FocusImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    checkbox.flags |= ITU.ITU_EXTERNAL;
                }
            }
            checkbox.pressColor.alpha = this.FlatAppearance.MouseDownBackColor.A;
            checkbox.pressColor.red   = this.FlatAppearance.MouseDownBackColor.R;
            checkbox.pressColor.green = this.FlatAppearance.MouseDownBackColor.G;
            checkbox.pressColor.blue  = this.FlatAppearance.MouseDownBackColor.B;
            checkbox.pressed          = 0;

            checkbox.checkedColor.alpha = this.FlatAppearance.CheckedBackColor.A;
            checkbox.checkedColor.red   = this.FlatAppearance.CheckedBackColor.R;
            checkbox.checkedColor.green = this.FlatAppearance.CheckedBackColor.G;
            checkbox.checkedColor.blue  = this.FlatAppearance.CheckedBackColor.B;

            checkbox.checkedFontColor.alpha = this.CheckedFontColor.A;
            checkbox.checkedFontColor.red   = this.CheckedFontColor.R;
            checkbox.checkedFontColor.green = this.CheckedFontColor.G;
            checkbox.checkedFontColor.blue  = this.CheckedFontColor.B;
            checkbox.orgFontColor.alpha     = this.ForeColor.A;
            checkbox.orgFontColor.red       = this.ForeColor.R;
            checkbox.orgFontColor.green     = this.ForeColor.G;
            checkbox.orgFontColor.blue      = this.ForeColor.B;

            if (this.CheckedImage != null)
            {
                checkbox.staticCheckedSurf = ITU.CreateSurfaceNode(this.CheckedImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    checkbox.flags |= ITU.ITU_EXTERNAL;
                }
            }
            checkbox._checked = this.Checked ? 1 : 0;

            if (this.FocusCheckedImage != null)
            {
                checkbox.staticFocusCheckedSurf = ITU.CreateSurfaceNode(this.FocusCheckedImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    checkbox.flags |= ITU.ITU_EXTERNAL;
                }
            }

            if (!this.SupportTouch)
            {
                checkbox.flags &= ~ITU.ITU_ENABLED;
            }

            checkbox.angle         = this.Angle;
            checkbox.transformType = (ITUTransformType)this.TransformType;
            checkbox.transformX    = this.TransformX;
            checkbox.transformY    = this.TransformY;

            checkbox.actions[0].action  = (ITUActionType)this.Action01.Action;
            checkbox.actions[0].ev      = (ITUEvent)this.Action01.Event;
            checkbox.actions[0].target  = this.Action01.Target;
            checkbox.actions[0].param   = this.Action01.Parameter;
            checkbox.actions[1].action  = (ITUActionType)this.Action02.Action;
            checkbox.actions[1].ev      = (ITUEvent)this.Action02.Event;
            checkbox.actions[1].target  = this.Action02.Target;
            checkbox.actions[1].param   = this.Action02.Parameter;
            checkbox.actions[2].action  = (ITUActionType)this.Action03.Action;
            checkbox.actions[2].ev      = (ITUEvent)this.Action03.Event;
            checkbox.actions[2].target  = this.Action03.Target;
            checkbox.actions[2].param   = this.Action03.Parameter;
            checkbox.actions[3].action  = (ITUActionType)this.Action04.Action;
            checkbox.actions[3].ev      = (ITUEvent)this.Action04.Event;
            checkbox.actions[3].target  = this.Action04.Target;
            checkbox.actions[3].param   = this.Action04.Parameter;
            checkbox.actions[4].action  = (ITUActionType)this.Action05.Action;
            checkbox.actions[4].ev      = (ITUEvent)this.Action05.Event;
            checkbox.actions[4].target  = this.Action05.Target;
            checkbox.actions[4].param   = this.Action05.Parameter;
            checkbox.actions[5].action  = (ITUActionType)this.Action06.Action;
            checkbox.actions[5].ev      = (ITUEvent)this.Action06.Event;
            checkbox.actions[5].target  = this.Action06.Target;
            checkbox.actions[5].param   = this.Action06.Parameter;
            checkbox.actions[6].action  = (ITUActionType)this.Action07.Action;
            checkbox.actions[6].ev      = (ITUEvent)this.Action07.Event;
            checkbox.actions[6].target  = this.Action07.Target;
            checkbox.actions[6].param   = this.Action07.Parameter;
            checkbox.actions[7].action  = (ITUActionType)this.Action08.Action;
            checkbox.actions[7].ev      = (ITUEvent)this.Action08.Event;
            checkbox.actions[7].target  = this.Action08.Target;
            checkbox.actions[7].param   = this.Action08.Parameter;
            checkbox.actions[8].action  = (ITUActionType)this.Action09.Action;
            checkbox.actions[8].ev      = (ITUEvent)this.Action09.Event;
            checkbox.actions[8].target  = this.Action09.Target;
            checkbox.actions[8].param   = this.Action09.Parameter;
            checkbox.actions[9].action  = (ITUActionType)this.Action10.Action;
            checkbox.actions[9].ev      = (ITUEvent)this.Action10.Event;
            checkbox.actions[9].target  = this.Action10.Target;
            checkbox.actions[9].param   = this.Action10.Parameter;
            checkbox.actions[10].action = (ITUActionType)this.Action11.Action;
            checkbox.actions[10].ev     = (ITUEvent)this.Action11.Event;
            checkbox.actions[10].target = this.Action11.Target;
            checkbox.actions[10].param  = this.Action11.Parameter;
            checkbox.actions[11].action = (ITUActionType)this.Action12.Action;
            checkbox.actions[11].ev     = (ITUEvent)this.Action12.Event;
            checkbox.actions[11].target = this.Action12.Target;
            checkbox.actions[11].param  = this.Action12.Parameter;
            checkbox.actions[12].action = (ITUActionType)this.Action13.Action;
            checkbox.actions[12].ev     = (ITUEvent)this.Action13.Event;
            checkbox.actions[12].target = this.Action13.Target;
            checkbox.actions[12].param  = this.Action13.Parameter;
            checkbox.actions[13].action = (ITUActionType)this.Action14.Action;
            checkbox.actions[13].ev     = (ITUEvent)this.Action14.Event;
            checkbox.actions[13].target = this.Action14.Target;
            checkbox.actions[13].param  = this.Action14.Parameter;
            checkbox.actions[14].action = (ITUActionType)this.Action15.Action;
            checkbox.actions[14].ev     = (ITUEvent)this.Action15.Event;
            checkbox.actions[14].target = this.Action15.Target;
            checkbox.actions[14].param  = this.Action15.Parameter;

            return(checkbox);
        }
Esempio n. 15
0
        public ITUWidget CreateITUWidget()
        {
            ITUProgressBar bar = new ITUProgressBar();

            bar.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            bar.visible = (bool)properties["Visible"].GetValue(this);

            bar.active       = false;
            bar.dirty        = false;
            bar.alpha        = 255;
            bar.rect.x       = this.Location.X;
            bar.rect.y       = this.Location.Y;
            bar.rect.width   = this.Size.Width;
            bar.rect.height  = this.Size.Height;
            bar.color.alpha  = this.BackColor.A;
            bar.color.red    = this.BackColor.R;
            bar.color.green  = this.BackColor.G;
            bar.color.blue   = this.BackColor.B;
            bar.bound.x      = 0;
            bar.bound.y      = 0;
            bar.bound.width  = 0;
            bar.bound.height = 0;

            if (this.ExternalImage)
            {
                bar.flags |= ITU.ITU_EXTERNAL_IMAGE;
            }

            if (this.BackgroundImage != null)
            {
                bar.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    bar.flags |= ITU.ITU_EXTERNAL;
                }
            }

            bar.fgColor.alpha = this.FlatAppearance.MouseDownBackColor.A;
            bar.fgColor.red   = this.FlatAppearance.MouseDownBackColor.R;
            bar.fgColor.green = this.FlatAppearance.MouseDownBackColor.G;
            bar.fgColor.blue  = this.FlatAppearance.MouseDownBackColor.B;

            bar.layout    = (ITULayout)this.Orientation;
            bar.min       = this.Minimum;
            bar.max       = this.Maximum;
            bar.step      = this.Step;
            bar.value     = this.Value;
            bar.valueName = this.ValueTarget;

            bar.graidentMode        = (uint)this.GradientMode;
            bar.gradientColor.alpha = this.GradientColor.A;
            bar.gradientColor.red   = this.GradientColor.R;
            bar.gradientColor.green = this.GradientColor.G;
            bar.gradientColor.blue  = this.GradientColor.B;

            if (this.BarImage != null)
            {
                bar.staticBarSurf = ITU.CreateSurfaceNode(this.BarImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    bar.flags |= ITU.ITU_EXTERNAL;
                }
            }

            return(bar);
        }
Esempio n. 16
0
        public ITUWidget CreateITUWidget()
        {
            ITUMeter meter = new ITUMeter();

            meter.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            meter.visible = (bool)properties["Visible"].GetValue(this);

            meter.active       = false;
            meter.dirty        = false;
            meter.alpha        = 255;
            meter.rect.x       = this.Location.X;
            meter.rect.y       = this.Location.Y;
            meter.rect.width   = this.Size.Width;
            meter.rect.height  = this.Size.Height;
            meter.color.alpha  = this.BackColor.A;
            meter.color.red    = this.BackColor.R;
            meter.color.green  = this.BackColor.G;
            meter.color.blue   = this.BackColor.B;
            meter.bound.x      = 0;
            meter.bound.y      = 0;
            meter.bound.width  = 0;
            meter.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                meter.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    meter.flags |= ITU.ITU_EXTERNAL;
                }
            }

            meter.value       = this.Value;
            meter.pointerName = this.PointerTarget;
            meter.pointerX    = this.PointerX;
            meter.pointerY    = this.PointerY;
            meter.startAngle  = this.StartAngle;
            meter.endAngle    = this.EndAngle;
            meter.maxValue    = this.MaxValue;
            meter.minRadius   = this.MinRadius;

            if (!this.SupportTouch)
            {
                meter.flags &= ~ITU.ITU_ENABLED;
            }

            meter.actions[0].action  = (ITUActionType)this.Action01.Action;
            meter.actions[0].ev      = (ITUEvent)this.Action01.Event;
            meter.actions[0].target  = this.Action01.Target;
            meter.actions[0].param   = this.Action01.Parameter;
            meter.actions[1].action  = (ITUActionType)this.Action02.Action;
            meter.actions[1].ev      = (ITUEvent)this.Action02.Event;
            meter.actions[1].target  = this.Action02.Target;
            meter.actions[1].param   = this.Action02.Parameter;
            meter.actions[2].action  = (ITUActionType)this.Action03.Action;
            meter.actions[2].ev      = (ITUEvent)this.Action03.Event;
            meter.actions[2].target  = this.Action03.Target;
            meter.actions[2].param   = this.Action03.Parameter;
            meter.actions[3].action  = (ITUActionType)this.Action04.Action;
            meter.actions[3].ev      = (ITUEvent)this.Action04.Event;
            meter.actions[3].target  = this.Action04.Target;
            meter.actions[3].param   = this.Action04.Parameter;
            meter.actions[4].action  = (ITUActionType)this.Action05.Action;
            meter.actions[4].ev      = (ITUEvent)this.Action05.Event;
            meter.actions[4].target  = this.Action05.Target;
            meter.actions[4].param   = this.Action05.Parameter;
            meter.actions[5].action  = (ITUActionType)this.Action06.Action;
            meter.actions[5].ev      = (ITUEvent)this.Action06.Event;
            meter.actions[5].target  = this.Action06.Target;
            meter.actions[5].param   = this.Action06.Parameter;
            meter.actions[6].action  = (ITUActionType)this.Action07.Action;
            meter.actions[6].ev      = (ITUEvent)this.Action07.Event;
            meter.actions[6].target  = this.Action07.Target;
            meter.actions[6].param   = this.Action07.Parameter;
            meter.actions[7].action  = (ITUActionType)this.Action08.Action;
            meter.actions[7].ev      = (ITUEvent)this.Action08.Event;
            meter.actions[7].target  = this.Action08.Target;
            meter.actions[7].param   = this.Action08.Parameter;
            meter.actions[8].action  = (ITUActionType)this.Action09.Action;
            meter.actions[8].ev      = (ITUEvent)this.Action09.Event;
            meter.actions[8].target  = this.Action09.Target;
            meter.actions[8].param   = this.Action09.Parameter;
            meter.actions[9].action  = (ITUActionType)this.Action10.Action;
            meter.actions[9].ev      = (ITUEvent)this.Action10.Event;
            meter.actions[9].target  = this.Action10.Target;
            meter.actions[9].param   = this.Action10.Parameter;
            meter.actions[10].action = (ITUActionType)this.Action11.Action;
            meter.actions[10].ev     = (ITUEvent)this.Action11.Event;
            meter.actions[10].target = this.Action11.Target;
            meter.actions[10].param  = this.Action11.Parameter;
            meter.actions[11].action = (ITUActionType)this.Action12.Action;
            meter.actions[11].ev     = (ITUEvent)this.Action12.Event;
            meter.actions[11].target = this.Action12.Target;
            meter.actions[11].param  = this.Action12.Parameter;
            meter.actions[12].action = (ITUActionType)this.Action13.Action;
            meter.actions[12].ev     = (ITUEvent)this.Action13.Event;
            meter.actions[12].target = this.Action13.Target;
            meter.actions[12].param  = this.Action13.Parameter;
            meter.actions[13].action = (ITUActionType)this.Action14.Action;
            meter.actions[13].ev     = (ITUEvent)this.Action14.Event;
            meter.actions[13].target = this.Action14.Target;
            meter.actions[13].param  = this.Action14.Parameter;
            meter.actions[14].action = (ITUActionType)this.Action15.Action;
            meter.actions[14].ev     = (ITUEvent)this.Action15.Event;
            meter.actions[14].target = this.Action15.Target;
            meter.actions[14].param  = this.Action15.Parameter;

            return(meter);
        }
        public ITUWidget CreateITUWidget()
        {
            ITUBackgroundButton widget = new ITUBackgroundButton();

            widget.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active       = false;
            widget.dirty        = false;
            widget.alpha        = 255;
            widget.rect.x       = this.Location.X;
            widget.rect.y       = this.Location.Y;
            widget.rect.width   = this.Size.Width;
            widget.rect.height  = this.Size.Height;
            widget.color.alpha  = this.BackColor.A;
            widget.color.red    = this.BackColor.R;
            widget.color.green  = this.BackColor.G;
            widget.color.blue   = this.BackColor.B;
            widget.bound.x      = 0;
            widget.bound.y      = 0;
            widget.bound.width  = 0;
            widget.bound.height = 0;
            widget.showDelay    = this.ShowDelay;
            widget.hideDelay    = this.HideDelay;
            widget.flags       |= this.TransferAlpha ? ITU.ITU_TRANSFER_ALPHA : 0;
            widget.effectSteps  = this.EffectSteps;
            widget.effects[(int)ITUState.ITU_STATE_SHOWING] = (ITUEffectType)this.ShowingEffect;
            widget.effects[(int)ITUState.ITU_STATE_HIDING]  = (ITUEffectType)this.HidingEffect;

            if (this.BackgroundImage != null)
            {
                widget.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    widget.flags |= ITU.ITU_EXTERNAL;
                }
            }

            widget.graidentMode        = (uint)this.GradientMode;
            widget.gradientColor.alpha = this.GradientColor.A;
            widget.gradientColor.red   = this.GradientColor.R;
            widget.gradientColor.green = this.GradientColor.G;
            widget.gradientColor.blue  = this.GradientColor.B;

            widget.actions[0].action  = (ITUActionType)this.Action01.Action;
            widget.actions[0].ev      = (ITUEvent)this.Action01.Event;
            widget.actions[0].target  = this.Action01.Target;
            widget.actions[0].param   = this.Action01.Parameter;
            widget.actions[1].action  = (ITUActionType)this.Action02.Action;
            widget.actions[1].ev      = (ITUEvent)this.Action02.Event;
            widget.actions[1].target  = this.Action02.Target;
            widget.actions[1].param   = this.Action02.Parameter;
            widget.actions[2].action  = (ITUActionType)this.Action03.Action;
            widget.actions[2].ev      = (ITUEvent)this.Action03.Event;
            widget.actions[2].target  = this.Action03.Target;
            widget.actions[2].param   = this.Action03.Parameter;
            widget.actions[3].action  = (ITUActionType)this.Action04.Action;
            widget.actions[3].ev      = (ITUEvent)this.Action04.Event;
            widget.actions[3].target  = this.Action04.Target;
            widget.actions[3].param   = this.Action04.Parameter;
            widget.actions[4].action  = (ITUActionType)this.Action05.Action;
            widget.actions[4].ev      = (ITUEvent)this.Action05.Event;
            widget.actions[4].target  = this.Action05.Target;
            widget.actions[4].param   = this.Action05.Parameter;
            widget.actions[5].action  = (ITUActionType)this.Action06.Action;
            widget.actions[5].ev      = (ITUEvent)this.Action06.Event;
            widget.actions[5].target  = this.Action06.Target;
            widget.actions[5].param   = this.Action06.Parameter;
            widget.actions[6].action  = (ITUActionType)this.Action07.Action;
            widget.actions[6].ev      = (ITUEvent)this.Action07.Event;
            widget.actions[6].target  = this.Action07.Target;
            widget.actions[6].param   = this.Action07.Parameter;
            widget.actions[7].action  = (ITUActionType)this.Action08.Action;
            widget.actions[7].ev      = (ITUEvent)this.Action08.Event;
            widget.actions[7].target  = this.Action08.Target;
            widget.actions[7].param   = this.Action08.Parameter;
            widget.actions[8].action  = (ITUActionType)this.Action09.Action;
            widget.actions[8].ev      = (ITUEvent)this.Action09.Event;
            widget.actions[8].target  = this.Action09.Target;
            widget.actions[8].param   = this.Action09.Parameter;
            widget.actions[9].action  = (ITUActionType)this.Action10.Action;
            widget.actions[9].ev      = (ITUEvent)this.Action10.Event;
            widget.actions[9].target  = this.Action10.Target;
            widget.actions[9].param   = this.Action10.Parameter;
            widget.actions[10].action = (ITUActionType)this.Action11.Action;
            widget.actions[10].ev     = (ITUEvent)this.Action11.Event;
            widget.actions[10].target = this.Action11.Target;
            widget.actions[10].param  = this.Action11.Parameter;
            widget.actions[11].action = (ITUActionType)this.Action12.Action;
            widget.actions[11].ev     = (ITUEvent)this.Action12.Event;
            widget.actions[11].target = this.Action12.Target;
            widget.actions[11].param  = this.Action12.Parameter;
            widget.actions[12].action = (ITUActionType)this.Action13.Action;
            widget.actions[12].ev     = (ITUEvent)this.Action13.Event;
            widget.actions[12].target = this.Action13.Target;
            widget.actions[12].param  = this.Action13.Parameter;
            widget.actions[13].action = (ITUActionType)this.Action14.Action;
            widget.actions[13].ev     = (ITUEvent)this.Action14.Event;
            widget.actions[13].target = this.Action14.Target;
            widget.actions[13].param  = this.Action14.Parameter;
            widget.actions[14].action = (ITUActionType)this.Action15.Action;
            widget.actions[14].ev     = (ITUEvent)this.Action15.Event;
            widget.actions[14].target = this.Action15.Target;
            widget.actions[14].param  = this.Action15.Parameter;

            return(widget);
        }
Esempio n. 18
0
        public ITUWidget CreateITUWidget()
        {
            ITUText widget = new ITUText();

            widget.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active        = false;
            widget.dirty         = false;
            widget.alpha         = 255;
            widget.rect.x        = this.Location.X;
            widget.rect.y        = this.Location.Y;
            widget.rect.width    = this.Size.Width;
            widget.rect.height   = this.Size.Height;
            widget.color.alpha   = this.ForeColor.A;
            widget.color.red     = this.ForeColor.R;
            widget.color.green   = this.ForeColor.G;
            widget.color.blue    = this.ForeColor.B;
            widget.bound.x       = 0;
            widget.bound.y       = 0;
            widget.bound.width   = 0;
            widget.bound.height  = 0;
            widget.bgColor.alpha = this.BackColor.A;
            widget.bgColor.red   = this.BackColor.R;
            widget.bgColor.green = this.BackColor.G;
            widget.bgColor.blue  = this.BackColor.B;
            widget.fontWidth     = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
            widget.fontHeight    = widget.fontWidth;
            widget.fontIndex     = this.FontIndex;

            if (base.Font.Bold)
            {
                widget.textFlags |= ITUText.ITU_TEXT_BOLD;
            }

            widget.boldSize = this.BoldSize;

            switch (this.TextAlign)
            {
            case ContentAlignment.BottomLeft:
                widget.layout = ITULayout.ITU_LAYOUT_BOTTOM_LEFT;
                break;

            case ContentAlignment.MiddleLeft:
                widget.layout = ITULayout.ITU_LAYOUT_MIDDLE_LEFT;
                break;

            case ContentAlignment.TopLeft:
                widget.layout = ITULayout.ITU_LAYOUT_TOP_LEFT;
                break;

            case ContentAlignment.BottomCenter:
                widget.layout = ITULayout.ITU_LAYOUT_BOTTOM_CENTER;
                break;

            case ContentAlignment.MiddleCenter:
                widget.layout = ITULayout.ITU_LAYOUT_MIDDLE_CENTER;
                break;

            case ContentAlignment.TopCenter:
                widget.layout = ITULayout.ITU_LAYOUT_TOP_CENTER;
                break;

            case ContentAlignment.BottomRight:
                widget.layout = ITULayout.ITU_LAYOUT_BOTTOM_RIGHT;
                break;

            case ContentAlignment.MiddleRight:
                widget.layout = ITULayout.ITU_LAYOUT_MIDDLE_RIGHT;
                break;

            case ContentAlignment.TopRight:
                widget.layout = ITULayout.ITU_LAYOUT_TOP_RIGHT;
                break;

            default:
                widget.layout = ITULayout.ITU_LAYOUT_DEFAULT;
                break;
            }

            string[] texts = new string[] { this.Text, this.Text1, this.Text2, this.Text3, this.Text4, this.Text5, this.Text6, this.Text7 };
            widget.stringSet = ITU.CreateStringSetNode(texts);

            return(widget);
        }
Esempio n. 19
0
        public ITUWidget CreateITUWidget()
        {
            ITUWheelBackground wbg = new ITUWheelBackground();

            wbg.name = this.Name;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            wbg.visible = (bool)properties["Visible"].GetValue(this);

            wbg.active       = false;
            wbg.dirty        = false;
            wbg.alpha        = 255;
            wbg.rect.x       = this.Location.X;
            wbg.rect.y       = this.Location.Y;
            wbg.rect.width   = this.Size.Width;
            wbg.rect.height  = this.Size.Height;
            wbg.color.alpha  = 0;
            wbg.color.red    = 0;
            wbg.color.green  = 0;
            wbg.color.blue   = 0;
            wbg.bound.x      = 0;
            wbg.bound.y      = 0;
            wbg.bound.width  = 0;
            wbg.bound.height = 0;

            if (this.BackgroundImage != null)
            {
                wbg.staticSurf = ITU.CreateSurfaceNode(this.BackgroundImage as Bitmap, this.PixelFormat, this.Compress, this.External);
                if (this.External)
                {
                    wbg.flags |= ITU.ITU_EXTERNAL;
                }
            }

            wbg.value = 0;

            wbg.actions[0].action  = (ITUActionType)this.Action01.Action;
            wbg.actions[0].ev      = (ITUEvent)this.Action01.Event;
            wbg.actions[0].target  = this.Action01.Target;
            wbg.actions[0].param   = this.Action01.Parameter;
            wbg.actions[1].action  = (ITUActionType)this.Action02.Action;
            wbg.actions[1].ev      = (ITUEvent)this.Action02.Event;
            wbg.actions[1].target  = this.Action02.Target;
            wbg.actions[1].param   = this.Action02.Parameter;
            wbg.actions[2].action  = (ITUActionType)this.Action03.Action;
            wbg.actions[2].ev      = (ITUEvent)this.Action03.Event;
            wbg.actions[2].target  = this.Action03.Target;
            wbg.actions[2].param   = this.Action03.Parameter;
            wbg.actions[3].action  = (ITUActionType)this.Action04.Action;
            wbg.actions[3].ev      = (ITUEvent)this.Action04.Event;
            wbg.actions[3].target  = this.Action04.Target;
            wbg.actions[3].param   = this.Action04.Parameter;
            wbg.actions[4].action  = (ITUActionType)this.Action05.Action;
            wbg.actions[4].ev      = (ITUEvent)this.Action05.Event;
            wbg.actions[4].target  = this.Action05.Target;
            wbg.actions[4].param   = this.Action05.Parameter;
            wbg.actions[5].action  = (ITUActionType)this.Action06.Action;
            wbg.actions[5].ev      = (ITUEvent)this.Action06.Event;
            wbg.actions[5].target  = this.Action06.Target;
            wbg.actions[5].param   = this.Action06.Parameter;
            wbg.actions[6].action  = (ITUActionType)this.Action07.Action;
            wbg.actions[6].ev      = (ITUEvent)this.Action07.Event;
            wbg.actions[6].target  = this.Action07.Target;
            wbg.actions[6].param   = this.Action07.Parameter;
            wbg.actions[7].action  = (ITUActionType)this.Action08.Action;
            wbg.actions[7].ev      = (ITUEvent)this.Action08.Event;
            wbg.actions[7].target  = this.Action08.Target;
            wbg.actions[7].param   = this.Action08.Parameter;
            wbg.actions[8].action  = (ITUActionType)this.Action09.Action;
            wbg.actions[8].ev      = (ITUEvent)this.Action09.Event;
            wbg.actions[8].target  = this.Action09.Target;
            wbg.actions[8].param   = this.Action09.Parameter;
            wbg.actions[9].action  = (ITUActionType)this.Action10.Action;
            wbg.actions[9].ev      = (ITUEvent)this.Action10.Event;
            wbg.actions[9].target  = this.Action10.Target;
            wbg.actions[9].param   = this.Action10.Parameter;
            wbg.actions[10].action = (ITUActionType)this.Action11.Action;
            wbg.actions[10].ev     = (ITUEvent)this.Action11.Event;
            wbg.actions[10].target = this.Action11.Target;
            wbg.actions[10].param  = this.Action11.Parameter;
            wbg.actions[11].action = (ITUActionType)this.Action12.Action;
            wbg.actions[11].ev     = (ITUEvent)this.Action12.Event;
            wbg.actions[11].target = this.Action12.Target;
            wbg.actions[11].param  = this.Action12.Parameter;
            wbg.actions[12].action = (ITUActionType)this.Action13.Action;
            wbg.actions[12].ev     = (ITUEvent)this.Action13.Event;
            wbg.actions[12].target = this.Action13.Target;
            wbg.actions[12].param  = this.Action13.Parameter;
            wbg.actions[13].action = (ITUActionType)this.Action14.Action;
            wbg.actions[13].ev     = (ITUEvent)this.Action14.Event;
            wbg.actions[13].target = this.Action14.Target;
            wbg.actions[13].param  = this.Action14.Parameter;
            wbg.actions[14].action = (ITUActionType)this.Action15.Action;
            wbg.actions[14].ev     = (ITUEvent)this.Action15.Event;
            wbg.actions[14].target = this.Action15.Target;
            wbg.actions[14].param  = this.Action15.Parameter;

            return(wbg);
        }
Esempio n. 20
0
        public ITUWidget CreateITUWidget()
        {
            ITUIcon widget = new ITUIcon();

            widget.name = this.Name;

            if (this.FilePath.Length > 0)
            {
                widget.name = this.FilePath;
            }

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active       = false;
            widget.dirty        = false;
            widget.alpha        = 255;
            widget.rect.x       = this.Location.X;
            widget.rect.y       = this.Location.Y;
            widget.rect.width   = this.Size.Width;
            widget.rect.height  = this.Size.Height;
            widget.color.alpha  = this.Alpha;
            widget.color.red    = 0;
            widget.color.green  = 0;
            widget.color.blue   = 0;
            widget.bound.x      = 0;
            widget.bound.y      = 0;
            widget.bound.width  = 0;
            widget.bound.height = 0;

            if (this.ExternalImage)
            {
                widget.flags |= ITU.ITU_EXTERNAL_IMAGE;
            }

            if (this.Image != null)
            {
                widget.staticSurf = ITU.CreateSurfaceNode(this.Image as Bitmap, this.PixelFormat, this.Compress, this.External);

                if (this.External)
                {
                    widget.flags |= ITU.ITU_EXTERNAL;
                }
            }
            if (this.Stretch)
            {
                widget.flags |= ITU.ITU_STRETCH;
            }
            if (this.FitToRectange)
            {
                widget.flags |= ITU.ITU_FIT_TO_RECT;
            }
            if (this.CutByRectange)
            {
                widget.flags |= ITU.ITU_CUT_BY_RECT;
            }
            widget.angle         = this.Angle;
            widget.transformType = (ITUTransformType)this.TransformType;
            widget.transformX    = this.TransformX;
            widget.transformY    = this.TransformY;

            return(widget);
        }
Esempio n. 21
0
        public ITUWidget CreateITUWidget()
        {
            ITUTextBox widget = new ITUTextBox();

            widget.name   = this.Name;
            widget.flags |= this.TabStop ? ITU.ITU_TAPSTOP : 0;

            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(this);

            widget.visible = (bool)properties["Visible"].GetValue(this);

            widget.active        = false;
            widget.dirty         = false;
            widget.alpha         = 255;
            widget.tabIndex      = this.TabIndex;
            widget.rect.x        = this.Location.X;
            widget.rect.y        = this.Location.Y;
            widget.rect.width    = this.Size.Width;
            widget.rect.height   = this.Size.Height;
            widget.color.alpha   = this.ForeColor.A;
            widget.color.red     = this.ForeColor.R;
            widget.color.green   = this.ForeColor.G;
            widget.color.blue    = this.ForeColor.B;
            widget.bound.x       = 0;
            widget.bound.y       = 0;
            widget.bound.width   = 0;
            widget.bound.height  = 0;
            widget.bgColor.alpha = this.BackAlpha;
            widget.bgColor.red   = this.BackColor.R;
            widget.bgColor.green = this.BackColor.G;
            widget.bgColor.blue  = this.BackColor.B;
            widget.fontWidth     = (int)Math.Round(this.Font.Size * (this.Font.FontFamily.GetCellAscent(FontStyle.Regular) + this.Font.FontFamily.GetCellDescent(FontStyle.Regular)) / this.Font.FontFamily.GetEmHeight(FontStyle.Regular));
            widget.fontHeight    = widget.fontWidth;
            widget.fontIndex     = this.FontIndex;

            if (base.Font.Bold)
            {
                widget.textFlags |= ITUText.ITU_TEXT_BOLD;
            }

            widget.boldSize = this.BoldSize;

            string[] texts = new string[] { this.Text, this.Text1, this.Text2, this.Text3, this.Text4, this.Text5, this.Text6, this.Text7 };
            widget.stringSet = ITU.CreateStringSetNode(texts);

            widget.maxLen       = this.MaxLength;
            widget.textboxFlags = 0;

            if (this.UseSystemPasswordChar)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_PASSWORD;
            }

            if (this.ShowCursor)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_CURSOR;
            }

            if (this.CharacterCasing == CharacterCasing.Upper)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_UPPER;
            }

            if (this.CharacterCasing == CharacterCasing.Lower)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_LOWER;
            }

            if (this.Multiline)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_MULTILINE;
            }

            if (this.WordWrap)
            {
                widget.textboxFlags |= ITUTextBox.ITU_TEXTBOX_WORDWRAP;
            }

            widget.fgColor.alpha    = this.TextColor.A;
            widget.fgColor.red      = this.TextColor.R;
            widget.fgColor.green    = this.TextColor.G;
            widget.fgColor.blue     = this.TextColor.B;
            widget.defColor.alpha   = this.ForeColor.A;
            widget.defColor.red     = this.ForeColor.R;
            widget.defColor.green   = this.ForeColor.G;
            widget.defColor.blue    = this.ForeColor.B;
            widget.focusColor.alpha = this.FocusColor.A;
            widget.focusColor.red   = this.FocusColor.R;
            widget.focusColor.green = this.FocusColor.G;
            widget.focusColor.blue  = this.FocusColor.B;

            widget.lineHeight = this.LineHeight;

            widget.actions[0].action  = (ITUActionType)this.Action01.Action;
            widget.actions[0].ev      = (ITUEvent)this.Action01.Event;
            widget.actions[0].target  = this.Action01.Target;
            widget.actions[0].param   = this.Action01.Parameter;
            widget.actions[1].action  = (ITUActionType)this.Action02.Action;
            widget.actions[1].ev      = (ITUEvent)this.Action02.Event;
            widget.actions[1].target  = this.Action02.Target;
            widget.actions[1].param   = this.Action02.Parameter;
            widget.actions[2].action  = (ITUActionType)this.Action03.Action;
            widget.actions[2].ev      = (ITUEvent)this.Action03.Event;
            widget.actions[2].target  = this.Action03.Target;
            widget.actions[2].param   = this.Action03.Parameter;
            widget.actions[3].action  = (ITUActionType)this.Action04.Action;
            widget.actions[3].ev      = (ITUEvent)this.Action04.Event;
            widget.actions[3].target  = this.Action04.Target;
            widget.actions[3].param   = this.Action04.Parameter;
            widget.actions[4].action  = (ITUActionType)this.Action05.Action;
            widget.actions[4].ev      = (ITUEvent)this.Action05.Event;
            widget.actions[4].target  = this.Action05.Target;
            widget.actions[4].param   = this.Action05.Parameter;
            widget.actions[5].action  = (ITUActionType)this.Action06.Action;
            widget.actions[5].ev      = (ITUEvent)this.Action06.Event;
            widget.actions[5].target  = this.Action06.Target;
            widget.actions[5].param   = this.Action06.Parameter;
            widget.actions[6].action  = (ITUActionType)this.Action07.Action;
            widget.actions[6].ev      = (ITUEvent)this.Action07.Event;
            widget.actions[6].target  = this.Action07.Target;
            widget.actions[6].param   = this.Action07.Parameter;
            widget.actions[7].action  = (ITUActionType)this.Action08.Action;
            widget.actions[7].ev      = (ITUEvent)this.Action08.Event;
            widget.actions[7].target  = this.Action08.Target;
            widget.actions[7].param   = this.Action08.Parameter;
            widget.actions[8].action  = (ITUActionType)this.Action09.Action;
            widget.actions[8].ev      = (ITUEvent)this.Action09.Event;
            widget.actions[8].target  = this.Action09.Target;
            widget.actions[8].param   = this.Action09.Parameter;
            widget.actions[9].action  = (ITUActionType)this.Action10.Action;
            widget.actions[9].ev      = (ITUEvent)this.Action10.Event;
            widget.actions[9].target  = this.Action10.Target;
            widget.actions[9].param   = this.Action10.Parameter;
            widget.actions[10].action = (ITUActionType)this.Action11.Action;
            widget.actions[10].ev     = (ITUEvent)this.Action11.Event;
            widget.actions[10].target = this.Action11.Target;
            widget.actions[10].param  = this.Action11.Parameter;
            widget.actions[11].action = (ITUActionType)this.Action12.Action;
            widget.actions[11].ev     = (ITUEvent)this.Action12.Event;
            widget.actions[11].target = this.Action12.Target;
            widget.actions[11].param  = this.Action12.Parameter;
            widget.actions[12].action = (ITUActionType)this.Action13.Action;
            widget.actions[12].ev     = (ITUEvent)this.Action13.Event;
            widget.actions[12].target = this.Action13.Target;
            widget.actions[12].param  = this.Action13.Parameter;
            widget.actions[13].action = (ITUActionType)this.Action14.Action;
            widget.actions[13].ev     = (ITUEvent)this.Action14.Event;
            widget.actions[13].target = this.Action14.Target;
            widget.actions[13].param  = this.Action14.Parameter;
            widget.actions[14].action = (ITUActionType)this.Action15.Action;
            widget.actions[14].ev     = (ITUEvent)this.Action15.Event;
            widget.actions[14].target = this.Action15.Target;
            widget.actions[14].param  = this.Action15.Parameter;

            return(widget);
        }