Skip to content

Commit

Permalink
Merge pull request #4 from DigitalPlatform/master
Browse files Browse the repository at this point in the history
同步源
  • Loading branch information
任延华 authored Aug 8, 2018
2 parents 1f2a2a4 + a873366 commit 5a3b630
Show file tree
Hide file tree
Showing 87 changed files with 10,440 additions and 7,169 deletions.
4 changes: 0 additions & 4 deletions DigitalPlatform.CommonControl/DoubleTextBox.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace DigitalPlatform.CommonControl
Expand Down
569 changes: 280 additions & 289 deletions DigitalPlatform.CommonControl/Field856Dialog.Designer.cs

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions DigitalPlatform.CommonControl/Field856Dialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ namespace DigitalPlatform.CommonControl
/// </summary>
public partial class Field856Dialog : Form
{
string _marcSyntax = "unimarc";
public string MarcSyntax
{
get
{
return this._marcSyntax;
}
set
{
this._marcSyntax = value;
this.SetMarcSyntax(this._marcSyntax);
}
}

// $8内容有初始值,要求follow填充其它几个相关子字段内容,则需要在打开对话框前设置该成员为true
public bool AutoFollowIdSet = false;

Expand All @@ -41,6 +55,61 @@ void FillTypeList()
this.tabComboBox_type.Items.Add("封面图像.大");
}

// 根据 MARC 格式,改变面板显示
void SetMarcSyntax(string strMarcSyntax)
{
if (strMarcSyntax == "usmarc")
{
this.label_indi_2.Text = "指示符2 -- 关系";
this.label_y.Text = "$y -- 链接文本";
this.label_y.Font = new Font(this.Font, FontStyle.Bold);

this.label_2.Text = "$2 -- 访问方式";
this.label_2.Font = new Font(this.Font, FontStyle.Regular);

this.label_3.Visible = true;
this.label_3_color.Visible = true;
this.textBox_3.Visible = true;

this.label_8.Visible = true;
this.label_8_color.Visible = true;
this.textBox_8.Visible = true;

}
else if (strMarcSyntax == "unimarc")
{
this.label_indi_2.Text = "指示符2 -- 未定义";
this.label_y.Text = "$y -- 访问方式";
this.label_y.Font = new Font(this.Font, FontStyle.Regular);

this.label_2.Text = "$2 -- 链接文本";
this.label_2.Font = new Font(this.Font, FontStyle.Bold);


this.label_3.Visible = false;
this.label_3_color.Visible = false;
this.textBox_3.Visible = false;

this.label_8.Visible = false;
this.label_8_color.Visible = false;
this.textBox_8.Visible = false;
}
}

public string GetAccessMethodSubfieldName()
{
if (this._marcSyntax == "unimarc")
return "y";
return "2";
}

public string GetLinkTextSubfieldName()
{
if (this._marcSyntax == "unimarc")
return "2";
return "y";
}

// 通过汉字名称获得正规的英文的 type 属性值
static string GetTypeString(string strCaption)
{
Expand Down Expand Up @@ -149,6 +218,8 @@ private void Field856Dialog_Load(object sender, EventArgs e)
comboBox_u_SelectedIndexChanged(null, null);
}

this.SetMarcSyntax(this._marcSyntax);

this.MessageText = this.MessageText;

FillObjectRights();
Expand Down
6 changes: 3 additions & 3 deletions DigitalPlatform.CommonControl/Field856Dialog.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -124,15 +124,15 @@
<data name="toolStripButton_copyRights_856ToObject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACFSURBVDhPtZFRCsAgDEM9m4fzGjul/m5EGgi2sk7Yg4LY
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAACFSURBVDhPtZFRCsAgDEM9m4fzGjul/m5EGgi2sk7Yg4LY
5CFb+Y0xxq1j13lQqrXOSQt675cdtwLNOBBkIBJgpzIHlpSsAt5hLO7BsrU2QxgV6M7iHpYYVAHueLa4
R0ssrOdXgYbX4css7uGHiiQs8y9tiSTpMlHJ5zKh5KhMUDwu5yjlAYoiL6bqrbZsAAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripButton_copyRights_objectTo856.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB/SURBVDhPtZFRCsAgDEM9m4fzGjtl/d2INBBm3SxsgUBX
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAB/SURBVDhPtZFRCsAgDEM9m4fzGjtl/d2INBBm3SxsgUBX
kzfQ8qvM7ID9MycUe+8nnIaw3FobTkG0XGsd3oZE5RRkVaYJ8fgsHGo4mrcA/JOWCHkFsHwH6JnHZzHI
y1QAd7DHZzHIWQHYEYI5lD5RBIA086gVYFsoqX39tUq5AMi8L6aOTq28AAAAAElFTkSuQmCC
</value>
Expand Down
Loading

0 comments on commit 5a3b630

Please sign in to comment.