Ejemplo n.º 1
0
        public RichAndCode()
        {
            InitializeComponent();

            cw                   = new CodeWindow();
            cw.Dock              = DockStyle.Fill;
            txtTextEditor.KeyUp += RichAndCode_KeyUp;
            cw.KeyUp            += RichAndCode_KeyUp;
            tcMain.KeyUp        += RichAndCode_KeyUp;
            tpCodeEdit.Controls.Add(cw);
        }
Ejemplo n.º 2
0
 private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (p != null)
     {
         pnlMain.Controls.Clear();
         if (cmbType.SelectedIndex == 0)
         {
             previousType = 0;
             var richCode = new RichAndCode();
             richCode.onKeyUp += onKeyUp;
             pnlMain.Controls.Add(richCode);
             PopulateList("Passages");
         }
         else if (cmbType.SelectedIndex == 1)
         {
             previousType = 1;
             var code = new CodeWindow();
             code.KeyUp += onKeyUp;
             pnlMain.Controls.Add(code);
             PopulateList("Game Events");
         }
     }
 }