public PropertiesControl() { InitializeComponent(); MMCMiscUtil.SetDoubleBuffered(this.listViewProp); this.Dock = DockStyle.Fill; ColumnHeader attrColumnHeader = new ColumnHeader(); attrColumnHeader.Text = "Attribute"; attrColumnHeader.Width = 400; listViewProp.Columns.Add(attrColumnHeader); ColumnHeader valColumnHeader = new ColumnHeader(); valColumnHeader.Text = "Value"; valColumnHeader.Width = 400; listViewProp.Columns.Add(valColumnHeader); ColumnHeader typColumnHeader = new ColumnHeader(); typColumnHeader.Text = "Syntax"; typColumnHeader.Width = 400; listViewProp.Columns.Add(typColumnHeader); _properties = new Dictionary <string, VMDirAttributeDTO>(); _currAttrDTOList = new List <AttributeDTO>(); _optAttrDTOList = new List <AttributeDTO>(); _oprAttrDTOList = new List <AttributeDTO>(); _mayAttrTyDTOList = new List <AttributeTypeDTO>(); _modData = new HashSet <string>(); SetEditState(false); }
private void buttonExport_Click(object sender, EventArgs e) { if (!ValidateForm()) { return; } MiscUtilsService.CheckedExec(delegate() { StringBuilder sb = new StringBuilder(); var start = 0; var end = _result.Count(); if (comboBoxScope.SelectedIndex == (int)ExportScope.CURR_PAGE) { start = (_currPage - 1) * _pageSize; end = _currPage * _pageSize > _result.Count ? _result.Count : _currPage * _pageSize; } HashSet <string> attrToExport = new HashSet <string>(); if (checkBoxAttToExport.CheckState == CheckState.Checked) { foreach (var item in _attrList) { attrToExport.Add(item); } } else { foreach (ListViewItem item in listViewAttrToExport.Items) { attrToExport.Add(item.SubItems[0].Text); } } foreach (var item in attrToExport) { sb.Append(item + ","); } sb.Append(Environment.NewLine); for (var i = start; i < end; i++) { foreach (var item in attrToExport) { sb.Append("\""); if (_result[i].NodeProperties.ContainsKey(item)) { foreach (var val in _result[i].NodeProperties[item].Values) { sb.Append(val.StringValue + " "); } } sb.Append("\""); sb.Append(","); } sb.Append(Environment.NewLine); } if (MMCMiscUtil.SaveDataToFile(sb.ToString(), "Export Result", MMCUIConstants.CSV_FILTER)) { MMCDlgHelper.ShowInformation(VMDirConstants.STAT_RES_EXPO_SUCC); } }); }
public RootNode(PropertiesControl control) : base(null, control) { this.Text = MMCMiscUtil.GetBrandConfig(CommonConstants.DIR_ROOT); ImageIndex = SelectedImageIndex = (int)VMDirIconIndex.Directory; this.Tag = "root"; }
void ExportSigningRequest() { MMCActionHelper.CheckedExec(delegate() { var cert = this.SelectedNodes[0].Tag as SigningRequestDTO; MMCMiscUtil.SaveDataToFile(cert.CSR, "Save CSR", MMCUIConstants.CSR_FILTER); }); }
private void buttonBrowse_Click(object sender, EventArgs e) { MiscUtilsService.CheckedExec(delegate() { var values = MMCMiscUtil.ReadAllFromFile("Select File", MMCUIConstants.TXT_FILTER); this.textBox1.Text = values; }); }
private void button1_Click(object sender, EventArgs e) { var keyFile = MMCMiscUtil.SelectFile("Select Secret key", MMCUIConstants.PRI_KEY_FILTER); try{ this.txtSecretKey.Text = File.ReadAllText(keyFile); } catch (Exception) {} }
public VMCARootNode() : base() { DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.CA_ROOT); RefreshDelegate = new Refresh(RefreshMethod); this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Add Server", "Add Server", -1, ACTION_ADD_SERVER)); ImageIndex = SelectedImageIndex = (int)VMCAImageIndex.CertificateAuthority; }
public VMCertStoreRootNode() : base() { DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.CS_ROOT); RefreshDelegate = new Refresh(RefreshMethod); this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Add Server", "Add Server", -1, ACTION_ADD_SERVER)); }
public NewServerView(ServiceGateway service) { InitializeComponent(); _service = service; _dto = new Dto.ServerDto(); cbIsSsl.Checked = true; lblStsUrl.Visible = cbSAML.Checked; txtStsUrl.Visible = cbSAML.Checked; this.txtDefaultTenant.Text = MMCMiscUtil.GetBrandConfig(CommonConstants.TENANT); UpdateUrlPreview(); }
public LoginForm(string server, string user, string domain) : this() { this.Server = server; this.UserName = user; if (!string.IsNullOrWhiteSpace(domain)) { this.DomainName = domain; } else { this.DomainName = MMCMiscUtil.GetBrandConfig(CommonConstants.TENANT); } }
public VMDNSRootNode() : base() { DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.DNS_ROOT); this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Add Server", "Add Server", -1, ACTION_ADD_SERVER)); }
public void StoreQuery() { MiscUtilsService.CheckedExec(delegate { if (!ValidateSearch()) { return; } var qdto = GetQuery(); if (qdto == null) { return; } MMCMiscUtil.SaveObjectToFile(qdto, "Store Query", MMCUIConstants.XML_FILTER); }); }
public frmConnectToServer(VMDirServerDTO dto) : this() { _dto = dto; txtDirectoryServer.Text = dto.Server; var tenant = MMCMiscUtil.GetBrandConfig(CommonConstants.TENANT); if (string.IsNullOrWhiteSpace(dto.BindDN)) { txtBindUPN.Text = "Administrator@" + tenant; } else { txtBindUPN.Text = dto.BindDN; } if (string.IsNullOrWhiteSpace(dto.BaseDN)) { txtBaseDN.Text = CommonConstants.GetDNFormat(tenant); } else { txtBaseDN.Text = dto.BaseDN; } }
public frmLogin() { InitializeComponent(); this.txtUser.Text = "Administrator@" + MMCMiscUtil.GetBrandConfig(CommonConstants.TENANT); }
private void btnBrowseCertificate_Click(object sender, EventArgs e) { txtCertificate.Text = MMCMiscUtil.SelectFile("Select Certificate", MMCUIConstants.CERT_FILTER); }
public SnapInNode() : base(false) { this.DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.SSO_ROOT); AddActions(); }
private void btnBrowse_Click(object sender, EventArgs e) { txtFileName.Text = MMCMiscUtil.SelectFile("Select private key file", MMCUIConstants.PRI_KEY_FILTER); }
public VMDirRootNode() { DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.DIR_ROOT); AddViewDescription(); }
public static void SaveKeyData(KeyPairData data) { MMCMiscUtil.SaveDataToFile(data.PrivateKey, "Save private key", MMCUIConstants.PRI_KEY_FILTER); MMCMiscUtil.SaveDataToFile(data.PublicKey, "Save public key", MMCUIConstants.PUB_KEY_FILTER); }
/// <summary> /// Constructor /// </summary> public RootNode() { this.DisplayName = MMCMiscUtil.GetBrandConfig(CommonConstants.PSC_ROOT); this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action(Constants.ConnectToServer, Constants.ConnectToServer, -1, ConnectToServerAction)); }
private void btnBrowsePrivateKey_Click(object sender, EventArgs e) { this.txtPrivateKey.Text = MMCMiscUtil.SelectFile("Select Private key", MMCUIConstants.PRI_KEY_FILTER); }