Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Theme Editor (Read 6413 times)
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Theme Editor
Dec 4th, 2010 at 8:33pm
Print Post  
I am very excited. I just purchased your WinForms suite and have a great project to use it on.

I am trying to find and use the theme editor. I installed the download file in the default directory, which on my PC is C:/Program Files(x86)/MindFusion/MindFusion WinForms.

Under the /bin/ directory I see ThemeEditor.exe and can execute it but I am lost from there. I tried File Load and Theme New but do not know what to load or how to proceed. Please advise what I should be doing.

Thanks,
John
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Theme Editor
Reply #1 - Dec 6th, 2010 at 7:03am
Print Post  
When you start the Theme editor by default it displays an empty theme library. To add a new theme to the current library, select Theme -> New from the menu. Give a proper identifier as a name of your theme because this name will be used as a name of the theme's class. After the theme is created you can double-click on it or select Theme -> Edit from the menu, to edit the theme.

What you will see after this is a Calendar control with the default settings applied. You can edit the properties of your theme from the property grid to the left and see their effect on the calendar to the right. The source code of the theme will also be displayed.

The first step is to select a base theme for your theme (from the BaseTheme property in the grid). Then play around with the settings until you are satisfied with how your new theme looks. Make sure you cover all visual aspects of the theme - for example, ItemSettings.SelectedItemStyle.

After you are done with the theme you have two options to use it in your application:
1. Directly copy the source code of the theme in you project's source code.
2. Compile the theme in a separate assembly and reference this assembly in your project. To compile the theme select Options -> Compile from the menu, but before that make sure that the references in Options -> Settings are correct.

Before closing the Theme editor, make sure to save your theme library in a file so that you can modify it later if necessary.

After you have added the new theme to your project you can use it by assigning an instance of it to the Calendar.CustomTheme property.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Theme Editor
Reply #2 - Dec 6th, 2010 at 4:09pm
Print Post  
Hi Meppy,
Thank you for the quick reply. When I enter a new theme and then try to edit it I get the following error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I thought this was a windows 7 security problem but I have tried everything I know to eliminate it.

My installation directory is C:/Program Files(x86)/... and I thought that might be the problem so I created a new directory and copied all the files from the /bin/MindFusionScheduling/ to the new directory. I thought this would create a runtime environment for the theme editor. Again, when I entered the new theme name and tried to edit, it gave the above error.

(I did the above twice, actually, I created one on the C: drive and also on a flash drive but got the same result).

So if you or any user who is using Windows 7 can show me what to do, I would greatly appreciate it.

Thanks,
John
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Theme Editor
Reply #3 - Dec 6th, 2010 at 7:46pm
Print Post  
I am making some progress. I did a fresh install of the winforms suite on a different PC and onto a flash drive. I am now able to run the theme editor and to see the calendar view and settings, etc.

I see the source code ok. But when I try to compile, I now get this error:

"StartIndex can not be less than zero.
Parameter name: startindex"

With the following details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at MindFusion.Scheduling.WinForms.Tools.ThemeEditor.MainForm.FullReference(String relativeReference)
   at MindFusion.Scheduling.WinForms.Tools.ThemeEditor.MainForm.Compile(ThemePack pack, ProcessMessage messageFatalError, ProcessMessage message)
   at MindFusion.Scheduling.WinForms.Tools.ThemeEditor.MainForm._menuOptionsCompile_Cl
ick(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ThemeEditor
    Assembly Version: 1.0.3825.19866
    Win32 Version: 1.0.3825.19866
    CodeBase: file:///F:/MindFusionWinFormsSuite/Bin/MindFusion.Scheduling/ThemeEditor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e
089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/Sy
stem.Drawing.dll
----------------------------------------
MindFusion.Scheduling
    Assembly Version: 5.0.0.16300
    Win32 Version: 5.0.0.16300
    CodeBase: file:///F:/MindFusionWinFormsSuite/Bin/MindFusion.Scheduling/MindFusion.Scheduli
ng.DLL
----------------------------------------
MindFusion.Common
    Assembly Version: 1.2.3764.24450
    Win32 Version: 1.2.3764.24450
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/MindFusion.Common/1.2.3764.24450__7fed53ada
5b92263/MindFusion.Common.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.
Data.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/Sys
tem.Design.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Acc
essibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I hope you can tell me what to do next. I really need to be able to create my own theme.

John
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Theme Editor
Reply #4 - Dec 6th, 2010 at 8:16pm
Print Post  
Hi,

It crashed for me too on Windows 7. I managed to make compilation work by first setting the paths to common.dll and scheduling.dll in the Options / Settings window (to the dlls in Bin\MindFusion.Scheduling). It might be failing to create some default config file upon startup since Windows 7 does not allow write access to c:\program files. Our developer will check this tomorrow.

Stoyan
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Theme Editor
Reply #5 - Dec 6th, 2010 at 8:36pm
Print Post  
Thank you, Stoyan.
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Theme Editor
Reply #6 - Dec 7th, 2010 at 2:56pm
Print Post  
Hi Stoyan,
One other question, is it possible to get the source for theme0 so I can use that as a starting point beyond the standard that show up for a new theme?

Also, is there a library of existing themes (beyond your standard ones) that we can try. If not, it may be a useful suggestion to allow users to provide their themes (if they are willing to share).

Just some thoughts,
Thanks,
John
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Theme Editor
Reply #7 - Dec 7th, 2010 at 3:50pm
Print Post  
Hi,

Do you mean the code displayed at the bottom of the editor? You can use the "Copy to clipboard" button above the code window and paste into a .cs file in your project. Then you will be able to edit the settings manually and use the theme without referencing a separate dll.

Unfortunately we don't have any other themes. I suppose we could create a repository for user-submitted themes if you wish to share yours first Smiley

Stoyan
  
Back to top
 
IP Logged
 
john6630
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 74
Joined: Sep 20th, 2010
Re: Theme Editor
Reply #8 - Dec 7th, 2010 at 11:21pm
Print Post  
Hi Stoyan,
I was able to use the source code created by the editor. So that works for me.

I would be glad to share my theme once I have one designed. A major benefit of the internet is the sharing of ideas and resources where appropriate. And I see themes as one area that would make sense.

John
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint