Ejemplo n.º 1
0
        public VisualEditDungeonEx(SqlConnection Conn, Class1 parentClass, string RootDir, bool bImageSupport, int nFont)
        {
            InitializeComponent();

            m_bImageSupport = bImageSupport;
            m_Root = RootDir;
            m_bHasChanged = false;
            m_Parent = parentClass;
            m_strTabName = "tbl_Guide_Dungeon";
            m_Conn = Conn;
            m_LastTags = new Object[2];
			m_nDefFont = nFont;
            font = new FontHelper(m_Root + FontFile, m_Root + FontListFile, m_Root + ColorFile, m_Root);

            string[] FontNames = font.GetAllFontName();

            
            foreach (string strName in FontNames)
            {
                FontBox.Items.Add(strName);
            }
            FontBox.Items.Add("默认(" + m_nDefFont.ToString() + ")");

            m_nLastLength = 0;
            MarkArray = new ArrayList();
            ImageArray = new ArrayList();
            LinkArray = new ArrayList();

            defFont = font.GetFontByID(m_nDefFont);
            defColor = font.GetColorByID(m_nDefFont);
            textBox.SelectionColor = defColor;
            textBox.SelectionFont = defFont;

            refreshText();
        }
Ejemplo n.º 2
0
        public VisualEditEx(string strOld, StringBuilder newString, SqlConnection Conn, Form parentForm, string RootDir, bool bImageSupport, int nDefFont)
        {
            InitializeComponent();

            m_bImageSupport = bImageSupport;
            Code = strOld;
            m_Root = RootDir;
            m_newString = newString;
            m_nDefFont = nDefFont;

            font = new FontHelper(m_Root + FontFile, m_Root + FontListFile, m_Root + ColorFile, m_Root);

            string[] FontNames = font.GetAllFontName();

            
            foreach (string strName in FontNames)
            {
                FontBox.Items.Add(strName);
            }
            FontBox.Items.Add("默认(" + m_nDefFont.ToString() +" )");

            m_nLastLength = 0;
            MarkArray = new ArrayList();
            ImageArray = new ArrayList();

            defFont = font.GetFontByID(m_nDefFont);
            defColor = font.GetColorByID(m_nDefFont);
            textBox.SelectionFont = defFont;
            textBox.SelectionColor = defColor;

            refreshText();
        }