Esempio n. 1
0
        public EditListWindow(EditListType type)
        {
            this._type = type;

            this.InitializeComponent();
            this.HasSelection = false;

            switch (type)
            {
                case EditListType.Profile:
                    this._collection = SettingsManager.Settings.Profiles;
                    this.Title = "Manage Profiles";
                    break;
                case EditListType.Account:
                    this._collection = SettingsManager.Settings.Accounts;
                    this.Title = "Manage Accounts";
                    break;
                case EditListType.Database:
                    this._collection = SettingsManager.Settings.Databases;
                    this.Title = "Manage Databases";
                    this.AddButton.ContextMenu = this.Resources["AdvancedContextMenu"] as ContextMenu;
                    break;
            }

            this.ItemsListBox.SelectionChanged += this.ItemsListBox_SelectionChanged;
            this.Closing += this.EditListWindow_Closing;

            this.RefreshList();
        }
Esempio n. 2
0
 private void ShowList(EditListType type)
 {
     var profiles = new EditListWindow(type) {Owner = this};
     profiles.ShowDialog();
 }