C2026-021_B2026-048 Expand Functionality of Viewing Mode
This commit is contained in:
@@ -55,7 +55,7 @@ namespace Volian.Controls.Library
|
||||
foreach (string name in names)
|
||||
{
|
||||
i++;
|
||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||
AddViewMode($"{name.Trim()} (View Only)", i.ToString(), apple == i);
|
||||
}
|
||||
|
||||
AddItemMode("All", "-1", ref gpSubItem);
|
||||
@@ -130,42 +130,46 @@ namespace Volian.Controls.Library
|
||||
set { _MyApplicability = value; }
|
||||
}
|
||||
|
||||
//private ProcedureInfo _MyProcedureInfo;
|
||||
//public ProcedureInfo MyProcedureInfo
|
||||
//{
|
||||
//get { return _MyProcedureInfo; }
|
||||
//set
|
||||
//{
|
||||
// _MyProcedureInfo = value;
|
||||
// if (_MyProcedureInfo != null && _MyProcedureInfo.IsProcedure)
|
||||
// {
|
||||
// DocVersionConfig cfg = new DocVersionConfig(_MyProcedureInfo.MyDocVersion);
|
||||
// if (cfg.Unit_Name == string.Empty)
|
||||
// this.Visible = false;
|
||||
// else
|
||||
// {
|
||||
// string[] names = cfg.Unit_Name.Split(',');
|
||||
// gpMode.Controls.Clear();
|
||||
// gpItem.Controls.Clear();
|
||||
// MyCheckBoxes.Clear();
|
||||
// AddViewMode("Master", "-1", true);
|
||||
// int i = 0;
|
||||
// foreach (string name in names)
|
||||
// {
|
||||
// AddViewMode(name.Trim(), (++i).ToString());
|
||||
// }
|
||||
// AddItemMode("All", "-1");
|
||||
// i = 0;
|
||||
// foreach (string name in names)
|
||||
// AddItemMode(name.Trim(), (++i).ToString());
|
||||
// AddItemMode("None", "0");
|
||||
// //if(!this.Visible)
|
||||
// // this.Visible = true;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
private void AddItemMode(string name, string value, ref DevComponents.DotNetBar.Controls.GroupPanel gpSubItem)
|
||||
//C2026-021 Expand Functionality of Viewing Mode
|
||||
public bool ShowItemSelection = true;
|
||||
public void SetEnableDisableItemSelection(bool value) => gpItem.Enabled = ShowItemSelection = value;
|
||||
|
||||
//private ProcedureInfo _MyProcedureInfo;
|
||||
//public ProcedureInfo MyProcedureInfo
|
||||
//{
|
||||
//get { return _MyProcedureInfo; }
|
||||
//set
|
||||
//{
|
||||
// _MyProcedureInfo = value;
|
||||
// if (_MyProcedureInfo != null && _MyProcedureInfo.IsProcedure)
|
||||
// {
|
||||
// DocVersionConfig cfg = new DocVersionConfig(_MyProcedureInfo.MyDocVersion);
|
||||
// if (cfg.Unit_Name == string.Empty)
|
||||
// this.Visible = false;
|
||||
// else
|
||||
// {
|
||||
// string[] names = cfg.Unit_Name.Split(',');
|
||||
// gpMode.Controls.Clear();
|
||||
// gpItem.Controls.Clear();
|
||||
// MyCheckBoxes.Clear();
|
||||
// AddViewMode("Master", "-1", true);
|
||||
// int i = 0;
|
||||
// foreach (string name in names)
|
||||
// {
|
||||
// AddViewMode(name.Trim(), (++i).ToString());
|
||||
// }
|
||||
// AddItemMode("All", "-1");
|
||||
// i = 0;
|
||||
// foreach (string name in names)
|
||||
// AddItemMode(name.Trim(), (++i).ToString());
|
||||
// AddItemMode("None", "0");
|
||||
// //if(!this.Visible)
|
||||
// // this.Visible = true;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
private void AddItemMode(string name, string value, ref DevComponents.DotNetBar.Controls.GroupPanel gpSubItem)
|
||||
{
|
||||
CheckBox cb = new CheckBox();
|
||||
cb.BackColor = Color.Transparent;
|
||||
@@ -550,7 +554,7 @@ namespace Volian.Controls.Library
|
||||
void DisplayApplicability_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
MyItemInfo = MyItemInfo;
|
||||
gpItem.Enabled = UserInfo.CanEdit(MyUserInfo,(MyItemInfo == null) ? null : MyItemInfo.MyDocVersion); //Can Change Applicability
|
||||
gpItem.Enabled = ShowItemSelection && UserInfo.CanEdit(MyUserInfo,(MyItemInfo == null) ? null : MyItemInfo.MyDocVersion); //Can Change Applicability
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user