Add project files.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.App
|
||||
{
|
||||
//=======================================================================
|
||||
public static class OpnGlobals_Win
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Windows Forms Session Profile - 'Win' version only valid in desktop application.
|
||||
public static OpnSessionProfile_Win SessionProfile { get; set; } = null;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Clear globals.
|
||||
public static void clear ()
|
||||
{
|
||||
SessionProfile = null;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using Sarand.Core.Bus;
|
||||
using Sarand.Core.Dbas.Base;
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class OpnSessionProfile_Win : OpnSessionProfile
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
// Session properties.
|
||||
// NB Not retained between sessions.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction - use derived objects.
|
||||
protected OpnSessionProfile_Win (OpnSessionContext sessionContext, ISacsDatabase database) :
|
||||
base(sessionContext)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// S e s s i o n P a r a m e t e r s
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// D a t a b a s e
|
||||
//-------------------------------------------------------------------
|
||||
// OperationsMgr database.
|
||||
public ISacsDatabase Database { get; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n i t i a l A p p l i c a t i o n D i s p l a y
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// D e f a u l t H T M L S t y l e s h e e t
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// L i s t D i s p l a y P r o p e r t i e s
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// C u r r e n t V i e w
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// G e t U s e r A f f i l i a t e
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// O w n e r O r g a n i s a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
public override bool SetSelectedOwner (SysId affiliateId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// E n v i r o n m e n t
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public interface ISbmMainAppForm
|
||||
{
|
||||
void RefreshMenu ();
|
||||
void RefreshViewStats ();
|
||||
void SwitchView (Opn.View view);
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
partial class OpnForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "OpnForm";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
using Sarand.Win.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnForm : SacsForm
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
[Browsable(false)]
|
||||
public new class Config : SacsForm.Config
|
||||
{
|
||||
/// <summary>Application managers and consoles - to share parent's internals.</summary>
|
||||
public OpnInternals Internals { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
private OpnForm() : this(null) { }
|
||||
protected OpnForm (Config config) : base(config)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration console utilities.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
partial class OpnForm_Item
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "OpnForm_Item";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using Sarand.Core.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnForm_Item : OpnForm
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
public new class Config : OpnForm.Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private Config config = null;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
private OpnForm_Item() : this(null) { }
|
||||
protected OpnForm_Item (Config config) : base (config)
|
||||
{
|
||||
this.config = config;
|
||||
InitializeComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
[Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public SysId NewItemId { get; protected set; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
partial class OpnGroupbox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using Sarand.Win.Forms.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnGroupbox : SacsGroupBox
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public OpnGroupbox ()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n i t i a l i s a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnCreateControl ()
|
||||
{
|
||||
base.OnCreateControl();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
partial class OpnPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Sarand.Win.Forms.Controls;
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnPanel : SacsPanel
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
public new class Config : SacsPanel.Config
|
||||
{
|
||||
/// <summary>Application managers and consoles - to share parent's internals.</summary>
|
||||
public OpnInternals Internals { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected OpnPanel () : this(null) { }
|
||||
public OpnPanel (Config config) : base(config)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration console utilities.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n i t i a l i s a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnCreateControl ()
|
||||
{
|
||||
base.OnCreateControl();
|
||||
|
||||
ConfigurePanel();
|
||||
}
|
||||
private void ConfigurePanel ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
partial class OpnTabPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using Sarand.OperationsMgr.Win.Forms.Panels;
|
||||
using Sarand.Win.Forms.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Base
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnTabPage : SacsTabPage
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
public new class Config : SacsTabPage.Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
private OpnTabPage () : this(null) { }
|
||||
protected OpnTabPage (Config config) : base(config)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration console utilities.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n i t i a l i s a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnCreateControl ()
|
||||
{
|
||||
base.OnCreateControl();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l s
|
||||
//-------------------------------------------------------------------
|
||||
protected void AddPanelsToPage (List<SacsPanel> panels)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnVisibleChanged (EventArgs e)
|
||||
{
|
||||
PositionControls();
|
||||
}
|
||||
protected override void PositionControls ()
|
||||
{
|
||||
}
|
||||
private void PositionPanel (Control panel, int panelTop)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
protected void Panel_Resize (object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
//protected virtual void panel_ItemCreated (object sender, OpnPanel_Items.ItemModifiedEventArgs e)
|
||||
//{
|
||||
// InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
//}
|
||||
//protected virtual void panel_ItemUpdated (object sender, OpnPanel_Items.ItemModifiedEventArgs e)
|
||||
//{
|
||||
// InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
//}
|
||||
//protected virtual void panel_ItemDeleted (object sender, OpnPanel_Items.ItemModifiedEventArgs e)
|
||||
//{
|
||||
// InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
//}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Panels
|
||||
{
|
||||
partial class OpnPanel_Items
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Sarand.OperationsMgr.Win.Forms.Base;
|
||||
using Sarand.Core.Bus;
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
|
||||
namespace Sarand.OperationsMgr.Win.Forms.Panels
|
||||
{
|
||||
//=======================================================================
|
||||
public partial class OpnPanel_Items : OpnPanel
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Configuration.
|
||||
public new class Config : OpnPanel.Config
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private Config config = null;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
private OpnPanel_Items() : this(null) { }
|
||||
protected OpnPanel_Items (Config config) : base(config)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
[Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public virtual int ItemTotal { get { return 0; } }
|
||||
[Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public virtual int ItemCount { get { return 0; } }
|
||||
[Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public virtual int SelectedItemCount { get { return 0; } }
|
||||
[Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public bool DeletedItemsAreShown { get; protected set; } = false;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Configure.
|
||||
private void SetConfig (Config config)
|
||||
{
|
||||
base.SetConfig(config);
|
||||
this.config = config;
|
||||
ConfigurePanel();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n i t i a l i s a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnCreateControl ()
|
||||
{
|
||||
base.OnCreateControl();
|
||||
|
||||
ConfigurePanel();
|
||||
}
|
||||
private void ConfigurePanel ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// A c t i o n s
|
||||
//-------------------------------------------------------------------
|
||||
// Refresh.
|
||||
protected void RefreshDataItems (object sender, EventArgs e) { RefreshDataItems(); }
|
||||
public virtual void RefreshDataItems ()
|
||||
{
|
||||
throw new NotSupportedException(GetType().Name + ".RefreshDataItems not implemented");
|
||||
}
|
||||
public virtual void RefreshDataItem (SysId id)
|
||||
{
|
||||
throw new NotSupportedException(GetType().Name + ".RefreshDataItem not implemented");
|
||||
}
|
||||
public virtual void RemoveDataItem (SysId id)
|
||||
{
|
||||
throw new NotSupportedException(GetType().Name + ".RemoveDataItem not implemented");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Show/Hide deleted items.
|
||||
protected void ShowDeletedItems (object sender, EventArgs e) { ShowDeletedItems(); }
|
||||
public virtual void ShowDeletedItems ()
|
||||
{
|
||||
DeletedItemsAreShown = true;
|
||||
RefreshDataItems();
|
||||
}
|
||||
protected void HideDeletedItems (object sender, EventArgs e) { HideDeletedItems(); }
|
||||
public virtual void HideDeletedItems ()
|
||||
{
|
||||
DeletedItemsAreShown = false;
|
||||
RefreshDataItems();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Create item.
|
||||
public virtual bool CanCreateItem () { return false; }
|
||||
protected void CreateItem (object sender, EventArgs e) { CreateItem(); }
|
||||
public virtual void CreateItem () { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// View/Update item.
|
||||
public virtual bool CanViewItem () { return false; }
|
||||
protected void ViewItem (object sender, EventArgs e) { UpdateItem(false); }
|
||||
public virtual bool CanUpdateItem () { return false; }
|
||||
protected void UpdateItem (object sender, EventArgs e) { UpdateItem(true); }
|
||||
public virtual void UpdateItem (bool updateItem = true) { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Delete item.
|
||||
public virtual bool CanDeleteItem () { return false; }
|
||||
protected void DeleteItem (object sender, EventArgs e) { DeleteItem(); }
|
||||
public virtual void DeleteItem () { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data import.
|
||||
public virtual bool CanImportData () { return false; }
|
||||
protected void ImportData (object sender, EventArgs e) { ImportData(); }
|
||||
public virtual void ImportData () { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data export.
|
||||
public virtual bool CanExportData () { return false; }
|
||||
protected void ExportData (object sender, EventArgs e) { ExportData(); }
|
||||
public virtual void ExportData () { }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
// Item count changed.
|
||||
public event EventHandler ItemCountChanged;
|
||||
protected void InvokeItemCountChangedEvent (EventArgs e)
|
||||
{
|
||||
ItemCountChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item selection changed.
|
||||
public event EventHandler ItemSelectionChanged;
|
||||
protected void InvokeItemSelectionChangedEvent (EventArgs e)
|
||||
{
|
||||
ItemSelectionChanged?.Invoke(this, e);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item created.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user