コード例 #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);
        }