示例#1
0
        private static PluginTextStyle ParsePluginTextStyle(string text)
        {
            PluginTextStyle textStyle = new PluginTextStyle();

            string[] styles = text.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            if (styles.Length > 0)
            {
                textStyle.Text = styles[0];
            }
            if (styles.Length > 1)
            {
                textStyle.ToolTipText = styles[1];
            }
            if (styles.Length > 2)
            {
                textStyle.Image = styles[2];
            }
            if (styles.Length > 3)
            {
                textStyle.ButtonType = styles[3];
            }
            if (styles.Length > 4)
            {
                textStyle.ShortKey = styles[4];
            }
            if (styles.Length > 5)
            {
                textStyle.Tag = styles[5];
            }
            return(textStyle);
        }
示例#2
0
 private static PluginTextStyle ParsePluginTextStyle(string text)
 {
     PluginTextStyle textStyle = new PluginTextStyle();
     string[] styles = text.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
     if (styles.Length > 0)
         textStyle.Text = styles[0];
     if (styles.Length > 1)
         textStyle.ToolTipText = styles[1];
     if (styles.Length > 2)
         textStyle.Image = styles[2];
     if (styles.Length > 3)
         textStyle.ButtonType = styles[3];
     if (styles.Length > 4)
         textStyle.ShortKey = styles[4];
     if (styles.Length > 5)
         textStyle.Tag = styles[5];
     return textStyle;
 }