コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Elliesaur/Confuser
        public MainWindow()
        {
            InitializeComponent();
            this.Width = 800; this.Height = 600;

            //=_=||
            Tab.ApplyTemplate();
            TabPanel panel = Tab.Template.FindName("HeaderPanel", Tab) as TabPanel;

            panel.SetBinding(TabPanel.IsEnabledProperty, new Binding()
            {
                Path = new PropertyPath(EnabledNavigationProperty), Source = this
            });

            menu = FindResource("dropMenu") as ContextMenu;
            menu.PlacementTarget = drop;
            menu.Placement       = PlacementMode.Bottom;
            (menu.Items[0] as MenuItem).Click += DbViewer_Click;
            (menu.Items[1] as MenuItem).Click += StackDecoder_Click;
            (menu.Items[2] as MenuItem).Click += About_Click;

            IPage page;

            page = new Asms();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Settings();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Rules();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Progress();
            page.Init(this);
            Tab.Items.Add(page);

            Project = new Prj();
            foreach (ConfuserTab i in Tab.Items)
            {
                i.InitProj();
            }
            Project.PropertyChanged += new PropertyChangedEventHandler(ProjectChanged);
            ProjectChanged(Project, new PropertyChangedEventArgs(""));
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: n017/Confuser
        public MainWindow()
        {
            InitializeComponent();
            this.Width = 800; this.Height = 600;

            //=_=||
            Tab.ApplyTemplate();
            TabPanel panel = Tab.Template.FindName("HeaderPanel", Tab) as TabPanel;
            panel.SetBinding(TabPanel.IsEnabledProperty, new Binding() { Path = new PropertyPath(EnabledNavigationProperty), Source = this });

            menu = FindResource("dropMenu") as ContextMenu;
            menu.PlacementTarget = drop;
            menu.Placement = PlacementMode.Bottom;
            (menu.Items[0] as MenuItem).Click += DbViewer_Click;
            (menu.Items[1] as MenuItem).Click += StackDecoder_Click;
            (menu.Items[2] as MenuItem).Click += About_Click;

            IPage page;

            page = new Asms();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Settings();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Rules();
            page.Init(this);
            Tab.Items.Add(page);

            page = new Progress();
            page.Init(this);
            Tab.Items.Add(page);

            Project = new Prj();
            foreach (ConfuserTab i in Tab.Items)
                i.InitProj();
            Project.PropertyChanged += new PropertyChangedEventHandler(ProjectChanged);
            ProjectChanged(Project, new PropertyChangedEventArgs(""));
        }