Example #1
0
        public MainForm()
        {
            InitializeComponent();
            modelRecord = new Model();
            this.logInfo = new LogInfo();
            this.address = new AddressList();
            this.userName = new UserNameList();
            this.mailInfo = new List<string>();
            Control.CheckForIllegalCrossThreadCalls = false;

            skinGalleryHelper = new RibbonDemos.SkinGalleryHelper(ribbonGallerySkins);

            ((DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit)ReceiveNameEdit.Edit).ButtonClick+=new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(ImportNameButton_Click);
            ((DevExpress.XtraEditors.Repository.RepositoryItemRadioGroup)MailCollectionType.Edit).SelectedIndexChanged += new EventHandler(CollectionRadioGroup_SelectIndexChanged);
            ((DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit)AddCommuRecord.Edit).CheckedChanged += new EventHandler(AutoAddCommuRecord_CheckedChanged);
            ((DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit)AddSendMailLog.Edit).CheckedChanged += new EventHandler(AutoAddSendMailLog_CheckedChanged);
            ((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)FliterUsersComboBox.Edit).SelectedIndexChanged+=new EventHandler(FliterUsers_SelectedIndexChanged);

            this.CookieMailPanel.Visible = true;
              //this.PopMailPanel.Visible = false;
             // this.MailEditorPanel.Visible = true;
        }
Example #2
0
 public void BindTreeView()
 {
     try
     {
         this.trvLogList.ExpandAll();
         this.trvListInfo.ExpandAll();
         this.trvLogList.Nodes.Clear();
         this.trvListInfo.Nodes.Clear();
         TreeNode node = new TreeNode();
         TreeNode node2 = new TreeNode();
         TreeNode node3 = new TreeNode();
         node.Text = "������־";
         node2.Text = "�����ռ���";
         node3.Text = "�����û���";
         node.Tag = "0";
         node2.Tag = "0";
         node3.Tag = "0";
         this.trvLogList.Nodes.Add(node);
         this.trvListInfo.Nodes.Add(node2);
         this.trvListInfo.Nodes.Add(node3);
         AddressList list = new AddressList();
         UserNameList list2 = new UserNameList();
         List<string> log = this.logInfo.GetLog();
         List<string> addressList = list.GetAddressList();
         List<string> userNameList = list2.GetUserNameList();
         for (int i = 0; i < log.Count; i++)
         {
             TreeNode node4 = new TreeNode();
             node4.Text = log[i];
             this.trvLogList.Nodes[0].Nodes.Add(node4);
         }
         for (int j = 0; j < addressList.Count; j++)
         {
             TreeNode node5 = new TreeNode();
             node5.Text = addressList[j];
             this.trvListInfo.Nodes[0].Nodes.Add(node5);
         }
         for (int k = 0; k < userNameList.Count; k++)
         {
             TreeNode node6 = new TreeNode();
             node6.Text = userNameList[k];
             this.trvListInfo.Nodes[1].Nodes.Add(node6);
         }
     }
     catch (Exception)
     {
         this.MailInfoOutput.Text = this.MailInfoOutput.Text + "ͨѶ¼/��־����ʧ��!";
         throw;
     }
 }
Example #3
0
 private void tlsDelAddreess_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("ȷ��Ҫɾ����?", "������ʾ", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
     {
         string text = "";
         string param = this.trvListInfo.SelectedNode.Text;
         if (this.trvListInfo.SelectedNode.Parent.Text == "�����û���")
         {
             text = new UserNameList().DelUserNameList(param);
         }
         else if (this.trvListInfo.SelectedNode.Parent.Text == "�����ռ���")
         {
             text = new AddressList().DelAddressList(param);
         }
         MessageBox.Show(text, "�������", MessageBoxButtons.OK, MessageBoxIcon.None);
     }
     this.trvListInfo.ExpandAll();
     this.BindTreeView();
 }