mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
remove wrong configuration options (server type)
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@46 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
03a03cb072
commit
52749fc846
@ -40,9 +40,9 @@ namespace webImTray {
|
||||
|
||||
void navigateThere() {
|
||||
#if DEBUG
|
||||
webBrowser1.Navigate("http://localhost:8080/IMCenter/client/users/index_flat.jsp");
|
||||
webBrowser1.Navigate("http://localhost:8080/webim/operator/users.php");
|
||||
#else
|
||||
webBrowser1.Navigate(Options.WebIMServer + (Options.isLiteServer ? Options.LITE_PENDING_USERS_PAGE : Options.PRO_PENDING_USERS_PAGE));
|
||||
webBrowser1.Navigate(Options.WebIMServer + Options.PENDING_USERS_PAGE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -6,21 +6,20 @@ using System.Windows.Forms;
|
||||
namespace webImTray {
|
||||
class Options {
|
||||
|
||||
public const string DEFAULT_PRO_SERVER = "http://pro.webim.ru";
|
||||
public const string DEFAULT_LITE_SERVER = "http://localhost/webim";
|
||||
public const string PRO_PENDING_USERS_PAGE = "/client/users/index_flat.jsp";
|
||||
public const string PRO_SETTINGS_PAGE = "/client/settings/index.jsp";
|
||||
public const string LITE_PENDING_USERS_PAGE = "/operator/users.php";
|
||||
public const string LITE_SETTINGS_PAGE = "/operator/operators.php";
|
||||
public const string DEFAULT_SERVER = "http://localhost/webim";
|
||||
public const string PENDING_USERS_PAGE = "/operator/users.php";
|
||||
public const string SETTINGS_PAGE = "/operator/operators.php";
|
||||
private const string HTTP_PREFIX = "http://";
|
||||
|
||||
public static string WebIMServer {
|
||||
get {
|
||||
String server = Application.UserAppDataRegistry.GetValue("server", DEFAULT_PRO_SERVER).ToString();
|
||||
while (server.EndsWith("/"))
|
||||
String server = Application.UserAppDataRegistry.GetValue("server", DEFAULT_SERVER).ToString();
|
||||
while (server.EndsWith("/")) {
|
||||
server = server.Substring(0, server.Length - 1);
|
||||
if (!server.StartsWith(HTTP_PREFIX))
|
||||
return DEFAULT_PRO_SERVER;
|
||||
}
|
||||
if (!server.StartsWith(HTTP_PREFIX)) {
|
||||
return DEFAULT_SERVER;
|
||||
}
|
||||
return server;
|
||||
}
|
||||
set {
|
||||
@ -30,15 +29,6 @@ namespace webImTray {
|
||||
}
|
||||
}
|
||||
|
||||
public static bool isLiteServer {
|
||||
get {
|
||||
return Application.UserAppDataRegistry.GetValue("islite", "false").ToString().ToLower().Equals("true");
|
||||
}
|
||||
set {
|
||||
Application.UserAppDataRegistry.SetValue("islite", value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static decimal ForceRefreshTime {
|
||||
get {
|
||||
return Decimal.Parse(Application.UserAppDataRegistry.GetValue("refreshtime", "15").ToString());
|
||||
|
@ -24,9 +24,6 @@ namespace webImTray {
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.radioPro = new System.Windows.Forms.RadioButton();
|
||||
this.radioLite = new System.Windows.Forms.RadioButton();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.forceRefreshTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.forceRefresh = new System.Windows.Forms.CheckBox();
|
||||
@ -43,9 +40,6 @@ namespace webImTray {
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.radioPro);
|
||||
this.groupBox1.Controls.Add(this.radioLite);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.forceRefreshTime);
|
||||
this.groupBox1.Controls.Add(this.forceRefresh);
|
||||
@ -63,47 +57,11 @@ namespace webImTray {
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Connection";
|
||||
//
|
||||
// radioPro
|
||||
//
|
||||
this.radioPro.AutoSize = true;
|
||||
this.radioPro.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.radioPro.Location = new System.Drawing.Point(131, 54);
|
||||
this.radioPro.Name = "radioPro";
|
||||
this.radioPro.Size = new System.Drawing.Size(58, 21);
|
||||
this.radioPro.TabIndex = 12;
|
||||
this.radioPro.TabStop = true;
|
||||
this.radioPro.Text = "\"Pro\"";
|
||||
this.radioPro.UseVisualStyleBackColor = true;
|
||||
this.radioPro.CheckedChanged += new System.EventHandler(this.radioCheckedChanged);
|
||||
//
|
||||
// radioLite
|
||||
//
|
||||
this.radioLite.AutoSize = true;
|
||||
this.radioLite.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.radioLite.Location = new System.Drawing.Point(43, 54);
|
||||
this.radioLite.Name = "radioLite";
|
||||
this.radioLite.Size = new System.Drawing.Size(59, 21);
|
||||
this.radioLite.TabIndex = 11;
|
||||
this.radioLite.TabStop = true;
|
||||
this.radioLite.Text = "\"Lite\"";
|
||||
this.radioLite.UseVisualStyleBackColor = true;
|
||||
this.radioLite.CheckedChanged += new System.EventHandler(this.radioCheckedChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
this.label3.Location = new System.Drawing.Point(20, 34);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(188, 17);
|
||||
this.label3.TabIndex = 10;
|
||||
this.label3.Text = "Web Messenger Server type";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.label2.Location = new System.Drawing.Point(319, 206);
|
||||
this.label2.Location = new System.Drawing.Point(319, 154);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(57, 17);
|
||||
@ -114,7 +72,7 @@ namespace webImTray {
|
||||
//
|
||||
this.forceRefreshTime.Enabled = false;
|
||||
this.forceRefreshTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.forceRefreshTime.Location = new System.Drawing.Point(251, 203);
|
||||
this.forceRefreshTime.Location = new System.Drawing.Point(251, 151);
|
||||
this.forceRefreshTime.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.forceRefreshTime.Maximum = new decimal(new int[] {
|
||||
120,
|
||||
@ -140,7 +98,7 @@ namespace webImTray {
|
||||
//
|
||||
this.forceRefresh.AutoSize = true;
|
||||
this.forceRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.forceRefresh.Location = new System.Drawing.Point(23, 204);
|
||||
this.forceRefresh.Location = new System.Drawing.Point(23, 152);
|
||||
this.forceRefresh.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.forceRefresh.Name = "forceRefresh";
|
||||
this.forceRefresh.Size = new System.Drawing.Size(187, 21);
|
||||
@ -154,7 +112,7 @@ namespace webImTray {
|
||||
this.autoDesconnectOnSS.AutoSize = true;
|
||||
this.autoDesconnectOnSS.Enabled = false;
|
||||
this.autoDesconnectOnSS.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.autoDesconnectOnSS.Location = new System.Drawing.Point(23, 176);
|
||||
this.autoDesconnectOnSS.Location = new System.Drawing.Point(23, 124);
|
||||
this.autoDesconnectOnSS.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.autoDesconnectOnSS.Name = "autoDesconnectOnSS";
|
||||
this.autoDesconnectOnSS.Size = new System.Drawing.Size(280, 21);
|
||||
@ -165,7 +123,7 @@ namespace webImTray {
|
||||
// webimServer
|
||||
//
|
||||
this.webimServer.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.webimServer.Location = new System.Drawing.Point(23, 108);
|
||||
this.webimServer.Location = new System.Drawing.Point(23, 56);
|
||||
this.webimServer.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.webimServer.Name = "webimServer";
|
||||
this.webimServer.Size = new System.Drawing.Size(408, 23);
|
||||
@ -176,7 +134,7 @@ namespace webImTray {
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.label1.Location = new System.Drawing.Point(20, 87);
|
||||
this.label1.Location = new System.Drawing.Point(20, 35);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(201, 17);
|
||||
@ -188,7 +146,7 @@ namespace webImTray {
|
||||
this.autoDisconnect.AutoSize = true;
|
||||
this.autoDisconnect.Enabled = false;
|
||||
this.autoDisconnect.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.autoDisconnect.Location = new System.Drawing.Point(23, 148);
|
||||
this.autoDisconnect.Location = new System.Drawing.Point(23, 96);
|
||||
this.autoDisconnect.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.autoDisconnect.Name = "autoDisconnect";
|
||||
this.autoDisconnect.Size = new System.Drawing.Size(261, 21);
|
||||
@ -252,8 +210,5 @@ namespace webImTray {
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown forceRefreshTime;
|
||||
private System.Windows.Forms.CheckBox forceRefresh;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.RadioButton radioPro;
|
||||
private System.Windows.Forms.RadioButton radioLite;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ using System.Windows.Forms;
|
||||
namespace webImTray {
|
||||
public partial class OptionsConnectionPanel : UserControl, OptionsPanel {
|
||||
bool modified = false;
|
||||
bool initialized = false;
|
||||
|
||||
public OptionsConnectionPanel() {
|
||||
InitializeComponent();
|
||||
@ -18,7 +17,6 @@ namespace webImTray {
|
||||
void OptionsPanel.apply() {
|
||||
if (modified) {
|
||||
Options.WebIMServer = webimServer.Text;
|
||||
Options.isLiteServer = radioLite.Checked;
|
||||
if (forceRefresh.Checked) {
|
||||
Options.ForceRefreshTime = forceRefreshTime.Value;
|
||||
} else {
|
||||
@ -34,12 +32,7 @@ namespace webImTray {
|
||||
forceRefreshTime.Enabled = forceRefresh.Checked = refreshTime != 0;
|
||||
forceRefreshTime.Value = refreshTime != 0 ? refreshTime : 15;
|
||||
|
||||
bool lite = Options.isLiteServer;
|
||||
radioPro.Checked = !lite;
|
||||
radioLite.Checked = lite;
|
||||
|
||||
modified = false;
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
string OptionsPanel.getDescription() {
|
||||
@ -65,15 +58,7 @@ namespace webImTray {
|
||||
}
|
||||
|
||||
private void showUserPropertiesOnline(object sender, LinkLabelLinkClickedEventArgs e) {
|
||||
System.Diagnostics.Process.Start(Options.WebIMServer + (Options.isLiteServer ? Options.LITE_SETTINGS_PAGE : Options.PRO_SETTINGS_PAGE ));
|
||||
}
|
||||
|
||||
private void radioCheckedChanged(object sender, EventArgs e) {
|
||||
modified = true;
|
||||
PanelModified.Invoke();
|
||||
if (initialized) {
|
||||
webimServer.Text = radioLite.Checked ? Options.DEFAULT_LITE_SERVER : Options.DEFAULT_PRO_SERVER;
|
||||
}
|
||||
System.Diagnostics.Process.Start(Options.WebIMServer + Options.SETTINGS_PAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user