Update RDS_Settings.
This commit is contained in:
parent
738334500d
commit
5c01228c0e
5 changed files with 272 additions and 39 deletions
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="gvGWServers.EmptyDataText" xml:space="preserve">
|
||||
<value>No gateway serves have been added yet.</value>
|
||||
</data>
|
||||
<data name="ServerNameColumn.HeaderText" xml:space="preserve">
|
||||
<value>Server Name</value>
|
||||
</data>
|
||||
</root>
|
|
@ -9,15 +9,6 @@
|
|||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtConnectionBroker" Display="Dynamic" ErrorMessage="*" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblGateway" meta:resourcekey="lblGateway" Text="Gateway Servers:"/>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtGateway" MaxLength="1000" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtGateway" Display="Dynamic" ErrorMessage="*" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblRootOU" meta:resourcekey="lblRootOU" Text="Root OU:"/>
|
||||
|
@ -52,4 +43,33 @@
|
|||
<asp:TextBox runat="server" ID="txtCentralNPS" Width="200px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap valign="top">
|
||||
<asp:Localize ID="locGWServers" runat="server" meta:resourcekey="locGWServers"
|
||||
Text="Gateway Servers:"></asp:Localize>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtAddGWServer" MaxLength="1000" Width="200px" />
|
||||
<asp:Button runat="server" ID="btnAddGWServer" OnClick="btnAddGWServer_Click" meta:resourcekey="btnAdd"
|
||||
CssClass="Button1" /><br />
|
||||
<asp:GridView ID="gvGWServers" runat="server" AutoGenerateColumns="False" EmptyDataText="gvRecords"
|
||||
CssSelectorClass="NormalGridView" OnRowCommand="gvGWServers_RowCommand" meta:resourcekey="gvGWServers">
|
||||
<Columns>
|
||||
<asp:TemplateField meta:resourcekey="ServerNameColumn" ItemStyle-Width="100%" >
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lblServerName" Text='<%#Eval("ServerName")%>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="cmdDelete" runat="server" SkinID="DeleteSmall" CommandName="RemoveServer"
|
||||
CommandArgument='<%#Eval("ServerName") %>' meta:resourcekey="cmdDelete" AlternateText="Delete"
|
||||
OnClientClick="return confirm('Delete?');"></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -27,6 +27,8 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.Common;
|
||||
|
||||
|
@ -39,10 +41,26 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
|
||||
}
|
||||
|
||||
public string GWServers
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["GWServers"] != null ? ViewState["GWServers"].ToString() : string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["GWServers"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
|
||||
{
|
||||
txtConnectionBroker.Text = settings["ConnectionBroker"];
|
||||
txtGateway.Text = settings["GWServrsList"];
|
||||
|
||||
GWServers = settings["GWServrsList"];
|
||||
|
||||
UpdateLyncServersGrid();
|
||||
|
||||
txtRootOU.Text = settings["RootOU"];
|
||||
txtPrimaryDomainController.Text = settings["PrimaryDomainController"];
|
||||
|
||||
|
@ -63,11 +81,12 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
|
||||
{
|
||||
settings["ConnectionBroker"] = txtConnectionBroker.Text;
|
||||
settings["GWServrsList"] = txtGateway.Text;
|
||||
settings["RootOU"] = txtRootOU.Text;
|
||||
settings["PrimaryDomainController"] = txtPrimaryDomainController.Text;
|
||||
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
|
||||
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||
|
||||
settings["GWServrsList"] = GWServers;
|
||||
}
|
||||
|
||||
protected void chkUseCentralNPS_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -76,5 +95,60 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
txtCentralNPS.Text = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||
}
|
||||
|
||||
protected void btnAddGWServer_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GWServers))
|
||||
GWServers += ";";
|
||||
|
||||
GWServers += txtAddGWServer.Text;
|
||||
|
||||
txtAddGWServer.Text = string.Empty;
|
||||
|
||||
UpdateLyncServersGrid();
|
||||
}
|
||||
|
||||
public List<GWServer> GetServices(string data)
|
||||
{
|
||||
if (string.IsNullOrEmpty(data))
|
||||
return null;
|
||||
List<GWServer> list = new List<GWServer>();
|
||||
string[] serversNames = data.Split(';');
|
||||
foreach (string current in serversNames)
|
||||
{
|
||||
list.Add(new GWServer { ServerName = current });
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private void UpdateLyncServersGrid()
|
||||
{
|
||||
gvGWServers.DataSource = GetServices(GWServers);
|
||||
gvGWServers.DataBind();
|
||||
}
|
||||
|
||||
protected void gvGWServers_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "RemoveServer")
|
||||
{
|
||||
string str = string.Empty;
|
||||
List<GWServer> servers = GetServices(GWServers);
|
||||
foreach (GWServer current in servers)
|
||||
{
|
||||
if (current.ServerName == e.CommandArgument.ToString())
|
||||
continue;
|
||||
|
||||
str += current.ServerName + ";";
|
||||
}
|
||||
|
||||
GWServers = str.TrimEnd(';');
|
||||
UpdateLyncServersGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class GWServer
|
||||
{
|
||||
public string ServerName { get; set; }
|
||||
}
|
||||
}
|
|
@ -39,33 +39,6 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
|
||||
|
||||
/// <summary>
|
||||
/// lblGateway control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblGateway;
|
||||
|
||||
/// <summary>
|
||||
/// txtGateway control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtGateway;
|
||||
|
||||
/// <summary>
|
||||
/// RequiredFieldValidator3 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
|
||||
|
||||
/// <summary>
|
||||
/// lblRootOU control.
|
||||
/// </summary>
|
||||
|
@ -155,5 +128,41 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtCentralNPS;
|
||||
|
||||
/// <summary>
|
||||
/// locGWServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locGWServers;
|
||||
|
||||
/// <summary>
|
||||
/// txtAddGWServer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtAddGWServer;
|
||||
|
||||
/// <summary>
|
||||
/// btnAddGWServer control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnAddGWServer;
|
||||
|
||||
/// <summary>
|
||||
/// gvGWServers control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView gvGWServers;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5535,6 +5535,7 @@
|
|||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" />
|
||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionServers.ascx.resx" />
|
||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx" />
|
||||
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue