Exemplo n.º 1
0
 // 设置菜单加亮状态 -- 856字段
 void Manage856_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null && curfield.Name == "856")
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }
Exemplo n.º 2
0
 // 设置菜单加亮状态 -- 创建索取号
 void CreateCallNumber_setMenu(object sender, SetMenuEventArgs e)
 {
     e.Action.Active = false;
     if (e.sender is EntityEditForm)
         e.Action.Active = true;
 }
Exemplo n.º 3
0
 // 设置菜单加亮状态 -- 加入著者号
 void AddAuthorNumber_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null && curfield.Name == "905")
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }
Exemplo n.º 4
0
 // 设置菜单加亮状态 -- 加入种次号
 void AddZhongcihao_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null && curfield.Name == "905"
         && this.DetailForm.MarcEditor.FocusedSubfieldName == 'd')
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }
Exemplo n.º 5
0
 // 设置菜单加亮状态 -- 905$d <-- 690$a
 void Copy690aTo905d_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null &&
                 (curfield.Name == "905" || curfield.Name == "690"))
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }
Exemplo n.º 6
0
 // 设置菜单加亮状态 -- 7*2$a <-- 200$g
 void Copy200gTo7x2a_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null &&
                 (curfield.Name == "702"
                 || curfield.Name == "712"))
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }
Exemplo n.º 7
0
    // 设置菜单加亮状态 -- 规整ISBN为10
    void HyphenISBN_10_setMenu(object sender, SetMenuEventArgs e)
    {
        Field curfield = this.DetailForm.MarcEditor.FocusedField;
        if (curfield == null || curfield.Name != "010")
        {
            e.Action.Active = false;
            return;
        }
        Subfield a = curfield.Subfields["a"];
        if (a == null)
        {
            e.Action.Active = false;
            return;
        }

        string strISBN = a.Value;
        if (string.IsNullOrEmpty(strISBN) == true)
        {
            e.Action.Active = false;
            return;
        }

        if (IsbnSplitter.IsIsbn13(strISBN) == true)
        {
            e.Action.Active = true;
            return;
        }

        e.Action.Active = false;
    }
Exemplo n.º 8
0
    void Test_setMenu(object sender, SetMenuEventArgs e)
    {
        Field curfield = this.DetailForm.MarcEditor.FocusedField;
        char c = this.DetailForm.MarcEditor.FocusedSubfieldName;

        e.Action.Comment = "当前字段名 '" +
            (curfield != null ? curfield.Name : "") 
            +"' 子字段名 '"+c.ToString()+"'";
    }
Exemplo n.º 9
0
 // 设置菜单加亮状态 -- 245$c<-- 100$a
 void Copy100aTo245c_setMenu(object sender, SetMenuEventArgs e)
 {
     Field curfield = this.DetailForm.MarcEditor.FocusedField;
     if (curfield != null
         && curfield.Name == "245" && this.DetailForm.MarcEditor.FocusedSubfieldName == 'c')
         e.Action.Active = true;
     else
         e.Action.Active = false;
 }