Ejemplo n.º 1
0
        private void addAcc_ListItemClick(object sender, DevExpress.XtraBars.ListItemClickEventArgs e)
        {
            var type = (e.Item as BarListItem).Strings[(int)e.Index];

            try
            {
                DataObject dataObject = (DataObject)Clipboard.GetDataObject();
                string[]   array      = Regex.Split(dataObject.GetData(DataFormats.Text).ToString().TrimEnd("\r\n".ToCharArray()), "\r\n");
                string[]   array2     = array;
                for (int i = 0; i < array2.Length; i++)
                {
                    string text = array2[i];
                    if (string.IsNullOrEmpty(text))
                    {
                        break;
                    }
                    if (!text.Replace("\t", "").Trim().Equals(""))
                    {
                        string[] account = text.Split('|');
                        if (account.Length >= 1)
                        {
                            try
                            {
                                int id = dataViewer.dataGridView.Rows.Add();
                                dataViewer.dataGridView.Rows[id].Cells[0].Value  = (id + 1).ToString();
                                dataViewer.dataGridView.Rows[id].Cells[1].Value  = account[0].Trim();
                                dataViewer.dataGridView.Rows[id].Cells[14].Value = account[1].Trim();
                                switch (type)
                                {
                                case "UID|Password|Cookie|2FA":
                                    dataViewer.dataGridView.Rows[id].Cells[6].Value = account[3].Trim();
                                    dataViewer.dataGridView.Rows[id].Cells[7].Value = account[2].Trim();
                                    break;

                                case "UID|Password|Cookie":
                                    dataViewer.dataGridView.Rows[id].Cells[7].Value = account[2].Trim();
                                    break;

                                case "UID|Password|2FA":
                                    dataViewer.dataGridView.Rows[id].Cells[6].Value = account[2].Trim();
                                    break;

                                case "UID|Password":
                                    break;

                                default:
                                    return;
                                }
                            }
                            catch
                            {
                            }
                        }
                    }
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
 private void barListItem1_ListItemClick(object sender, DevExpress.XtraBars.ListItemClickEventArgs e)
 {
     #region Help畫面
     FlyoutAction action = new FlyoutAction();
     action.Description = "版權聲明 Copyright©\r\n著作權© 2020 新茂能源實業有限公司 版權所有。\r\nCopyright© 2020 SIN MAO Energy CO.,LTD All right reserved.\r\n \r\n工程版本:1.0.0";
     action.Commands.Add(FlyoutCommand.OK);
     { FlyoutDialog.Show(FindForm(), action); };
     #endregion
 }