Пример #1
0
        private void addPlugin_Click(object sender, RoutedEventArgs e)
        {
            AddPluginWindow window = new AddPluginWindow();

            window.Owner = this;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.ShowDialog();
        }
 private void addPlugin_Click(object sender, RoutedEventArgs e) {
     var window = new AddPluginWindow();
     window.Owner = this;
     window.Top = 10;
     window.Left = this.Left + 50;
     if (window.Left + window.Width > SystemParameters.WorkArea.Width) window.Left = SystemParameters.WorkArea.Width - window.Width - 5;
     if (window.Left < 0) window.Left = 5;
     if (SystemParameters.WorkArea.Height - 10 < (window.Height)) window.Height = SystemParameters.WorkArea.Height - 10;
     window.ShowDialog();
     Async.Queue("Refresh after plugin add", () => RefreshEntryPoints(true));
     var current = pluginList.SelectedIndex;
     PluginManager.Instance.RefreshInstalledPlugins(); //refresh list
     if (current > pluginList.Items.Count) current = pluginList.Items.Count;
     pluginList.SelectedIndex = current;
 }
Пример #3
0
 private void addPlugin_Click(object sender, RoutedEventArgs e)
 {
     AddPluginWindow window = new AddPluginWindow();
     window.Owner = this;
     window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     window.ShowDialog();
 }