It is currently Thu Mar 28, 2024 6:44 am

All times are UTC - 7 hours [ DST ]

Recent News:



Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sat Oct 03, 2009 11:56 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
yakuza wrote:
I gotcha, yes, I've always built mine in designer.

Have you seen this example for creating a Settings tab?


Yes and that's designing the controls at runtime. Nothing to click in the designer. Right? or am i smoking crack again.


Top
 Profile  
Thanks  

Attention Guest: Remove this ad by Registering with the MediaSmartServer.net Forums. It's Free!
PostPosted: Sun Oct 04, 2009 12:00 am 
Offline
Founder
Founder
User avatar

Joined: Tue Jul 31, 2007 11:54 am
Posts: 10735
Location: Fort Collins, Colorado
Thanks: 630
Thanked: 931 times in 885 posts
After creating the project I've always added a new form and set the dimensions, then added my controls via the designer. I've never manually built them at runtime.

_________________
Alex Kuretz
Remote Notification: Monitoring and alerting for your Home Server via email, Twitter, text message, RSS, push notifications, and on your Mac desktop
Have you tried our Add-Ins?


Top
 Profile  
Thanks  
PostPosted: Sun Oct 04, 2009 12:08 am 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
yakuza wrote:
After creating the project I've always added a new form and set the dimensions, then added my controls via the designer. I've never manually built them at runtime.


I wrote my code based upon that link yesterday doing what it did, and writing everything at run time.., which is not that fun at all.

So you are telling me i can drop in a form and call that up...... wow. You can have a form in a class?


Top
 Profile  
Thanks  
PostPosted: Sun Oct 04, 2009 12:25 am 
Offline
Founder
Founder
User avatar

Joined: Tue Jul 31, 2007 11:54 am
Posts: 10735
Location: Fort Collins, Colorado
Thanks: 630
Thanked: 931 times in 885 posts
I presume you've seen the first part of the tutorial about setting up your solution.

Here's an example from my MSS Fan Control addin. I don't claim to be any kind of programming expert but this works for me.
Code:
using System;
using System.Diagnostics;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Net;
using System.ServiceProcess;
using System.Runtime.InteropServices;
using Microsoft.HomeServer.Extensibility;
using Microsoft.Win32;
namespace Microsoft.HomeServer.HomeServerConsoleTab.MSSFanControl
{
    public partial class HomeServerSettingsExtender : UserControl, ISettingsTab
    {

        public HomeServerSettingsExtender(int width, int height, IConsoleServices consoleServices)
        {
               
        }

        public string TabText { get { return "MSS Fan Control"; } }

        public Bitmap TabImage { get { return Properties.Resources.MSSFanControlImg; } }

        public Control TabControl { get { return this; } }

        public bool GetHelp() { MessageBox.Show("MSS Fan Control 1.0.0.8"); return true; }

        public Guid SettingsGuid { get { return GUID; } }

        public bool Commit()
        {
        }

        private void HomeServerSettingsExtender_Load(object sender, EventArgs e)
        {
         }

    }
}

_________________
Alex Kuretz
Remote Notification: Monitoring and alerting for your Home Server via email, Twitter, text message, RSS, push notifications, and on your Mac desktop
Have you tried our Add-Ins?


Top
 Profile  
Thanks  
PostPosted: Sun Oct 04, 2009 12:35 am 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
Where in that code does it call form elements? TabControl needs to return a control of some sorts. You return "this". Is "this" a form? "this" to me seems to be a namespace.

I am obviously confused.


Top
 Profile  
Thanks  
PostPosted: Sun Oct 04, 2009 12:47 am 
Offline
Founder
Founder
User avatar

Joined: Tue Jul 31, 2007 11:54 am
Posts: 10735
Location: Fort Collins, Colorado
Thanks: 630
Thanked: 931 times in 885 posts
HomeServerSettingsExtender is the class (aka "this"), and implements ISettingsTab class and UserControl (form) class.

_________________
Alex Kuretz
Remote Notification: Monitoring and alerting for your Home Server via email, Twitter, text message, RSS, push notifications, and on your Mac desktop
Have you tried our Add-Ins?


Top
 Profile  
Thanks  
PostPosted: Sun Oct 04, 2009 1:11 am 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
well i got it to run at run time using AddHandler btnSubmitSecurity.Click, AddressOf clickme


Top
 Profile  
Thanks  
PostPosted: Sat Oct 10, 2009 8:24 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
just an update, the new installer is done and the code has been given to the testers. It has already been given some really good testing by some close friends and it works great. No more Whiist or anything like that. You now install it like any other addin.

I'm thinking late next week for a release. I will keep you posted.


Top
 Profile  
Thanks  
PostPosted: Sun Oct 11, 2009 2:35 pm 
Offline
Top Contributor
Top Contributor
User avatar

Joined: Mon Jul 21, 2008 8:46 pm
Posts: 828
Location: Texas
Thanks: 13
Thanked: 51 times in 49 posts
That's great news Kris!
Glad to hear it!

_________________
Chris Bickerstaff
HP MSS DataVault X510
Core 2 Quad Core Q9550s
4GB Mushkin Ram
TR4MB eSata Enclosure
TR4UB USB Enclosure
Netgear WNDR3700
UPS APC 1500 XS LCD


Top
 Profile  
Thanks  
PostPosted: Sun Oct 11, 2009 5:16 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Dec 07, 2007 11:18 pm
Posts: 539
Location: Orange County, CA
Thanks: 2
Thanked: 14 times in 13 posts
snowdins wrote:
just an update, the new installer is done and the code has been given to the testers. It has already been given some really good testing by some close friends and it works great. No more Whiist or anything like that. You now install it like any other addin.

I'm thinking late next week for a release. I will keep you posted.



:boxster: :banana: :cheers:

_________________
If you only have 1 copy of a file you do not have a copy! Back-up off site!!!
If someone wrote a particularly helpful post? Use the "Thank Post" button!


Top
 Profile  
Thanks  
PostPosted: Sun Oct 11, 2009 7:16 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
Thanks guys =) This forum really pushed me to get this installer done and I owe it to you guys to open my eyes =). As well as the support too! Im really happy with the way this new installer has turned out. Basically you just click to install now :beerme:

So here is something I bet you guys will not like however. One of my testers tried installing this on a fresh WHS install with .net framework 2.0 installed. It does not work. In fact P80 does not work with 3.0 either. In the 3 years since I have left programming it kind of escaped me to develop on baseline requirements. NOT THE LATEST AND GREATEST! :oops:

To run P80 you will need .net framework 3.5 installed. Most people have automatic updates installed so this is not to much of a problem. The installer will not install if 3.5 is not installed. It will tell the user to install the framework with a link supplied.

I could make P80 run on 2.0, but it would require a lot of recoding. Man I am really pissed at myself for not building off 2.0 to begin with. If I get enough free time or in future versions I will see if I can recode what needs to be done to run with 2.0.

Do you guys consider this a deal breaker with a lot of people? If so then it will need to be done now rather than later.... meaning another 2 weeks or more till release.

So far the current build is running great if .net 3.5 is installed :wink:


Top
 Profile  
Thanks  
PostPosted: Mon Oct 12, 2009 12:44 am 
Offline
Founder
Founder
User avatar

Joined: Tue Jul 31, 2007 11:54 am
Posts: 10735
Location: Fort Collins, Colorado
Thanks: 630
Thanked: 931 times in 885 posts
Great to hear you've made good progress getting this simpler to install, I'm sure this will make more people interested in trying it out.

I don't think requiring .NET 3.5 is a deal breaker, as you say many people have Automatic Updates enabled so this won't be a problem. I personally develop my add-ins against 2.0 to avoid any compatibility issues but I know it adds a lot of new features to use the latest and greatest framework. My only suggestion would be around making sure you do the proper error messaging so a user who encounters the failure is able to easily figure out why it failed.

_________________
Alex Kuretz
Remote Notification: Monitoring and alerting for your Home Server via email, Twitter, text message, RSS, push notifications, and on your Mac desktop
Have you tried our Add-Ins?


Top
 Profile  
Thanks  
PostPosted: Wed Oct 14, 2009 10:08 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
Looks like this Friday, 10.14.09, is just about a go for a public release. Thus a new installer, WOL, cleaned up css, and compiled code. New build, 2.0.5 has received good comments so far, so if no major errors then Friday it is!


Top
 Profile  
Thanks  
PostPosted: Wed Oct 14, 2009 11:04 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Dec 07, 2007 11:18 pm
Posts: 539
Location: Orange County, CA
Thanks: 2
Thanked: 14 times in 13 posts
Today is 10-14-09 and it's Wednesday...

_________________
If you only have 1 copy of a file you do not have a copy! Back-up off site!!!
If someone wrote a particularly helpful post? Use the "Thank Post" button!


Top
 Profile  
Thanks  
The following user would like to thank COPC for this post
snowdins
PostPosted: Thu Oct 15, 2009 9:01 pm 
Offline
Top Contributor
Top Contributor
User avatar

Joined: Mon Jul 21, 2008 8:46 pm
Posts: 828
Location: Texas
Thanks: 13
Thanked: 51 times in 49 posts
http://www.homeserverland.com/blogs/b/h ... e-p80.aspx

P80 Re-Release goes live!

_________________
Chris Bickerstaff
HP MSS DataVault X510
Core 2 Quad Core Q9550s
4GB Mushkin Ram
TR4MB eSata Enclosure
TR4UB USB Enclosure
Netgear WNDR3700
UPS APC 1500 XS LCD


Top
 Profile  
Thanks  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 60 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group