Skip to content

Commit

Permalink
Merge pull request #14 from DigitalPlatform/master
Browse files Browse the repository at this point in the history
同步源
  • Loading branch information
renyh1013 committed Apr 19, 2016
2 parents aea4b97 + bcd8a73 commit 154b171
Show file tree
Hide file tree
Showing 38 changed files with 2,523 additions and 2,352 deletions.
2 changes: 1 addition & 1 deletion DigitalPlatform.Library/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;

//
Expand Down
88 changes: 44 additions & 44 deletions DigitalPlatform.Library/BookItem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
Expand All @@ -11,86 +11,86 @@
namespace DigitalPlatform.Library
{
/// <summary>
/// 册信息
/// 册信息
/// </summary>
public class BookItem
{
/// <summary>
/// 册条码号
/// 册条码号
/// </summary>
public string Barcode = "";
public string Barcode = "";

/// <summary>
/// 册状态
/// 册状态
/// </summary>
public string State = "";
public string State = "";

/// <summary>
/// 从属的书目记录id
/// 从属的书目记录id
/// </summary>
public string Parent = "";
public string Parent = "";

/// <summary>
/// 馆藏地点
/// 馆藏地点
/// </summary>
public string Location = "";
public string Location = "";

/// <summary>
/// 册价格
/// 册价格
/// </summary>
public string Price = "";
public string Price = "";
/// <summary>
/// 图书类型
/// 图书类型
/// </summary>
public string BookType = "";
public string BookType = "";
/// <summary>
/// 注释
/// 注释
/// </summary>
public string Comment = "";
public string Comment = "";
/// <summary>
/// 借书人证条码号
/// 借书人证条码号
/// </summary>
public string Borrower = "";
public string Borrower = "";
/// <summary>
/// 借书的日期
/// 借书的日期
/// </summary>
public string BorrowDate = "";
public string BorrowDate = "";
/// <summary>
/// 借阅期限
/// 借阅期限
/// </summary>
public string BorrowPeriod = "";
public string BorrowPeriod = "";

/// <summary>
/// 册记录路径
/// 册记录路径
/// </summary>
public string RecPath = "";

/// <summary>
/// 是否被修改
/// 是否被修改
/// </summary>
bool m_bChanged = false;

/// <summary>
/// 记录的dom
/// 记录的dom
/// </summary>
public XmlDocument RecordDom = null;
public XmlDocument RecordDom = null;

/// <summary>
/// 时间戳
/// 时间戳
/// </summary>
public byte[] Timestamp = null;

ListViewItem ListViewItem = null;

/// <summary>
/// 构造函数
/// 构造函数
/// </summary>
public BookItem()
{
}

/// <summary>
/// 构造函数
/// 构造函数
/// </summary>
/// <param name="strRecPath"></param>
/// <param name="dom"></param>
Expand All @@ -104,7 +104,7 @@ public BookItem(string strRecPath, XmlDocument dom)


/// <summary>
/// 根据dom初始化各个成员
/// 根据dom初始化各个成员
/// </summary>
/// <returns></returns>
public int Initial()
Expand All @@ -129,7 +129,7 @@ public int Initial()
}

/// <summary>
/// 创建好适合于保存的记录信息
/// 创建好适合于保存的记录信息
/// </summary>
/// <param name="strXml"></param>
/// <param name="strError"></param>
Expand All @@ -149,13 +149,13 @@ public int BuildRecord(

if (this.Parent == "")
{
strError = "Parent成员尚未定义";
strError = "Parent成员尚未定义";
return -1;
}

if (this.Barcode == "")
{
strError = "Barcode成员尚未定义";
strError = "Barcode成员尚未定义";
return -1;
}

Expand All @@ -178,7 +178,7 @@ public int BuildRecord(
}

/// <summary>
/// 是否被修改过
/// 是否被修改过
/// </summary>
public bool Changed
{
Expand All @@ -190,12 +190,12 @@ public bool Changed
{
m_bChanged = value;
}

}


/// <summary>
/// 将本事项加入到listview中
/// 将本事项加入到listview中
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
Expand Down Expand Up @@ -226,13 +226,13 @@ void SetItemBackColor(ListViewItem item)
{
if (this.State == "" && this.m_bChanged == true)
{
// 新事项
item.BackColor = Color.FromArgb(255, 255, 100); // 浅黄色
// 新事项
item.BackColor = Color.FromArgb(255, 255, 100); // 浅黄色
}
else if (this.m_bChanged == true)
{
// 修改过的旧事项
item.BackColor = Color.FromArgb(100, 255, 100); // 浅绿色
// 修改过的旧事项
item.BackColor = Color.FromArgb(100, 255, 100); // 浅绿色
}
else
{
Expand All @@ -241,7 +241,7 @@ void SetItemBackColor(ListViewItem item)
}

/// <summary>
/// 刷新事项颜色
/// 刷新事项颜色
/// </summary>
public void RefreshItemColor()
{
Expand All @@ -252,13 +252,13 @@ public void RefreshItemColor()
}

/// <summary>
/// 册信息的集合容器
/// 册信息的集合容器
/// </summary>
public class BookItemCollection : List<BookItem>
{

/// <summary>
/// 以册条码号定位一个事项
/// 以册条码号定位一个事项
/// </summary>
/// <param name="strBarcode"></param>
/// <returns></returns>
Expand All @@ -275,7 +275,7 @@ public BookItem GetItem(string strBarcode)
}

/// <summary>
/// 是否修改过
/// 是否修改过
/// </summary>
public bool Changed
{
Expand Down
22 changes: 11 additions & 11 deletions DigitalPlatform.Library/BrowseSearchResultDlg.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
Expand All @@ -11,7 +11,7 @@
namespace DigitalPlatform.Library
{
/// <summary>
/// 浏览检索命中的结果的窗口
/// 浏览检索命中的结果的窗口
/// </summary>
public partial class BrowseSearchResultDlg : Form
{
Expand All @@ -21,23 +21,23 @@ public partial class BrowseSearchResultDlg : Form
public SearchPanel SearchPannel = null;

/// <summary>
/// 打开详细窗
/// 打开详细窗
/// </summary>
public event OpenDetailEventHandler OpenDetail = null;

/// <summary>
/// 显示记录的ListView窗
/// 显示记录的ListView窗
/// </summary>
public ListView RecordsList
{
get
get
{
return this.listView_records;
}
}

/// <summary>
/// 构造函数
/// 构造函数
/// </summary>
public BrowseSearchResultDlg()
{
Expand All @@ -52,7 +52,7 @@ private void button_OK_Click(object sender, EventArgs e)
{
if (this.listView_records.SelectedItems.Count == 0)
{
MessageBox.Show(this, "尚未选择事项");
MessageBox.Show(this, "尚未选择事项");
return;
}

Expand All @@ -69,7 +69,7 @@ private void button_Cancel_Click(object sender, EventArgs e)
this.Close();
}

// 确保列标题数量足够
// 确保列标题数量足够
void EnsureColumns(int nCount)
{
if (this.listView_records.Columns.Count >= nCount)
Expand All @@ -80,7 +80,7 @@ void EnsureColumns(int nCount)
string strText = "";
if (i == 0)
{
strText = "记录路径";
strText = "记录路径";
}
else
{
Expand All @@ -97,7 +97,7 @@ void EnsureColumns(int nCount)


/// <summary>
/// 在listview最后追加一行
/// 在listview最后追加一行
/// </summary>
/// <param name="strID"></param>
/// <param name="others"></param>
Expand Down Expand Up @@ -125,7 +125,7 @@ private void listView_records_DoubleClick(object sender, EventArgs e)
}

/// <summary>
/// 装入第一条记录到详细窗
/// 装入第一条记录到详细窗
/// </summary>
/// <param name="bCloseWindow"></param>
public void LoadFirstDetail(bool bCloseWindow)
Expand Down
7 changes: 0 additions & 7 deletions DigitalPlatform.Library/Class2SubjectDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@
using System.ComponentModel;
using System.Windows.Forms;
using System.Diagnostics;

// using SHDocVw;

using System.Runtime.InteropServices;
using System.Collections.Specialized;

using System.Text;
using System.Web;
using System.Threading;
using System.Xml;

// using mshtml;

using DigitalPlatform;
using DigitalPlatform.rms.Client;
using DigitalPlatform.Xml;
using DigitalPlatform.GUI;
using DigitalPlatform.Text;


namespace DigitalPlatform.Library
{
/// <summary>
Expand Down
Loading

0 comments on commit 154b171

Please sign in to comment.