Example #1
0
 public void Dispose()
 {
     if (statusBar != null)
     {
         statusBar.Dispose();
         statusBar = null;
     }
 }
Example #2
0
 public SdStatusBarService(SdStatusBar statusBar)
 {
     if (statusBar == null)
     {
         throw new ArgumentNullException("statusBar");
     }
     this.statusBar = statusBar;
 }
Example #3
0
        public static void SetCaretPosition(int x, int y, int charOffset)
        {
            ToolStripStatusLabel lblServer    = new ToolStripStatusLabel();
            ToolStripStatusLabel lblOperation = new ToolStripStatusLabel();
            ToolStripStatusLabel lblDate      = new ToolStripStatusLabel();
            ToolStripStatusLabel lblUserName  = new ToolStripStatusLabel();

            lblServer.Text    = StringParser.Parse("${res:Global.RemotingServer}") + ":" + PropertyService.Get("SITE");
            lblOperation.Text = StringParser.Parse("${res:Global.Operator}") + PropertyService.Get("USER_NAME");              //工号
            lblDate.Text      = StringParser.Parse("${res:Global.LoginTime}") + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            lblUserName.Text  = StringParser.Parse("${res:Global.Name}") + PropertyService.Get(PROPERTY_FIELDS.USER_NAME_MZ); //姓名

            if (statusBar == null)
            {
                statusBar = new SdStatusBar();
            }
            if (statusBar.Items.Count > 0)
            {
                statusBar.Items.Clear();
            }
            statusBar.Items.Add(lblServer);
            statusBar.Items.Add(new ToolStripSeparator());
            statusBar.Items.Add(lblOperation);
            statusBar.Items.Add(new ToolStripSeparator());
            statusBar.Items.Add(lblUserName);
            statusBar.Items.Add(new ToolStripSeparator());
            statusBar.Items.Add(lblDate);
            //statusBar.CursorStatusBarPanel.Text = StringParser.Parse(
            // StringParser.Parse("${res:Global.RemotingServer}") + ":" + PropertyService.Get("Site") + " " + StringParser.Parse("${res:Global.Operator}") +
            // PropertyService.Get(PROPERTY_FIELDS.USER_NAME) + " " + StringParser.Parse("${res:Global.OperateTime}") + DateTime.Now.ToString("yyyy-MM-dd"),
            //   new string[,] {
            //        {"Line", String.Format("{0,-10}", y)},
            //        {"Column", String.Format("{0,-5}", x)},
            //        {"Character", String.Format("{0,-5}", charOffset)}
            //    });
        }
Example #4
0
 public DefaultStatusBarService()
 {
     statusBar = new SdStatusBar(this);
 }
Example #5
0
 internal static void Initialize()
 {
     statusBar = new SdStatusBar();
 }