public SkinFormControlBoxRenderEventArgs(CCSkinMain form, Graphics graphics, Rectangle clipRect, bool active, CCWin.ControlBoxStyle controlBoxStyle, ControlBoxState controlBoxState)
     : base(graphics, clipRect)
 {
     this._form = form;
     this._active = active;
     this._controlBoxState = controlBoxState;
     this._controlBoxStyle = controlBoxStyle;
 }
 public PaintScrollBarThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, CCWin.SkinClass.ControlState controlState, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics = graphics;
     this._thumbRect = thumbRect;
     this._controlState = controlState;
     this._orientation = orientation;
     this._enabled = enabled;
 }
 public PaintScrollBarArrowEventArgs(System.Drawing.Graphics graphics, Rectangle arrowRect, CCWin.SkinClass.ControlState controlState, System.Windows.Forms.ArrowDirection arrowDirection, System.Windows.Forms.Orientation orientation, bool enabled)
 {
     this._graphics = graphics;
     this._arrowRect = arrowRect;
     this._controlState = controlState;
     this._arrowDirection = arrowDirection;
     this._orientation = orientation;
     this._enabled = enabled;
 }
 public REOBJECT InsertOleObject(CCWin.SkinControl.IOleObject oleObject, int index)
 {
     CCWin.SkinControl.ILockBytes pLockBytes;
     CCWin.SkinControl.IStorage pStorage;
     CCWin.SkinControl.IOleClientSite pOleClientSite;
     if (oleObject == null)
     {
         return null;
     }
     CCWin.Win32.NativeMethods.CreateILockBytesOnHGlobal(IntPtr.Zero, true, out pLockBytes);
     CCWin.Win32.NativeMethods.StgCreateDocfileOnILockBytes(pLockBytes, 0x1012, 0, out pStorage);
     this.IRichEditOle.GetClientSite(out pOleClientSite);
     Guid guid = new Guid();
     oleObject.GetUserClassID(ref guid);
     CCWin.Win32.NativeMethods.OleSetContainedObject(oleObject, true);
     REOBJECT reoObject = new REOBJECT();
     reoObject.cp = this._richEdit.TextLength;
     reoObject.clsid = guid;
     reoObject.pstg = pStorage;
     reoObject.poleobj = Marshal.GetIUnknownForObject(oleObject);
     reoObject.polesite = pOleClientSite;
     reoObject.dvAspect = 1;
     reoObject.dwFlags = 2;
     reoObject.dwUser = (uint) index;
     this.IRichEditOle.InsertObject(reoObject);
     Marshal.ReleaseComObject(pLockBytes);
     Marshal.ReleaseComObject(pOleClientSite);
     Marshal.ReleaseComObject(pStorage);
     return reoObject;
 }
Esempio n. 5
0
 private void InitDefaultAnimation(CCWin.SkinControl.AnimationType animationType)
 {
     switch (animationType)
     {
         case AnimationType.Custom: break;
         case AnimationType.Rotate: DefaultAnimation = Animation.Rotate; break;
         case AnimationType.HorizSlide: DefaultAnimation = Animation.HorizSlide; break;
         case AnimationType.VertSlide: DefaultAnimation = Animation.VertSlide; break;
         case AnimationType.Scale: DefaultAnimation = Animation.Scale; break;
         case AnimationType.ScaleAndRotate: DefaultAnimation = Animation.ScaleAndRotate; break;
         case AnimationType.HorizSlideAndRotate: DefaultAnimation = Animation.HorizSlideAndRotate; break;
         case AnimationType.ScaleAndHorizSlide: DefaultAnimation = Animation.ScaleAndHorizSlide; break;
         case AnimationType.Transparent: DefaultAnimation = Animation.Transparent; break;
         case AnimationType.Leaf: DefaultAnimation = Animation.Leaf; break;
         case AnimationType.Mosaic: DefaultAnimation = Animation.Mosaic; break;
         case AnimationType.Particles: DefaultAnimation = Animation.Particles; break;
         case AnimationType.VertBlind: DefaultAnimation = Animation.VertBlind; break;
         case AnimationType.HorizBlind: DefaultAnimation = Animation.HorizBlind; break;
     }
 }
Esempio n. 6
0
 private void chatListBox_DoubleClickSubItem(object sender, CCWin.SkinControl.ChatListEventArgs e)
 {
     frmChat1 frmc = new frmChat1();
     frmc.ChatUserID = chatListBox1.SelectSubItem.ID;
     frmc.Show();
 }
 public static extern IntPtr SetWindowsHookEx(int idHook, CCWin.Win32.Callback.HookProc lpfn, int hMod, int dwThreadId);
 public static extern int RtlMoveMemory(ref CCWin.Win32.Struct.POINT destination, ref RECT Source, int length);
 public PaintScrollBarThumbEventArgs(System.Drawing.Graphics graphics, Rectangle thumbRect, CCWin.SkinClass.ControlState controlState, System.Windows.Forms.Orientation orientation)
     : this(graphics, thumbRect, controlState, orientation, true)
 {
 }
 public void RenderBackgroundInternal(Graphics g, Rectangle rect, Color baseColor, Color borderColor, Color innerBorderColor, CCWin.SkinClass.RoundStyle style, int roundWidth, float basePosition, bool drawBorder, bool drawGlass, LinearGradientMode mode)
 {
     if (drawBorder)
     {
         rect.Width--;
         rect.Height--;
     }
     using (LinearGradientBrush brush = new LinearGradientBrush(rect, Color.Transparent, Color.Transparent, mode))
     {
         Color[] colors = new Color[] { this.GetColor(baseColor, 0, 0x23, 0x18, 9), this.GetColor(baseColor, 0, 13, 8, 3), baseColor, this.GetColor(baseColor, 0, 0x44, 0x45, 0x36) };
         ColorBlend blend = new ColorBlend();
         float[] CS_0_0000 = new float[4];
         CS_0_0000[1] = basePosition;
         CS_0_0000[2] = basePosition + 0.05f;
         CS_0_0000[3] = 1f;
         blend.Positions = CS_0_0000;
         blend.Colors = colors;
         brush.InterpolationColors = blend;
         if (style != CCWin.SkinClass.RoundStyle.None)
         {
             using (GraphicsPath path = GraphicsPathHelper.CreatePath(rect, roundWidth, style, false))
             {
                 g.FillPath(brush, path);
             }
             if (baseColor.A > 80)
             {
                 Rectangle rectTop = rect;
                 if (mode == LinearGradientMode.Vertical)
                 {
                     rectTop.Height = (int) (rectTop.Height * basePosition);
                 }
                 else
                 {
                     rectTop.Width = (int) (rect.Width * basePosition);
                 }
                 using (GraphicsPath pathTop = GraphicsPathHelper.CreatePath(rectTop, roundWidth, CCWin.SkinClass.RoundStyle.Top, false))
                 {
                     using (SolidBrush brushAlpha = new SolidBrush(Color.FromArgb(80, 0xff, 0xff, 0xff)))
                     {
                         g.FillPath(brushAlpha, pathTop);
                     }
                 }
             }
             if (drawGlass)
             {
                 RectangleF glassRect = rect;
                 if (mode == LinearGradientMode.Vertical)
                 {
                     glassRect.Y = rect.Y + (rect.Height * basePosition);
                     glassRect.Height = (rect.Height - (rect.Height * basePosition)) * 2f;
                 }
                 else
                 {
                     glassRect.X = rect.X + (rect.Width * basePosition);
                     glassRect.Width = (rect.Width - (rect.Width * basePosition)) * 2f;
                 }
                 this.DrawGlass(g, glassRect, 170, 0);
             }
             if (!drawBorder)
             {
                 return;
             }
             using (GraphicsPath path = GraphicsPathHelper.CreatePath(rect, roundWidth, style, false))
             {
                 using (Pen pen = new Pen(borderColor))
                 {
                     g.DrawPath(pen, path);
                 }
             }
             rect.Inflate(-1, -1);
             using (GraphicsPath path = GraphicsPathHelper.CreatePath(rect, roundWidth, style, false))
             {
                 using (Pen pen = new Pen(innerBorderColor))
                 {
                     g.DrawPath(pen, path);
                 }
                 return;
             }
         }
         g.FillRectangle(brush, rect);
         if (baseColor.A > 80)
         {
             Rectangle rectTop = rect;
             if (mode == LinearGradientMode.Vertical)
             {
                 rectTop.Height = (int) (rectTop.Height * basePosition);
             }
             else
             {
                 rectTop.Width = (int) (rect.Width * basePosition);
             }
             using (SolidBrush brushAlpha = new SolidBrush(Color.FromArgb(80, 0xff, 0xff, 0xff)))
             {
                 g.FillRectangle(brushAlpha, rectTop);
             }
         }
         if (drawGlass)
         {
             RectangleF glassRect = rect;
             if (mode == LinearGradientMode.Vertical)
             {
                 glassRect.Y = rect.Y + (rect.Height * basePosition);
                 glassRect.Height = (rect.Height - (rect.Height * basePosition)) * 2f;
             }
             else
             {
                 glassRect.X = rect.X + (rect.Width * basePosition);
                 glassRect.Width = (rect.Width - (rect.Width * basePosition)) * 2f;
             }
             this.DrawGlass(g, glassRect, 200, 0);
         }
         if (drawBorder)
         {
             using (Pen pen = new Pen(borderColor))
             {
                 g.DrawRectangle(pen, rect);
             }
             rect.Inflate(-1, -1);
             using (Pen pen = new Pen(innerBorderColor))
             {
                 g.DrawRectangle(pen, rect);
             }
         }
     }
 }
 public PaintScrollBarArrowEventArgs(System.Drawing.Graphics graphics, Rectangle arrowRect, CCWin.SkinClass.ControlState controlState, System.Windows.Forms.ArrowDirection arrowDirection, System.Windows.Forms.Orientation orientation)
     : this(graphics, arrowRect, controlState, arrowDirection, orientation, true)
 {
 }
Esempio n. 12
0
 private void CheckIP(CCWin.SkinControl.SkinTextBox objtext, string text)
 {
     try
     {
         IPAddress IP_end;
         IP_end = IPAddress.Parse(objtext.Text);
     }
     catch
     {
         MessageBox.Show(text);
         objtext.Focus();
         return;
     }
 }
Esempio n. 13
0
 private void CheckInteger(CCWin.SkinControl.SkinTextBox objtext, string text)
 {
     try
     {
         int a = Int16.Parse(objtext.Text);
     }
     catch
     {
         MessageBox.Show(text);
         objtext.Focus();
         return;
     }
 }