public AddInToolBarWiewModel(FrmToolBar toolbar)
 {
     this.toolbar = toolbar;
 }
Exemplo n.º 2
0
        /// <summary>
        /// 刷新工具栏
        /// </summary>
        void SetToolBar()
        {
            if (null == toolBar)
            {
                LogManager.SystemLog.DebugFormat("null == toolBar");
                Dispatcher.Invoke(new Action(() =>
                {
                    toolBar = new FrmToolBar(this);

                    if (scaleUIX == 1)
                    {
                        WinDPIAdapter();
                    }
                    else
                    {
                        toolBar.LabState.Location = new System.Drawing.Point((int)(355 * scaleUIX), 25);
                        toolBar.LabState.Size = new System.Drawing.Size(157, 18);
                    }

                    toolBar.Show();

                    SetToolBarTip();
                    iToolBarHandle = toolBar.Handle;
                    SetParent(iToolBarHandle, iMainWpfHandle);
                    MoveWindow(iToolBarHandle, 0, (int)((WPFHeight - iToolBarHeightOff) * scaleUIY), (int)(WPFWidth * scaleUIX), (int)(iToolBarWidthOff * scaleUIX), true);
                    toolBar.Visible = true;
                    toolBar.toolCallClick = new Action(ToolCallClicked);
                    toolBar.toolCallOver = new Action(ToolCallOver);

                    InvokeWinReSize();//强制刷新画面,DPI非97时需要
                    if (SingletonObj.LoginInfo == null || SingletonObj.LoginInfo.UserID == string.Empty)
                    {
                        StartLoginUC();
                    }
                    else
                    {
                        toolBar.BtnSetting.Visible = true;
                    }
                }));
            }
            else
            {
                LogManager.SystemLog.DebugFormat("toolBar.Visible = true");
                Dispatcher.Invoke(new Action(() => { toolBar.Visible = true; }));
            }

        }
Exemplo n.º 3
0
 public AddInToolBarWiewModel(FrmToolBar toolbar)
 {
     this.toolbar = toolbar;
 }