This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit https://www.cyotek.com/blog for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Archived posts for All of 2018

Checking if your Windows Forms applications are ready for .NET Core 3.0

windows forms wpf .net core 2 Comments

Since the recent announcement that .NE Core 3.0 would support Windows Forms, I've been cautiously optimistic. Over the last week or so I've finally started experimenting with ASP.NET Core 2.1 and liking what I see (mostly, I haven't made my mind up with Razor Pages yet!).

A couple of days ago Microsoft made another announcement - a tool to scan your existing Windows Forms / WPF applications and see if how much of the API's they use are supported by Core 3.0.

Read More

Upgrading a SVN repository using VisualSVN Server

svn upgrade visualsvn svnadmin 0 Comments

Although I use Git for anything open source we produce, all other code is still in a SVN repository. I use VisualSVN Server for the server side things. When upgrading it last week to the latest version, it mentioned that Apache SVN 1.10 had new compression options and it occurred to me that while I've upgraded working copy formats before, my SVN databases are probably still using whatever format they were created at. This article covers how to upgrade SVN repositories using the VisualSVN Server software.

According to the release notes, the current filesystem format version used by SVN is 8. We can either use the svnadmin info command to view the version, or via a GUI by right clicking a repository in the Visual SVN Server Manager, selecting Properties from the context menu then accessing the Details tab.

Read More

Working with CorelDRAW Palettes part 2, writing .pal files

c# color rgb color palette cmyk coreldraw 0 Comments Downloads

In my previous article, I described how to read an archaic CorelDRAW! 3.0 palette file. This continuation covers how to write files in this format.

Just like reading the file, writing is also a simple enough process.

Read More

Working with CorelDRAW Palettes part 1, reading .pal files

c# color rgb color palette cmyk coreldraw 0 Comments Downloads

I recently picked up a copy of CorelDRAW! 3.0 from eBay which came on two CD's with a different version on each. That gave me two different surprises, the first in that 3.0A wasn't an improved version of 3.0, and secondly instead of the .cpl format I was expecting to find, there were two different .pal formats, one text based (for CorelDRAW!) and one binary (for PHOTO-PAINT! (very shouty this software!)). This first article covers reading the text based palette format.

The palette format itself is simple enough, from the example colours below we can infer that each colour entry is in CMYK format with the range 0-100. Although it looks as if it is a fixed width format, when looking at other palettes using this format this isn't the case and columns can be of differing widths.

Read More

Converting colours between RGB and CMYK in C#

c# color rgb cmyk 2 Comments Downloads

In my previous articles on reading and writing colours from various palette/swatch formats, I left CMYK conversion as an exercise for the reader and only demonstrated RGB aspects. This article demonstrates how to convert colours in CMYK format to RGB and vice versa.

Unlike RGB which generally uses the range 0-255, most examples of CMYK I've seen use percentages instead, e.g. 37% cyan, 18% magenta, no yellow and 31% black. In this article I'm using the range 0-1 to describe the colours. (Just to be awkward, the demonstration front end uses 0-100 to make it more user friendly!)

Read More

Displaying text in an empty ListBox

c# winforms WM_PAINT listbox wm_erasebkgnd 3 Comments Downloads

While looking at ways of improving the UI of a dialog in an application, I wanted to display some status text in a ListBox control that was empty. The default Windows Forms ListBox (which uses the underlying native Win32 control) doesn't support this, but with a little effort we can extend the control.

When a Control receives either the WM_PAINT or WM_ERASEBKGND messages, it will check to see if the ControlStyles.UserPaint style is set. If set then the WM_PAINT message will cause the Paint event to be raised, and for WM_ERASEBKGND the PaintBackground event - but only if the the AllPaintingInWmPaint style is not set.

Read More

Using the MantisBT REST API when hosted on IIS

mantisbt iis https redirect 0 Comments

I'm currently in the process of moving our hosting services from one provider to another; although some parts of cyotek.com infrastructure runs on Microsoft Azure, a fair chunk uses more traditional hosting. Our MantisBT instance is one such service that I recently migrated.

Previously the instance was hosted on Linux, now it's on Windows. The initial migration seemed to have gone well and so I'd moved onto the next sub-domain on the list.

Read More

Updating AssemblyInfo.cs version information via batch file

c# jenkins teamcity assemblyinfo sed 0 Comments

Over a year ago I wrote how to build and publish NuGet packages via Jenkins in which I stated I would follow up with another article on modifying AssemblyInfo.cs via a batch file. Of course, I forgot to write that post. Recently I was adding a NuGet publish job to a TeamCity server which reminded me and therefore finally here is the article.

While both Jenkins and TeamCity include or have available plugins for updating AssemblyInfo.cs, they both suffer from the problem in that they can write a version into the file but they can't read from it first to derive a new value. However, if you simply want to set a full version from within either CI tool you can without having to bother with anything in this post. As I wish to combine part of the existing version with a CI supplied value, I need to look at alternatives.

Read More

Tools we use - 2017 edition

tools 0 Comments

Happy New Year! Once again it's that time for the list of software products I used throughout the past year. Although there's a fair few new entries, overall there's not a huge amount of change given Cyotek's current technology focus.

(This list has grown over time and could probably do with some form of better grouping and ordering. For now, categories are fairly ad-hoc and nothing is in any particular order)

Read More