예제 #1
0
파일: MainForm.cs 프로젝트: xeliven/PDDB
        private void DocList_ItemDounleChick(object sender, MouseEventArgs e)
        {//打开文档
            BaseItem        bc   = sender as BaseItem;
            ItemBindingData data = bc.Tag as ItemBindingData;
            Document        doc  = data.DataItem as Document;

            if (!System.IO.File.Exists(doc.filepath))
            {
                MessageBox.Show("找不到此文件!"); return;
            }
            System.Diagnostics.Process.Start(doc.filepath);
        }
예제 #2
0
파일: MainForm.cs 프로젝트: xeliven/PDDB
        private void Listbox_ItemCheck(object sender, EventArgs e)
        {//选择文件
            BaseItem        bc   = sender as BaseItem;
            ItemBindingData data = bc.Tag as ItemBindingData;

            if (data == null)
            {
                return;
            }
            Document doc = data.DataItem as Document;

            if (!System.IO.File.Exists(doc.filepath))
            {
                return;
            }
            System.IO.FileInfo fi = new System.IO.FileInfo(doc.filepath);

            DocumentInfo info = new DocumentInfo()
            {
                文件名      = doc.docname,
                文件地址     = doc.filepath,
                文档大小     = PublicStatic.GetDisplaySize(fi.Length),
                文档建立时间   = doc.modifydatetime == null?DateTime.MinValue:(DateTime)doc.modifydatetime,
                文档归档时间   = doc.msgdatetime,
                文档最后修改时间 = fi.LastWriteTime,
                文档最后访问时间 = fi.LastAccessTime,
                文档类别     = doc.doctypename,
                文档类别缩写   = doc.doctypeshort,
                档案编号     = doc.docnumber,
                项目名称     = doc.projname,
                项目名称缩写   = doc.projshort,
                项目类别     = doc.projtypename,
                项目类别缩写   = doc.projtypeshot,
            };

            propertyGrid1.SelectedObject = info;
        }
예제 #3
0
 void client_OnItemValueChangedEvent(ItemBindingData itemdata)
 {
     
 }
예제 #4
0
 public void ItemValueChangedEvenr(ItemBindingData ItemBindingData)
 {
     if (this.OnItemValueChangedEvent != null)
         this.OnItemValueChangedEvent(ItemBindingData);
 }
예제 #5
0
        void client_OnItemValueChangedEvent(ItemBindingData itemdata)
        {
            if (IsExit)
                return;
            if (this.ItemBindingDatas == null)
                return;

            ItemBindingData data = this.ItemBindingDatas.Where(n => n.ItemID == itemdata.ItemID).FirstOrDefault();
            bool IsDegreeChanged = false;
         if (data == null)
             return;

         data.Content = itemdata.Content;
         data.ColorString = itemdata.ColorString;
         data.IsAlarm = itemdata.IsAlarm;

         if (data.Degree != itemdata.Degree)
             IsDegreeChanged = true;
         data.Value = itemdata.Value;
         data.Degree = itemdata.Degree;

         if (itemdata.GroupID != null && IsDegreeChanged)
                   UpdateItemGroup((int)itemdata.GroupID);
        }
예제 #6
0
 public void ItemValueChangedEvenr(ItemBindingData ItemBindingData)
 {
     throw new NotImplementedException();
 }