示例#1
0
文件: TextCtrl.cs 项目: wshcdr/wxnet
 public TextAttr(Colour colText, Colour colBack)
     : this(colText, colBack, null, TextAttrAlignment.wxTEXT_ALIGNMENT_DEFAULT)
 {
 }
示例#2
0
文件: Pen.cs 项目: wshcdr/wxnet
 public Pen(Colour colour, int width)
     : this(colour, width, FillStyle.wxSOLID)
 {
 }
示例#3
0
文件: Pen.cs 项目: wshcdr/wxnet
 public Pen(Colour col, int width, FillStyle style)
     : base(wxPen_ctor(Object.SafePtr(col), width, style))
 {
 }
示例#4
0
        public void OnColorChoice(object sender, Event evt)
        {
            wx.Object        obj = evt.EventObject;
            SkinElementColor el  = null;

            if (obj == m_background.m_rgbSelector)
            {
                el = m_background;
            }
            else if (obj == m_freeTrack.m_rgbSelector)
            {
                el = m_freeTrack;
            }
            else if (obj == m_reservedTrack.m_rgbSelector)
            {
                el = m_reservedTrack;
            }
            else if (obj == m_reservedShunting.m_rgbSelector)
            {
                el = m_reservedShunting;
            }
            else if (obj == m_occupiedTrack.m_rgbSelector)
            {
                el = m_occupiedTrack;
            }
            else if (obj == m_workingTrack.m_rgbSelector)
            {
                el = m_workingTrack;
            }
            else if (obj == m_outline.m_rgbSelector)
            {
                el = m_outline;
            }
            else if (obj == m_text.m_rgbSelector)
            {
                el = m_text;
            }
            else
            {
                return;
            }

            byte   rv, gv, bv;
            String str;

            str = el.m_r.Value;
            rv  = Globals.wxStrtoul(str, 0, 0);
            str = el.m_g.Value;
            gv  = Globals.wxStrtoul(str, 0, 0);
            str = el.m_b.Value;
            bv  = Globals.wxStrtoul(str, 0, 0);
            Colour     elCol = new wx.Colour(rv, gv, bv);
            ColourData data  = new ColourData();

            data.ChooseFull = (true);
            data.Colour     = (elCol);

            ColourDialog dialog = new ColourDialog(this, data);

            if (dialog.ShowModal() == ShowModalResult.OK)
            {
                ColourData retData = dialog.ColourData;
                wx.Colour  col     = retData.Colour;
                byte       v       = col.Red;
                str          = String.Format(wxPorting.T("%d"), v);
                el.m_r.Value = (str);

                v            = col.Green;
                str          = String.Format(wxPorting.T("%d"), v);
                el.m_g.Value = (str);

                v            = col.Blue;
                str          = String.Format(wxPorting.T("%d"), v);
                el.m_b.Value = (str);
            }
        }
示例#5
0
文件: Pen.cs 项目: wshcdr/wxnet
 public Pen(Colour colour)
     : this(colour, 1, FillStyle.wxSOLID)
 {
 }
示例#6
0
文件: GdiCommon.cs 项目: wshcdr/wxnet
        //-----------------------------------------------------------------------------

        public string FindName(Colour colour)
        {
            return(new wxString(wxColourDatabase_FindName(wxObject, Object.SafePtr(colour)), true));
        }
示例#7
0
文件: GdiCommon.cs 项目: wshcdr/wxnet
        //-----------------------------------------------------------------------------

        public Pen FindOrCreatePen(Colour colour, int width, int style)
        {
            return(new Pen(wxPenList_FindOrCreatePen(wxObject, Object.SafePtr(colour), width, style)));
        }
示例#8
0
        //---------------------------------------------------------------------

        public bool GetPixel(int x, int y, Colour col)
        {
            return(wxDC_GetPixel(wxObject, x, y, Object.SafePtr(col)));
        }
示例#9
0
 public bool GetPixel(Point pt, Colour col)
 {
     return(GetPixel(pt.X, pt.Y, col));
 }
示例#10
0
 public bool FloodFill(Point pt, Colour col)
 {
     return(FloodFill(pt, col, FloodStyle.wxFLOOD_SURFACE));
 }
示例#11
0
 public bool FloodFill(Point pt, Colour col, int style)
 {
     return(FloodFill(pt.X, pt.Y, col, style));
 }
示例#12
0
 public bool FloodFill(int x, int y, Colour col, int style)
 {
     return(wxDC_FloodFill(wxObject, x, y, Object.SafePtr(col), style));
 }
示例#13
0
        //---------------------------------------------------------------------

        public bool FloodFill(int x, int y, Colour col)
        {
            return(FloodFill(x, y, col, FloodStyle.wxFLOOD_SURFACE));
        }
示例#14
0
        //---------------------------------------------------------------------

        public void SetTextBackground(Colour colour)
        {
            wxWindowDC_SetTextBackground(wxObject, Object.SafePtr(colour));
        }
示例#15
0
文件: TextCtrl.cs 项目: wshcdr/wxnet
 public TextAttr(Colour colText, Colour colBack, Font font)
     : this(colText, colBack, font, TextAttrAlignment.wxTEXT_ALIGNMENT_DEFAULT)
 {
 }
示例#16
0
        public static void setBackgroundColor(wx.Colour col)
        {
            int rgb = curSkin.background;

            col.Set((byte)(rgb >> 16), (byte)((rgb >> 8) & 0xFF), (byte)(rgb & 0xFF));
        }
示例#17
0
文件: TextCtrl.cs 项目: wshcdr/wxnet
 public TextAttr(Colour colText, Colour colBack, Font font, TextAttrAlignment alignment)
     : this(wxTextAttr_ctor(Object.SafePtr(colText), Object.SafePtr(colBack), Object.SafePtr(font), (int)alignment), true)
 {
 }
示例#18
0
文件: Bitmap.cs 项目: wshcdr/wxnet
 public Mask(Bitmap bitmap, Colour colour)
     : this(wxMask_ctorByBitmpaColour(Object.SafePtr(bitmap), Object.SafePtr(colour)))
 {
 }
示例#19
0
文件: GdiCommon.cs 项目: wshcdr/wxnet
        //-----------------------------------------------------------------------------

        public void AddColour(string name, Colour colour)
        {
            wxColourDatabase_AddColour(wxObject, name, Object.SafePtr(colour));
        }
示例#20
0
文件: Bitmap.cs 项目: wshcdr/wxnet
        //---------------------------------------------------------------------

        public bool Create(Bitmap bitmap, Colour colour)
        {
            return(wxMask_CreateByBitmapColour(wxObject, Object.SafePtr(bitmap), Object.SafePtr(colour)));
        }
示例#21
0
文件: GdiCommon.cs 项目: wshcdr/wxnet
        //-----------------------------------------------------------------------------

        public Brush FindOrCreateBrush(Colour colour, int style)
        {
            return(new Brush(wxBrushList_FindOrCreateBrush(wxObject, Object.SafePtr(colour), style)));
        }
示例#22
0
        //---------------------------------------------------------------------

        public bool Read(string key, ref Colour val)
        {
            Colour def = new Colour(0, 0, 0);

            return(Read(key, ref val, def));
        }