예제 #1
0
파일: MainPlugin.cs 프로젝트: derKosi/Gum
        private void CreateControl()
        {
            control   = new Views.CodeWindow();
            viewModel = new ViewModels.CodeWindowViewModel();

            control.CodeOutputSettingsPropertyChanged += (not, used) => HandleCodeOutputPropertyChanged();
            control.GenerateCodeClicked += (not, used) => HandleGenerateCodeButtonClicked();
            viewModel.PropertyChanged   += (not, used) => RefreshCodeDisplay();

            control.DataContext = viewModel;

            GumCommands.Self.GuiCommands.AddControl(control, "Code", TabLocation.Right);
        }
예제 #2
0
파일: MainPlugin.cs 프로젝트: patridge/Gum
        private void CreateControl()
        {
            control   = new Views.CodeWindow();
            viewModel = new ViewModels.CodeWindowViewModel();

            control.CodeOutputSettingsPropertyChanged += (not, used) => HandleCodeOutputPropertyChanged();
            control.GenerateCodeClicked += (not, used) => HandleGenerateCodeButtonClicked();
            viewModel.PropertyChanged   += (not, used) => RefreshCodeDisplay();

            control.DataContext = viewModel;

            // We don't actually want it to show, just associate, so add and immediately remove.
            // Eventually we want this to be done with a single call but I don't know if there's Gum
            // support for it yet
            GumCommands.Self.GuiCommands.AddControl(control, "Code", TabLocation.RightBottom);
        }