Exemplo n.º 1
0
        private void OpenPostBuildStep_Click(object sender, RoutedEventArgs e)
        {
            Button             openButton     = (Button)sender;
            SolutionObjectView solutionObject = openButton.DataContext as SolutionObjectView;
            var dialog = new StringQueryDialog("Enter command:", "Postbuild step")
            {
                Owner = this
            };

            dialog.Width       = Width * 0.8;
            dialog.QueryString = solutionObject.PostBuildStep;
            if (dialog.ShowDialog() == true)
            {
                solutionObject.PostBuildStep = dialog.QueryString;
            }
        }
Exemplo n.º 2
0
        private void NewDistributionTarget_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new StringQueryDialog("Enter Target name:")
            {
                Owner = this
            };

            if (dialog.ShowDialog() == true)
            {
                String          name       = dialog.QueryString;
                View.MainWindow mainWindow = (View.MainWindow)System.Windows.Application.Current.MainWindow;
                if (mainWindow != null)
                {
                    mainWindow.ViewModel.DistributionTargetMap.Add(name, "");
                }
            }
        }
Exemplo n.º 3
0
        private void MnuCopyTab_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new StringQueryDialog("Enter Tab name:")
            {
                Owner = this
            };

            if (dialog.ShowDialog() == true)
            {
                String       tabName         = dialog.QueryString;
                BuildTabItem originalTab     = tabs.SelectedItem as BuildTabItem;
                String       originalBaseDir = originalTab.BaseDir;
                String       newBaseDir      = originalBaseDir.Replace(originalTab.TabName, tabName);
                BuildTabItem tab             = new BuildTabItem()
                {
                    TabName = tabName, BaseDir = newBaseDir, BaseOptions = originalTab.BaseOptions
                };
                var clonedList = _Model.Scope2SolutionObjects[originalTab.TabName].Select(obj => (SolutionObject)obj.Clone()).ToList();
                _Model.Scope2SolutionObjects[tabName] = new System.Collections.ObjectModel.ObservableCollection <SolutionObject>(clonedList);
                tab.BindToModel(ref _Model, ref _ViewModel);
                _ViewModel.Tabs.Add(tab);
            }
        }