A few quick hacks... (NOTE: All the below info is just in ref to MainForm.cs no other file needs to be edited)
If anyone is wanting to stop the X button from closing the uploader (I had some of my friends request this cos they kept accidently closing instead of minimizing) go to the start of the MainForm.cs at this line:
- Code: Select all
public class MainForm : UniUploader.GUI_helper
{
And change it so its this:
- Code: Select all
public class MainForm : UniUploader.GUI_helper
{
private const int CP_NOCLOSE_BUTTON = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams myCp = base.CreateParams;
myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON ;
return myCp;
}
}
That will disable the X button, (when I get time I'll see about coding an option together to make the X be optional to minimize instead of close, but for now this will suffice).
Next...
In ref to the new submenu options in the systray icons menu, add this function:
- Code: Select all
private void doContextMenuMoveToBottom(string text)
{
foreach (MenuItem mi in contextMenu1.MenuItems)
{
if (mi.Text == text)
{
contextMenu1.MenuItems.RemoveAt(mi.Index);
contextMenu1.MenuItems.Add(menuItem3);
}
}
}
(or name it whatever you want, I just wrote it like that to explain what it is quickly, shoulda really added some comments to it but *shrugs*).
Then at the bottom of the doHomeURL() and doForumURL() functions (one, or the other, or both, doesn't really matter it seems), add:
- Code: Select all
// Put the Exit option at the BOTTOM of the list!
doContextMenuExit("Exit");
Before the final "}".
This will force the Exit option to move to the bottom of the list, :-) Instead of having it above the 2 new items (in the middle of the list).
Quick an dirty hack but it works, ;-)
I also wrote together a new url entry option for those who release custom UniUploaders and have their own updates page. Instead of them getting updates from
http://www.wowroster.net/uniuploader_up ... update.phpIt works great, and means you can have the updater set to any url.
And here ya go, the info on how to add the url entry for custom updater stuff...
Find:
- Code: Select all
private System.Windows.Forms.Button autoAddonSyncNow;
Add below it:
- Code: Select all
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox UpdatesURL;
Next find:
- Code: Select all
public string _SYNCHURL = "Synchronization URL:";
And add below it:
- Code: Select all
public string _UPDATESURL = "Updates URL:";
Find:
- Code: Select all
this.AutoAddonURL = new System.Windows.Forms.TextBox();
Add below it:
- Code: Select all
this.label21 = new System.Windows.Forms.Label();
this.UpdatesURL = new System.Windows.Forms.TextBox();
Find:
- Code: Select all
this.groupBox11.Controls.Add(this.AutoAddonURL);
An again, below it:
- Code: Select all
this.groupBox11.Controls.Add(this.label21);
this.groupBox11.Controls.Add(this.UpdatesURL);
Find:
- Code: Select all
//
// label12
//
this.label12.Location = new System.Drawing.Point(8, 88);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(152, 16);
this.label12.TabIndex = 3;
this.label12.Text = "Synchronization URL:";
//
// AutoAddonURL
//
this.AutoAddonURL.Location = new System.Drawing.Point(8, 112);
this.AutoAddonURL.Name = "AutoAddonURL";
this.AutoAddonURL.Size = new System.Drawing.Size(280, 20);
this.AutoAddonURL.TabIndex = 2;
this.AutoAddonURL.Text = "http://XXXXXXX.XXX/uniadmin/interface.php";
Replace with (replaced due to the 2 above items being moved a little to make room for the 2 new items, and to keep things looking neat):
- Code: Select all
//
// label12
//
this.label12.Location = new System.Drawing.Point(8, 107);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(152, 16);
this.label12.TabIndex = 3;
this.label12.Text = "Synchronization URL:";
//
// AutoAddonURL
//
this.AutoAddonURL.Location = new System.Drawing.Point(8, 123);
this.AutoAddonURL.Name = "AutoAddonURL";
this.AutoAddonURL.Size = new System.Drawing.Size(280, 20);
this.AutoAddonURL.TabIndex = 2;
this.AutoAddonURL.Text = "http://XXXXXXX.XXX/uniadmin/interface.php";
//
// label21
//
this.label21.Location = new System.Drawing.Point(8, 69);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(152, 16);
this.label21.TabIndex = 3;
this.label21.Text = "Updates URL:";
//
// UpdatesURL
//
this.UpdatesURL.Location = new System.Drawing.Point(8, 85);
this.UpdatesURL.Name = "UpdatesURL";
this.UpdatesURL.Size = new System.Drawing.Size(280, 20);
this.UpdatesURL.TabIndex = 2;
this.UpdatesURL.Text = "http://www.wowroster.net/uniuploader_updater2/update.php";
Find:
- Code: Select all
case "SYNCHROURL":
AutoAddonURL.Text = settingValue;
break;
Add below:
- Code: Select all
case "UPDATESURL":
UpdatesURL.Text = settingValue;
break;
Again, another find:
- Code: Select all
ini.AddValue("updater", "SYNCHROURL", AutoAddonURL.Text);
Add below:
- Code: Select all
ini.AddValue("updater", "UPDATESURL", UpdatesURL.Text);
Search for:
- Code: Select all
case "SYNCHROURL":
AutoAddonURL.Text = settingSplit[1];
break;
Below add:
- Code: Select all
case "UPDATESURL":
UpdatesURL.Text = settingSplit[1];
break;
Search for and delete all traces of:
- Code: Select all
string updaterLocation = "http://www.wowroster.net/uniuploader_updater2/update.php";
Should only be 3 to be found.
Then search for and replace all traces of:
- Code: Select all
updaterLocation
With:
- Code: Select all
UpdatesURL.Text
Should be a total of 7 items.
(Nearly done!)
Find:
- Code: Select all
case "_SYNCHURL":
_SYNCHURL = @settingValue;
break;
Below it add:
- Code: Select all
case "_UPDATESURL":
_UPDATESURL = @settingValue;
break;
Find:
- Code: Select all
autoAddonSyncNow.Text = _SYNCHNOW;
Below it add:
- Code: Select all
label21.Text = _UPDATESURL;
That should be about everything, you'll now see a new menu option listed. :-D
Oh, and in ref to that updatesurl thing I also modded the UniAdmin system so that it now has a new option to let you select the url used there too, if anyone wants this code let me know and I'll paste the info. I'll paste it anyways, but only when I get time, :-)