コード例 #1
0
ファイル: ADPermissions.cs プロジェクト: gsool/cameyo
        private void listBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            if (listBox.SelectedIndex == -1)
            {
                System.ComponentModel.ComponentResourceManager localResources =
                    new System.ComponentModel.ComponentResourceManager(typeof(ADPermissionsForm));
                btnAddSave.Text = localResources.GetString("btnAddSave.Text");
                txtCmd.Text     = "";
                return;
            }
            btnAddSave.Text = PackageEditor.Messages.Messages.btnApply;
            ADEntity entity = curEntities[listBox.SelectedIndex];

            txtCmd.Text = entity.name;
        }
コード例 #2
0
ファイル: ADPermissions.cs プロジェクト: gsool/cameyo
        private void PropertyToADEntities(String inPropertyName, List <ADEntity> outEntities)
        {
            String inPropertyValue = "";

            virtPackage.GetProperty(inPropertyName, ref inPropertyValue);

            String[] values = inPropertyValue.Split(';');
            foreach (String value in values)
            {
                if (value == "")
                {
                    continue;
                }
                var newEntity = new ADEntity(value);
                outEntities.Add(newEntity);
            }
        }
コード例 #3
0
ファイル: ADPermissions.cs プロジェクト: gsool/cameyo
        private void btnAddSave_Click(object sender, EventArgs e)
        {
            int saveSelectedIndex = listBox.SelectedIndex;

            System.ComponentModel.ComponentResourceManager localResources = new System.ComponentModel.ComponentResourceManager(typeof(CustomEventsForm));
            if (txtCmd.Text.Trim() == "")
            {
                MessageBox.Show("Please enter a valid name");
                return;
            }
            int selectedIndex = listBox.SelectedIndex;

            if (listBox.SelectedIndex == -1)
            {
                curEntities.Add(new ADEntity(txtCmd.Text));
            }
            else
            {
                ADEntity entity = curEntities[listBox.SelectedIndex];
                entity.name = txtCmd.Text;
            }
            RefreshDisplay();
            //listBox.SelectedIndex = -1;   // Force refresh
        }
コード例 #4
0
ファイル: ADPermissions.cs プロジェクト: dream1986/cameyo
        private void PropertyToADEntities(String inPropertyName, List<ADEntity> outEntities)
        {
            String inPropertyValue = "";
            virtPackage.GetProperty(inPropertyName, ref inPropertyValue);

            String[] values = inPropertyValue.Split(';');
            foreach (String value in values)
            {
                if (value == "") continue;
                var newEntity = new ADEntity(value);
                outEntities.Add(newEntity);
            }
        }