Interaction logic for ExclusionConntrol.xaml
Inheritance: System.Windows.Controls.UserControl
Beispiel #1
0
        private void HandleItemSelected(System.Windows.Forms.TreeNode selectedTreeNode)
        {
            var file = GlueState.Self.CurrentReferencedFileSave;

            if (file == null)
            {
                base.RemoveTab();
            }
            else if (GlueState.Self.SyncedProjects.Count() != 0)
            {
                if (control == null)
                {
                    control   = new ExclusionControl();
                    pluginTab = base.AddToTab(PluginManager.CenterTab, control, "Platform Inclusions");
                }
                else
                {
                    base.AddTab();
                }

                FileExclusionViewModel viewModel = new FileExclusionViewModel();
                viewModel.PropertyChanged += HandlePropertyChanged;
                viewModel.SetFrom(file);

                UpdateTabTitle(file);

                control.DataContext = viewModel;
            }
        }
Beispiel #2
0
        private void HandleItemSelected(System.Windows.Forms.TreeNode selectedTreeNode)
        {
            var file = GlueState.Self.CurrentReferencedFileSave;

            if (file == null)
            {
                base.RemoveTab();
            }
            else if(GlueState.Self.SyncedProjects.Count() != 0)
            {
                if (control == null)
                {
                    control = new ExclusionControl();
                    pluginTab = base.AddToTab(PluginManager.LeftTab, control, "Platform Inclusions");
                }
                else
                {
                    base.AddTab();
                }

                FileExclusionViewModel viewModel = new FileExclusionViewModel();
                viewModel.PropertyChanged += HandlePropertyChanged;
                viewModel.SetFrom(file);

                UpdateTabTitle(file);

                control.DataContext = viewModel;

            }
        }