public ObjectAddMoreAttributesDlg(ADObjectAddDlg objectAddDlg, IPlugInContainer container, StandardPage parentPage)
     : this(container, parentPage)
 {
     this._objectAddDlg = objectAddDlg;
     InitializeComponent();
     InitializePages();
 }
 public ResetPassword(IPlugInContainer container, StandardPage parentPage, bool bPwdNeverExpires, string user)
 : this()
 {
     this.IPlugInContainer = container;
     this.bNeverExpiresPwd = bPwdNeverExpires;
     this.sUser = user;
 }
    /// <summary>
    /// Gets all class attributes from the Schema template and add them to the treeview
    /// </summary>
    /// <param name="objectAddDlg"></param>
    public ObjectAddWelcomePage(ADObjectAddDlg objectAddDlg, ADUCDirectoryNode dirnode, IPlugInContainer container, StandardPage parentPage)
        : this()
    {
        this._objectAddDlg = objectAddDlg;
        this.dirnode = dirnode;
        this._container = container;
        this._parentPage = parentPage;

        if (_objectAddDlg.objectClasses != null)
        {
            if (treeView1.Nodes != null)
            {
                treeView1.Nodes.Clear();
            }

            foreach (string node in _objectAddDlg.objectClasses)
            {
                if (node != null)
                {
                    SchemaType schemaType = _objectAddDlg.schemaCache.GetSchemaTypeByObjectClass(node);
                    LdapClassType ldapClassType = schemaType as LdapClassType;
                    String[] mandatoryAttributes = ldapClassType.MandatoryAttributes;
                    TreeNode schemeNode = new TreeNode();
                    schemeNode.Text = schemaType.AttributeDisplayName;
                    schemeNode.Tag = mandatoryAttributes;
                    treeView1.Nodes.Add(schemeNode);
                    treeView1.Sort();
                }
            }
        }

        treeView1.HideSelection = true;
    }
 public ObjectSelectDlg(IPlugInContainer container, StandardPage parentPage, Hostinfo hn, IPlugIn plugin)
     : this()
 {
     this.IPlugInContainer = container;
     //this.AddPage(new DomainConnectPage(this, hn, plugin, container));
     this.AddPage(new ObjectSelectPage(this, plugin, container));
 }
Example #5
0
    public NewGroupDlg(IPlugInContainer container, StandardPage parentPage,Hostinfo hn, IPlugIn plugin)
    : base(container, parentPage)
    {
        InitializeComponent();
        
        // Create an instance of a ListView column sorter and assign it
        // to the ListView control.
        lvwColumnSorter = new ListViewColumnSorter();
        this.lvMembers.ListViewItemSorter = lvwColumnSorter;
        
        this.ButtonCancel.Text = "Cancel";
        
        this.ButtonOK.Text = "Create";
        
        this.SetAllValueChangedHandlers(this);
        
        localParent = (LUGPage)parentPage;
        
        if (localParent == null)
        {
            throw new ArgumentException("NewGroupDlg constructor: (LUGPage) parentPage == null");
        }

        this._hn = hn;
        this._plugin = (LUGPlugIn)plugin;

        ((EditDialog)this).btnApply.Visible = false;
        users = new Hashtable();
        
        this.tbGroupName.Select();
        
    }
 //private Hostinfo hn = null;
 
 #endregion
 
 #region Constructors
 
 public GroupPropertiesDlg(IPlugInContainer container, StandardPage parentPage, IPlugIn plugin)
 : base(container, parentPage)
 {
     this.plugin = plugin;
     InitializeComponent();
     InitializePages();
 }
Example #7
0
 public ADRenameDlg(IPlugInContainer container, StandardPage parentPage , string name,string objclass)
 : this()
 {
     this.IPlugInContainer = container;
     objname = name;
     RenametextBox.Text = name;
     obj_type = objclass;
 }
 public GenericPropertiesDlg(IPlugInContainer container, StandardPage parentPage, bool IsGeneralPageReq)
 : base(container, parentPage)
 {
     InitializeComponent();
     this.Text = "{0} Properties";
     this.bIsGeneralpageReq = IsGeneralPageReq;
     InitializePages();
 }
 /// <summary>
 /// The preferred constructor
 /// </summary>
 /// <param name="container">Back reference to the PlugInContainer</param>
 /// <param name="el">Reference to the log being viewed</param>
 public LogPropertiesPage(IPlugInContainer container, EventLogRecord el, IPlugIn plgin, StandardPage parentPage)
     : this()
 {
     this.pageID = "LogProperities";
     this._container = container;
     this.el = el;
     this._plugin = plgin as EventlogPlugin;
     this._parentPage = parentPage;
 }
 public DomainPropertiesDlg(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin)
     : base(container, parentPage)
 {
     InitializeComponent();
     this.Text = "{0} Properties";
     _plugin = plugin;
     _container = container;
     InitializePages();
 }
 public ADGroupPropertiesDlg(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin,ADUCDirectoryNode dirnode)
 : base(container, parentPage)
 {
     this.Text = "{0} Properties";
     this._dirnode = dirnode;
     InitializeComponent();
     _plugin = plugin;
     _container = container;
     InitializePages();
 }
 public UserPropertiesDlg(IPlugInContainer container, StandardPage parentPage)
 : base(container, parentPage)
 {
     Groups = new List<ListViewItem>();
     
     InitializeComponent();
     
     InitializePages();
     
 }
 public MultiItemPropertiesDlg(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin,
                               List<object> ObjectCounts)
     : base(container, parentPage)
 {
     InitializeComponent();
     this.ObjectCounts = ObjectCounts;
     _plugin = plugin;
     _container = container;
     InitializePages();
 }
        public SharePropertiesDlg(IPlugInContainer container, StandardPage parentPage, FileShareManagerIPlugIn plugin, Hostinfo hn)
            : base(container, parentPage)
        {
            InitializeComponent();

            this.Text = "{0} Properties";
            this._hn = hn;
            _plugin = plugin;
            _container = container;
            InitializePages();
        }
        public ServicePropertiesDlg(IPlugInContainer container, StandardPage parentPage,
                                    ServiceManagerPlugin plugin, string serviceName)
                                    : base(container, parentPage)
        {
            InitializeComponent();

            this.Text = serviceName;
            _container = container;
            _plugin = plugin;

            InitializePages(serviceName);
        }
        public ADGroupAddDlg(IPlugInContainer container, StandardPage parentPage, ADUCDirectoryNode dirnode)
            : this()
        {
            int ret = -1;
            this.IPlugInContainer = container;
            this._dirnode = dirnode;
            if (dirnode != null)
            {
                List<LdapEntry> ldapEntries = null;

                ret = dirnode.LdapContext.ListChildEntriesSynchronous
                (dirnode.DistinguishedName,
                LdapAPI.LDAPSCOPE.BASE,
                "(objectClass=*)",
                null,
                false,
                out ldapEntries);

                if (ldapEntries == null || ldapEntries.Count == 0)
                {
                    return;
                }

                LdapEntry ldapNextEntry = ldapEntries[0];
                //As of now we are not getting canonicalName attribute in the list because of paging issue
                //LdapValue[] attr = ldapNextEntry.GetAttributeValues("canonicalName", dirnode.LdapContext);
                //if (attr != null && attr.Length > 0)
                //    this.lblCreatein.Text = "Create in: " + attr[0].stringData;

                //As of now we are taking "DistinguishedName" and spliting and displaying it.
                string[] sData = dirnode.DistinguishedName.Split(',');
                string sOutput = "";
                for (int i = sData.Length - 1; i >= 0; i--)
                {
                    if (sData[i].ToString().Trim().StartsWith("DC", StringComparison.InvariantCultureIgnoreCase))
                    {
                        sOutput = sData[i].ToString().Trim().Substring(3) + "." + sOutput;
                    }
                    else if (sData[i].ToString().Trim().StartsWith("OU", StringComparison.InvariantCultureIgnoreCase) || sData[i].ToString().Trim().StartsWith("CN", StringComparison.InvariantCultureIgnoreCase))
                    {
                        sOutput += "/" + sData[i].ToString().Trim().Substring(3);
                    }
                }
                if (sOutput.EndsWith("."))
                {
                    sOutput += "/";
                }
                sOutput = sOutput.Replace("./", "/");

                this.txtcreatein.Text = "Create in: " + sOutput;
            }
        }
    /// <summary>
    /// Overriden constructor gets all class schema attributes from AD Schema template
    /// </summary>
    /// <param name="container"></param>
    /// <param name="parentPage"></param>
    /// <param name="text"></param>
    /// <param name="schemaCache"></param>
    public NewShareWizardDlg(IPlugInContainer container, StandardPage parentPage, IPlugIn plugin)
        : this()
    {
        this.plugin = plugin as FileShareManagerIPlugIn;
        this.shareInfo = new ShareInfo();
        shareInfo.hostName = this.plugin.HostInfo.hostName;
        sharedFolderList = new List<ShareInfo>();

        this.AddPage(new NewShareWelcomePage(this, plugin, container));
        this.AddPage(new NewShareFolderSetUpPage(this, plugin, container));
        this.AddPage(new NewSharePermissionsPage(this, plugin, container));
        this.AddPage(new NewShareFinishPage(this, plugin, container));
    }
 public EventPropertiesDlg(IPlugInContainer container, StandardPage parentPage, EventlogPlugin plugin,ListView lvEvents)
 : base(container, parentPage)
 {
     InitializeComponent();
     btnApply.Visible = false;
     btnCancel.Visible = false;
     btnOK.Location = btnApply.Location;
     this.Text = "Event Properties";
     _plugin = plugin;
     _container = container;
     _eventsListView = lvEvents;
     InitializePages();
 }
Example #19
0
 public NewUserDlg(IPlugInContainer container, StandardPage parentPage)
 : base(container, parentPage)
 {
     InitializeComponent();
     
     ButtonCancel.Text = "Cancel";
     ButtonOK.Text = "Create";
     SetAllValueChangedHandlers(this);
     tbFullName.MaxLength = 256;
     
     localParent = (LUGPage) parentPage;
     
     this.tbUserName.Select();
     
 }
    /// <summary>
    /// Overriden constructor gets all class schema attributes from AD Schema template
    /// </summary>
    /// <param name="container"></param>
    /// <param name="parentPage"></param>
    /// <param name="text"></param>
    /// <param name="schemaCache"></param>
    public ADObjectAddDlg(IPlugInContainer container, StandardPage parentPage, string text, LDAPSchemaCache schemaCache, ADUCDirectoryNode dirnode)
        : this()
    {
        this.IPlugInContainer = container;
        this.Text = text;

        string[] objectClasses = null;
        string[] attrs = { "name", "allowedAttributes", "allowedChildClasses", null };

        if (schemaCache != null && dirnode != null)
        {
            List<LdapEntry> ldapEntries = null;
            int ret = dirnode.LdapContext.ListChildEntriesSynchronous
            (dirnode.DistinguishedName,
            LdapAPI.LDAPSCOPE.BASE,
            "(objectClass=*)",
            attrs,
            false,
            out ldapEntries);

            if (ldapEntries == null)
            {
                return;
            }

            LdapEntry ldapNextEntry = ldapEntries[0];

            LdapValue[] ldapValues = ldapNextEntry.GetAttributeValues("allowedChildClasses", dirnode.LdapContext);
            if (ldapValues != null && ldapValues.Length > 0)
            {
                objectClasses = new string[ldapValues.Length];
                int index = 0;
                foreach (LdapValue Oclass in ldapValues)
                {
                    objectClasses[index] = Oclass.stringData;
                    index++;
                }
            }
        }

        this.objectClasses = objectClasses;
        this.schemaCache = schemaCache;
        this.choosenClass = null;

        this.objectInfo = new ObjectInfo();

        this.AddPage(new ObjectAddWelcomePage(this, dirnode, container, parentPage));
    }
    /// <summary>
    /// Override constructor gets the Plugin node and all its childs
    /// Adds the all nodes to the treeview
    /// </summary>
    /// <param name="container"></param>
    /// <param name="parentPage"></param>
    /// <param name="plugin"></param>
    /// <param name="origTreeview"></param>
    public ADMoveObjectPage(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin, LWTreeView origTreeview)
    : this()
    {
        this.IPlugInContainer = container;
        _addplugin = plugin;
        
        _origLWTreeView = origTreeview;
        
        _aducRootnode = _addplugin.GetPlugInNode();
        
        if (_aducRootnode.Nodes.Count > 0)
        {
                /*TreeNode[] newTreeArray = new TreeNode[_aducRootnode.Nodes.Count];
                // Iterate through the root nodes in the Nodes property.
                _aducRootnode.Nodes.CopyTo(newTreeArray, 0);
                foreach (TreeNode node in newTreeArray)
                {
                    LACTreeNode lacnode = node as LACTreeNode;
                    //   treeView1.Nodes.Add(lacnode.DeepCopy() as TreeNode);
                }*/
            ADUCDirectoryNode rootNode =
            ADUCDirectoryNode.GetDirectoryRoot(_addplugin.GetpluginContext(),          
            _addplugin.GetRootDN(),
            Resources.ADUC, typeof (ADUCPage), _addplugin);

            if (rootNode != null)
            {
                treeView1.Nodes.Add(rootNode);
                ADUCDirectoryNode[] childNodes = rootNode.ListContainerChildren(rootNode);
                if (childNodes != null)
                    rootNode.Nodes.AddRange(childNodes);
                treeView1.ExpandAll();
            }
        }
        else
        {
            Logger.Log("The LWTreeView control does not have any nodes.");
        }
    }
 public LogPropertiesDlg(IPlugInContainer container, StandardPage parentPage, EventlogPlugin plugin,
 ListView lvEvents, EventLogRecord el, EventFilter ef, string pageID)
     : base(container, parentPage)
 {
     InitializeComponent();
     btnApply.Enabled = true;
     this.DataChanged = true;
     _plugin = plugin;
     _container = container;
     this._parentPage = parentPage;
     _eventsListView = lvEvents;
     _el = el;
     _ef = ef;
     sShowPage = pageID;
     if (parentPage != null &&
         parentPage.LMCTree != null &&
         parentPage.LMCTree.SelectedNode != null &&
         !String.IsNullOrEmpty(parentPage.LMCTree.SelectedNode.Text))
     {
         this.Text = parentPage.LMCTree.SelectedNode.Text + " " + "Properties";
     }
     InitializePages();
 }
Example #23
0
 public MPContainer(IPlugInContainer container, StandardPage parentPage)
     : base(container, parentPage)
 {
     Initialize();
     this.Icon = Resources.likewise;
 }
Example #24
0
 public EditDialog(IPlugInContainer container, StandardPage parentPage)
 {
     this.container = container;
     this.parentPage = parentPage;
     InitializeComponent();
 }
Example #25
0
 public EditDialog(IPlugInContainer container, StandardPage parentPage)
 {
     this.container  = container;
     this.parentPage = parentPage;
     InitializeComponent();
 }
Example #26
0
 public EditDialog(StandardPage parentPage)
 {
     this.parentPage = parentPage;
     InitializeComponent();
 }
 public ObjectAddMoreAttributesDlg(IPlugInContainer container, StandardPage parentPage)
 : base(container, parentPage)
 {
 }
Example #28
0
        public void SetViewStyle(StandardPage.ViewStyle view)
        {
            Logger.Log("Manage.SetViewStyle", Logger.manageLogLevel);

            if (currentViewStyle != view)
            {
                currentViewStyle = view;
                if (controlVisible is StandardPage)
                {
                    ((StandardPage)controlVisible).SetViewStyle(view);
                }
            }
        }
        /// <summary>
        /// Shows the Manage form and directs it at a particular
        /// machine.
        /// </summary>
        /// <param name="sHostname">The machine to manage</param>
        /// <param name="viewStyle">The style of list view to use, if a listview is used</param>
        /// <returns>TRUE if was able to manage the given machine. FALSE if a
        ///          network or credential error occured. </returns>
        public bool ManageHost(string sHostname, StandardPage.ViewStyle viewStyle)
        {

            // first, normalize the incoming hostname
            Hostinfo hn = new Hostinfo(sHostname);

            // now, set the host type
            if (!CheckHostInfo(hn))
            {

                string sMsg = string.Format(Resources.Error_InvalidComputerType, sHostname);
                ShowError(sMsg, MessageBoxButtons.OK);
                return false;
            }

            // do this first so that we can do any slow stuff before we start
            // changing pages
            if (!controlManage.ManageHost(hn))
                return false;

            SetViewStyle(viewStyle);

            // show the management control
            ShowManage();

            string str = String.Format(Resources.Connected_As,
                                       hn.creds.UserName,
                                       hn.hostName);

            controlManage.SetStatusMesaage(str, 1);

            return true;
        }
 public void SetViewStyle(StandardPage.ViewStyle view)
 {
     if (currentViewStyle != view)
     {
         currentViewStyle = view;
         controlManage.SetViewStyle(view);
     }
 }
Example #31
0
 public MPContainer(IPlugInContainer container, StandardPage parentPage)
     : base(container, parentPage)
 {
     Initialize();
     this.Icon = Resources.likewise;
 }
Example #32
0
 public ADUserAddDlg(IPlugInContainer container, 
                     StandardPage parentPage, 
                     string text, 
                     ADUCDirectoryNode dirnode, 
                     bool bAcountDisable, 
                     bool bNeverExpiresPwd, 
                     bool bMustChangePwd,
                     bool bUserCannotChange,
                     string copyfrom)
 : this()
 {
     this.IPlugInContainer = container;
     
     this.userInfo = new UserInfo();
     
     if (dirnode != null)
     {
         int ret = -1;
         List<LdapEntry> ldapEntries = null;
         
         ret = dirnode.LdapContext.ListChildEntriesSynchronous
         (dirnode.DistinguishedName,
         LdapAPI.LDAPSCOPE.BASE,
         "(objectClass=*)",
         null,
         false,
         out ldapEntries);
         
         if (ldapEntries == null || ldapEntries.Count == 0)
         {
             return;
         }
         
         LdapEntry ldapNextEntry = ldapEntries[0];
         //As of now we are not getting canonicalName attribute in the list because of paging issue
         //LdapValue[] attr = ldapNextEntry.GetAttributeValues("canonicalName", dirnode.LdapContext);
         //if (attr != null && attr.Length > 0)
         //    this.lblCreatein.Text = "Create in: " + attr[0].stringData;
         
         //As of now we are taking "DistinguishedName" and spliting and displaying it.
         string[] sData = dirnode.DistinguishedName.Split(',');
         string sOutput = "";
         for (int i = sData.Length - 1; i >= 0; i--)
         {
             if (sData[i].ToString().Trim().StartsWith("DC", StringComparison.InvariantCultureIgnoreCase))
             {
                 sOutput = sData[i].ToString().Trim().Substring(3) + "." + sOutput;
             }
             else if (sData[i].ToString().Trim().StartsWith("OU", StringComparison.InvariantCultureIgnoreCase) || sData[i].ToString().Trim().StartsWith("CN", StringComparison.InvariantCultureIgnoreCase))
             {
                 sOutput += "/" + sData[i].ToString().Trim().Substring(3);
             }
         }
         if (sOutput.EndsWith("."))
         {
             sOutput += "/";
         }
         sOutput = sOutput.Replace("./", "/");
         this.userInfo.OUPath = sOutput;
         this.userInfo.domainName = dirnode.LdapContext.DomainName;
     }
     
     this.userInfo.bAcountDisable = bAcountDisable;
     this.userInfo.bMustChangePwd = bMustChangePwd;
     this.userInfo.bNeverExpiresPwd = bNeverExpiresPwd;
     this.userInfo.bCannotChangePwd = bUserCannotChange;
     this.userInfo.copyfrom = copyfrom;
     
     this.Text = text;
     
     this.AddPage(new UserAddWelcomePage(this,dirnode));
     this.AddPage(new UserAddpasswordPage(this));
     this.AddPage(new UserAddFinishPage(this, dirnode));
 }
Example #33
0
 public EditDialog(StandardPage parentPage)
 {
     this.parentPage = parentPage;
     InitializeComponent();
 }