Exemplo n.º 1
0
    private void Show(ViewState st, AccountInfo info = null)
    {
        _mainView.Hide();
        _unlockView.Hide();
        _addView.Hide();
        _setlockView.Hide();
        _settingsView.Hide();

        switch (st)
        {
        case ViewState.Add:
            _addView.Show(info);
            break;

        case ViewState.List:
            _mainView.Show();
            break;

        case ViewState.Unlock:
            _unlockView.Show();
            break;

        case ViewState.SetLock:
            _setlockView.Show();
            break;

        case ViewState.Settings:
            _settingsView.Show();
            break;
        }
    }
Exemplo n.º 2
0
        private void mItem_Settings(Object sender, EventArgs e)
        {
            this.Visibility = Visibility.Collapsed;
            UISettings settings = new UISettings();

            //
            settings.SettingGroups.Add(new String[] { "general" }, new UIGeneral());
            settings.SettingGroups.Add(new String[] { "proxy" }, new UIProxy());
            settings.SettingGroups.Add(new String[] { "providers" }, new UIProviders(this.Providers.AvailableProviders));
            //
            foreach (IProvider provider in this.Providers.AvailableProviders)
            {
                if (provider.getSettingGroups() == null)
                {
                    continue;
                }
                foreach (Uri xamlUri in provider.getSettingGroups())
                {
                    ISettingGroup sGroup = (ISettingGroup)System.Windows.Application.LoadComponent(xamlUri);
                    settings.SettingGroups.Add(new String[] { "providersettings", provider.GetType().ToString() }, sGroup);
                }
            }
            //
            settings.Settings = this.Settings;
            settings.Show();
        }