mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
added group container (#1508)
This commit is contained in:
@@ -44,7 +44,7 @@ export default class MainController implements vscode.Disposable {
|
||||
vscode.window.showInformationMessage(`Clicked from profile ${profile.serverName}.${profile.databaseName}`);
|
||||
});
|
||||
|
||||
vscode.commands.registerCommand('sqlservices.openDialog', () => {
|
||||
vscode.commands.registerCommand('sqlservices.openDialog', () => {
|
||||
this.openDialog();
|
||||
});
|
||||
|
||||
@@ -77,51 +77,49 @@ export default class MainController implements vscode.Disposable {
|
||||
dialog.customButtons = [customButton1, customButton2];
|
||||
tab1.registerContent(async (view) => {
|
||||
let inputBox = view.modelBuilder.inputBox()
|
||||
.withProperties({
|
||||
//width: 300
|
||||
})
|
||||
.component();
|
||||
let inputBox2 = view.modelBuilder.inputBox()
|
||||
.component();
|
||||
.withProperties({
|
||||
//width: 300
|
||||
}).component();
|
||||
let inputBox2 = view.modelBuilder.inputBox().component();
|
||||
|
||||
let checkbox = view.modelBuilder.checkBox()
|
||||
.withProperties({
|
||||
label: 'Copy-only backup'
|
||||
})
|
||||
.component();
|
||||
.withProperties({
|
||||
label: 'Copy-only backup'
|
||||
})
|
||||
.component();
|
||||
checkbox.onChanged(e => {
|
||||
console.info("inputBox.enabled " + inputBox.enabled);
|
||||
inputBox.enabled = !inputBox.enabled;
|
||||
console.info("inputBox.enabled " + inputBox.enabled);
|
||||
inputBox.enabled = !inputBox.enabled;
|
||||
});
|
||||
let button = view.modelBuilder.button()
|
||||
.withProperties({
|
||||
label: '+'
|
||||
}).component();
|
||||
.withProperties({
|
||||
label: '+'
|
||||
}).component();
|
||||
let button3 = view.modelBuilder.button()
|
||||
.withProperties({
|
||||
label: '-'
|
||||
.withProperties({
|
||||
label: '-'
|
||||
|
||||
}).component();
|
||||
}).component();
|
||||
let button2 = view.modelBuilder.button()
|
||||
.component();
|
||||
.component();
|
||||
button.onDidClick(e => {
|
||||
inputBox2.value = 'Button clicked';
|
||||
inputBox2.value = 'Button clicked';
|
||||
});
|
||||
let dropdown = view.modelBuilder.dropDown()
|
||||
.withProperties({
|
||||
value: 'Full',
|
||||
values: ['Full', 'Differential', 'Transaction Log']
|
||||
})
|
||||
.component();
|
||||
.withProperties({
|
||||
value: 'Full',
|
||||
values: ['Full', 'Differential', 'Transaction Log']
|
||||
})
|
||||
.component();
|
||||
let f = 0;
|
||||
inputBox.onTextChanged((params) => {
|
||||
vscode.window.showInformationMessage(inputBox.value);
|
||||
vscode.window.showInformationMessage(inputBox.value);
|
||||
f = f + 1;
|
||||
inputBox2.value = f.toString();
|
||||
});
|
||||
dropdown.onValueChanged((params) => {
|
||||
vscode.window.showInformationMessage(inputBox2.value);
|
||||
inputBox.value = dropdown.value;
|
||||
vscode.window.showInformationMessage(inputBox2.value);
|
||||
inputBox.value = dropdown.value;
|
||||
});
|
||||
let radioButton = view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
@@ -136,43 +134,65 @@ export default class MainController implements vscode.Disposable {
|
||||
value: 'option2',
|
||||
name: 'radioButtonOptions',
|
||||
label: 'Option 2'
|
||||
|
||||
//width: 300
|
||||
}).component();
|
||||
let inputBox3 = view.modelBuilder.inputBox().component();
|
||||
let inputBox4 = view.modelBuilder.inputBox().component();
|
||||
let form2Model = view.modelBuilder.formContainer()
|
||||
.withFormItems([{
|
||||
component: inputBox3,
|
||||
title: 'inputBox3'
|
||||
}, {
|
||||
component: inputBox4,
|
||||
title: 'inputBox4'
|
||||
}], {
|
||||
horizontal: true
|
||||
}).component();
|
||||
let groupModel1 = view.modelBuilder.groupContainer()
|
||||
.withLayout({
|
||||
}).withItems([
|
||||
form2Model
|
||||
]).component();
|
||||
radioButton.onDidClick(() => {
|
||||
inputBox.value = radioButton.value;
|
||||
groupModel1.enabled = true;
|
||||
});
|
||||
radioButton2.onDidClick(() => {
|
||||
inputBox.value = radioButton.value;
|
||||
groupModel1.enabled = false;
|
||||
});
|
||||
|
||||
let flexRadioButtonsModel = view.modelBuilder.flexContainer()
|
||||
.withLayout({
|
||||
flexFlow: 'column',
|
||||
alignItems: 'left',
|
||||
justifyContent: 'space-evenly',
|
||||
height: 50
|
||||
}).withItems([
|
||||
radioButton, radioButton2]
|
||||
radioButton, groupModel1, radioButton2]
|
||||
, { flex: '1 1 50%' }).component();
|
||||
let formModel = view.modelBuilder.formContainer()
|
||||
.withFormItems([{
|
||||
component: inputBox,
|
||||
title: 'Backup name'
|
||||
.withFormItems([{
|
||||
component: inputBox,
|
||||
title: 'Backup name'
|
||||
}, {
|
||||
component: inputBox2,
|
||||
title: 'Recovery model'
|
||||
component: inputBox2,
|
||||
title: 'Recovery model'
|
||||
}, {
|
||||
component: dropdown,
|
||||
title: 'Backup type'
|
||||
component: dropdown,
|
||||
title: 'Backup type'
|
||||
}, {
|
||||
component: checkbox,
|
||||
title: ''
|
||||
component: checkbox,
|
||||
title: ''
|
||||
}, {
|
||||
component: inputBox2,
|
||||
title: 'Backup files',
|
||||
actions: [button, button3]
|
||||
component: inputBox2,
|
||||
title: 'Backup files',
|
||||
actions: [button, button3]
|
||||
}, {
|
||||
component: flexRadioButtonsModel,
|
||||
title: 'Options'
|
||||
component: flexRadioButtonsModel,
|
||||
title: 'Options'
|
||||
}], {
|
||||
horizontal: false,
|
||||
//width: 500,
|
||||
componentWidth: 400
|
||||
}).component();
|
||||
horizontal: false,
|
||||
componentWidth: 400
|
||||
}).component();
|
||||
await view.initializeModel(formModel);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user