Example #1
0
 public void WriteMessage(int nCode)
 {
     listInformation.Items.Add(m_pSKCenter.SKCenterLib_GetReturnCodeMessage(nCode));
     listInformation.SelectedIndex = listInformation.Items.Count - 1;
     //Graphics g = listInformation.CreateGraphics();
     //int hzSize = (int)g.MeasureString(listInformation.Items[listInformation.Items.Count - 1].ToString(), listInformation.Font).Width;
     //listInformation.HorizontalExtent = hzSize;
 }
Example #2
0
        public void WriteMessage(int nCode)
        {
            listInformation.Items.Add(m_pSKCenter.SKCenterLib_GetReturnCodeMessage(nCode));

            listInformation.SelectedIndex = listInformation.Items.Count - 1;

            //listInformation.HorizontalScrollbar = true;

            // Create a Graphics object to use when determining the size of the largest item in the ListBox.
            Graphics g = listInformation.CreateGraphics();

            // Determine the size for HorizontalExtent using the MeasureString method using the last item in the list.
            int hzSize = (int)g.MeasureString(listInformation.Items[listInformation.Items.Count - 1].ToString(), listInformation.Font).Width;

            // Set the HorizontalExtent property.
            listInformation.HorizontalExtent = hzSize;
        }
Example #3
0
 void OnActionExecuted(string action)
 {
     this.strMsg = m_pSKCenter.SKCenterLib_GetReturnCodeMessage(this.m_nCode);
     OnActionExecuted(new ActionEventArgs(action, this.m_nCode.ToString(), this.strMsg));
 }