Пример #1
0
        private void OnAccountDialogDestroyedEvent(object o, EventArgs args)
        {
            AccountDialog accDialog = (AccountDialog)o;

            if (accDialog != null)
            {
                string domainID = accDialog.DomainID;
                if (domainID != null && detailsDialogs.ContainsKey(domainID))
                {
                    detailsDialogs.Remove(domainID);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Event Handler for Details Clicked
        /// </summary>
        private void OnDetailsClicked(object o, EventArgs args)
        {
            TreeSelection tSelect = AccTreeView.Selection;

            if (tSelect.CountSelectedRows() == 1)
            {
                TreeModel tModel;
                TreeIter  iter;

                tSelect.GetSelected(out tModel, out iter);
                string            domainID = (string)tModel.GetValue(iter, 0);
                DomainInformation dom      = domainController.GetDomain(domainID);

                AccountDialog accDialog = null;
                if (detailsDialogs.ContainsKey(domainID))
                {
                    accDialog = (AccountDialog)detailsDialogs[domainID];
                    accDialog.Present();
                }
                else
                {
                    IDomainProviderUI provider = domainProviderUI.GetProviderForID(domainID);
                    if (provider != null)
                    {
                        accDialog = provider.CreateAccountDialog(topLevelWindow, dom);
                    }
                    else
                    {
                        accDialog = new EnterpriseAccountDialog(topLevelWindow, dom);
                    }

                    if (accDialog != null)
                    {
                        detailsDialogs[domainID] = accDialog;
                        accDialog.SetPosition(WindowPosition.Center);
                        accDialog.Destroyed +=
                            new EventHandler(OnAccountDialogDestroyedEvent);

                        accDialog.ShowAll();
                    }
                }
            }
        }
Пример #3
0
 private void OnDetailsClicked(object o, EventArgs args)
 {
     TreeSelection tSelect = AccTreeView.Selection;
        if(tSelect.CountSelectedRows() == 1)
        {
     TreeModel tModel;
     TreeIter iter;
     tSelect.GetSelected(out tModel, out iter);
     string domainID = (string) tModel.GetValue(iter, 0);
     DomainInformation dom = domainController.GetDomain(domainID);
     AccountDialog accDialog = null;
     if (detailsDialogs.ContainsKey(domainID))
     {
      accDialog = (AccountDialog) detailsDialogs[domainID];
      accDialog.Present();
     }
     else
     {
      accDialog = new AccountDialog(dom);
      detailsDialogs[domainID] = accDialog;
      accDialog.SetPosition(WindowPosition.Center);
      accDialog.Destroyed +=
        new EventHandler(OnAccountDialogDestroyedEvent);
      accDialog.ShowAll();
     }
        }
 }