public void Dispose() { if (statusBar != null) { statusBar.Dispose(); statusBar = null; } }
public SdStatusBarService(SdStatusBar statusBar) { if (statusBar == null) { throw new ArgumentNullException("statusBar"); } this.statusBar = statusBar; }
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)} // }); }
public DefaultStatusBarService() { statusBar = new SdStatusBar(this); }
internal static void Initialize() { statusBar = new SdStatusBar(); }