Category: "Programming"
Sub-window should not show in the task bar
That is a common mistake for myself. I like to create some sub-windows which are acting a dialog. I am so easy to forget set ShowInTaskbar = false.
Bolded the dates in MonthCalendar
I am writing a simple diary application. I am using a monthcalendar control to select the date to load the diary. I need the control to display the date in bolded if that date on the calendar has the data. That is easy and simple. Just using BoldedDates.
Code
List<DateTime> boldedDates = new List<DateTime>(); | |
foreach(DateTime boldedDate in entries.Keys) | |
{ | |
boldedDates.Add(boldedDate); | |
} | |
this.monthCalendar1.BoldedDates = boldedDates.ToArray(); |
Get the current assembly version
That is very easy by using Reflection.
Code
using System.Reflection; | |
Assembly.GetExecutingAssembly().GetName().Version; |
MonoDev 2.0
MonoDev is getting well developed. Now, it has an ASP.Net Toolbar and even it has database explorer!
A careless mistake in ActiveRecord for MySql
I am writing a program for myself by using ActiveRecord. I am an MS SQL Server Develper. So, I just did in a careless mistake. I called a table , User. If you call a table will crash with system table name, we use '[' and ']'. I hardcoded the table name in '[User]' in a Model class for ActiveRecord. I can't create a schema by Active Record. Because in MySql, we use '`'. So, it should be
Code
[ActiveRecord("`User`")] | |
| |
public class User : ActiveRecordBase |
Not
Code
[ActiveRecord("[User]")] | |
| |
public class User : ActiveRecordBase |