private void ShowConfig_Click(object sender, RoutedEventArgs e)
        {
            listView.SelectedItem = ((System.Windows.Controls.Button)sender).DataContext;
            string path      = configList[listView.SelectedIndex].Path;
            bool   canModify = (
                configList[listView.SelectedIndex].ConfigName == "本地配置文件" ||
                configList[listView.SelectedIndex].ConfigName == "远端配置文件") ? false : true;


            ConfigDetailsView configDetailsView = new ConfigDetailsView(parent);

            configDetailsView.showDetails(path, canModify);
            parent.addItem(configDetailsView, configList[listView.SelectedIndex].ConfigName);
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            UrlView.url        = ConfigManager.ReadUrlConfig(); // 读取UrlConfig.config文件中的url
            configListView     = new ConfigListView(this);
            configDetailsView  = new ConfigDetailsView(this);
            configCreationView = new ConfigCreationView(this);

            TabItem item = new TabItem();

            item.Header = "配置文件列表";
            Frame tabFrame = new Frame();

            tabFrame.Content = configListView;
            item.Content     = tabFrame;

            tabConrol.Items.Add(item);
        }