Example #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);
        }
Example #2
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);
        }
Example #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);
        }
Example #4
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);
        }
Example #5
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);
        }
Example #6
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);
        }
        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);
        }
Example #8
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);
        }
Example #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);
        }
        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);
        }
Example #11
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);
        }
Example #12
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);
        }
Example #13
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);
        }
Example #14
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);
        }
Example #15
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);
        }