Ejemplo n.º 1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     Init();
     //数据获取前后操作
     DgetSourceModel = new DgetSourceModel(this.richTextBoxEx1, this);
     DgetTextFromQQ  = new DQQOperation(this);
     textBoxEx1.SetDgetSourceModel(DgetSourceModel);
     richTextBoxEx1.SetInit(TypeData.Instance);
     richTextBoxEx1.SetDgetSourceModel(DgetSourceModel);
     TypeData.Instance.Init    += (o, args) => this.Activate();
     DgetSourceModel.TypeEnd   += DgetSourceModel_TypeEnd;
     DgetSourceModel.TypeStart += DgetSourceModel_TypeStart;
     //获取群
     GroupOprationModel.Instance.RefreshGroup();
     //启动输入法
     this.InputOperationModel = new InputOperationModel(this.textBoxEx1.Handle);
     //this.InputOperationModel.InputLan(TypeData.Instance.GetTypeAchievement().AchievementDic["输入法"].TypeData.关连值.ToString());
 }
Ejemplo n.º 2
0
 public void SetDgetSourceModel(DgetSourceModel dgetSourceModel)
 {
     this.DgetSourceModel = dgetSourceModel;
     //跟打完成时 设为只读
     DgetSourceModel.TypeEnd += (info, time) => this.ReadOnly = true;
     //跟打开始时 设为可写
     TypeData.Instance.Init += (sender, args) =>
     {
         this.TextChanged -= TextBoxEx_TextChanged;
         this.ResetText();
         this.ReadOnly  = false;
         this.MaxLength = TypeData.Instance.TypeText.Length;
         Array.Clear(_last, 0, 2);
         this.TextChanged          += TextBoxEx_TextChanged;
         TypeData.Instance.Progress = 0;
         TypeFlag = 0;
         TempData.Instance.BackReport.Clear();
         TempData.Instance.TypeReport.Clear();
         this.Focus();
     };
     //主题
     Font      = GlobalModel.Instance.Theme.GFont;
     BackColor = GlobalModel.Instance.Theme.GBgColor;
 }
Ejemplo n.º 3
0
 public void SetDgetSourceModel(DgetSourceModel dgetSourceModel)
 {
     this.DgetSourceModel          = dgetSourceModel;
     this.DgetSourceModel.TypeEnd += DgetSourceModel_TypeEnd;
 }