Exemplo n.º 1
0
 /// <summary>
 /// 쪽지함 리스트 폼 생성
 /// </summary>
 private void MakeMemoList()
 {
     try
     {
         List <MemoObj> list = MemoUtils.MemoFileRead(ConfigHelper.Id);
         if (list == null || list.Count == 0)
         {
             MessageBox.Show("저장된 쪽지가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             if (mMemoListForm != null && !mMemoListForm.IsDisposed)
             {
                 mMemoListForm.Close();
             }
             mMemoListForm = new MemoListForm(connection, list);
             mMemoListForm.Show();
         }
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 쪽지함 리스트 폼 생성
        /// </summary>
        private void MakeMemoList()
        {
            try
            {
               
                ArrayList list = MemoUtils.MemoFileRead(this.myid);
                if (list == null || list.Count == 0)
                {
                    MessageBox.Show("저장된 쪽지가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    if (mMemoListForm != null)
                    {
                        mMemoListForm.Close();
                    }
                    mMemoListForm = new MemoListForm();
                    
                    mMemoListForm.listView.SelectedIndexChanged += new EventHandler(memolistView_Click);
                    mMemoListForm.btn_del.MouseClick += new MouseEventHandler(btn_del_Click_forMemo);

                    string source = "";
                    foreach (object obj in list)
                    {
                        if (((string)obj).Length > 2 && ((string)obj).Substring(0, 2) == MEMO_HEADER)
                        {
                            source = (string)obj;  //item(m|name|id|message|수신사id|time)
                        }
                        else
                        {
                            source += Environment.NewLine +(string)obj;  //item(m|name|id|message|수신사id|time)
                        }
                        if (source.Split('|').Length < 6) continue; 

                        logWrite("memo[" + source + "]");
                        
                        //> 2 && source.Substring(0,2) == MEMO_HEADER ) 

                        if (source.Length != 0)
                        {
                            string[] subitems = source.Split('|');
                            ListViewItem item = mMemoListForm.listView.Items.Add(subitems[5]);
                            item.SubItems.Add(subitems[1] + "(" + subitems[2] + ")");
                            item.SubItems.Add(subitems[3]);
                            item.Tag = source;
                        }
                        source = "";
                    }
                    mMemoListForm.Show();
                }
            }
            catch (Exception exception)
            {
                logWrite(exception.ToString());
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 쪽지함 리스트 폼 생성
 /// </summary>
 private void MakeMemoList()
 {
     try
     {
         List<MemoObj> list = MemoUtils.MemoFileRead(ConfigHelper.Id);
         if (list == null || list.Count == 0)
             MessageBox.Show("저장된 쪽지가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
         else
         {
             if (mMemoListForm != null && !mMemoListForm.IsDisposed)
                 mMemoListForm.Close();
             mMemoListForm = new MemoListForm(connection, list);
             mMemoListForm.Show();
         }
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }