Пример #1
0
        private void BtnPackages()
        {
            PManageDependencies ManageDependenciesWindow = new PManageDependencies();

            ManageDependenciesWindow.Title = "Manage Packages";
            switch (CurrentType)
            {
            case DBItemType.Template:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Package, currentTemplate());
                break;

            case DBItemType.Macro:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Package, currentMacro());
                break;

            case DBItemType.Meta:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Package, currentMeta());
                break;

            case DBItemType.Environment:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Package, currentEnvironment());
                break;

            default:
                break;
            }

            ManageDependenciesWindow.Show();
        }
Пример #2
0
        private void BtnEnvs()
        {
            PManageDependencies ManageDependenciesWindow = new PManageDependencies();

            ManageDependenciesWindow.Title = "Manage Environments";
            switch (CurrentType)
            {
            case DBItemType.Template:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Environment, currentTemplate());
                break;

            case DBItemType.Meta:
                ManageDependenciesWindow.DataContext = new VMDependencyManagment(DBItemType.Environment, currentMeta());
                break;

            default:
                break;
            }
            ManageDependenciesWindow.ShowDialog();
        }