コード例 #1
0
 private async void Window_Loaded(object sender, RoutedEventArgs e)
 {
     AcrylicEffect.EnableBlur(this);
     if (await CheckLogin())
     {
         LoginHelper.APIclient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(Properties.Settings.Default.TokenType, Properties.Settings.Default.AccessToken);
         MyToolBar.ToMineBtn.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
         MyToolBar.GetUser();
     }
 }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ControlReSize reSize = new ControlReSize(PR_Panel);

            //加载自定义的菜单栏
            axMxDrawX1.Iniset = "./mxmenu.mnu";
            axMxDrawX1.Call("Mx_ReLoadMenu", $@"{Directory.GetCurrentDirectory()}\mxmenu.mnu");
            //axMxDrawX1.LoadToolBar("Toolkip_toolbar.mxt",true);
            axMxDrawX1.OpenDwgFile(@"D:\好蓝图平面CAD钢筋\测试\试验图纸\S-2#-08屋面层梁平法施工图.dwg");
            //TreeView测试
            //tree_project.Nodes.Add("测试项目");//根节点
            _TestData = new Project_Tree(ref tree_project, ref tree_drawing);
            bar_state = new MyToolBar(ref _TestData, ref axMxDrawX1);
            //_TestData.StructTree();
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MyShell"/> class.
        /// </summary>
        public MyShell()
        {
            this.defaultMenu      = new MyMenu();
            this.defaultToolBar   = new MyToolBar();
            this.defaultStatusBar = new DefaultStatusBar();
            this.viewContent      = new ContentControl();

            // Bind the content property to the content control's content property
            Binding contentBinding = new Binding(DefaultView.ContentProperty.Name);

            contentBinding.Source = this;
            BindingOperations.SetBinding(this.viewContent, ContentControl.ContentProperty, contentBinding);

            this.Children.Add(this.defaultMenu);
            this.Children.Add(this.defaultToolBar);
            this.Children.Add(this.defaultStatusBar);
            this.Children.Add(this.viewContent);
        }