Files
ayanova7/source/WinFormApp/Form1.cs
2018-08-22 23:11:19 +00:00

5691 lines
308 KiB
C#

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using GZTW.AyaNova.BLL;
using System.Threading;
using CSLA.Security;
using System.Text;
using Infragistics.Win.UltraWinExplorerBar;
using log4net;
using Infragistics.Win.UltraWinDock;
namespace AyaNova
{
/// <summary>
///
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _Form1_Toolbars_Dock_Area_Bottom;
private System.Windows.Forms.Panel Form1_Fill_Panel;
private UltraExplorerBar ultraExplorerBar1; //Case 534 made internal
private System.Windows.Forms.Panel RightPane;
private System.ComponentModel.IContainer components;
System.Windows.Forms.Form frmActive;
private Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl ultraExplorerBarContainerControl1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Splitter splitter2;
private System.Windows.Forms.ImageList imageList1;
private System.Timers.Timer timer1;
private Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl ultraExplorerBarContainerControl2;
private Infragistics.Win.UltraWinTree.UltraTree ServiceTree;
private Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl ultraExplorerBarContainerControl3;
private Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl ultraExplorerBarContainerControl4;
private Infragistics.Win.UltraWinTree.UltraTree QuoteTree;
private Infragistics.Win.UltraWinTree.UltraTree PMTree;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edOpenWorkorder;
private MyDateNavigator ctDateNav;
private Infragistics.Win.UltraWinDock.AutoHideControl _Form1AutoHideControl;
private Infragistics.Win.UltraWinDock.UltraDockManager dm;
private Infragistics.Win.UltraWinDock.WindowDockingArea windowDockingArea1;
private Infragistics.Win.UltraWinDock.DockableWindow dockableWindow1;
private Infragistics.Win.UltraWinDock.UnpinnedTabArea _Form1UnpinnedTabAreaTop;
private Infragistics.Win.UltraWinDock.UnpinnedTabArea _Form1UnpinnedTabAreaBottom;
private Infragistics.Win.UltraWinDock.UnpinnedTabArea _Form1UnpinnedTabAreaLeft;
private Infragistics.Win.UltraWinDock.UnpinnedTabArea _Form1UnpinnedTabAreaRight;
private HelpProvider helpProvider1;
private StatusStrip statusStrip1;
private ToolStripStatusLabel toolStripStatusLabel1;
private ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.Timer timerClock;
private ToolStripStatusLabel toolStripClock;
private Infragistics.Win.Misc.UltraDesktopAlert ultraDesktopAlert1;
// Create a logger for use in this class
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
//case 2094
/// <summary>
/// This is a flag to trigger a dialog prompting for license update or advising to downgrade
/// after login
/// </summary>
public bool LicenseRequired = false;
public Form1()
{
InitializeComponent();
Util.TempFolder = AyaBizUtils.TempFolderPath();
}
private NotifySubscriptionsForm frmSubscriptions;
private RegionsForm frmMainRegions;
private LocalesForm frmLocalizedText;
private GlobalSettingsForm frmGlobalSettings;
private SecurityGroupsForm frmSecurityGroups;
private NotifyDeliveryLogsForm frmNotifyDeliveryLogs;
//private PopUp frmPopUp;
private CustomizableObjectsForm frmCustomizeableObjects;
//required public for case 702, 697 and one other from the past for the grid form
public MainGrid frmMainGrid;
public ScheduleFormEx frmMainSchedule;
//case 1805
private DashboardForm frmDashboard;
//case 1967
//Classes outside of this form require access to some of the private components
//on this form. Previosly I just changed their definition to "internal" but
//any use of the Infragistics form editor causes them to be set back to private
//so these public properties solve that for once and for all.
public UltraExplorerBar UltraExplorerBar1
{ get { return ultraExplorerBar1; } }
public Infragistics.Win.UltraWinTree.UltraTree MainServiceTree
{ get { return ServiceTree; } }
public Infragistics.Win.UltraWinTree.UltraTree MainQuoteTree
{ get { return QuoteTree; } }
public Infragistics.Win.UltraWinTree.UltraTree MainPMTree
{ get { return PMTree; } }
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
AyaBizUtils.TempFolderDelete(Util.TempFolder);
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#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();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode1 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode2 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode3 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode4 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode5 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode6 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode7 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode8 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode9 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode10 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.Override _override1 = new Infragistics.Win.UltraWinTree.Override();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode11 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode12 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode13 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode14 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode15 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode16 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode17 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode18 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.Override _override2 = new Infragistics.Win.UltraWinTree.Override();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode19 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode20 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode21 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode22 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode23 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode24 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode25 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.UltraTreeNode ultraTreeNode26 = new Infragistics.Win.UltraWinTree.UltraTreeNode();
Infragistics.Win.UltraWinTree.Override _override3 = new Infragistics.Win.UltraWinTree.Override();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup1 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup2 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup3 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup4 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup5 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup6 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem1 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem2 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem3 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem4 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem5 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem6 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem7 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem8 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem9 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup7 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem10 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem11 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem12 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem13 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem14 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance23 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance24 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance25 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup8 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem15 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance26 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem16 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance27 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem17 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance28 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance29 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance30 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup9 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem18 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance31 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance32 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance33 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup10 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem19 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance34 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem20 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance35 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem21 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance36 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem22 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance37 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem23 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance38 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance39 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance40 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance41 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup11 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.Appearance appearance42 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance43 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup ultraExplorerBarGroup12 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem24 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance44 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem25 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance45 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem26 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance46 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem27 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance47 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem28 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance48 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem29 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance49 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem30 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance50 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem31 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance51 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem32 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance52 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem ultraExplorerBarItem33 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem();
Infragistics.Win.Appearance appearance53 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance54 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance55 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton("SERVICE");
Infragistics.Win.Appearance appearance56 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("QUOTE");
Infragistics.Win.Appearance appearance57 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinEditors.EditorButton editorButton3 = new Infragistics.Win.UltraWinEditors.EditorButton("PM");
Infragistics.Win.Appearance appearance58 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinDock.DockAreaPane dockAreaPane1 = new Infragistics.Win.UltraWinDock.DockAreaPane(Infragistics.Win.UltraWinDock.DockedLocation.DockedLeft, new System.Guid("4fac2092-4180-4597-b383-821fe63af95f"));
Infragistics.Win.UltraWinDock.DockableControlPane dockableControlPane1 = new Infragistics.Win.UltraWinDock.DockableControlPane(new System.Guid("acb2c95c-f4b9-432e-8247-334e401f03ab"), new System.Guid("00000000-0000-0000-0000-000000000000"), -1, new System.Guid("4fac2092-4180-4597-b383-821fe63af95f"), -1);
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("LT:UI.Toolbar.MainMenuBar");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool1 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.MRU");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Go.Logout");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.Go");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool3 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.SubGrids");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("NotifyPop");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool1 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("LT:O.Workorder");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool4 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.Help");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool5 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.Go");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool1 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Service", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool2 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Quotes", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool3 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.PreventiveMaintenance", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool4 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Schedule", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool5 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Inventory", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool6 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Client.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool7 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Unit.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool8 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool9 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Administration", "");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool6 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.SubGrids");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientGroup.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:DispatchZone.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartAssembly.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartWarehouse.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:TaxCode.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitModelCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitOfMeasure.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitServiceType.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UserCertification.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UserSkill.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool7 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.Help");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("QuickStart");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool22 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.Contents");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.TechSupport");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.CheckForUpdates");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.PurchaseLicenses");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.AboutAyaNova");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool27 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.License");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool28 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LITE");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool10 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Client.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool11 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Service", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool12 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Inventory", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool13 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Schedule", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool14 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Unit.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool15 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.List", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool16 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Administration", "");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool29 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:DispatchZone.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool30 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientGroup.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool31 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool32 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool33 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool34 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool35 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitOfMeasure.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool36 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool37 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartAssembly.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool38 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool39 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:TaxCode.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool40 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UserCertification.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool41 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UserSkill.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool42 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Go.Logout");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool43 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitServiceType.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool44 = new Infragistics.Win.UltraWinToolbars.ButtonTool("NotifyPop");
Infragistics.Win.Appearance appearance59 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance60 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool45 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartWarehouse.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool46 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitModelCategory.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool47 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool17 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.Quotes", "");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool18 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:UI.Go.PreventiveMaintenance", "");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool48 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.Contents");
Infragistics.Win.UltraWinToolbars.ControlContainerTool controlContainerTool2 = new Infragistics.Win.UltraWinToolbars.ControlContainerTool("LT:O.Workorder");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool49 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.License");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool8 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Menu.MRU");
Infragistics.Win.Appearance appearance61 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance62 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ListTool listTool1 = new Infragistics.Win.UltraWinToolbars.ListTool("MRULIST");
Infragistics.Win.UltraWinToolbars.ListTool listTool2 = new Infragistics.Win.UltraWinToolbars.ListTool("MRULIST");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool50 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.Appearance appearance63 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance64 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool51 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LITE");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool52 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.AboutAyaNova");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool53 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.TechSupport");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool54 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.CheckForUpdates");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool55 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Help.PurchaseLicenses");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool56 = new Infragistics.Win.UltraWinToolbars.ButtonTool("QuickStart");
Infragistics.Win.Appearance appearance65 = new Infragistics.Win.Appearance();
this.ultraExplorerBarContainerControl2 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl();
this.ServiceTree = new Infragistics.Win.UltraWinTree.UltraTree();
this.ultraExplorerBarContainerControl3 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl();
this.QuoteTree = new Infragistics.Win.UltraWinTree.UltraTree();
this.ultraExplorerBarContainerControl4 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl();
this.PMTree = new Infragistics.Win.UltraWinTree.UltraTree();
this.ultraExplorerBarContainerControl1 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl();
this.splitter2 = new System.Windows.Forms.Splitter();
this.panel2 = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.ctDateNav = new AyaNova.MyDateNavigator();
this.ultraExplorerBar1 = new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar();
this.edOpenWorkorder = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.Form1_Fill_Panel = new System.Windows.Forms.Panel();
this.RightPane = new System.Windows.Forms.Panel();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.timer1 = new System.Timers.Timer();
this.dm = new Infragistics.Win.UltraWinDock.UltraDockManager(this.components);
this._Form1UnpinnedTabAreaLeft = new Infragistics.Win.UltraWinDock.UnpinnedTabArea();
this._Form1UnpinnedTabAreaRight = new Infragistics.Win.UltraWinDock.UnpinnedTabArea();
this._Form1UnpinnedTabAreaTop = new Infragistics.Win.UltraWinDock.UnpinnedTabArea();
this._Form1UnpinnedTabAreaBottom = new Infragistics.Win.UltraWinDock.UnpinnedTabArea();
this._Form1AutoHideControl = new Infragistics.Win.UltraWinDock.AutoHideControl();
this.dockableWindow1 = new Infragistics.Win.UltraWinDock.DockableWindow();
this.windowDockingArea1 = new Infragistics.Win.UltraWinDock.WindowDockingArea();
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
this._Form1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this._Form1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._Form1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._Form1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripClock = new System.Windows.Forms.ToolStripStatusLabel();
this.timerClock = new System.Windows.Forms.Timer(this.components);
this.ultraDesktopAlert1 = new Infragistics.Win.Misc.UltraDesktopAlert(this.components);
this.ultraExplorerBarContainerControl2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ServiceTree)).BeginInit();
this.ultraExplorerBarContainerControl3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.QuoteTree)).BeginInit();
this.ultraExplorerBarContainerControl4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PMTree)).BeginInit();
this.ultraExplorerBarContainerControl1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ctDateNav)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ultraExplorerBar1)).BeginInit();
this.ultraExplorerBar1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edOpenWorkorder)).BeginInit();
this.Form1_Fill_Panel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dm)).BeginInit();
this.dockableWindow1.SuspendLayout();
this.windowDockingArea1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ultraDesktopAlert1)).BeginInit();
this.SuspendLayout();
//
// ultraExplorerBarContainerControl2
//
this.ultraExplorerBarContainerControl2.Controls.Add(this.ServiceTree);
this.ultraExplorerBarContainerControl2.Location = new System.Drawing.Point(-12000, -11538);
this.ultraExplorerBarContainerControl2.Name = "ultraExplorerBarContainerControl2";
this.ultraExplorerBarContainerControl2.Size = new System.Drawing.Size(232, 108);
this.ultraExplorerBarContainerControl2.TabIndex = 1;
this.ultraExplorerBarContainerControl2.Visible = false;
//
// ServiceTree
//
this.ServiceTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.ServiceTree.HideSelection = false;
this.ServiceTree.ImageTransparentColor = System.Drawing.Color.Transparent;
this.ServiceTree.Indent = 15;
this.ServiceTree.Location = new System.Drawing.Point(0, 0);
this.ServiceTree.Name = "ServiceTree";
this.ServiceTree.NodeConnectorColor = System.Drawing.SystemColors.ControlDark;
this.ServiceTree.NodeConnectorStyle = Infragistics.Win.UltraWinTree.NodeConnectorStyle.None;
ultraTreeNode1.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly;
ultraTreeNode1.CheckedState = System.Windows.Forms.CheckState.Checked;
ultraTreeNode1.Key = "LT:WorkorderService.Label.List";
ultraTreeNode1.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode1.LeftImages"))));
ultraTreeNode2.Key = "LT:WorkorderItem.Label.List";
ultraTreeNode2.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode2.LeftImages"))));
ultraTreeNode3.Key = "LT:WorkorderItem.Label.ScheduledUsers";
ultraTreeNode3.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode3.LeftImages"))));
ultraTreeNode3.Text = "LT:WorkorderItem.Label.ScheduledUsers";
ultraTreeNode4.Key = "LT:WorkorderItem.Label.Parts";
ultraTreeNode4.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode4.LeftImages"))));
ultraTreeNode4.Text = "LT:WorkorderItem.Label.Parts";
ultraTreeNode5.Key = "LT:WorkorderItem.Label.Labors";
ultraTreeNode5.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode5.LeftImages"))));
ultraTreeNode5.Text = "LT:WorkorderItem.Label.Labors";
ultraTreeNode6.Key = "LT:WorkorderItem.Label.Travels";
ultraTreeNode6.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode6.LeftImages"))));
ultraTreeNode6.Text = "LT:WorkorderItem.Label.Travels";
ultraTreeNode7.Key = "LT:WorkorderItem.Label.Loans";
ultraTreeNode7.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode7.LeftImages"))));
ultraTreeNode7.Text = "LT:WorkorderItem.Label.Loans";
ultraTreeNode8.Key = "LT:WorkorderItem.Label.Expenses";
ultraTreeNode8.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode8.LeftImages"))));
ultraTreeNode8.Text = "LT:WorkorderItem.Label.Expenses";
ultraTreeNode9.Key = "LT:WorkorderItem.Label.CustomFields";
ultraTreeNode9.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode9.LeftImages"))));
ultraTreeNode9.Text = "LT:WorkorderItem.Label.CustomFields";
ultraTreeNode2.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode3,
ultraTreeNode4,
ultraTreeNode5,
ultraTreeNode6,
ultraTreeNode7,
ultraTreeNode8,
ultraTreeNode9});
ultraTreeNode2.Text = "LT:WorkorderItem.Label.List";
ultraTreeNode1.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode2});
ultraTreeNode1.Text = "LT:WorkorderService.Label.List";
ultraTreeNode10.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly;
ultraTreeNode10.CheckedState = System.Windows.Forms.CheckState.Checked;
ultraTreeNode10.Key = "LT:O.WorkorderServiceTemplate";
ultraTreeNode10.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode10.LeftImages"))));
ultraTreeNode10.Text = "LT:O.WorkorderServiceTemplate";
this.ServiceTree.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode1,
ultraTreeNode10});
_override1.AllowAutoDragExpand = Infragistics.Win.UltraWinTree.AllowAutoDragExpand.Never;
_override1.AllowCopy = Infragistics.Win.DefaultableBoolean.False;
_override1.AllowCut = Infragistics.Win.DefaultableBoolean.False;
_override1.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
_override1.AllowPaste = Infragistics.Win.DefaultableBoolean.False;
_override1.BorderStyleNode = Infragistics.Win.UIElementBorderStyle.None;
_override1.CellClickAction = Infragistics.Win.UltraWinTree.CellClickAction.SelectNodeOnly;
_override1.HotTracking = Infragistics.Win.DefaultableBoolean.True;
_override1.ReserveCheckBoxSpace = Infragistics.Win.DefaultableBoolean.False;
_override1.SelectionType = Infragistics.Win.UltraWinTree.SelectType.Single;
_override1.ShowExpansionIndicator = Infragistics.Win.UltraWinTree.ShowExpansionIndicator.Never;
_override1.Sort = Infragistics.Win.UltraWinTree.SortType.None;
this.ServiceTree.Override = _override1;
this.ServiceTree.ShowLines = false;
this.ServiceTree.ShowRootLines = false;
this.ServiceTree.Size = new System.Drawing.Size(232, 108);
this.ServiceTree.TabIndex = 0;
this.ServiceTree.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
this.ServiceTree.AfterSelect += new Infragistics.Win.UltraWinTree.AfterNodeSelectEventHandler(this.ServiceTree_AfterSelect);
//
// ultraExplorerBarContainerControl3
//
this.ultraExplorerBarContainerControl3.Controls.Add(this.QuoteTree);
this.ultraExplorerBarContainerControl3.Location = new System.Drawing.Point(-12000, -11538);
this.ultraExplorerBarContainerControl3.Name = "ultraExplorerBarContainerControl3";
this.ultraExplorerBarContainerControl3.Size = new System.Drawing.Size(232, 108);
this.ultraExplorerBarContainerControl3.TabIndex = 2;
this.ultraExplorerBarContainerControl3.Visible = false;
//
// QuoteTree
//
this.QuoteTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.QuoteTree.HideSelection = false;
this.QuoteTree.ImageTransparentColor = System.Drawing.Color.Transparent;
this.QuoteTree.Indent = 15;
this.QuoteTree.Location = new System.Drawing.Point(0, 0);
this.QuoteTree.Name = "QuoteTree";
this.QuoteTree.NodeConnectorColor = System.Drawing.SystemColors.ControlDark;
this.QuoteTree.NodeConnectorStyle = Infragistics.Win.UltraWinTree.NodeConnectorStyle.None;
ultraTreeNode11.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly;
ultraTreeNode11.CheckedState = System.Windows.Forms.CheckState.Checked;
ultraTreeNode11.Key = "LT:WorkorderQuote.Label.List";
ultraTreeNode11.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode11.LeftImages"))));
ultraTreeNode12.Key = "LT:WorkorderItem.Label.ListQuote";
ultraTreeNode12.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode12.LeftImages"))));
ultraTreeNode13.Key = "LT:WorkorderItem.Label.ScheduledUsersQuote";
ultraTreeNode13.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode13.LeftImages"))));
ultraTreeNode13.Text = "LT:WorkorderItem.Label.ScheduledUsers";
ultraTreeNode14.Key = "LT:WorkorderItem.Label.PartsQuote";
ultraTreeNode14.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode14.LeftImages"))));
ultraTreeNode14.Text = "LT:WorkorderItem.Label.Parts";
ultraTreeNode15.Key = "LT:WorkorderItem.Label.LaborsQuote";
ultraTreeNode15.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode15.LeftImages"))));
ultraTreeNode15.Text = "LT:WorkorderItem.Label.Labors";
ultraTreeNode16.Key = "LT:WorkorderItem.Label.TravelsQuote";
ultraTreeNode16.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode16.LeftImages"))));
ultraTreeNode16.Text = "LT:WorkorderItem.Label.Travels";
ultraTreeNode17.Key = "LT:WorkorderItem.Label.CustomFieldsQuote";
ultraTreeNode17.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode17.LeftImages"))));
ultraTreeNode17.Text = "LT:WorkorderItem.Label.CustomFields";
ultraTreeNode12.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode13,
ultraTreeNode14,
ultraTreeNode15,
ultraTreeNode16,
ultraTreeNode17});
ultraTreeNode12.Text = "LT:WorkorderItem.Label.List";
ultraTreeNode11.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode12});
ultraTreeNode11.Text = "LT:WorkorderQuote.Label.List";
ultraTreeNode18.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly;
ultraTreeNode18.CheckedState = System.Windows.Forms.CheckState.Checked;
ultraTreeNode18.Key = "LT:O.WorkorderQuoteTemplate";
ultraTreeNode18.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode18.LeftImages"))));
ultraTreeNode18.Text = "LT:O.WorkorderQuoteTemplate";
this.QuoteTree.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode11,
ultraTreeNode18});
_override2.AllowAutoDragExpand = Infragistics.Win.UltraWinTree.AllowAutoDragExpand.Never;
_override2.AllowCopy = Infragistics.Win.DefaultableBoolean.False;
_override2.AllowCut = Infragistics.Win.DefaultableBoolean.False;
_override2.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
_override2.AllowPaste = Infragistics.Win.DefaultableBoolean.False;
_override2.BorderStyleNode = Infragistics.Win.UIElementBorderStyle.None;
_override2.CellClickAction = Infragistics.Win.UltraWinTree.CellClickAction.SelectNodeOnly;
_override2.HotTracking = Infragistics.Win.DefaultableBoolean.True;
_override2.ReserveCheckBoxSpace = Infragistics.Win.DefaultableBoolean.False;
_override2.SelectionType = Infragistics.Win.UltraWinTree.SelectType.Single;
_override2.ShowExpansionIndicator = Infragistics.Win.UltraWinTree.ShowExpansionIndicator.Never;
_override2.Sort = Infragistics.Win.UltraWinTree.SortType.None;
this.QuoteTree.Override = _override2;
this.QuoteTree.ShowLines = false;
this.QuoteTree.ShowRootLines = false;
this.QuoteTree.Size = new System.Drawing.Size(232, 108);
this.QuoteTree.TabIndex = 1;
this.QuoteTree.AfterSelect += new Infragistics.Win.UltraWinTree.AfterNodeSelectEventHandler(this.QuoteTree_AfterSelect);
//
// ultraExplorerBarContainerControl4
//
this.ultraExplorerBarContainerControl4.Controls.Add(this.PMTree);
this.ultraExplorerBarContainerControl4.Location = new System.Drawing.Point(-12000, -11538);
this.ultraExplorerBarContainerControl4.Name = "ultraExplorerBarContainerControl4";
this.ultraExplorerBarContainerControl4.Size = new System.Drawing.Size(232, 107);
this.ultraExplorerBarContainerControl4.TabIndex = 3;
this.ultraExplorerBarContainerControl4.Visible = false;
//
// PMTree
//
this.PMTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.PMTree.HideSelection = false;
this.PMTree.ImageTransparentColor = System.Drawing.Color.Transparent;
this.PMTree.Indent = 15;
this.PMTree.Location = new System.Drawing.Point(0, 0);
this.PMTree.Name = "PMTree";
this.PMTree.NodeConnectorColor = System.Drawing.SystemColors.ControlDark;
this.PMTree.NodeConnectorStyle = Infragistics.Win.UltraWinTree.NodeConnectorStyle.None;
ultraTreeNode19.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly;
ultraTreeNode19.CheckedState = System.Windows.Forms.CheckState.Checked;
ultraTreeNode19.Key = "LT:WorkorderPreventiveMaintenance.Label.List";
ultraTreeNode19.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode19.LeftImages"))));
ultraTreeNode20.Key = "LT:WorkorderItem.Label.ListPM";
ultraTreeNode20.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode20.LeftImages"))));
ultraTreeNode21.Key = "LT:WorkorderItem.Label.ScheduledUsersPM";
ultraTreeNode21.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode21.LeftImages"))));
ultraTreeNode21.Text = "LT:WorkorderItem.Label.ScheduledUsers";
ultraTreeNode22.Key = "LT:WorkorderItem.Label.PartsPM";
ultraTreeNode22.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode22.LeftImages"))));
ultraTreeNode22.Text = "LT:WorkorderItem.Label.Parts";
ultraTreeNode23.Key = "LT:WorkorderItem.Label.LaborsPM";
ultraTreeNode23.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode23.LeftImages"))));
ultraTreeNode23.Text = "LT:WorkorderItem.Label.Labors";
ultraTreeNode24.Key = "LT:WorkorderItem.Label.TravelsPM";
ultraTreeNode24.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode24.LeftImages"))));
ultraTreeNode24.Text = "LT:WorkorderItem.Label.Travels";
ultraTreeNode25.Key = "LT:WorkorderItem.Label.CustomFieldsPM";
ultraTreeNode25.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode25.LeftImages"))));
ultraTreeNode25.Text = "LT:WorkorderItem.Label.CustomFields";
ultraTreeNode20.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode21,
ultraTreeNode22,
ultraTreeNode23,
ultraTreeNode24,
ultraTreeNode25});
ultraTreeNode20.Text = "LT:WorkorderItem.Label.List";
ultraTreeNode19.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode20});
ultraTreeNode19.Text = "LT:WorkorderPreventiveMaintenance.Label.List";
ultraTreeNode26.Key = "LT:O.WorkorderPreventiveMaintenanceTemplate";
ultraTreeNode26.LeftImages.Add(((object)(resources.GetObject("ultraTreeNode26.LeftImages"))));
ultraTreeNode26.Text = "LT:O.WorkorderPreventiveMaintenanceTemplate";
this.PMTree.Nodes.AddRange(new Infragistics.Win.UltraWinTree.UltraTreeNode[] {
ultraTreeNode19,
ultraTreeNode26});
_override3.AllowAutoDragExpand = Infragistics.Win.UltraWinTree.AllowAutoDragExpand.Never;
_override3.AllowCopy = Infragistics.Win.DefaultableBoolean.False;
_override3.AllowCut = Infragistics.Win.DefaultableBoolean.False;
_override3.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
_override3.AllowPaste = Infragistics.Win.DefaultableBoolean.False;
_override3.BorderStyleNode = Infragistics.Win.UIElementBorderStyle.None;
_override3.CellClickAction = Infragistics.Win.UltraWinTree.CellClickAction.SelectNodeOnly;
_override3.HotTracking = Infragistics.Win.DefaultableBoolean.True;
_override3.ReserveCheckBoxSpace = Infragistics.Win.DefaultableBoolean.False;
_override3.SelectionType = Infragistics.Win.UltraWinTree.SelectType.Single;
_override3.ShowExpansionIndicator = Infragistics.Win.UltraWinTree.ShowExpansionIndicator.Never;
_override3.Sort = Infragistics.Win.UltraWinTree.SortType.None;
this.PMTree.Override = _override3;
this.PMTree.ShowLines = false;
this.PMTree.ShowRootLines = false;
this.PMTree.Size = new System.Drawing.Size(232, 107);
this.PMTree.TabIndex = 1;
this.PMTree.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
this.PMTree.AfterSelect += new Infragistics.Win.UltraWinTree.AfterNodeSelectEventHandler(this.PMTree_AfterSelect);
//
// ultraExplorerBarContainerControl1
//
this.ultraExplorerBarContainerControl1.Controls.Add(this.splitter2);
this.ultraExplorerBarContainerControl1.Controls.Add(this.panel2);
this.ultraExplorerBarContainerControl1.Controls.Add(this.panel1);
this.ultraExplorerBarContainerControl1.Location = new System.Drawing.Point(-12000, -11538);
this.ultraExplorerBarContainerControl1.Name = "ultraExplorerBarContainerControl1";
this.ultraExplorerBarContainerControl1.Size = new System.Drawing.Size(232, 108);
this.ultraExplorerBarContainerControl1.TabIndex = 0;
this.ultraExplorerBarContainerControl1.Visible = false;
//
// splitter2
//
this.splitter2.BackColor = System.Drawing.SystemColors.Control;
this.splitter2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitter2.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter2.Location = new System.Drawing.Point(0, 157);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(232, 9);
this.splitter2.TabIndex = 2;
this.splitter2.TabStop = false;
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 157);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(232, 0);
this.panel2.TabIndex = 1;
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.Control;
this.panel1.Controls.Add(this.ctDateNav);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(232, 157);
this.panel1.TabIndex = 0;
//
// ctDateNav
//
this.ctDateNav.BoldAppointmentDates = false;
this.ctDateNav.DateTime = new System.DateTime(2007, 10, 11, 0, 0, 0, 0);
this.ctDateNav.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctDateNav.HighlightHolidays = false;
this.ctDateNav.HotDate = null;
this.ctDateNav.Location = new System.Drawing.Point(0, 0);
this.ctDateNav.LookAndFeel.SkinName = "Lilian";
this.ctDateNav.LookAndFeel.UseDefaultLookAndFeel = false;
this.ctDateNav.Name = "ctDateNav";
this.ctDateNav.ShowWeekNumbers = false;
this.ctDateNav.Size = new System.Drawing.Size(232, 157);
this.ctDateNav.TabIndex = 0;
//
// ultraExplorerBar1
//
this.ultraExplorerBar1.Controls.Add(this.ultraExplorerBarContainerControl1);
this.ultraExplorerBar1.Controls.Add(this.ultraExplorerBarContainerControl2);
this.ultraExplorerBar1.Controls.Add(this.ultraExplorerBarContainerControl3);
this.ultraExplorerBar1.Controls.Add(this.ultraExplorerBarContainerControl4);
this.ultraExplorerBar1.Cursor = System.Windows.Forms.Cursors.Hand;
this.ultraExplorerBar1.Dock = System.Windows.Forms.DockStyle.Fill;
ultraExplorerBarGroup1.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup1.Key = "LT:Dashboard.Label.Dashboard";
appearance1.Image = global::AyaNova.Resource1.dashboard32;
ultraExplorerBarGroup1.Settings.AppearancesLarge.HeaderAppearance = appearance1;
appearance2.Image = global::AyaNova.Resource1.dashboard16;
ultraExplorerBarGroup1.Settings.AppearancesSmall.HeaderAppearance = appearance2;
ultraExplorerBarGroup1.Text = "LT:Dashboard.Label.Dashboard";
ultraExplorerBarGroup2.Container = this.ultraExplorerBarContainerControl2;
ultraExplorerBarGroup2.Key = "LT:UI.Go.Service";
appearance3.Image = ((object)(resources.GetObject("appearance3.Image")));
ultraExplorerBarGroup2.Settings.AppearancesLarge.HeaderAppearance = appearance3;
appearance4.Image = ((object)(resources.GetObject("appearance4.Image")));
ultraExplorerBarGroup2.Settings.AppearancesSmall.HeaderAppearance = appearance4;
ultraExplorerBarGroup2.Settings.Style = Infragistics.Win.UltraWinExplorerBar.GroupStyle.ControlContainer;
ultraExplorerBarGroup2.Text = "LT:UI.Go.Service";
ultraExplorerBarGroup3.Container = this.ultraExplorerBarContainerControl3;
ultraExplorerBarGroup3.Key = "LT:UI.Go.Quotes";
appearance5.Image = ((object)(resources.GetObject("appearance5.Image")));
ultraExplorerBarGroup3.Settings.AppearancesLarge.HeaderAppearance = appearance5;
appearance6.Image = ((object)(resources.GetObject("appearance6.Image")));
ultraExplorerBarGroup3.Settings.AppearancesSmall.HeaderAppearance = appearance6;
ultraExplorerBarGroup3.Settings.Style = Infragistics.Win.UltraWinExplorerBar.GroupStyle.ControlContainer;
ultraExplorerBarGroup3.Text = "LT:UI.Go.Quotes";
ultraExplorerBarGroup4.Container = this.ultraExplorerBarContainerControl4;
ultraExplorerBarGroup4.Key = "LT:UI.Go.PreventiveMaintenance";
appearance7.Image = ((object)(resources.GetObject("appearance7.Image")));
ultraExplorerBarGroup4.Settings.AppearancesLarge.HeaderAppearance = appearance7;
appearance8.Image = ((object)(resources.GetObject("appearance8.Image")));
ultraExplorerBarGroup4.Settings.AppearancesSmall.HeaderAppearance = appearance8;
ultraExplorerBarGroup4.Settings.Style = Infragistics.Win.UltraWinExplorerBar.GroupStyle.ControlContainer;
ultraExplorerBarGroup4.Text = "LT:UI.Go.PreventiveMaintenance";
ultraExplorerBarGroup5.Container = this.ultraExplorerBarContainerControl1;
ultraExplorerBarGroup5.Key = "LT:UI.Go.Schedule";
appearance9.Image = ((object)(resources.GetObject("appearance9.Image")));
ultraExplorerBarGroup5.Settings.AppearancesLarge.HeaderAppearance = appearance9;
appearance10.Image = ((object)(resources.GetObject("appearance10.Image")));
ultraExplorerBarGroup5.Settings.AppearancesSmall.HeaderAppearance = appearance10;
ultraExplorerBarGroup5.Settings.Style = Infragistics.Win.UltraWinExplorerBar.GroupStyle.ControlContainer;
ultraExplorerBarGroup5.Text = "LT:UI.Go.Schedule";
ultraExplorerBarItem1.Key = "LT:Part.Label.List";
appearance11.Image = ((object)(resources.GetObject("appearance11.Image")));
ultraExplorerBarItem1.Settings.AppearancesSmall.Appearance = appearance11;
ultraExplorerBarItem1.Text = "LT:Part.Label.List";
ultraExplorerBarItem2.Key = "LT:UI.Go.Inventory.PurchaseOrders";
appearance12.Image = ((object)(resources.GetObject("appearance12.Image")));
ultraExplorerBarItem2.Settings.AppearancesSmall.Appearance = appearance12;
ultraExplorerBarItem2.Text = "LT:UI.Go.Inventory.PurchaseOrders";
ultraExplorerBarItem3.Key = "LT:UI.Go.Inventory.PurchaseOrdersDetailed";
ultraExplorerBarItem3.Settings.Indent = 24;
ultraExplorerBarItem3.Settings.ReserveImageSpace = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem3.Settings.UseDefaultImage = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem3.Text = "LT:UI.Go.Inventory.PurchaseOrdersDetailed";
ultraExplorerBarItem4.Key = "LT:UI.Go.Inventory.PurchaseOrderReceipts";
appearance13.Image = ((object)(resources.GetObject("appearance13.Image")));
ultraExplorerBarItem4.Settings.AppearancesSmall.Appearance = appearance13;
ultraExplorerBarItem4.Text = "LT:UI.Go.Inventory.PurchaseOrderReceipts";
ultraExplorerBarItem5.Key = "LT:UI.Go.Inventory.PurchaseOrderReceiptsDetailed";
ultraExplorerBarItem5.Settings.Indent = 24;
ultraExplorerBarItem5.Settings.ReserveImageSpace = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem5.Settings.UseDefaultImage = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem5.Text = "LT:UI.Go.Inventory.PurchaseOrderReceiptsDetailed";
ultraExplorerBarItem6.Key = "LT:UI.Go.Inventory.PartInventoryAdjustments";
appearance14.Image = ((object)(resources.GetObject("appearance14.Image")));
ultraExplorerBarItem6.Settings.AppearancesSmall.Appearance = appearance14;
ultraExplorerBarItem6.Text = "LT:UI.Go.Inventory.PartInventoryAdjustments";
ultraExplorerBarItem7.Key = "LT:UI.Go.Inventory.PartInventoryAdjustmentsDetailed";
ultraExplorerBarItem7.Settings.Indent = 24;
ultraExplorerBarItem7.Settings.ReserveImageSpace = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem7.Settings.UseDefaultImage = Infragistics.Win.DefaultableBoolean.False;
ultraExplorerBarItem7.Text = "LT:UI.Go.Inventory.PartInventoryAdjustmentsDetailed";
ultraExplorerBarItem8.Key = "LT:PartByWarehouseInventory.Label.List";
appearance15.Image = ((object)(resources.GetObject("appearance15.Image")));
ultraExplorerBarItem8.Settings.AppearancesSmall.Appearance = appearance15;
ultraExplorerBarItem8.Text = "LT:PartByWarehouseInventory.Label.List";
ultraExplorerBarItem9.Key = "LT:WorkorderItemPartRequest.Label.List";
appearance16.Image = ((object)(resources.GetObject("appearance16.Image")));
ultraExplorerBarItem9.Settings.AppearancesSmall.Appearance = appearance16;
ultraExplorerBarItem9.Text = "LT:WorkorderItemPartRequest.Label.List";
ultraExplorerBarGroup6.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem1,
ultraExplorerBarItem2,
ultraExplorerBarItem3,
ultraExplorerBarItem4,
ultraExplorerBarItem5,
ultraExplorerBarItem6,
ultraExplorerBarItem7,
ultraExplorerBarItem8,
ultraExplorerBarItem9});
ultraExplorerBarGroup6.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup6.Key = "LT:UI.Go.Inventory";
appearance17.Image = ((object)(resources.GetObject("appearance17.Image")));
ultraExplorerBarGroup6.Settings.AppearancesLarge.HeaderAppearance = appearance17;
appearance18.Image = ((object)(resources.GetObject("appearance18.Image")));
ultraExplorerBarGroup6.Settings.AppearancesSmall.HeaderAppearance = appearance18;
ultraExplorerBarGroup6.Text = "LT:UI.Go.Inventory";
ultraExplorerBarItem10.Key = "LT:Client.Label.List";
appearance19.Image = ((object)(resources.GetObject("appearance19.Image")));
ultraExplorerBarItem10.Settings.AppearancesSmall.Appearance = appearance19;
ultraExplorerBarItem10.Text = "LT:Client.Label.List";
ultraExplorerBarItem11.Key = "LT:HeadOffice.Label.List";
appearance20.Image = ((object)(resources.GetObject("appearance20.Image")));
ultraExplorerBarItem11.Settings.AppearancesSmall.Appearance = appearance20;
ultraExplorerBarItem11.Text = "LT:HeadOffice.Label.List";
ultraExplorerBarItem12.Key = "LT:Contract.Label.List";
appearance21.Image = ((object)(resources.GetObject("appearance21.Image")));
ultraExplorerBarItem12.Settings.AppearancesSmall.Appearance = appearance21;
ultraExplorerBarItem12.Text = "LT:Contract.Label.List";
ultraExplorerBarItem13.Key = "LT:Project.Label.List";
appearance22.Image = ((object)(resources.GetObject("appearance22.Image")));
ultraExplorerBarItem13.Settings.AppearancesSmall.Appearance = appearance22;
ultraExplorerBarItem13.Text = "LT:Project.Label.List";
ultraExplorerBarItem14.Key = "LT:ClientServiceRequest.Label.List";
appearance23.Image = ((object)(resources.GetObject("appearance23.Image")));
ultraExplorerBarItem14.Settings.AppearancesSmall.Appearance = appearance23;
ultraExplorerBarItem14.Text = "LT:ClientServiceRequest.Label.List";
ultraExplorerBarGroup7.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem10,
ultraExplorerBarItem11,
ultraExplorerBarItem12,
ultraExplorerBarItem13,
ultraExplorerBarItem14});
ultraExplorerBarGroup7.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup7.Key = "LT:Client.Label.List";
appearance24.Image = ((object)(resources.GetObject("appearance24.Image")));
ultraExplorerBarGroup7.Settings.AppearancesLarge.HeaderAppearance = appearance24;
appearance25.Image = ((object)(resources.GetObject("appearance25.Image")));
ultraExplorerBarGroup7.Settings.AppearancesSmall.HeaderAppearance = appearance25;
ultraExplorerBarGroup7.Text = "LT:Client.Label.List";
ultraExplorerBarItem15.Key = "LT:Unit.Label.List";
appearance26.Image = ((object)(resources.GetObject("appearance26.Image")));
ultraExplorerBarItem15.Settings.AppearancesSmall.Appearance = appearance26;
ultraExplorerBarItem15.Text = "LT:Unit.Label.List";
ultraExplorerBarItem16.Key = "LT:UnitModel.Label.List";
appearance27.Image = ((object)(resources.GetObject("appearance27.Image")));
ultraExplorerBarItem16.Settings.AppearancesSmall.Appearance = appearance27;
ultraExplorerBarItem16.Text = "LT:UnitModel.Label.List";
ultraExplorerBarItem17.Key = "LT:LoanItem.Label.List";
appearance28.Image = ((object)(resources.GetObject("appearance28.Image")));
ultraExplorerBarItem17.Settings.AppearancesSmall.Appearance = appearance28;
ultraExplorerBarItem17.Text = "LT:LoanItem.Label.List";
ultraExplorerBarGroup8.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem15,
ultraExplorerBarItem16,
ultraExplorerBarItem17});
ultraExplorerBarGroup8.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup8.Key = "LT:Unit.Label.List";
appearance29.Image = ((object)(resources.GetObject("appearance29.Image")));
ultraExplorerBarGroup8.Settings.AppearancesLarge.HeaderAppearance = appearance29;
appearance30.Image = ((object)(resources.GetObject("appearance30.Image")));
ultraExplorerBarGroup8.Settings.AppearancesSmall.HeaderAppearance = appearance30;
ultraExplorerBarGroup8.Text = "LT:Unit.Label.List";
ultraExplorerBarItem18.Key = "LT:Vendor.Label.List";
appearance31.Image = ((object)(resources.GetObject("appearance31.Image")));
ultraExplorerBarItem18.Settings.AppearancesSmall.Appearance = appearance31;
ultraExplorerBarItem18.Text = "LT:Vendor.Label.List";
ultraExplorerBarGroup9.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem18});
ultraExplorerBarGroup9.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup9.Key = "LT:Vendor.Label.List";
appearance32.Image = ((object)(resources.GetObject("appearance32.Image")));
ultraExplorerBarGroup9.Settings.AppearancesLarge.HeaderAppearance = appearance32;
appearance33.Image = ((object)(resources.GetObject("appearance33.Image")));
ultraExplorerBarGroup9.Settings.AppearancesSmall.HeaderAppearance = appearance33;
ultraExplorerBarGroup9.Text = "LT:Vendor.Label.List";
ultraExplorerBarItem19.Key = "LT:Memo.Label.List";
appearance34.Image = ((object)(resources.GetObject("appearance34.Image")));
ultraExplorerBarItem19.Settings.AppearancesSmall.Appearance = appearance34;
ultraExplorerBarItem19.Text = "LT:Memo.Label.List";
ultraExplorerBarItem20.Key = "LT:NotifySubscription.Label.List";
appearance35.Image = ((object)(resources.GetObject("appearance35.Image")));
ultraExplorerBarItem20.Settings.AppearancesSmall.Appearance = appearance35;
ultraExplorerBarItem20.Text = "LT:NotifySubscription.Label.List";
ultraExplorerBarItem21.Key = "LT:NotifyDeliveryLog.Label.List";
appearance36.Image = ((object)(resources.GetObject("appearance36.Image")));
ultraExplorerBarItem21.Settings.AppearancesSmall.Appearance = appearance36;
ultraExplorerBarItem21.Text = "LT:NotifyDeliveryLog.Label.List";
ultraExplorerBarItem22.Key = "LT:O.WikiPage";
appearance37.Image = ((object)(resources.GetObject("appearance37.Image")));
ultraExplorerBarItem22.Settings.AppearancesSmall.Appearance = appearance37;
ultraExplorerBarItem22.Text = "LT:O.WikiPage";
ultraExplorerBarItem23.Key = "LT:ScheduleMarker.Label.List";
appearance38.Image = global::AyaNova.Resource1.ScheduleMarker16;
ultraExplorerBarItem23.Settings.AppearancesSmall.Appearance = appearance38;
ultraExplorerBarItem23.Text = "LT:ScheduleMarker.Label.List";
ultraExplorerBarGroup10.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem19,
ultraExplorerBarItem20,
ultraExplorerBarItem21,
ultraExplorerBarItem22,
ultraExplorerBarItem23});
ultraExplorerBarGroup10.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup10.Key = "LT:UI.Go.User";
appearance39.Image = ((object)(resources.GetObject("appearance39.Image")));
ultraExplorerBarGroup10.Settings.AppearancesLarge.HeaderAppearance = appearance39;
appearance40.Image = ((object)(resources.GetObject("appearance40.Image")));
ultraExplorerBarGroup10.Settings.AppearancesSmall.Appearance = appearance40;
appearance41.Image = ((object)(resources.GetObject("appearance41.Image")));
ultraExplorerBarGroup10.Settings.AppearancesSmall.HeaderAppearance = appearance41;
ultraExplorerBarGroup10.Text = "LT:UI.Label.CurrentUserName";
ultraExplorerBarGroup11.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup11.Key = "LT:UI.Go.Search";
appearance42.Image = ((object)(resources.GetObject("appearance42.Image")));
ultraExplorerBarGroup11.Settings.AppearancesLarge.HeaderAppearance = appearance42;
appearance43.Image = ((object)(resources.GetObject("appearance43.Image")));
ultraExplorerBarGroup11.Settings.AppearancesSmall.HeaderAppearance = appearance43;
ultraExplorerBarGroup11.Text = "LT:UI.Go.Search";
ultraExplorerBarItem24.Key = "LT:UI.Go.Administration.GlobalSettings";
appearance44.Image = ((object)(resources.GetObject("appearance44.Image")));
ultraExplorerBarItem24.Settings.AppearancesSmall.Appearance = appearance44;
ultraExplorerBarItem24.Text = "LT:UI.Go.Administration.GlobalSettings";
ultraExplorerBarItem25.Key = "LT:Region.Label.List";
appearance45.Image = ((object)(resources.GetObject("appearance45.Image")));
ultraExplorerBarItem25.Settings.AppearancesSmall.Appearance = appearance45;
ultraExplorerBarItem25.Text = "LT:Region.Label.List";
ultraExplorerBarItem26.Key = "LT:SecurityGroup.Label.List";
appearance46.Image = ((object)(resources.GetObject("appearance46.Image")));
ultraExplorerBarItem26.Settings.AppearancesSmall.Appearance = appearance46;
ultraExplorerBarItem26.Text = "LT:SecurityGroup.Label.List";
ultraExplorerBarItem27.Key = "LT:User.Label.List";
appearance47.Image = ((object)(resources.GetObject("appearance47.Image")));
ultraExplorerBarItem27.Settings.AppearancesSmall.Appearance = appearance47;
ultraExplorerBarItem27.Text = "LT:User.Label.List";
ultraExplorerBarItem28.Key = "LT:UI.Command.CustomFieldDesign";
appearance48.Image = ((object)(resources.GetObject("appearance48.Image")));
ultraExplorerBarItem28.Settings.AppearancesSmall.Appearance = appearance48;
ultraExplorerBarItem28.Text = "LT:UI.Command.CustomFieldDesign";
ultraExplorerBarItem29.Key = "LT:UI.Command.LocalizedTextDesign";
appearance49.Image = ((object)(resources.GetObject("appearance49.Image")));
ultraExplorerBarItem29.Settings.AppearancesSmall.Appearance = appearance49;
ultraExplorerBarItem29.Text = "LT:UI.Command.LocalizedTextDesign";
ultraExplorerBarItem30.Key = "LT:NotifyDeliveryLog.Label.List";
appearance50.Image = ((object)(resources.GetObject("appearance50.Image")));
ultraExplorerBarItem30.Settings.AppearancesSmall.Appearance = appearance50;
ultraExplorerBarItem30.Text = "LT:NotifyDeliveryLog.Label.List";
ultraExplorerBarItem31.Key = "LT:Report.Label.List";
appearance51.Image = ((object)(resources.GetObject("appearance51.Image")));
ultraExplorerBarItem31.Settings.AppearancesSmall.Appearance = appearance51;
ultraExplorerBarItem31.Text = "LT:Report.Label.List";
ultraExplorerBarItem32.Key = "LT:AyaFile.Label.List";
appearance52.Image = ((object)(resources.GetObject("appearance52.Image")));
ultraExplorerBarItem32.Settings.AppearancesSmall.Appearance = appearance52;
ultraExplorerBarItem32.Text = "LT:AyaFile.Label.List";
ultraExplorerBarItem33.Key = "LT:ScheduleMarker.Label.List";
appearance53.Image = global::AyaNova.Resource1.ScheduleMarker16;
ultraExplorerBarItem33.Settings.AppearancesSmall.Appearance = appearance53;
ultraExplorerBarItem33.Text = "LT:ScheduleMarker.Label.List";
ultraExplorerBarGroup12.Items.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem[] {
ultraExplorerBarItem24,
ultraExplorerBarItem25,
ultraExplorerBarItem26,
ultraExplorerBarItem27,
ultraExplorerBarItem28,
ultraExplorerBarItem29,
ultraExplorerBarItem30,
ultraExplorerBarItem31,
ultraExplorerBarItem32,
ultraExplorerBarItem33});
ultraExplorerBarGroup12.ItemSettings.Style = Infragistics.Win.UltraWinExplorerBar.ItemStyle.StateButton;
ultraExplorerBarGroup12.Key = "LT:UI.Go.Administration";
appearance54.Image = ((object)(resources.GetObject("appearance54.Image")));
ultraExplorerBarGroup12.Settings.AppearancesLarge.HeaderAppearance = appearance54;
appearance55.Image = ((object)(resources.GetObject("appearance55.Image")));
ultraExplorerBarGroup12.Settings.AppearancesSmall.HeaderAppearance = appearance55;
ultraExplorerBarGroup12.Text = "LT:UI.Go.Administration";
this.ultraExplorerBar1.Groups.AddRange(new Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup[] {
ultraExplorerBarGroup1,
ultraExplorerBarGroup2,
ultraExplorerBarGroup3,
ultraExplorerBarGroup4,
ultraExplorerBarGroup5,
ultraExplorerBarGroup6,
ultraExplorerBarGroup7,
ultraExplorerBarGroup8,
ultraExplorerBarGroup9,
ultraExplorerBarGroup10,
ultraExplorerBarGroup11,
ultraExplorerBarGroup12});
this.ultraExplorerBar1.GroupSettings.AllowDrag = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.GroupSettings.AllowEdit = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.GroupSettings.AllowItemDrop = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.GroupSettings.AllowItemUncheck = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.GroupSettings.NavigationAllowHide = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.ItemSettings.AllowDragCopy = Infragistics.Win.UltraWinExplorerBar.ItemDragStyle.None;
this.ultraExplorerBar1.ItemSettings.AllowDragMove = Infragistics.Win.UltraWinExplorerBar.ItemDragStyle.None;
this.ultraExplorerBar1.ItemSettings.AllowEdit = Infragistics.Win.DefaultableBoolean.False;
this.ultraExplorerBar1.Location = new System.Drawing.Point(0, 19);
this.ultraExplorerBar1.Margins.Bottom = 23;
this.ultraExplorerBar1.Margins.Left = 13;
this.ultraExplorerBar1.Margins.Right = 9;
this.ultraExplorerBar1.Margins.Top = 4;
this.ultraExplorerBar1.Name = "ultraExplorerBar1";
this.ultraExplorerBar1.SettingsKey = "Form1.ultraExplorerBar1";
this.ultraExplorerBar1.ShowDefaultContextMenu = false;
this.ultraExplorerBar1.Size = new System.Drawing.Size(260, 724);
this.ultraExplorerBar1.StateButtonCheckStyle = Infragistics.Win.UltraWinExplorerBar.StateButtonCheckStyle.ExclusiveWithinGroup;
this.ultraExplorerBar1.Style = Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarStyle.OutlookNavigationPane;
this.ultraExplorerBar1.TabIndex = 4;
this.ultraExplorerBar1.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
this.ultraExplorerBar1.UseLargeGroupHeaderImages = Infragistics.Win.DefaultableBoolean.True;
this.ultraExplorerBar1.GroupClick += new Infragistics.Win.UltraWinExplorerBar.GroupClickEventHandler(this.ultraExplorerBar1_GroupClick);
this.ultraExplorerBar1.ItemCheckStateChanging += new Infragistics.Win.UltraWinExplorerBar.ItemCheckStateChangingEventHandler(this.ultraExplorerBar1_ItemCheckStateChanging);
this.ultraExplorerBar1.ItemCheckStateChanged += new Infragistics.Win.UltraWinExplorerBar.ItemCheckStateChangedEventHandler(this.ultraExplorerBar1_ItemCheckStateChanged);
//
// edOpenWorkorder
//
appearance56.Image = ((object)(resources.GetObject("appearance56.Image")));
editorButton1.Appearance = appearance56;
editorButton1.Key = "SERVICE";
appearance57.Image = ((object)(resources.GetObject("appearance57.Image")));
editorButton2.Appearance = appearance57;
editorButton2.Key = "QUOTE";
appearance58.Image = ((object)(resources.GetObject("appearance58.Image")));
editorButton3.Appearance = appearance58;
editorButton3.Key = "PM";
this.edOpenWorkorder.ButtonsRight.Add(editorButton1);
this.edOpenWorkorder.ButtonsRight.Add(editorButton2);
this.edOpenWorkorder.ButtonsRight.Add(editorButton3);
this.edOpenWorkorder.Dock = System.Windows.Forms.DockStyle.Right;
this.edOpenWorkorder.Location = new System.Drawing.Point(408, 0);
this.edOpenWorkorder.MinimumSize = new System.Drawing.Size(130, 21);
this.edOpenWorkorder.Name = "edOpenWorkorder";
this.edOpenWorkorder.Nullable = false;
this.edOpenWorkorder.Size = new System.Drawing.Size(130, 24);
this.edOpenWorkorder.TabIndex = 0;
this.edOpenWorkorder.Visible = false;
this.edOpenWorkorder.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.edOpenWorkorder_EditorButtonClick);
this.edOpenWorkorder.KeyUp += new System.Windows.Forms.KeyEventHandler(this.edOpenWorkorder_KeyUp);
//
// Form1_Fill_Panel
//
this.Form1_Fill_Panel.Controls.Add(this.edOpenWorkorder);
this.Form1_Fill_Panel.Controls.Add(this.RightPane);
this.Form1_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
this.Form1_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.Form1_Fill_Panel.Location = new System.Drawing.Point(222, 27);
this.Form1_Fill_Panel.Name = "Form1_Fill_Panel";
this.Form1_Fill_Panel.Size = new System.Drawing.Size(538, 643);
this.Form1_Fill_Panel.TabIndex = 1;
//
// RightPane
//
this.RightPane.BackColor = System.Drawing.SystemColors.ControlDark;
this.RightPane.Dock = System.Windows.Forms.DockStyle.Fill;
this.RightPane.Location = new System.Drawing.Point(0, 0);
this.RightPane.Name = "RightPane";
this.RightPane.Size = new System.Drawing.Size(538, 643);
this.RightPane.TabIndex = 5;
//
// imageList1
//
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// timer1
//
this.timer1.AutoReset = false;
this.timer1.Interval = 500D;
this.timer1.SynchronizingObject = this;
this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed);
//
// dm
//
this.dm.AnimationSpeed = Infragistics.Win.UltraWinDock.AnimationSpeed.StandardSpeedPlus5;
this.dm.DefaultPaneSettings.AllowClose = Infragistics.Win.DefaultableBoolean.False;
this.dm.DefaultPaneSettings.AllowMaximize = Infragistics.Win.DefaultableBoolean.False;
this.dm.DefaultPaneSettings.AllowMinimize = Infragistics.Win.DefaultableBoolean.False;
dockableControlPane1.Control = this.ultraExplorerBar1;
dockableControlPane1.FlyoutSize = new System.Drawing.Size(179, -1);
dockableControlPane1.OriginalControlBounds = new System.Drawing.Rectangle(0, 0, 272, 647);
dockableControlPane1.Size = new System.Drawing.Size(100, 100);
dockableControlPane1.TextTab = " AyaNova";
dockAreaPane1.Panes.AddRange(new Infragistics.Win.UltraWinDock.DockablePaneBase[] {
dockableControlPane1});
dockAreaPane1.Size = new System.Drawing.Size(217, 644);
dockAreaPane1.TextTab = "";
this.dm.DockAreas.AddRange(new Infragistics.Win.UltraWinDock.DockAreaPane[] {
dockAreaPane1});
this.dm.DragWindowStyle = Infragistics.Win.UltraWinDock.DragWindowStyle.LayeredWindow;
this.dm.HostControl = this;
this.dm.SettingsKey = "Form1.dm";
this.dm.ShowCloseButton = false;
this.dm.ShowDisabledButtons = false;
this.dm.UseDefaultContextMenus = false;
this.dm.AfterSplitterDrag += new Infragistics.Win.UltraWinDock.PanesEventHandler(this.dm_AfterSplitterDrag);
this.dm.AfterHideFlyout += new Infragistics.Win.UltraWinDock.ControlPaneEventHandler(this.dm_AfterHideFlyout);
//
// _Form1UnpinnedTabAreaLeft
//
this._Form1UnpinnedTabAreaLeft.Dock = System.Windows.Forms.DockStyle.Left;
this._Form1UnpinnedTabAreaLeft.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._Form1UnpinnedTabAreaLeft.Location = new System.Drawing.Point(0, 27);
this._Form1UnpinnedTabAreaLeft.Name = "_Form1UnpinnedTabAreaLeft";
this._Form1UnpinnedTabAreaLeft.Owner = this.dm;
this._Form1UnpinnedTabAreaLeft.Size = new System.Drawing.Size(0, 643);
this._Form1UnpinnedTabAreaLeft.TabIndex = 7;
//
// _Form1UnpinnedTabAreaRight
//
this._Form1UnpinnedTabAreaRight.Dock = System.Windows.Forms.DockStyle.Right;
this._Form1UnpinnedTabAreaRight.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._Form1UnpinnedTabAreaRight.Location = new System.Drawing.Point(760, 27);
this._Form1UnpinnedTabAreaRight.Name = "_Form1UnpinnedTabAreaRight";
this._Form1UnpinnedTabAreaRight.Owner = this.dm;
this._Form1UnpinnedTabAreaRight.Size = new System.Drawing.Size(0, 643);
this._Form1UnpinnedTabAreaRight.TabIndex = 8;
//
// _Form1UnpinnedTabAreaTop
//
this._Form1UnpinnedTabAreaTop.Dock = System.Windows.Forms.DockStyle.Top;
this._Form1UnpinnedTabAreaTop.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._Form1UnpinnedTabAreaTop.Location = new System.Drawing.Point(0, 27);
this._Form1UnpinnedTabAreaTop.Name = "_Form1UnpinnedTabAreaTop";
this._Form1UnpinnedTabAreaTop.Owner = this.dm;
this._Form1UnpinnedTabAreaTop.Size = new System.Drawing.Size(760, 0);
this._Form1UnpinnedTabAreaTop.TabIndex = 9;
//
// _Form1UnpinnedTabAreaBottom
//
this._Form1UnpinnedTabAreaBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this._Form1UnpinnedTabAreaBottom.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._Form1UnpinnedTabAreaBottom.Location = new System.Drawing.Point(0, 670);
this._Form1UnpinnedTabAreaBottom.Name = "_Form1UnpinnedTabAreaBottom";
this._Form1UnpinnedTabAreaBottom.Owner = this.dm;
this._Form1UnpinnedTabAreaBottom.Size = new System.Drawing.Size(760, 0);
this._Form1UnpinnedTabAreaBottom.TabIndex = 10;
//
// _Form1AutoHideControl
//
this._Form1AutoHideControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this._Form1AutoHideControl.Location = new System.Drawing.Point(25, 27);
this._Form1AutoHideControl.Name = "_Form1AutoHideControl";
this._Form1AutoHideControl.Owner = this.dm;
this._Form1AutoHideControl.Size = new System.Drawing.Size(221, 746);
this._Form1AutoHideControl.TabIndex = 11;
//
// dockableWindow1
//
this.dockableWindow1.Controls.Add(this.ultraExplorerBar1);
this.dockableWindow1.Location = new System.Drawing.Point(0, 0);
this.dockableWindow1.Name = "dockableWindow1";
this.dockableWindow1.Owner = this.dm;
this.dockableWindow1.Size = new System.Drawing.Size(217, 643);
this.dockableWindow1.TabIndex = 20;
//
// windowDockingArea1
//
this.windowDockingArea1.Controls.Add(this.dockableWindow1);
this.windowDockingArea1.Dock = System.Windows.Forms.DockStyle.Left;
this.windowDockingArea1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.windowDockingArea1.Location = new System.Drawing.Point(0, 27);
this.windowDockingArea1.Name = "windowDockingArea1";
this.windowDockingArea1.Owner = this.dm;
this.windowDockingArea1.Size = new System.Drawing.Size(222, 643);
this.windowDockingArea1.TabIndex = 12;
this.windowDockingArea1.Visible = false;
//
// _Form1_Toolbars_Dock_Area_Left
//
this._Form1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._Form1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._Form1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._Form1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._Form1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 27);
this._Form1_Toolbars_Dock_Area_Left.Name = "_Form1_Toolbars_Dock_Area_Left";
this._Form1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 643);
this._Form1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
//
// ultraToolbarsManager1
//
this.ultraToolbarsManager1.DesignerFlags = 1;
this.ultraToolbarsManager1.DockWithinContainer = this;
this.ultraToolbarsManager1.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
this.ultraToolbarsManager1.MdiMergeable = false;
this.ultraToolbarsManager1.SettingsKey = "Form1.ultraToolbarsManager1";
this.ultraToolbarsManager1.ShowFullMenusDelay = 500;
ultraToolbar1.DockedColumn = 0;
ultraToolbar1.DockedRow = 0;
ultraToolbar1.IsMainMenuBar = true;
controlContainerTool1.ControlName = "edOpenWorkorder";
controlContainerTool1.InstanceProps.Width = 130;
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool1,
buttonTool1,
buttonTool2,
popupMenuTool2,
popupMenuTool3,
buttonTool3,
controlContainerTool1,
popupMenuTool4,
buttonTool4});
ultraToolbar1.Text = "LT:UI.Toolbar.MainMenuBar";
this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar1});
this.ultraToolbarsManager1.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False;
this.ultraToolbarsManager1.ToolbarSettings.AllowFloating = Infragistics.Win.DefaultableBoolean.False;
this.ultraToolbarsManager1.ToolbarSettings.AllowHiding = Infragistics.Win.DefaultableBoolean.False;
popupMenuTool5.SharedPropsInternal.Caption = "LT:UI.Menu.Go";
popupMenuTool5.SharedPropsInternal.Category = "Main Menu";
popupMenuTool5.SharedPropsInternal.Visible = false;
popupMenuTool5.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
stateButtonTool1,
stateButtonTool2,
stateButtonTool3,
stateButtonTool4,
stateButtonTool5,
stateButtonTool6,
stateButtonTool7,
stateButtonTool8,
stateButtonTool9});
popupMenuTool6.Settings.IsSideStripVisible = Infragistics.Win.DefaultableBoolean.False;
popupMenuTool6.SharedPropsInternal.Caption = "LT:UI.Menu.SubGrids";
popupMenuTool6.SharedPropsInternal.Category = "Main menu";
popupMenuTool6.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool5,
buttonTool6,
buttonTool7,
buttonTool8,
buttonTool9,
buttonTool10,
buttonTool11,
buttonTool12,
buttonTool13,
buttonTool14,
buttonTool15,
buttonTool16,
buttonTool17,
buttonTool18,
buttonTool19,
buttonTool20});
popupMenuTool7.SharedPropsInternal.Caption = "LT:UI.Menu.Help";
popupMenuTool7.SharedPropsInternal.Category = "Main Menu";
popupMenuTool7.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool21,
buttonTool22,
buttonTool23,
buttonTool24,
buttonTool25,
buttonTool26,
buttonTool27,
buttonTool28});
stateButtonTool10.SharedPropsInternal.Caption = "LT:Client.Label.List";
stateButtonTool10.SharedPropsInternal.Category = "Main Menu";
stateButtonTool11.SharedPropsInternal.Caption = "LT:UI.Go.Service";
stateButtonTool11.SharedPropsInternal.Category = "Main Menu";
stateButtonTool12.SharedPropsInternal.Caption = "LT:UI.Go.Inventory";
stateButtonTool12.SharedPropsInternal.Category = "Main Menu";
stateButtonTool13.SharedPropsInternal.Caption = "LT:UI.Go.Schedule";
stateButtonTool13.SharedPropsInternal.Category = "Main Menu";
stateButtonTool14.SharedPropsInternal.Caption = "LT:Unit.Label.List";
stateButtonTool14.SharedPropsInternal.Category = "Main Menu";
stateButtonTool15.SharedPropsInternal.Caption = "LT:Vendor.Label.List";
stateButtonTool15.SharedPropsInternal.Category = "Main Menu";
stateButtonTool16.SharedPropsInternal.Caption = "LT:UI.Go.Administration";
stateButtonTool16.SharedPropsInternal.Category = "Main Menu";
buttonTool29.SharedPropsInternal.Caption = "LT:DispatchZone.Label.List";
buttonTool30.SharedPropsInternal.Caption = "LT:ClientGroup.Label.List";
buttonTool31.SharedPropsInternal.Caption = "LT:WorkorderItemType.Label.List";
buttonTool32.SharedPropsInternal.Caption = "LT:WorkorderCategory.Label.List";
buttonTool33.SharedPropsInternal.Caption = "LT:WorkorderStatus.Label.List";
buttonTool34.SharedPropsInternal.Caption = "LT:Priority.Label.List";
buttonTool35.SharedPropsInternal.Caption = "LT:UnitOfMeasure.Label.List";
buttonTool36.SharedPropsInternal.Caption = "LT:PartCategory.Label.List";
buttonTool37.SharedPropsInternal.Caption = "LT:PartAssembly.Label.List";
buttonTool38.SharedPropsInternal.Caption = "LT:Rate.Label.List";
buttonTool39.SharedPropsInternal.Caption = "LT:TaxCode.Label.List";
buttonTool40.SharedPropsInternal.Caption = "LT:UserCertification.Label.List";
buttonTool41.SharedPropsInternal.Caption = "LT:UserSkill.Label.List";
buttonTool42.SharedPropsInternal.Caption = "LT:UI.Go.Logout";
buttonTool42.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
buttonTool43.SharedPropsInternal.Caption = "LT:UnitServiceType.Label.List";
buttonTool44.SharedPropsInternal.AllowMultipleInstances = false;
appearance59.Image = ((object)(resources.GetObject("appearance59.Image")));
buttonTool44.SharedPropsInternal.AppearancesLarge.Appearance = appearance59;
appearance60.Image = ((object)(resources.GetObject("appearance60.Image")));
buttonTool44.SharedPropsInternal.AppearancesSmall.Appearance = appearance60;
buttonTool44.SharedPropsInternal.ShowInCustomizer = false;
buttonTool45.SharedPropsInternal.Caption = "LT:PartWarehouse.Label.List";
buttonTool46.SharedPropsInternal.Caption = "LT:UnitModelCategory.Label.List";
buttonTool47.SharedPropsInternal.Caption = "LT:UI.Command.Close";
buttonTool47.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
stateButtonTool17.SharedPropsInternal.Caption = "LT:UI.Go.Quotes";
stateButtonTool18.SharedPropsInternal.Caption = "LT:UI.Go.PreventiveMaintenance";
buttonTool48.SharedPropsInternal.Caption = "LT:UI.Help.Contents";
buttonTool48.SharedPropsInternal.Category = "Main Menu";
buttonTool48.SharedPropsInternal.Shortcut = System.Windows.Forms.Shortcut.F1;
controlContainerTool2.ControlName = "edOpenWorkorder";
controlContainerTool2.SharedPropsInternal.Caption = "LT:O.Workorder";
controlContainerTool2.SharedPropsInternal.Width = 130;
buttonTool49.SharedPropsInternal.Caption = "LT:UI.Help.License";
appearance61.Image = ((object)(resources.GetObject("appearance61.Image")));
popupMenuTool8.SharedPropsInternal.AppearancesLarge.Appearance = appearance61;
appearance62.Image = ((object)(resources.GetObject("appearance62.Image")));
popupMenuTool8.SharedPropsInternal.AppearancesSmall.Appearance = appearance62;
popupMenuTool8.SharedPropsInternal.Caption = "LT:UI.Menu.MRU";
popupMenuTool8.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars;
popupMenuTool8.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
listTool1});
listTool2.SharedPropsInternal.Caption = "MRULIST";
appearance63.Image = ((object)(resources.GetObject("appearance63.Image")));
buttonTool50.SharedPropsInternal.AppearancesLarge.Appearance = appearance63;
appearance64.Image = ((object)(resources.GetObject("appearance64.Image")));
buttonTool50.SharedPropsInternal.AppearancesSmall.Appearance = appearance64;
buttonTool50.SharedPropsInternal.Caption = "LT:O.WikiPage";
buttonTool51.SharedPropsInternal.Caption = "LITE";
buttonTool52.SharedPropsInternal.Caption = "LT:UI.Help.AboutAyaNova";
buttonTool52.SharedPropsInternal.Category = "Main Menu";
buttonTool53.SharedPropsInternal.Caption = "LT:UI.Help.TechSupport";
buttonTool53.SharedPropsInternal.Category = "Main Menu";
buttonTool54.SharedPropsInternal.Caption = "LT:UI.Help.CheckForUpdates";
buttonTool54.SharedPropsInternal.Category = "Main Menu";
buttonTool55.SharedPropsInternal.Caption = "LT:UI.Help.PurchaseLicenses";
buttonTool55.SharedPropsInternal.Category = "Main Menu";
appearance65.FontData.UnderlineAsString = "True";
appearance65.ForeColor = System.Drawing.Color.Blue;
buttonTool56.SharedPropsInternal.AppearancesSmall.Appearance = appearance65;
buttonTool56.SharedPropsInternal.Caption = "Quick start guide for beginners";
this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool5,
popupMenuTool6,
popupMenuTool7,
stateButtonTool10,
stateButtonTool11,
stateButtonTool12,
stateButtonTool13,
stateButtonTool14,
stateButtonTool15,
stateButtonTool16,
buttonTool29,
buttonTool30,
buttonTool31,
buttonTool32,
buttonTool33,
buttonTool34,
buttonTool35,
buttonTool36,
buttonTool37,
buttonTool38,
buttonTool39,
buttonTool40,
buttonTool41,
buttonTool42,
buttonTool43,
buttonTool44,
buttonTool45,
buttonTool46,
buttonTool47,
stateButtonTool17,
stateButtonTool18,
buttonTool48,
controlContainerTool2,
buttonTool49,
popupMenuTool8,
listTool2,
buttonTool50,
buttonTool51,
buttonTool52,
buttonTool53,
buttonTool54,
buttonTool55,
buttonTool56});
this.ultraToolbarsManager1.BeforeToolDropdown += new Infragistics.Win.UltraWinToolbars.BeforeToolDropdownEventHandler(this.ultraToolbarsManager1_BeforeToolDropdown);
this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
//
// _Form1_Toolbars_Dock_Area_Right
//
this._Form1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._Form1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._Form1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._Form1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._Form1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(760, 27);
this._Form1_Toolbars_Dock_Area_Right.Name = "_Form1_Toolbars_Dock_Area_Right";
this._Form1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 643);
this._Form1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
//
// _Form1_Toolbars_Dock_Area_Top
//
this._Form1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._Form1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._Form1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._Form1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._Form1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._Form1_Toolbars_Dock_Area_Top.Name = "_Form1_Toolbars_Dock_Area_Top";
this._Form1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(760, 27);
this._Form1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
//
// _Form1_Toolbars_Dock_Area_Bottom
//
this._Form1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._Form1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._Form1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._Form1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._Form1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 670);
this._Form1_Toolbars_Dock_Area_Bottom.Name = "_Form1_Toolbars_Dock_Area_Bottom";
this._Form1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(760, 0);
this._Form1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel2,
this.toolStripStatusLabel1,
this.toolStripClock});
this.statusStrip1.Location = new System.Drawing.Point(0, 670);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(760, 23);
this.statusStrip1.TabIndex = 18;
//
// toolStripStatusLabel2
//
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
this.toolStripStatusLabel2.Size = new System.Drawing.Size(372, 18);
this.toolStripStatusLabel2.Spring = true;
this.toolStripStatusLabel2.Text = "---";
this.toolStripStatusLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(372, 18);
this.toolStripStatusLabel1.Spring = true;
this.toolStripStatusLabel1.Text = "....";
this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// toolStripClock
//
this.toolStripClock.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
this.toolStripClock.Name = "toolStripClock";
this.toolStripClock.Size = new System.Drawing.Size(0, 18);
//
// timerClock
//
this.timerClock.Interval = 1000;
this.timerClock.Tick += new System.EventHandler(this.timerClock_Tick);
//
// ultraDesktopAlert1
//
this.ultraDesktopAlert1.DesktopAlertLinkClicked += new Infragistics.Win.Misc.DesktopAlertLinkClickedHandler(this.ultraDesktopAlert1_DesktopAlertLinkClicked);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(760, 693);
this.Controls.Add(this._Form1AutoHideControl);
this.Controls.Add(this.Form1_Fill_Panel);
this.Controls.Add(this.windowDockingArea1);
this.Controls.Add(this._Form1UnpinnedTabAreaTop);
this.Controls.Add(this._Form1UnpinnedTabAreaBottom);
this.Controls.Add(this._Form1UnpinnedTabAreaLeft);
this.Controls.Add(this._Form1UnpinnedTabAreaRight);
this.Controls.Add(this._Form1_Toolbars_Dock_Area_Left);
this.Controls.Add(this._Form1_Toolbars_Dock_Area_Right);
this.Controls.Add(this._Form1_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this._Form1_Toolbars_Dock_Area_Top);
this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
this.IsMdiContainer = true;
this.Name = "Form1";
this.helpProvider1.SetShowHelp(this, true);
this.Text = "AyaNova";
this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
this.Deactivate += new System.EventHandler(this.Form1_Deactivate);
this.Load += new System.EventHandler(this.Form1_Load);
this.Shown += new System.EventHandler(this.Form1_Shown);
this.ultraExplorerBarContainerControl2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.ServiceTree)).EndInit();
this.ultraExplorerBarContainerControl3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.QuoteTree)).EndInit();
this.ultraExplorerBarContainerControl4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.PMTree)).EndInit();
this.ultraExplorerBarContainerControl1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.ctDateNav)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ultraExplorerBar1)).EndInit();
this.ultraExplorerBar1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.edOpenWorkorder)).EndInit();
this.Form1_Fill_Panel.ResumeLayout(false);
this.Form1_Fill_Panel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dm)).EndInit();
this.dockableWindow1.ResumeLayout(false);
this.windowDockingArea1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ultraDesktopAlert1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///// <summary>
///// The main entry point for the application.
///// </summary>
//[STAThread]
//static void Main()
//{
//}
#region Unhandled exception handler
static bool MainFormLoadingComplete = false;//case 1389
public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
//splash.CloseForm();
//Splash2.Fadeout();
try
{//System.Diagnostics.Debugger.Launch();
string errorMessage = "";
//Case 815 eat buggy exception message in devexpress scheduler
if (e.Exception.StackTrace.IndexOf("DevExpress.XtraScheduler.DateNavigator.OnKeyDown") != -1)
{
//eat it, it's some kind of intermittent bug when you press the right arrow in the calendar
return;
}
//case 1389
if (!MainFormLoadingComplete)
{
if (e.Exception is System.InvalidOperationException)
{
return;
}
}
if (e.Exception.Message.IndexOf("LICENSE") == -1)
{
// It's not a license related error so
//display and log the exception
log.Fatal("Unhandled exception", e.Exception);
//Changed: 17-Nov-2006 case 168
Exception e2;
if (e.Exception is System.Reflection.TargetInvocationException)
e2 = e.Exception.InnerException;
else
e2 = e.Exception;
errorMessage = e2.Message;
}
else
{
//It's a license violation so don't include stack trace etc
//and don't allow to continue after message
errorMessage = e.Exception.Message;
log.Fatal(errorMessage);
ExceptionDialog dl = new ExceptionDialog(errorMessage, true);
dl.ShowDialog();
Application.Exit();
return;
}
ExceptionDialog d = new ExceptionDialog(errorMessage, false);
DialogResult result = d.ShowDialog();
// Exit the program if the user clicks Abort.
if (result == DialogResult.Abort)
{
log.Warn("User opted to abort after exception. Exiting now");
Application.Exit();
}
else
{
log.Warn("User opted to continue after exception");
}
}
catch
{
// Fatal error, terminate program
try
{
ExceptionDialog d = new ExceptionDialog("FATAL ERROR", true);
d.ShowDialog();
}
finally
{
Application.Exit();
}
}
}
#endregion
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
//************************************************************
#region Form load / close
private void Form1_Load(object sender, System.EventArgs e)
{
//
// helpProvider1
//
this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "index.html ";
this.Hide(); //case 1389
statusStrip1.Cursor = Cursors.Default;
// Subscribe to thread (unhandled) exception events
// (Alternatively, could do this in Form_Load)
Application.ThreadException += new ThreadExceptionEventHandler(
Application_ThreadException);
Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
this.Icon = Resource1.AyaNova5;
Util.InitUtil(this);
//splash.CloseForm();
// Splash2.Fadeout();
DoLogin();
if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
Util.PluginInsertMenu(ultraToolbarsManager1, new Util.PluginMenuOptionData(true, RootObjectTypes.Nothing, null, null));//case 941
//case 73
if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
{
string[] args = Environment.GetCommandLineArgs();
if (args != null && args.Length > 0)
{
TypeAndID tid = TypeAndID.ParseAyaURL(args[args.Length - 1]);
if (tid != null)
Util.EditRecord(tid);
}
}
//case 1389 - trying this as a possible solution
//while (!IsHandleCreated) ;
//case 1389 a value of 50 stopped the error so doubling it for a safety margin
//Update sept 2010 a user claims it still happens on a dataportal and lan connection.
//sounds suspect to me but I'll double it and see, this is starting to get into noticeable territory
//so if he says it's still happening then I want to know if other users are seeing it as well or just him
//Joyce still seeing it so setting it to 400 because I don't give a fuck any more
//Thread.Sleep(400);
}
private void Application_ApplicationExit(object sender, EventArgs e)
{
log.Info("AyaNova has shut down OK");
}
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//Case 677 - without this you can close and lose changes in any open dirty work orders
WorkorderForm wf = Util.OpenDirtyWorkOrder;
if (wf != null)
{
e.Cancel = true;
return;
}
//case 1039 //log.Debug("Form1_Closing");
Util.PluginRemoveMenu(this.ultraToolbarsManager1);//case 941
CloseShop();
DoLogout();
#if (xDEBUG)
MessageBox.Show("Localized text keys used: " + LocalizedTextTable.KeysUsed.Count.ToString());
;
#endif
}
private void CloseShop()
{
//case 1039 //log.Debug("CloseShop: Closing main form, saving settings");
//Save user form settings
if (Thread.CurrentPrincipal != null && Thread.CurrentPrincipal.Identity.IsAuthenticated != false)
{
log.Info(Thread.CurrentPrincipal.Identity.Name + " closing AyaNova");
//turn off month view stuff or it will cause
//a load of appointments when it closes
// ultraMonthViewMulti1.EventManager.AllEventsEnabled=false;
if (Util.GlobalSettings.IsDirty)
{
//case 1039 //log.Debug("GlobalSettings need to be saved, displaying GlobalSettings form");
ShowForm("LT:UI.Go.Administration", "LT:UI.Go.Administration.GlobalSettings");
}
if (frmGlobalSettings != null)
{
//case 1039 //log.Debug("Closing GlobalSettings form");
frmGlobalSettings.Close();
frmGlobalSettings = null;
}
if (frmMainSchedule != null)
{
//case 1311
this.ctDateNav.SchedulerControl = null;
frmMainSchedule.Close();
frmMainSchedule = null;
}
if (frmSubscriptions != null)
{
//case 1039 //log.Debug("Closing Notification subscriptions form");
frmSubscriptions.Close();
frmSubscriptions = null;
}
if (frmMainRegions != null)
{
//case 1039 //log.Debug("Closing Regions form");
frmMainRegions.Close();
frmMainRegions = null;
}
if (frmLocalizedText != null)
{
//case 1039 //log.Debug("Closing LocalizedText form");
frmLocalizedText.Close();
frmLocalizedText = null;
}
if (frmSecurityGroups != null)
{
//case 1039 //log.Debug("Closing SecurityGroups form");
frmSecurityGroups.Close();
frmSecurityGroups = null;
}
if (this.frmNotifyDeliveryLogs != null)
{
//case 1039 //log.Debug("Closing NotifyDeliveryLogs form");
frmNotifyDeliveryLogs.Close();
frmNotifyDeliveryLogs = null;
}
if (frmCustomizeableObjects != null)
{
//case 1039 //log.Debug("Closing CustomizeableObjects form");
frmCustomizeableObjects.Close();
frmCustomizeableObjects = null;
}
if (frmMainGrid != null)
{
//case 1039 //log.Debug("Closing MainGrid form");
frmMainGrid.Close();
frmMainGrid = null;
}
//case 1805
if (frmDashboard != null)
{
frmDashboard.Close();
frmDashboard = null;
}
}
}
#endregion
#region Login/out
private void DoLogin()
{
//case 1039 //log.Debug("DoLogin");
if (Thread.CurrentPrincipal.Identity.IsAuthenticated != false)
{
DoLogout();
}
bool bDoLogin = true;
string sLogin = "user";
string sPass = "user";
if (!AyaBizUtils.Lite)
{
Login dlg = null;
#if(DEBUG)
dlg = new Login("manager", "letmein");
#else
if(AyaBizUtils.Trial)
dlg = new Login("manager","letmein");
else
dlg = new Login("","");
#endif
dlg.ShowDialog(this);
bDoLogin = dlg.LoggingIn;
sLogin = dlg.Username;
sPass = dlg.Password;
dlg.Dispose();
}
if (bDoLogin)
{
Cursor = Cursors.WaitCursor;
Status("Verifying user...");
AyaBizUtils.Login(sLogin, sPass);
Status("");
if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
{
log.Info(Thread.CurrentPrincipal.Identity.Name + " logged in");
//Get the settings
//NOTE: this triggers the first database call *after* the login one by indirectly triggering the ScheduleableUserCountFetcher which is the first database call and why
//we often see a log trace like this:
/*
en System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
en System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
en System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
en System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
en System.Data.SqlClient.SqlConnection.Open()
en GZTW.Data.GZTWDatabase.OpenConnection()
en GZTW.Data.GZTWDatabase.ExecuteScalar(DBCommandWrapper command) //<------THIS IS THE CALL TO THE SCHEDULEABLE USER COUNT FETCHER FOR SOME REASON THIS IS THE ERROR SEEN IN A DB RELATED ISSUE IMMEDIATELY AFTER LOGIN MOST OFTEN
en GZTW.AyaNova.BLL.DBUtil.A(String A)
en GZTW.AyaNova.BLL.Global.DataPortal_Fetch(Object Criteria)
*/
User uLoggingIn = User.GetItem((((BusinessPrincipal)Thread.CurrentPrincipal).ID));
//change: 9-Nov-2006 check for client account login and prevent it
if (uLoggingIn.IsClientOrHeadOfficeAccount)
{
log.Info(Thread.CurrentPrincipal.Identity.Name + " is a client account, ACCESS DENIED, shutting down.");
MessageBox.Show("Sorry, client account logins are restricted to AyaNova WBI and AyaNova RI only.");
Application.Exit();
return;
}
Util.CurrentUserDefaultPartWarehouseID = uLoggingIn.DefaultWarehouseID;
//case 939
Util.CurrentUserIsAdminType = uLoggingIn.UserType == UserTypes.Administrator;
//Load the localized text data
Util.LocaleText = LocalizedTextTable.Load(uLoggingIn.DefaultLanguage);
//From this point on we can use the localized text...
//case 786 - force a reset for cases where a re-login is happening
//to clear old ro status
AyaBizUtils.GlobalSettings = null;
//changed:13-July-2006 this forces the biz utils global settings object
//to initialize thus preventing a lockup when it's accessed
//from within another objects transaction while doing the keyword Break
//method
Util.GlobalSettings = AyaBizUtils.GlobalSettings;
//Util.GlobalSettings=Global.GetItem();
//GZTW.AyaNova.BLL.AyaBizUtils.GlobalSettings=Util.GlobalSettings;
Util.RegionalSettings = GZTW.AyaNova.BLL.Region.GetItem(uLoggingIn.RegionID);
GZTW.AyaNova.BLL.AyaBizUtils.RegionalSettings = Util.RegionalSettings;
log.Info("Settings:\r\n" +
Util.FullSettingsInfo(uLoggingIn));
//Load / re-load plugins
Util.LoadPluginsEx();
//Get users form setting preferences collection
Util.gFormSettings = UIUserFormSettings.GetItems(User.CurrentThreadUserID);
//Changed: 15-March-2005 added so that admins settings can be copied if any
//missing for current user
Util.gAdminFormSettings = UIUserFormSettings.GetItems(User.AdministratorID);
//Added: 22-May-2006 added for new grid layout objects
Util.gGridLastViews = UIUserGridLastViews.GetItems(User.CurrentThreadUserID);
//Get users explorer bar layout for this form1
UIExplorerBarLayout uexp = UIExplorerBarLayout.GetItem("Main", User.CurrentThreadUserID);
//==========================================================================
//Load the toolbarmanager layout
if (uexp.LayoutSize > 0 && ((Control.ModifierKeys & Keys.Shift) == 0) /*Shift key not held down*/)
{
//case 1560
try
{
this.ultraExplorerBar1.LoadFromBinary(uexp.GetExplorerBarLayoutContent());
}
catch { }
this.ultraExplorerBar1.ViewStyle = UltraExplorerBarViewStyle.Office2007;
this.dm.DockAreas[0].Size = new Size(uexp.SplitPosition1, this.dm.DockAreas[0].Size.Height);
int newwidth = uexp.SplitPosition1;
if (newwidth < 60) newwidth = 60;//sanity check
DockableControlPane pane = dm.ControlPanes[0];
pane.FlyoutSize = new Size(newwidth, pane.FlyoutSize.Height);
//this.splitter1.SplitPosition=uexp.SplitPosition1;
this.panel1.Height = uexp.SplitPosition2;
}
//==========================================================================
Util.LoadFormCustomization("MainForm", this, ultraToolbarsManager1, false);
//Localize all of the infragistics
//components internal messages that user might see
//this only needs to be called this one time for
//the entire session
Util.LocalizeInfragistics();
Status("");
Util.LocalizeHelperInsertMenu(ultraToolbarsManager1, this); //case 1810
Util.Localize(this);
Util.Localize(this.dm);
EnableMenus();
//Check if license required flag
if (LCheck())
{
this.Close();
return;
}
//case 2094
//check if Schema update is required
if (SchemaCheck())
{
this.Close();
return;
}
////Set user prefs group to users own name
if (ultraExplorerBar1.Groups["LT:UI.Go.User"].Visible)
{
ultraExplorerBar1.Groups["LT:UI.Go.User"].Text = Thread.CurrentPrincipal.Identity.Name;
}
//Show last selected form
string sFormKey = "";
string sSubFormKey = "";
if (uLoggingIn.LastView != "")
{
//Does it contain a subform as well?
if (uLoggingIn.LastView.IndexOf(",") != -1)
{
//split it out
string[] split = uLoggingIn.LastView.Split(",".ToCharArray(), 2);
sFormKey = split[0];
sSubFormKey = split[1];
}
}
//show form or if no match then show first visible form
//case 2103, if formkey is empty then also show first visible form
if (string.IsNullOrEmpty(sFormKey) || (!ShowForm(sFormKey, sSubFormKey)))
{
//Show first visible form (i.e. one they have access to)
for (int x = 0; x < ultraExplorerBar1.Groups.Count; x++)
{
if (ultraExplorerBar1.Groups[x].Visible == true)
{
ultraExplorerBar1.SelectedGroup = ultraExplorerBar1.Groups[x];
ShowForm(ultraExplorerBar1.SelectedGroup.Key, "");
break;
}
}
}
else
{
try
{
//Sucessfully showed the last viewed form, now need to ensure that the
//explorerbar on the left matches the visible form...
ultraExplorerBar1.SelectedGroup = ultraExplorerBar1.Groups[sFormKey];
//Is the sub item a tree or a explorer bar?
if (sFormKey == "LT:UI.Go.Service" ||
sFormKey == "LT:UI.Go.Quotes" ||
sFormKey == "LT:UI.Go.PreventiveMaintenance")
{
//It's a tree..get a reference to it...
Infragistics.Win.UltraWinTree.UltraTree t = (Infragistics.Win.UltraWinTree.UltraTree)ultraExplorerBar1.Groups[sFormKey].Container.Controls[0];
t.ExpandAll();
//Preselect the first node in case there is no selected subformitem
Infragistics.Win.UltraWinTree.UltraTreeNode n = t.Nodes[0];
//Is there a subitem to select?
if (sSubFormKey != "")
n = t.GetNodeByKey(sSubFormKey);
n.Selected = true;
n.BringIntoView(true);
}
else
{
//It's an explorer bar
//And ensure that the sub form item is checked....
if (sSubFormKey != null && sSubFormKey != "")
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[sSubFormKey].Checked = true;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
}
}
}
catch (System.ArgumentException aex)
{
log.Error("RECOVERABLE ERROR: In DoLogin() setting last viewed form: (FormKey=\"" + sFormKey + "\", SubFormKey=\"" + sSubFormKey + "\")", aex);
}
}
//Initially hide the popup notification
//tool bar button in case it's turned off or there are none
ShowNotifyPopMenuOption(false);
this.Visible = true;
//start popup timer for notification popup alerts
//But not for the admin user
if (!User.IsAdmin && !AyaBizUtils.Lite)//case 1172 for the lite
{
timer1.Enabled = true;
//these two case 1472
timer1.Interval = 500;
timer1.Start();
}
//case 1163 start clock timer
if (AyaBizUtils.OverrideTimeZone)
{
toolStripClock.Font = new Font(toolStripClock.Font, FontStyle.Bold);
}
else
{
toolStripClock.Font = new Font(toolStripClock.Font, FontStyle.Regular);
}
timerClock.Enabled = true;
string sstat = AyaBizUtils.stat;
if (sstat != "")
{
log.Info(sstat);
MessageBox.Show(sstat);
ShowForm("LT:UI.Go.Administration", "LT:User.Label.List");
}
}
else
{
//backdoor reset of manager password
string s = GZTW.AyaNova.BLL.AyaBizUtils.SS(sLogin, sPass);
DoLogout();
if (s == "~~~")
{
this.Close();
}
else
{
log.Info("Login failed invalid username or password");
MessageBox.Show("The username or password are not valid", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
DoLogin();
}
}
}
else
{
DoLogout();
Close();
}
}
//Check and handle if license is required
private bool LCheck()
{
//case 2094
if (LicenseRequired)
{
string s = "This is a new version of AyaNova not previously used with this database\r\n\r\nAn active subscription license is required to use it\r\n\r\nThere are two options:\r\n1) Downgrade back to the previous version\r\n2) Install a new license\r\n\r\n";
if (!AyaBizUtils.Lite && User.AdministratorID != User.CurrentThreadUserID)
{
log.Info(s+"Current user is not the Manager account.\r\nInforming of options and exiting...");
MessageBox.Show(s+"If you would like to install a new license you must log in again using the AyaNova \"Manager\" account.");
Application.Exit();
return true;
}
log.Info(s+"Prompting for license entry...");
if (MessageBox.Show(s+"You can enter a new license now by selecting OK", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
{
log.Info("User opted for license entry form...");
GlobalxForm g = new GlobalxForm(true);
g.ShowDialog();
Application.Exit();
return true;
}
else
{
log.Info("User opted to exit...");
Application.Exit();
return true;
}
}
return false;
}
//case 2103
bool bSchemaWasOutdated = false;
//case 2094
//Check and handle if Schema update is required
private bool SchemaCheck()
{
//case 2103
bSchemaWasOutdated = AyaBizUtils.SchemaOutdated;
if (AyaBizUtils.SchemaOutdated)
{
if (!AyaBizUtils.Lite)
{
string s = "This AyaNova database needs to be updated.\r\n\r\nClose all other programs using this AyaNova database ** now ** before proceeding\r\n(Close AyaNova at other computers, DataPortal, MBI, WBI, RI, Generator etc)\r\n\r\n";
if (User.AdministratorID != User.CurrentThreadUserID)
{
log.Info(s + "Current user is not the Manager account.\r\nInforming of options and exiting...");
MessageBox.Show(s + "To proceed with the database update you must log in again using the AyaNova \"Manager\" account.");
Application.Exit();
return true;
}
log.Info(s + "Prompting double check all other users are out...");
if (MessageBox.Show(s + "\r\nIf you are absolutely **CERTAIN** no other app.\r\nis using this AyaNova database right now\r\nproceed by selecting OK", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
{
log.Info("User has agreed they are absolutely certain no other apps are using DB...");
AyaBizUtils.UpdateSchema();
MessageBox.Show("Schema has been updated.\r\nAyaNova will now close to complete the update.");
Application.Exit();
return true;
}
else
{
log.Info("User opted to exit...");
Application.Exit();
return true;
}
}
else
{
//It's LITE, nothing else can be using the db now anyway so no need to prompt just do the update
AyaBizUtils.UpdateSchema();
MessageBox.Show("The database schema has been updated.\r\nAyaNova will now close to complete the update.");
Application.Exit();
return true;
}
}
return false;
}
/// <summary>
/// Save the layout on a logout or form close
/// </summary>
private void SaveExplorerBarLayout()
{
if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
{
//case 1039 //log.Debug( Thread.CurrentPrincipal.Identity.Name + " - saving explorer bar layout");
//===========================================================
//Save explorer bar customization
UIExplorerBarLayout uexp = UIExplorerBarLayout.GetItem("Main", User.CurrentThreadUserID);
System.IO.MemoryStream msTemp = new System.IO.MemoryStream();
this.ultraExplorerBar1.SaveAsBinary(msTemp);
uexp.SetExplorerBarLayoutContent(msTemp);
DockableControlPane pane = dm.ControlPanes[0];
uexp.SplitPosition1 = pane.FlyoutSize.Width;
uexp.SplitPosition2 = this.panel1.Height;
uexp.Save();
//===========================================================
}
}
private void DoLogout()
{
timer1.Enabled = false;
timerClock.Enabled = false;
//case 1312 reset popup id list
if (lsShownPopUpNotifications != null)
lsShownPopUpNotifications.Clear();
if (Thread.CurrentPrincipal == null || Thread.CurrentPrincipal.Identity.IsAuthenticated == false) return;
log.Info(Thread.CurrentPrincipal.Identity.Name + " logging out");
//case 2103 no need for further processing
//and we do *not* want to save form customization after a schema update that
//could potentially change them
if (bSchemaWasOutdated) return;
SaveExplorerBarLayout();
Util.SaveFormCustomization("MainForm", this, ultraToolbarsManager1, false);
User u = User.GetItem((((BusinessPrincipal)Thread.CurrentPrincipal).ID));
u.LastView = mCurrentForm + "," + mItemKey;
u.Save();
Util.gFormSettings.Save();
Util.gGridLastViews.Save();
AyaBizUtils.MRU.Save();
//Unload plugins
Util.UnloadPluginsEx();
this.WindowState = FormWindowState.Normal;
this.Visible = false;
Thread.CurrentPrincipal = null;
Util.GlobalSettings = null;
Util.RegionalSettings = null;
Status("");
//case 774
mCurrentForm = "";
mItemKey = "";
}
public void Status(String Text)
{
if (Thread.CurrentPrincipal.Identity.IsAuthenticated)
toolStripStatusLabel1.Text = Thread.CurrentPrincipal.Identity.Name;
else
toolStripStatusLabel1.Text = "";
toolStripStatusLabel2.Text = Text;
}
#endregion
#region Security and access rights
/// <summary>
/// this is where the various menu items get enabled based on roles etc
/// </summary>
private void EnableMenus()
{
//case 1039 //log.Debug("Enable menus");
bool bVisible = false;
//case 1172
ultraToolbarsManager1.Tools["LT:UI.Go.Logout"].SharedProps.Visible = !AyaBizUtils.Lite;
//case 73
ultraToolbarsManager1.Tools["LT:O.WikiPage"].SharedProps.Visible = Util.GlobalSettings.CanWiki && !AyaBizUtils.Lite;
//License entry menu option
//case 1817 - show it all the time but prevent install other than admin with descriptive message to avoid
//support questions "where is the license entry thing, it's not there...blah blah"
//ultraToolbarsManager1.Tools["LT:UI.Help.License"].SharedProps.Visible=User.IsAdmin || AyaBizUtils.Lite;
ultraToolbarsManager1.Tools["LT:UI.Help.License"].SharedProps.Visible = true;
//CLIENTS
//Hide all or selected items?
bVisible = (
(AyaBizUtils.Right("Object.HeadOffice") > 1) ||
(AyaBizUtils.Right("Object.Contract") > 1) ||
(AyaBizUtils.Right("Object.Client") > 1) ||
(AyaBizUtils.Right("Object.Project") > 1)
);
ultraExplorerBar1.Groups["LT:Client.Label.List"].Visible = bVisible;
//Restrict subitems as necessary:
if (bVisible)
{
ultraExplorerBar1.Groups["LT:Client.Label.List"].Items["LT:Client.Label.List"].Visible = (AyaBizUtils.Right("Object.Client") > 1);
ultraExplorerBar1.Groups["LT:Client.Label.List"].Items["LT:HeadOffice.Label.List"].Visible = (AyaBizUtils.Right("Object.HeadOffice") > 1);
ultraExplorerBar1.Groups["LT:Client.Label.List"].Items["LT:Contract.Label.List"].Visible = (AyaBizUtils.Right("Object.Contract") > 1);
ultraExplorerBar1.Groups["LT:Client.Label.List"].Items["LT:Project.Label.List"].Visible = (AyaBizUtils.Right("Object.Project") > 1);
ultraExplorerBar1.Groups["LT:Client.Label.List"].Items["LT:ClientServiceRequest.Label.List"].Visible =
(AyaBizUtils.Right("Object.ClientServiceRequest") > 1) &&
(
AyaBizUtils.PluginSubscriptionExists("WBI - Web browser interface") ||
AyaBizUtils.PluginSubscriptionExists("RI - Responsive Interface")
);
}
//*** WORKORDERS ***
//Case 441 changed this block
bVisible = (
(AyaBizUtils.Right("Object.WorkorderService") > 1) ||//case 1001
(AyaBizUtils.Right("Object.WorkorderPreventiveMaintenance") > 1) ||
(AyaBizUtils.Right("Object.WorkorderQuote") > 1)
);
//show quick open workorder edit box and buttons in tool bar
//if user has rights to *any* form of workorder else hide them all
edOpenWorkorder.Visible = bVisible;
//Quick workorder open toolbar button
ultraToolbarsManager1.Toolbars["LT:UI.Toolbar.MainMenuBar"].Tools["LT:O.Workorder"].SharedProps.Visible = bVisible;
//SERVICE
ultraExplorerBar1.Groups["LT:UI.Go.Service"].Visible = AyaBizUtils.Right("Object.WorkorderService") > 1;//case 1001
edOpenWorkorder.ButtonsRight["SERVICE"].Visible = AyaBizUtils.Right("Object.WorkorderService") > 1;//case 1001
//case 1172
if (AyaBizUtils.Lite)
{
// ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ScheduledUsers"].Visible = false;
//ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Labors"].Visible = false;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Travels"].Visible = false;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Loans"].Visible = false;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Expenses"].Visible = false;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.CustomFields"].Visible = false;
ServiceTree.Nodes[1].Visible = false;
}
else
{
//case 1317 hide workorder grandchild items
if (AyaBizUtils.Right("Object.WorkorderService") > 1)
{
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ScheduledUsers"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemScheduledUser) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Labors"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLabor) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Travels"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemTravel) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Loans"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLoan) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Expenses"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemMiscExpense) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.Parts"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemPart) > 1;
ServiceTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.CustomFields"].Visible = Util.ShowCustomFields("WorkorderItem");
}
if (AyaBizUtils.Right("Object.WorkorderPreventiveMaintenance") > 1)
{
PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ScheduledUsersPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemScheduledUser) > 1;
PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.LaborsPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLabor) > 1;
PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.TravelsPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemTravel) > 1;
// PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.LoansPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLoan) > 1;
//PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ExpensesPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemMiscExpense) > 1;
PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.PartsPM"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemPart) > 1;
PMTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.CustomFieldsPM"].Visible = Util.ShowCustomFields("WorkorderItem");
}
if (AyaBizUtils.Right("Object.WorkorderQuote") > 1)
{
QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ScheduledUsersQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemScheduledUser) > 1;
QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.LaborsQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLabor) > 1;
QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.TravelsQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemTravel) > 1;
// QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.LoansQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemLoan) > 1;
//QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.ExpensesQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemMiscExpense) > 1;
QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.PartsQuote"].Visible = AyaBizUtils.Right(RootObjectTypes.WorkorderItemPart) > 1;
QuoteTree.Nodes[0].Nodes[0].Nodes["LT:WorkorderItem.Label.CustomFieldsQuote"].Visible = Util.ShowCustomFields("WorkorderItem");
}
}
//PM
ultraExplorerBar1.Groups["LT:UI.Go.PreventiveMaintenance"].Visible = AyaBizUtils.Right("Object.WorkorderPreventiveMaintenance") > 1;
edOpenWorkorder.ButtonsRight["PM"].Visible = AyaBizUtils.Right("Object.WorkorderPreventiveMaintenance") > 1;
//QUOTES
ultraExplorerBar1.Groups["LT:UI.Go.Quotes"].Visible = AyaBizUtils.Right("Object.WorkorderQuote") > 1;
edOpenWorkorder.ButtonsRight["QUOTE"].Visible = AyaBizUtils.Right("Object.WorkorderQuote") > 1;
//*************************************
//INVENTORY
//Hide all or selected items?
bVisible = (
(AyaBizUtils.Right("Object.Part") > 1) ||
(AyaBizUtils.Right("Object.PartWarehouse") > 1) ||
(AyaBizUtils.Right("Object.PurchaseOrder") > 1) ||
(AyaBizUtils.Right("Object.WorkorderItemPart") > 1) ||
(AyaBizUtils.Right("Object.PartInventoryAdjustment") > 1) ||
(AyaBizUtils.Right("Object.PartByWarehouseInventory") > 1)
);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Visible = bVisible;
//pop.Tools["LT:UI.Go.Inventory"].SharedProps.Visible=bVisible;
//Restrict subitems as necessary:
if (bVisible)
{
//First restrict based on rights
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:Part.Label.List"].Visible = (AyaBizUtils.Right("Object.Part") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrders"].Visible = (AyaBizUtils.Right("Object.PurchaseOrder") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrderReceipts"].Visible = (AyaBizUtils.Right("Object.PurchaseOrder") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PartInventoryAdjustments"].Visible = (AyaBizUtils.Right("Object.PartInventoryAdjustment") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:PartByWarehouseInventory.Label.List"].Visible = (AyaBizUtils.Right("Object.PartByWarehouseInventory") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:WorkorderItemPartRequest.Label.List"].Visible = (AyaBizUtils.Right("Object.WorkorderItemPart") > 1);
//Now restrict any still visible inventory related items
//based on whether inventory is being used or not
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrders"].Visible)
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrders"].Visible = Util.GlobalSettings.UseInventory;
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrderReceipts"].Visible)
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrderReceipts"].Visible = Util.GlobalSettings.UseInventory;
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PartInventoryAdjustments"].Visible)
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PartInventoryAdjustments"].Visible = Util.GlobalSettings.UseInventory;
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:PartByWarehouseInventory.Label.List"].Visible)
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:PartByWarehouseInventory.Label.List"].Visible = Util.GlobalSettings.UseInventory;
//case 932
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:WorkorderItemPartRequest.Label.List"].Visible)
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:WorkorderItemPartRequest.Label.List"].Visible = Util.GlobalSettings.UseInventory;
//case 2102
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items.Exists("LT:UI.Go.Inventory.PurchaseOrdersDetailed"))
{
//case 1000
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrdersDetailed"].Visible =
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrders"].Visible;
}
//case 2102
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items.Exists("LT:UI.Go.Inventory.PurchaseOrderReceiptsDetailed"))
{
//case 1000
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrderReceiptsDetailed"].Visible =
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PurchaseOrderReceipts"].Visible;
}
//case 2099 added in schema 105
if (ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items.Exists("LT:UI.Go.Inventory.PartInventoryAdjustmentsDetailed"))
{
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PartInventoryAdjustmentsDetailed"].Visible =
ultraExplorerBar1.Groups["LT:UI.Go.Inventory"].Items["LT:UI.Go.Inventory.PartInventoryAdjustments"].Visible;
}
}
//SCHEDULE
bVisible = AyaBizUtils.Right("Object.ScheduleForm") > 1;
ultraExplorerBar1.Groups["LT:UI.Go.Schedule"].Visible = bVisible;
//pop.Tools["LT:UI.Go.Schedule"].SharedProps.Visible=bVisible;
//UNITS
//Hide all or selected items?
bVisible = (
(AyaBizUtils.Right("Object.Unit") > 1) ||
(AyaBizUtils.Right("Object.UnitModel") > 1) ||
(AyaBizUtils.Right("Object.LoanItem") > 1)
);
ultraExplorerBar1.Groups["LT:Unit.Label.List"].Visible = bVisible;
//Restrict subitems as necessary:
if (bVisible)
{
ultraExplorerBar1.Groups["LT:Unit.Label.List"].Items["LT:Unit.Label.List"].Visible = (AyaBizUtils.Right("Object.Unit") > 1);
ultraExplorerBar1.Groups["LT:Unit.Label.List"].Items["LT:UnitModel.Label.List"].Visible = (AyaBizUtils.Right("Object.UnitModel") > 1);
ultraExplorerBar1.Groups["LT:Unit.Label.List"].Items["LT:LoanItem.Label.List"].Visible = (AyaBizUtils.Right("Object.LoanItem") > 1);
}
//VENDORS
bVisible = AyaBizUtils.Right("Object.Vendor") > 1;
ultraExplorerBar1.Groups["LT:Vendor.Label.List"].Visible = bVisible;
//pop.Tools["LT:Vendor.Label.List"].SharedProps.Visible=bVisible;
//CURRENT USER
bool bShowWikiLink = WikiPage.ShowWikiLink(RootObjectTypes.User, User.CurrentThreadUserID);
//Hide all or selected items?
bVisible = (
(AyaBizUtils.Right("Object.Memo") > 1) ||
bShowWikiLink ||
(AyaBizUtils.Right("Object.Notification") > 1) ||
(AyaBizUtils.Right("Object.ScheduleMarker") > 1)
);
ultraExplorerBar1.Groups["LT:UI.Go.User"].Visible = bVisible;
//Restrict subitems as necessary:
if (bVisible)
{
ultraExplorerBar1.Groups["LT:UI.Go.User"].Items["LT:Memo.Label.List"].Visible = (AyaBizUtils.Right("Object.Memo") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.User"].Items["LT:NotifySubscription.Label.List"].Visible = (AyaBizUtils.Right("Object.Notification") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.User"].Items["LT:NotifyDeliveryLog.Label.List"].Visible = (AyaBizUtils.Right("Object.Notification") > 1);
//case 2102
if (ultraExplorerBar1.Groups["LT:UI.Go.User"].Items.Exists("LT:O.WikiPage"))
{
ultraExplorerBar1.Groups["LT:UI.Go.User"].Items["LT:O.WikiPage"].Visible = bShowWikiLink;
}
//case 1967
if (ultraExplorerBar1.Groups["LT:UI.Go.User"].Items.Exists("LT:ScheduleMarker.Label.List"))
{
ultraExplorerBar1.Groups["LT:UI.Go.User"].Items["LT:ScheduleMarker.Label.List"].Visible =
((AyaBizUtils.Right("Object.ScheduleMarker") > 1) &&
(User.CurrentUserType== UserTypes.Schedulable));//only scheduleable users can have a followup or schedulemarker
}
}
//ADMINISTRATION
// ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Visible=AyaBizUtils.Right("Object.Client")>1;
// pop.Tools["LT:UI.Go.Administration"].SharedProps.Visible=AyaBizUtils.Right("Object.Client")>1;
//Hide all or selected items?
//CUSTOM FIELDS rights for this are tied to localizedtext
bVisible = (
(AyaBizUtils.Right("Object.Global") > 1) ||
(AyaBizUtils.Right("Object.Region") > 1) ||
(AyaBizUtils.Right("Object.SecurityGroup") > 1) ||
(AyaBizUtils.Right("Object.User") > 1) ||
(AyaBizUtils.Right("Object.LocalizedText") > 1) ||
(AyaBizUtils.Right("Object.Notification") > 1) ||
(AyaBizUtils.Right("Object.Report") > 1) ||
(AyaBizUtils.Right("Object.AyaFile") > 1) ||
(AyaBizUtils.Right("Object.ScheduleMarker") > 1)
);
//
//case 939
//if they would normally have access make sure they are an administrator user type as well
if (bVisible)
bVisible = Util.CurrentUserIsAdminType || AyaBizUtils.Lite;
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Visible = bVisible;
//Restrict subitems as necessary:
if (bVisible)
{
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:UI.Go.Administration.GlobalSettings"].Visible = (AyaBizUtils.Right("Object.Global") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:Region.Label.List"].Visible = (AyaBizUtils.Right("Object.Region") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:SecurityGroup.Label.List"].Visible = (AyaBizUtils.Right("Object.SecurityGroup") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:User.Label.List"].Visible = (AyaBizUtils.Right("Object.User") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:UI.Command.CustomFieldDesign"].Visible = (AyaBizUtils.Right("Object.LocalizedText") > 1) && !AyaBizUtils.Lite;
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:UI.Command.LocalizedTextDesign"].Visible = (AyaBizUtils.Right("Object.LocalizedText") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:NotifyDeliveryLog.Label.List"].Visible = (AyaBizUtils.Right("Object.Notification") > 1);
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:Report.Label.List"].Visible = (AyaBizUtils.Right("Object.Report") > 1);
//case 2102
if (ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items.Exists("LT:AyaFile.Label.List"))
{
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:AyaFile.Label.List"].Visible = (AyaBizUtils.Right("Object.AyaFile") > 1);
}
//case 1967
if (ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items.Exists("LT:ScheduleMarker.Label.List"))
{
ultraExplorerBar1.Groups["LT:UI.Go.Administration"].Items["LT:ScheduleMarker.Label.List"].Visible = (AyaBizUtils.Right("Object.ScheduleMarker") > 1);
}
}
//SubGrids
Infragistics.Win.UltraWinToolbars.PopupMenuTool sub = (Infragistics.Win.UltraWinToolbars.PopupMenuTool)ultraToolbarsManager1.Toolbars["LT:UI.Toolbar.MainMenuBar"].Tools["LT:UI.Menu.SubGrids"];
sub.Tools["LT:DispatchZone.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.DispatchZone") > 1;
sub.Tools["LT:ClientGroup.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.ClientGroup") > 1;
sub.Tools["LT:WorkorderItemType.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.WorkorderItemType") > 1;
sub.Tools["LT:WorkorderCategory.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.WorkorderCategory") > 1;
sub.Tools["LT:WorkorderStatus.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.WorkorderStatus") > 1;
sub.Tools["LT:Priority.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.Priority") > 1;
sub.Tools["LT:UnitOfMeasure.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.UnitOfMeasure") > 1;
sub.Tools["LT:PartCategory.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.PartCategory") > 1;
sub.Tools["LT:PartAssembly.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.PartAssembly") > 1;
sub.Tools["LT:UserSkill.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.UserSkill") > 1;
sub.Tools["LT:UserCertification.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.UserCertification") > 1;
sub.Tools["LT:UnitServiceType.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.UnitServiceType") > 1;
sub.Tools["LT:Rate.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.Rate") > 1;
sub.Tools["LT:TaxCode.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.TaxCode") > 1;
sub.Tools["LT:PartWarehouse.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.PartWarehouse") > 1;
sub.Tools["LT:UnitModelCategory.Label.List"].SharedProps.Visible = AyaBizUtils.Right("Object.UnitModel") > 1;
//Hide the popup menu tool "sub" altogether
//if there are no visible items in it
bool bHideSub = true;
foreach (Infragistics.Win.UltraWinToolbars.ToolBase tb in sub.Tools)
{
if (tb.SharedProps.Visible)
{
bHideSub = false;
break;
}
}
sub.SharedProps.Visible = !bHideSub;
Infragistics.Win.UltraWinToolbars.PopupMenuTool tbHelp = (Infragistics.Win.UltraWinToolbars.PopupMenuTool)ultraToolbarsManager1.Toolbars["LT:UI.Toolbar.MainMenuBar"].Tools["LT:UI.Menu.Help"];
//case 3646 removed
////case 1356
//if ((AyaBizUtils.RequestedTrial || AyaBizUtils.Trial) && AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection)
//{
// tbHelp.Tools["LITE"].SharedProps.Visible = true;
// if (AyaBizUtils.Lite)
// tbHelp.Tools["LITE"].SharedProps.Caption = "Trial: Switch to regular AyaNova";
// else
// tbHelp.Tools["LITE"].SharedProps.Caption = "Trial: Switch to AyaNova Lite";
//}
//else
tbHelp.Tools["LITE"].SharedProps.Visible = false;
//case 1306
tbHelp.Tools["QuickStart"].SharedProps.Visible = AyaBizUtils.Trial;
//case 2098
if (ultraExplorerBar1.Groups.Exists("LT:Dashboard.Label.Dashboard"))
{
//case 1805
ultraExplorerBar1.Groups["LT:Dashboard.Label.Dashboard"].Visible = true;
}
}
#endregion
#region Public member variables
#endregion
#region ShowForm
private string mCurrentForm = "";
private string mItemKey = "";
internal bool ShowForm(string sFormKey, string sItemKey)//case 534 added overload for existing code
{ return ShowForm(sFormKey, sItemKey, false); }
internal bool ShowForm(string sFormKey, string sItemKey, bool force)//case 534 added force
{
//case 1039 //log.Debug("ShowForm("+sFormKey+", " +sItemKey+", " + force.ToString() + ")");
if (force)
{
mCurrentForm = "";
mItemKey = "";
}
if (sFormKey == mCurrentForm && sItemKey == mItemKey) return true;
mCurrentForm = sFormKey;
mItemKey = sItemKey;
Cursor.Current = Cursors.WaitCursor;
System.Windows.Forms.Form frmPrior = frmActive;
//Instantiate the main grid if not done already
//so we can avoid repetitive coding in all lists that use it below
if (frmMainGrid == null)
{
frmMainGrid = new MainGrid();
frmMainGrid.Dock = RightPane.Dock;
frmMainGrid.Size = RightPane.Size;
frmMainGrid.TopLevel = false;
frmMainGrid.Parent = RightPane;
}
switch (sFormKey)
{
case "LT:Client.Label.List":
#region Client Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:Client.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("ClientList", force);
break;
case "LT:HeadOffice.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("HeadOfficeList", force);
break;
case "LT:Contract.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("ContractList", force);
break;
case "LT:Project.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("ProjectList", force);
break;
case "LT:ClientServiceRequest.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("ClientServiceRequestList", force);
break;
}
#endregion client pane
break;
case "LT:UI.Go.Inventory":
#region Inventory Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:Part.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("PartList", force);
break;
case "LT:UI.Go.Inventory.PurchaseOrders":
frmActive = frmMainGrid;
frmMainGrid.ShowList("PurchaseOrderList", force);
break;
case "LT:UI.Go.Inventory.PurchaseOrderReceipts":
frmActive = frmMainGrid;
frmMainGrid.ShowList("PurchaseOrderReceiptList", force);
break;
case "LT:UI.Go.Inventory.PurchaseOrdersDetailed"://case 764
frmActive = frmMainGrid;
frmMainGrid.ShowList("PurchaseOrderListDetailed", force);
break;
case "LT:UI.Go.Inventory.PurchaseOrderReceiptsDetailed"://case 765
frmActive = frmMainGrid;
frmMainGrid.ShowList("PurchaseOrderReceiptListDetailed", force);
break;
case "LT:UI.Go.Inventory.PartInventoryAdjustments":
frmActive = frmMainGrid;
frmMainGrid.ShowList("PartInventoryAdjustmentList", force);
break;
case "LT:UI.Go.Inventory.PartInventoryAdjustmentsDetailed"://case 1394
frmActive = frmMainGrid;
frmMainGrid.ShowList("PartInventoryAdjustmentListDetailed", force);
break;
case "LT:PartByWarehouseInventory.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("PartWarehouseInventoryList", force);
break;
case "LT:WorkorderItemPartRequest.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderItemPartRequestList", force);
break;
}
#endregion inventory pane
break;
case "LT:UI.Go.Service":
#region Service Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:WorkorderService.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceList", force);
break;
case "LT:WorkorderItem.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceItemList", force);
break;
case "LT:WorkorderItem.Label.ScheduledUsers":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceScheduledUserList", force);
break;
case "LT:WorkorderItem.Label.Parts":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServicePartList", force);
break;
case "LT:WorkorderItem.Label.Labors":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceLaborList", force);
break;
case "LT:WorkorderItem.Label.Travels":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceTravelList", force);
break;
case "LT:WorkorderItem.Label.Loans":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceLoanList", force);
break;
case "LT:WorkorderItem.Label.Expenses":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceExpenseList", force);
break;
case "LT:WorkorderItem.Label.CustomFields":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderServiceCustomList", force);
break;
case "LT:O.WorkorderServiceTemplate":
frmActive = frmMainGrid;
frmMainGrid.ShowList("TemplateServiceList", force);
break;
}
#endregion service pane
break;
case "LT:UI.Go.Quotes":
#region Quotes Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:WorkorderQuote.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteList", force);
break;
case "LT:WorkorderItem.Label.ListQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteItemList", force);
break;
case "LT:WorkorderItem.Label.ScheduledUsersQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteScheduledUserList", force);
break;
case "LT:WorkorderItem.Label.PartsQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuotePartList", force);
break;
case "LT:WorkorderItem.Label.LaborsQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteLaborList", force);
break;
case "LT:WorkorderItem.Label.TravelsQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteTravelList", force);
break;
case "LT:WorkorderItem.Label.CustomFieldsQuote":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderQuoteCustomList", force);
break;
case "LT:O.WorkorderQuoteTemplate":
frmActive = frmMainGrid;
frmMainGrid.ShowList("TemplateQuoteList", force);
break;
}
#endregion quotes pane
break;
case "LT:UI.Go.PreventiveMaintenance":
#region PM Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:WorkorderPreventiveMaintenance.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMList", force);
break;
case "LT:WorkorderItem.Label.ListPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMItemList", force);
break;
case "LT:WorkorderItem.Label.ScheduledUsersPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMScheduledUserList", force);
break;
case "LT:WorkorderItem.Label.PartsPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMPartList", force);
break;
case "LT:WorkorderItem.Label.LaborsPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMLaborList", force);
break;
case "LT:WorkorderItem.Label.TravelsPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMTravelList", force);
break;
case "LT:WorkorderItem.Label.CustomFieldsPM":
frmActive = frmMainGrid;
frmMainGrid.ShowList("WorkorderPMCustomList", force);
break;
case "LT:O.WorkorderPreventiveMaintenanceTemplate":
frmActive = frmMainGrid;
frmMainGrid.ShowList("TemplatePreventiveMaintenanceList", force);
break;
}
#endregion PM pane
break;
case "LT:UI.Go.Schedule":
#region Schedule pane
if (frmMainSchedule == null)
{
frmMainSchedule = new ScheduleFormEx();
frmMainSchedule.Dock = RightPane.Dock;
frmMainSchedule.Size = RightPane.Size;
frmMainSchedule.TopLevel = false;
frmMainSchedule.Parent = RightPane;
}
frmActive = frmMainSchedule;
this.ctDateNav.SchedulerControl = frmMainSchedule.ScheduleControl;
frmMainSchedule.DateNav = this.ctDateNav;
#endregion schedule pane
break;
case "LT:Unit.Label.List":
#region Units Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:Unit.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("UnitList", force);
break;
case "LT:UnitModel.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("UnitModelList", force);
break;
case "LT:LoanItem.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("LoanItemList", force);
break;
}
#endregion units pane
break;
case "LT:Vendor.Label.List":
#region Vendor Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:Vendor.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("VendorList", force);
break;
}
#endregion
break;
case "LT:UI.Go.Search":
#region Search pane
frmActive = frmMainGrid;
frmMainGrid.ShowList("SearchResultList", force);
break;
#endregion
case "LT:UI.Go.User":
#region User Pane
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:Memo.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("MemoList", force);
break;
case "LT:NotifySubscription.Label.List":
if (this.frmSubscriptions == null)
{
frmSubscriptions = new NotifySubscriptionsForm();
frmSubscriptions.Dock = RightPane.Dock;
frmSubscriptions.Size = RightPane.Size;
frmSubscriptions.TopLevel = false;
frmSubscriptions.Parent = RightPane;
}
frmActive = frmSubscriptions;
//ultraToolbarsManager1.ActiveMdiChildManager=frmSubscriptions.ToolBar;
break;
case "LT:NotifyDeliveryLog.Label.List":
if (this.frmNotifyDeliveryLogs == null)
{
frmNotifyDeliveryLogs = new NotifyDeliveryLogsForm();
frmNotifyDeliveryLogs.Dock = RightPane.Dock;
frmNotifyDeliveryLogs.Size = RightPane.Size;
frmNotifyDeliveryLogs.TopLevel = false;
frmNotifyDeliveryLogs.Parent = RightPane;
}
frmActive = frmNotifyDeliveryLogs;
//ultraToolbarsManager1.ActiveMdiChildManager=frmNotifyDeliveryLogs.ToolBar;
//User mode - show only events for current logged in user
frmNotifyDeliveryLogs.AdminMode = false;
break;
case "LT:ScheduleMarker.Label.List"://case 1967
frmActive = frmMainGrid;
frmMainGrid.ShowList("ScheduleMarkerList", force);
break;
}
#endregion user pane
break;
case "LT:UI.Go.Administration":
#region Administration pane
//Case 859 due to special way global form opens it needs a rights check here to avoid an error
//when it self closes because it was chosen as the default from last user session
if (AyaBizUtils.Right("Object.Global") < (int)SecurityLevelTypes.ReadOnly && sItemKey == "LT:UI.Go.Administration.GlobalSettings")
sItemKey = "";
//============ STANDARD CODE TO SELECT FIRST AVAILABLE SUB ITEM IF NONE SPECIFIED
if ("" == sItemKey)
{
for (int x = 0; x < ultraExplorerBar1.SelectedGroup.Items.Count; x++)
{
if (ultraExplorerBar1.SelectedGroup.Items[x].Visible == true)
{
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, false);
ultraExplorerBar1.SelectedGroup.Items[x].Checked = true;
sItemKey = ultraExplorerBar1.SelectedGroup.Items[x].Key;
ultraExplorerBar1.EventManager.SetEnabled(UltraExplorerBarEventIds.ItemCheckStateChanged, true);
break;
}
}
}
//============ END OF STANDARD SUBITEM CODE
switch (sItemKey)
{
case "LT:UI.Go.Administration.GlobalSettings":
if (frmGlobalSettings == null)
{
frmGlobalSettings = new GlobalSettingsForm();
frmGlobalSettings.GlobalSettingToEdit = Util.GlobalSettings;
frmGlobalSettings.Dock = RightPane.Dock;
frmGlobalSettings.Size = RightPane.Size;
frmGlobalSettings.TopLevel = false;
frmGlobalSettings.Parent = RightPane;
}
frmActive = frmGlobalSettings;
// ultraToolbarsManager1.ActiveMdiChildManager=frmGlobalSettings.ToolBar;
break;
case "LT:Region.Label.List":
if (frmMainRegions == null)
{
frmMainRegions = new RegionsForm();
frmMainRegions.Dock = RightPane.Dock;
frmMainRegions.Size = RightPane.Size;
frmMainRegions.TopLevel = false;
frmMainRegions.Parent = RightPane;
}
frmActive = frmMainRegions;
//ultraToolbarsManager1.ActiveMdiChildManager=frmMainRegions.ToolBar;
break;
case "LT:User.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("UserList", force);
break;
case "LT:UI.Command.LocalizedTextDesign":
if (frmLocalizedText == null)
{
frmLocalizedText = new LocalesForm();
frmLocalizedText.Dock = RightPane.Dock;
frmLocalizedText.Size = RightPane.Size;
frmLocalizedText.TopLevel = false;
frmLocalizedText.Parent = RightPane;
}
frmActive = frmLocalizedText;
//ultraToolbarsManager1.ActiveMdiChildManager=frmLocalizedText.ToolBar;
break;
case "LT:UI.Command.CustomFieldDesign":
if (frmCustomizeableObjects == null)
{
frmCustomizeableObjects = new CustomizableObjectsForm();
frmCustomizeableObjects.Dock = RightPane.Dock;
frmCustomizeableObjects.Size = RightPane.Size;
frmCustomizeableObjects.TopLevel = false;
frmCustomizeableObjects.Parent = RightPane;
}
frmActive = frmCustomizeableObjects;
//ultraToolbarsManager1.ActiveMdiChildManager=frmCustomizeableObjects.ToolBar;
break;
case "LT:SecurityGroup.Label.List":
if (frmSecurityGroups == null)
{
frmSecurityGroups = new SecurityGroupsForm();
frmSecurityGroups.Dock = RightPane.Dock;
frmSecurityGroups.Size = RightPane.Size;
frmSecurityGroups.TopLevel = false;
frmSecurityGroups.Parent = RightPane;
}
frmActive = frmSecurityGroups;
//ultraToolbarsManager1.ActiveMdiChildManager=frmSecurityGroups.ToolBar;
break;
case "LT:Report.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("ReportList", force);
break;
case "LT:NotifyDeliveryLog.Label.List":
if (this.frmNotifyDeliveryLogs == null)
{
frmNotifyDeliveryLogs = new NotifyDeliveryLogsForm();
frmNotifyDeliveryLogs.Dock = RightPane.Dock;
frmNotifyDeliveryLogs.Size = RightPane.Size;
frmNotifyDeliveryLogs.TopLevel = false;
frmNotifyDeliveryLogs.Parent = RightPane;
}
frmActive = frmNotifyDeliveryLogs;
//ultraToolbarsManager1.ActiveMdiChildManager=frmNotifyDeliveryLogs.ToolBar;
//Administrator mode - show events for all users
frmNotifyDeliveryLogs.AdminMode = true;
break;
case "LT:AyaFile.Label.List":
frmActive = frmMainGrid;
frmMainGrid.ShowList("AyaFileList", force);
break;
case "LT:ScheduleMarker.Label.List"://case 1967
frmActive = frmMainGrid;
frmMainGrid.ShowList("ScheduleMarkerListAllUsers", force);
break;
}
#endregion administration panel
break;
//case 1805
case "LT:Dashboard.Label.Dashboard":
#region Dashboard pane
if (frmDashboard == null)
{
frmDashboard = new DashboardForm();
frmDashboard.Dock = RightPane.Dock;
frmDashboard.Size = RightPane.Size;
frmDashboard.TopLevel = false;
frmDashboard.Parent = RightPane;
}
frmActive = frmDashboard;
break;
#endregion
default:
return false;
}
//Show title bar text for main form
if (sFormKey != "LT:UI.Go.User")
this.Text = Util.LocaleText.GetLocalizedText(sFormKey.Replace("LT:", "")) + " - AyaNova";
else
this.Text = Thread.CurrentPrincipal.Identity.Name + " - AyaNova";
if (frmActive != frmPrior)
{
frmActive.Visible = true;//.Show();
if (frmPrior != null)
frmPrior.Visible = false;
else
frmPrior = frmActive;//this key bit of code prevents toolbar from disappearing when use has just logged in and reselects this form
}
//remove the oldstyle toolbar if it's present from an oldstyle form
if (frmActive == frmMainGrid)
ultraToolbarsManager1.ActiveMdiChildManager = null;
//Required to ensure that flyout pane doesn't linger needlessly when
//unpinned, otherwise you have to click on something in the right pane to make it go away
if (dm.FlyoutPane != null)
dm.FlyIn();
return true;
}
#endregion
#region Events / ToolBar clicks
private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
//case 1039 //log.Debug("Tool click: " + e.Tool.Key);
switch (e.Tool.Key)
{
case "LT:UI.Command.Close": // ButtonTool
this.Close();
break;
case "LT:UI.Go.Logout": // ButtonTool
CloseShop();
DoLogin();
break;
#region Go Menu Options
case "LT:Client.Label.List": // StateButtonTool
case "LT:UI.Go.Service": // StateButtonTool
case "LT:UI.Go.Quotes": // StateButtonTool
case "LT:UI.Go.PreventiveMaintenance": // StateButtonTool
case "LT:UI.Go.Inventory": // StateButtonTool
case "LT:UI.Go.Schedule": // StateButtonTool
case "LT:Unit.Label.List": // StateButtonTool
case "LT:Vendor.Label.List": // StateButtonTool
case "LT:UI.Go.Administration": // StateButtonTool
ultraExplorerBar1.SelectedGroup = ultraExplorerBar1.Groups[e.Tool.Key];
ShowForm(e.Tool.Key, "");
break;
#endregion
#region Tool Menu Options
case "LT:DispatchZone.Label.List": // ButtonTool
GenericListForm g1 = new GenericListForm();
DispatchZones dz = DispatchZones.GetItems(true);
g1.GridDataSource = dz;
g1.ShowDialog();
break;
case "LT:ClientGroup.Label.List": // ButtonTool
GenericListForm g2 = new GenericListForm();
ClientGroups cg = ClientGroups.GetItems();
g2.GridDataSource = cg;
g2.ShowDialog();
break;
case "LT:WorkorderItemType.Label.List": // ButtonTool
GenericListForm g3 = new GenericListForm();
WorkorderItemTypes wit = WorkorderItemTypes.GetItems();
g3.GridDataSource = wit;
g3.ShowDialog();
break;
case "LT:WorkorderCategory.Label.List": // ButtonTool
GenericListForm g4 = new GenericListForm();
WorkorderCategories woc = WorkorderCategories.GetItems();
g4.GridDataSource = woc;
g4.ShowDialog();
break;
case "LT:WorkorderStatus.Label.List": // ButtonTool
GenericListForm g5 = new GenericListForm();
WorkorderStatuses ws = WorkorderStatuses.GetItems();
g5.GridDataSource = ws;
g5.ShowDialog();
break;
case "LT:Priority.Label.List": // ButtonTool
GenericListForm g6 = new GenericListForm();
Priorities p = Priorities.GetItems();
g6.GridDataSource = p;
g6.Visible = false;
g6.ShowDialog();
break;
case "LT:UnitOfMeasure.Label.List": // ButtonTool
GenericListForm g7 = new GenericListForm();
UnitOfMeasures uom = UnitOfMeasures.GetItems();
g7.GridDataSource = uom;
g7.ShowDialog();
break;
case "LT:PartCategory.Label.List": // ButtonTool
GenericListForm g8 = new GenericListForm();
PartCategories pg = PartCategories.GetItems();
g8.GridDataSource = pg;
g8.ShowDialog();
break;
case "LT:PartAssembly.Label.List": // ButtonTool
GenericListForm g9 = new GenericListForm();
PartAssemblies pa = PartAssemblies.GetItems();
g9.GridDataSource = pa;
g9.ShowDialog();
break;
case "LT:UserSkill.Label.List": // ButtonTool
GenericListForm g10 = new GenericListForm();
UserSkills us = UserSkills.GetItems();
g10.GridDataSource = us;
g10.ShowDialog();
break;
case "LT:UserCertification.Label.List": // ButtonTool
GenericListForm g11 = new GenericListForm();
UserCertifications uc = UserCertifications.GetItems();
g11.GridDataSource = uc;
g11.ShowDialog();
break;
case "LT:UnitServiceType.Label.List": // ButtonTool
GenericListForm g13 = new GenericListForm();
UnitServiceTypes ust = UnitServiceTypes.GetItems();
g13.GridDataSource = ust;
g13.ShowDialog();
break;
case "LT:Rate.Label.List": // ButtonTool
RatesForm f = new RatesForm();
f.ShowDialog();
break;
case "LT:TaxCode.Label.List": // ButtonTool
TaxCodesForm tcf = new TaxCodesForm();
tcf.ShowDialog();
break;
case "LT:PartWarehouse.Label.List": // ButtonTool
GenericListForm g14 = new GenericListForm();
PartWarehouses pw = PartWarehouses.GetItems(true);
g14.GridDataSource = pw;
g14.ShowDialog();
break;
case "LT:UnitModelCategory.Label.List": // ButtonTool
GenericListForm g15 = new GenericListForm();
UnitModelCategories umc = UnitModelCategories.GetItems();
g15.GridDataSource = umc;
g15.ShowDialog();
break;
case "NotifyPop":
ShowPopupNotificationForm();
break;
#endregion
#region Help Menu Options
case "LT:UI.Help.Contents": // StateButtonTool
Util.OpenWebURL(Util.BaseHelpUrl + "index.html");
break;
case "QuickStart": // case 1306
//case 3649
Util.OpenWebURL(Util.BaseHelpUrl + "index.html?quickstart_for_beginners.htm");
break;
case "LT:UI.Help.TechSupport": // StateButtonTool
Util.OpenWebURL("http://forum.ayanova.com");
break;
case "LT:UI.Help.AboutAyaNova": // StateButtonTool
new About().ShowDialog();
break;
case "LT:UI.Help.CheckForUpdates": // StateButtonTool
//case 3116
//original
//string surl = CheckForUpdate.UpdateUrl((AyaBizUtils.Lite ? "AyaNovaLite" : "AyaNovaFull"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
//New
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
System.Diagnostics.FileVersionInfo fileVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(a.Location);
string surl = CheckForUpdate.UpdateUrl((AyaBizUtils.Lite ? "AyaNovaLite" : "AyaNovaFull"), fileVersion.FileVersion);
if (!string.IsNullOrEmpty(surl))
{
//case 3649
if (surl.StartsWith("http:"))
surl = surl.Replace("http:", "https:");
if (!surl.StartsWith("https:"))
Util.Error("CheckForUpdate failed", surl);
else
Util.OpenWebURL(surl);
}
else
MessageBox.Show("Up to date!");
break;
case "LT:UI.Help.PurchaseLicenses": // StateButtonTool
Util.OpenWebURL("http://www.ayanova.com/purchase.htm");
break;
case "LT:UI.Help.License": // ButtonTool
GlobalxForm g = new GlobalxForm();
g.ShowDialog();
break;
case "LITE": // ButtonTool
AyaBizUtils.AyaNovaConnectionSetting.TrialLiteFlip();
DoLogout();
this.Close();
break;
#endregion Help Menu Options
case "MRULIST":
{
Infragistics.Win.UltraWinToolbars.ListTool ListTool;
ListTool = (Infragistics.Win.UltraWinToolbars.ListTool)e.Tool;
Infragistics.Win.UltraWinToolbars.ListToolItem i = ListTool.SelectedItem;
TypeAndID tid = TypeAndID.Parse(i.Key);
if (tid != null)
Util.EditRecord(tid);
}
break;
case "LT:O.WikiPage":
{
Util.OpenWikiPage(RootObjectTypes.Global, Address.GlobalAddressID, false);
break;
}
}
}
private void ultraToolbarsManager1_BeforeToolDropdown(object sender, Infragistics.Win.UltraWinToolbars.BeforeToolDropdownEventArgs e)
{
//Populate the mru if it's the one selected
if (e.Tool.Key == "LT:UI.Menu.MRU")
{
Infragistics.Win.UltraWinToolbars.PopupMenuTool p = (Infragistics.Win.UltraWinToolbars.PopupMenuTool)e.Tool;
Infragistics.Win.UltraWinToolbars.ListTool ListTool;
ListTool = (Infragistics.Win.UltraWinToolbars.ListTool)p.Tools[0];
ListTool.ListToolItems.Clear();
ListTool.DisplayCheckmark = false;
foreach (DataRowView r in AyaBizUtils.MRU.MRU)
{
Infragistics.Win.UltraWinToolbars.ListToolItem li = ListTool.ListToolItems.Insert(
ListTool.ListToolItems.Count,
((TypeAndID)r["TID"]).ToString(),
r["Description"].ToString());
}
}
}
private bool NavPaneTreesExpanded = false;
public void ForceNavPaneTreesUpdate()
{
if (!NavPaneTreesExpanded)
{
Infragistics.Win.UltraWinTree.UltraTree t = (Infragistics.Win.UltraWinTree.UltraTree)ultraExplorerBar1.Groups["LT:UI.Go.Service"].Container.Controls[0];
t.ExpandAll();
t = (Infragistics.Win.UltraWinTree.UltraTree)ultraExplorerBar1.Groups["LT:UI.Go.Quotes"].Container.Controls[0];
t.ExpandAll();
t = (Infragistics.Win.UltraWinTree.UltraTree)ultraExplorerBar1.Groups["LT:UI.Go.PreventiveMaintenance"].Container.Controls[0];
t.ExpandAll();
NavPaneTreesExpanded = true;
}
}
private void ultraExplorerBar1_GroupClick(object sender, Infragistics.Win.UltraWinExplorerBar.GroupEventArgs e)
{
//Is the clicked item a tree container or an explorer bar group?
if (e.Group.Key == "LT:UI.Go.Service" ||
e.Group.Key == "LT:UI.Go.Quotes" ||
e.Group.Key == "LT:UI.Go.PreventiveMaintenance")
{
//It's a tree
Infragistics.Win.UltraWinTree.UltraTree t = (Infragistics.Win.UltraWinTree.UltraTree)ultraExplorerBar1.Groups[e.Group.Key].Container.Controls[0];
t.ExpandAll();
if (t.SelectedNodes.Count > 0)
{
//showform for selected node
ShowForm(e.Group.Key, t.SelectedNodes[0].Key);
}
else
{
//Pick the first item
t.Nodes[0].Selected = true;
}
}
else
{
//It's an explorer bar items pane
//see if any are selected, and if so then show that one
foreach (Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem i in e.Group.Items)
{
if (i.Checked)
{
ShowForm(e.Group.Key, i.Key);
return;
}
}
//None already selected, so just show the default first item instead
ShowForm(e.Group.Key, "");
}
}
/// <summary>
/// Gets a text line of the selections in the explorer bar
/// to display in the dock fly out tab when unpinned and flown in
/// </summary>
/// <returns></returns>
private string GetExplorerBarSelectionString()
{
if (this.ultraExplorerBar1.SelectedGroup == null) return "AyaNova";
UltraExplorerBarGroup g = this.ultraExplorerBar1.SelectedGroup;
string strReturn = g.Text;
if (g.Key == "LT:UI.Go.Service" ||
g.Key == "LT:UI.Go.Quotes" ||
g.Key == "LT:UI.Go.PreventiveMaintenance")
{
//It's a tree
Infragistics.Win.UltraWinTree.UltraTree t = (Infragistics.Win.UltraWinTree.UltraTree)g.Container.Controls[0];
if (t.SelectedNodes.Count > 0)
strReturn += " - " + t.SelectedNodes[0].Text;
else
strReturn += " - " + t.Nodes[0].Text;
return strReturn;
}
if (g.Key == "LT:UI.Go.Schedule")//It's the schedule and date navigator
{
strReturn += ": " + this.ctDateNav.SelectionStart.ToString() + " - " + this.ctDateNav.SelectionEnd.ToString();
}
else
{
//It's an explorer bar items pane
foreach (Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarItem i in g.Items)
{
if (i.Checked)
{
strReturn += " - " + i.Text;
return strReturn;
}
}
}
return strReturn;
}
//case 73, don't want wikipage to be sticky selection
private void ultraExplorerBar1_ItemCheckStateChanging(object sender, CancelableItemEventArgs e)
{
if (e.Item.Key == "LT:O.WikiPage")
{
Util.OpenWikiPage(RootObjectTypes.User, User.CurrentThreadUserID, false);
e.Cancel = true;
}
}
private void ultraExplorerBar1_ItemCheckStateChanged(object sender, Infragistics.Win.UltraWinExplorerBar.ItemEventArgs e)
{
if (e.Item.Checked == true)
{
//if (e.Item.Key == "LT:O.WikiPage")
// Util.OpenWikiPage(RootObjectTypes.User,User.CurrentThreadUserID,false);
//else
ShowForm(e.Item.Group.Key, e.Item.Key);
}
}
private void ServiceTree_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
{
if (!e.NewSelections[0].Selected) return;
ShowForm("LT:UI.Go.Service", e.NewSelections[0].Key);
}
private void QuoteTree_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
{
if (!e.NewSelections[0].Selected) return;
ShowForm("LT:UI.Go.Quotes", e.NewSelections[0].Key);
}
private void PMTree_AfterSelect(object sender, Infragistics.Win.UltraWinTree.SelectEventArgs e)
{
if (!e.NewSelections[0].Selected) return;
ShowForm("LT:UI.Go.PreventiveMaintenance", e.NewSelections[0].Key);
}
#endregion
#region Timer (for notification popup and other utility functions)
//Keep track of the notifications so we know if a new one came in or not
private System.Collections.Generic.List<Guid> lsShownPopUpNotifications = null;
NotifyPopUpList mNotifyPopUpList = null;
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
timer1.Stop();
//Check if we are running as a standalone firebird database,
//if so then we need to do the notification and PM processing ourselves
if (AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection)
{
//case 1039 //log.Debug("Re-generate (PM & Notifications)");
try
{
AyaBizUtils.TG = true;
Cursor.Current = Cursors.WaitCursor;
Status("Processing PM workorders...");
GenProcessPM.GeneratePMWorkorders();
if (Util.GlobalSettings.UseNotification)
{
Status("Processing user notifications...");
GenProcessDeliveries.DeliverNotifications();
Status("Processing client notifications...");
GenProcessClientNotifications.DeliverNotifications();
}
}
catch
{
throw;
}
finally
{
AyaBizUtils.TG = false;
}
Status("Generator: OK @ " + DBUtil.CurrentWorkingDateTime.ToShortTimeString());
}
#if (DEBUG)
//testing interval (30 seconds)
timer1.Interval = 30000;
#else
//5 minutes
timer1.Interval=300000;
#endif
#region check for popup notifications
//Enabling notification will require a restart of the program
//no point in checking this all the time otherwise
//so if notification is off, just stop timer and return
//and timer will not fire again until program is restarted.
if (!this.ultraDesktopAlert1.IsOpen("NOTIFYBUBBLE") && Util.GlobalSettings != null)
if (Util.GlobalSettings.UseNotification)
{
if (lsShownPopUpNotifications == null)
lsShownPopUpNotifications = new System.Collections.Generic.List<Guid>();
mNotifyPopUpList = NotifyPopUpList.GetList();
if (mNotifyPopUpList.Count > 0)
{
//enable popup menu option
ShowNotifyPopMenuOption(true);
//See if there is a newer notification than previous
bool bNewNotifications = false;
System.Text.StringBuilder sbPopupText = new StringBuilder();
sbPopupText.Append("<br/>");
//case 3467
//we want to display a maximum of 5 items and then just say +xx more...
int addedPopupItemCount = 0;
foreach (NotifyPopUpList.NotifyPopUpListInfo i in mNotifyPopUpList)
{
if (!lsShownPopUpNotifications.Contains(i.ID))
{
lsShownPopUpNotifications.Add(i.ID);
bNewNotifications = true;
sbPopupText.Append("<p>");
sbPopupText.Append(i.LT_Notify_Label_NotificationMessage);
sbPopupText.Append("</p>");
//case 3467
addedPopupItemCount++;
if (addedPopupItemCount > 5)
{
sbPopupText.Append("<p><br/><br/><b>+ ");
sbPopupText.Append((mNotifyPopUpList.Count - 5).ToString());
sbPopupText.Append(" MORE....</b></p>");
break;
}
}
}
//if so then show the windesktop notification bubble
if (bNewNotifications)
{
Infragistics.Win.Misc.UltraDesktopAlertShowWindowInfo wi =
new Infragistics.Win.Misc.UltraDesktopAlertShowWindowInfo();
//Infragistics.Win.Misc.UltraDesktopAlertWindowInfo i = new Infragistics.Win.Misc.UltraDesktopAlertWindowInfo();
wi.Caption = Thread.CurrentPrincipal.Identity.Name;
wi.FooterText = "AyaNova";
wi.Image = Resource1.NotificationSubscription32;
wi.PinButtonVisible = false;
wi.Pinned = false;
wi.Text = sbPopupText.ToString();
wi.Key = "NOTIFYBUBBLE";
// Disallow moving the desktop alert window, and prevent
// multiple alerts from appearing.
this.ultraDesktopAlert1.AllowMove = Infragistics.Win.DefaultableBoolean.False;
this.ultraDesktopAlert1.MultipleWindowDisplayStyle = Infragistics.Win.Misc.MultipleWindowDisplayStyle.None;
// Set AutoClose to true, and set AutoCloseDelay to a relatively
// high value so that the end user has enough time to notice the alert.
this.ultraDesktopAlert1.AutoClose = Infragistics.Win.DefaultableBoolean.True;
this.ultraDesktopAlert1.AutoCloseDelay = 5000;
this.ultraDesktopAlert1.AnimationStyleShow = Infragistics.Win.Misc.AnimationStyle.Fade;
this.ultraDesktopAlert1.AnimationStyleAutoClose = Infragistics.Win.Misc.AnimationStyle.Fade;
this.ultraDesktopAlert1.TreatCaptionAsLink = Infragistics.Win.DefaultableBoolean.False;
this.ultraDesktopAlert1.TreatFooterTextAsLink = Infragistics.Win.DefaultableBoolean.False;
// this.ultraDesktopAlert1.TreatTextAsLink = Infragistics.Win.DefaultableBoolean.False;
//this.ultraDesktopAlert1.AnimationScrollDirectionShow = Infragistics.Win.Misc.AnimationScrollDirection.BottomRightToTopLeft;
// this.ultraDesktopAlert1.AnimationScrollDirectionAutoClose = Infragistics.Win.Misc.AnimationScrollDirection.TopLeftToBottomRight;
// this.ultraDesktopAlert1.FixedSize =
//new Size(Screen.PrimaryScreen.WorkingArea.Width / 8,
//Screen.PrimaryScreen.WorkingArea.Height / 8);
//this.ultraDesktopAlert1.TextAppearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;
this.ultraDesktopAlert1.Show(wi);
}
}
else
{
//disable popup menu option
ShowNotifyPopMenuOption(false);
//reset
lsShownPopUpNotifications.Clear();
}
}
#endregion
Cursor.Current = Cursors.Default;//was bugging me that wait cursor didn't clear on gen process while testing case 1163
timer1.Start();
}
private void ultraDesktopAlert1_DesktopAlertLinkClicked(object sender, Infragistics.Win.Misc.DesktopAlertLinkClickedEventArgs e)
{
ShowPopupNotificationForm();
}
private void ShowNotifyPopMenuOption(bool Show)
{
this.ultraToolbarsManager1.Tools["NotifyPop"].SharedProps.Enabled = Show;
this.ultraToolbarsManager1.Tools["NotifyPop"].SharedProps.Visible = Show;
}
private void ShowPopupNotificationForm()
{
if (this.ultraDesktopAlert1.IsOpen("NOTIFYBUBBLE"))
ultraDesktopAlert1.GetWindowInfo("NOTIFYBUBBLE").Close();
PopUp p = new PopUp(mNotifyPopUpList);
p.ShowDialog();
}
#endregion
#region Open workorder toolbar events
/// <summary>
/// Direct open workorder by number click event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void edOpenWorkorder_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
Guid g = Guid.Empty;
string sObject = Util.LocaleText.GetLocalizedText("O.WorkorderService");
WorkorderTypes wotype = WorkorderTypes.Service;
switch (e.Button.Key)
{
case "QUOTE":
wotype = WorkorderTypes.Quote;
sObject = Util.LocaleText.GetLocalizedText("O.WorkorderQuote");
break;
case "PM":
wotype = WorkorderTypes.PreventiveMaintenance;
sObject = Util.LocaleText.GetLocalizedText("O.WorkorderPreventiveMaintenance");
break;
}
g = WorkorderInternalIDFetcher.GetItem(edOpenWorkorder.Text, wotype);
if (g != Guid.Empty && (AyaBizUtils.InYourRegion(ObjectRegionIDFetcher.ObjectRegion(new TypeAndID(RootObjectTypes.Workorder, g)))))//case 58
Util.EditRecord(RootObjectTypes.Workorder, g);
else
MessageBox.Show(
string.Format(Util.LocaleText.GetLocalizedText("Error.Object.FieldValueNotValid"), edOpenWorkorder.Text),
sObject,
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
}
/// <summary>
/// Case 226
/// Open service workorder if enter key is used since
/// it's the most common workorder type
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void edOpenWorkorder_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
Cursor.Current = Cursors.WaitCursor;
Guid g = Guid.Empty;
string sObject = Util.LocaleText.GetLocalizedText("O.WorkorderService");
WorkorderTypes wotype = WorkorderTypes.Service;
g = WorkorderInternalIDFetcher.GetItem(edOpenWorkorder.Text, wotype);
if (g != Guid.Empty && (AyaBizUtils.InYourRegion(ObjectRegionIDFetcher.ObjectRegion(new TypeAndID(RootObjectTypes.Workorder, g)))))//case 58
Util.EditRecord(RootObjectTypes.Workorder, g);
else
{
MessageBox.Show(
string.Format(Util.LocaleText.GetLocalizedText("Error.Object.FieldValueNotValid"), edOpenWorkorder.Text),
sObject,
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
}
}
}
#endregion
#region Docking events
private void dm_AfterSplitterDrag(object sender, PanesEventArgs e)
{
DockableControlPane pane = dm.ControlPanes[0];
int newwidth = e.Panes[0].ActualSize.Width;
if (newwidth < 60) newwidth = 60;//sanity check
pane.FlyoutSize = new Size(newwidth, pane.FlyoutSize.Height);
}
private void dm_AfterHideFlyout(object sender, ControlPaneEventArgs e)
{
e.Pane.TextTab = GetExplorerBarSelectionString();
}
#endregion
private void Form1_Deactivate(object sender, EventArgs e)
{
}
private void Form1_Shown(object sender, EventArgs e)
{
////case 1389 TEST
//throw new System.InvalidOperationException("TEST case 1389");
//case 2049
//all this expires stuff previously was about trial versions only.
if (AyaBizUtils.Trial || AyaBizUtils.WillLockout || AyaBizUtils.RequestedTrial)
{
//case 1172 moved here for lite version because
//this messagebox is hidden behind splash in autologin
if (AyaBizUtils.TrialExpired || AyaBizUtils.LockedOut)
{//case 1424
TrialExpired tedlg = new TrialExpired();
tedlg.ShowDialog();
//Util.PromptWithIconOKOnlyFromLocaleKey("Error.License.Expired", MessageBoxIcon.Warning);
}
else if (AyaBizUtils.WillExpire || AyaBizUtils.WillLockout)
{//case 1306
TrialExpire tedlg = new TrialExpire();
tedlg.ShowDialog();
}
}
else
{
//case 2094
//warning if trial is within 10 days of expiry
//warning if expired
if (AyaBizUtils.SubscriptionExpirationImminent || AyaBizUtils.SubscriptionExpired)
{
SubStatus ssdlg = new SubStatus();
ssdlg.ShowDialog();
}
}
//case 1389
MainFormLoadingComplete = true;
}
//case 1163
private void timerClock_Tick(object sender, EventArgs e)
{
toolStripClock.Text = DBUtil.CurrentWorkingDateTime.ToString();
}
#region Accelerator keys
/// <summary>
/// Case 37
/// </summary>
/// <param name="msg"></param>
/// <param name="keyData"></param>
/// <returns></returns>
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
#if(DEBUG)
//Case 515 testing
if (keyData == Keys.F12)
{
//DBManager.FireBirdRecomputeStatistics();
#region Generate huge tracts o' data
//Random rand=new Random();
//Guid gTestSecurityGroupID = new Guid("{EA613C39-38F0-470E-9B76-ABB9B05C5F3A}");
//for (int x = 0; x < 999; x++)
//{
// User u = User.NewItem();
// u.EmployeeNumber = x.ToString();
// u.FirstName = "User";
// u.LastName = x.ToString();
// u.Initials = "xx";
// u.EmailAddress = x.ToString() + "@" + "test.com";
// u.UserType = UserTypes.Schedulable;
// u.MemberOfGroup = gTestSecurityGroupID;
// u.Login = x.ToString();
// u.Password = x.ToString();
// if (!u.IsSavable)
// System.Diagnostics.Debugger.Break();
// u.Save();
//}
//for (int x = 0; x < 20000; x++)
//{
// Client c = Client.NewItem();
// c.Name = "Client" + x.ToString("00000");
// c.Notes = "The quick brown fox jumped over the six lazy dogs";
// c.Phone1="555"+x.ToString("00000");
// c.Contact = "Client Contact";
// c.GoToAddress.City = "City";
// c.GoToAddress.Country = "Country";
// c.GoToAddress.Postal = rand.Next(90000, 99000).ToString();
// c.WebAddress = "http://www.client" + x.ToString("00000") + ".com";
// Address.Copy(c.GoToAddress, c.MailToAddress);
// c.AccountNumber = x.ToString();
// if (!c.IsSavable)
// System.Diagnostics.Debugger.Break();
// c.Save();
//}
//for (int x = 0; x < 20000; x++)
//{
// Vendor c = Vendor.NewItem();
// c.Name = "Test" + x.ToString("00000");
// c.Notes = "The quick brown fox jumped over the six lazy dogs";
// c.Phone1 = "555" + x.ToString("00000");
// c.Contact="Vendor Contact";
// c.GoToAddress.City = "City";
// c.GoToAddress.Country = "Country";
// c.GoToAddress.Postal = rand.Next(90000, 99000).ToString();
// c.WebAddress = "http://www.vendor" + x.ToString("00000") + ".com";
// Address.Copy(c.GoToAddress, c.MailToAddress);
// c.AccountNumber = x.ToString();
// if (!c.IsSavable)
// System.Diagnostics.Debugger.Break();
// c.Save();
//}
//VendorPickList vpl = VendorPickList.GetList();
//for (int x = 0; x < 20000; x++)
//{
// Part c = Part.NewItem();
// c.PartNumber = x.ToString();
// c.Cost = 5.00m;
// c.Retail = 15.00m;
// c.WholesalerID = vpl[rand.Next(vpl.Count)].ID;
// c.Name= "Part" + x.ToString("00000");
// c.Save();
//}
//Units
//manufacturers
//for (int x = 20001; x < 20050; x++)
//{
// Vendor c = Vendor.NewItem();
// c.VendorType = VendorTypes.Manufacturer;
// c.Name = "VendorMan" + x.ToString("00000");
// c.Notes = "The quick brown fox jumped over the six lazy dogs";
// c.Phone1 = "555" + x.ToString("00000");
// c.Contact = "VendorMan Contact";
// c.GoToAddress.City = "VendManCity";
// c.GoToAddress.Country = "VendManCountry";
// c.GoToAddress.Postal = rand.Next(90000, 99000).ToString();
// c.WebAddress = "http://www.vendor" + x.ToString("00000") + ".com";
// Address.Copy(c.GoToAddress, c.MailToAddress);
// c.AccountNumber = x.ToString();
// if (!c.IsSavable)
// System.Diagnostics.Debugger.Break();
// c.Save();
//}
//VendorPickList vendorMans = VendorPickList.GetList(VendorTypes.Manufacturer);
////Unitmodels
//for (int x = 0; x < 500; x++)
//{
// UnitModel c = UnitModel.NewItem();
// c.ModelNumber = x.ToString();
// c.VendorID = vendorMans[rand.Next(vendorMans.Count)].ID;
// c.LifeTimeWarranty = true;
// c.Name = "UnitModel" + x.ToString("00000");
// c.Save();
//}
//UnitModelPickList umpl= UnitModelPickList.GetList();
//ClientPickList cpl = ClientPickList.GetList();
//int nSerial=1;
//foreach (ClientPickList.ClientPickListInfo cp in cpl)
//{
// Unit u = Unit.NewItem();
// u.ClientID = cp.ID;
// u.UnitModelID = umpl[rand.Next(umpl.Count)].ID;
// u.Serial = nSerial.ToString();
// u.Description="Unit" + nSerial.ToString();
// nSerial++;
// u.Save();
//}
//Service Rates
// Rates rs = Rates.GetItems(false);
//for (int x = 0; x < 50; x++)
//{
// Rate r= rs.Add();
// r.AccountNumber = "svc" + x.ToString();
// r.Charge = 25.00m;
// r.Cost = 10.00m;
// r.Description = "Service Rate" + x.ToString();
// r.Name = "SVCRATE " + x.ToString();
// r.RateType = RateTypes.Service;
// rs.Save();
//}
//Travel Rates
//for (int x = 0; x < 50; x++)
//{
// Rate r = rs.Add();
// r.AccountNumber = "trv" + x.ToString();
// r.Charge = 25.00m;
// r.Cost = 10.00m;
// r.Description = "Travel Rate" + x.ToString();
// r.Name = "TRVRATE " + x.ToString();
// r.RateType = RateTypes.Travel;
// rs.Save();
//}
//UserPickList uplproj=UserPickList.GetList(false);
//DateTime dtStart;
//DateTime dtStop;
////Projects
//for (int x = 0; x < 500; x++)
//{
// dtStart = new DateTime(2000, 1, 1).AddDays(rand.Next(4380));//4380 days = 12 years
// Project c = Project.NewItem();
// c.AccountNumber = x.ToString();
// c.DateStarted = dtStart;
// c.Name = "Project" + x.ToString();
// c.ProjectOverseerID = uplproj[rand.Next(uplproj.Count)].ID;
// c.Save();
//}
//Workorders
// ClientPickList cpl = ClientPickList.GetList();
// UserPickList upl = UserPickList.GetList(false);
// WorkorderStatusPickList wspl = WorkorderStatusPickList.GetList();
// ProjectList projects = ProjectList.GetList("");
// WorkorderCategories wocats = WorkorderCategories.GetItems();
// PriorityPickList priors = PriorityPickList.GetList();
// WorkorderItemTypePickList woitypes = WorkorderItemTypePickList.GetList();
// RandomText text = new RandomText();
// RatePickList rl= RatePickList.GetListAllActiveRates();
// System.Collections.Generic.List<Guid> serviceRates=new System.Collections.Generic.List<Guid>();
// System.Collections.Generic.List<Guid> travelRates=new System.Collections.Generic.List<Guid>();
// PartPickList ppl=PartPickList.GetAllParts();
// foreach(RatePickList.RatePickListInfo i in rl)
// {
// if(i.RateType== RateTypes.Service)
// serviceRates.Add(i.ID);
// else
// travelRates.Add(i.ID);
// }
// TaxCodeList tcl = TaxCodeList.GetList();
// int nCount=1;
// for (int year = 2009; year < 2010; year++)
// for(int month=10;month < 13; month++)
// for (int day = 1; day < 29; day++)
// for(int hour=9;hour<18;hour++)
// {
// DateTime dtStart = new DateTime(year, month, day, hour, 0, 0);
// DateTime dtStop = dtStart.AddHours(1);
// Workorder w = Workorder.NewItem(WorkorderTypes.Service);
// w.ClientID = cpl[rand.Next(cpl.Count)].ID;
// w.WorkorderCategoryID = wocats[rand.Next(wocats.Count)].ID;
// w.WorkorderService.WorkorderStatusID = wspl[rand.Next(wspl.Count)].ID;
// w.ProjectID = projects[rand.Next(projects.Count)].LT_O_Project.Value;
// w.Summary = text.GetRandomSentence(5);
// w.WorkorderService.CloseByDate = dtStart.AddDays(1);
// w.WorkorderService.ServiceDate = dtStart;
// w.CustomerReferenceNumber = text.GetRandomSentence(1);
// w.InternalReferenceNumber = "Second run"+nCount.ToString();
// w.Onsite = true;
// WorkorderItem wi = w.WorkorderItems[0];
// wi.Summary = text.GetRandomText(1, 1, 2, 3, 8);
// wi.TechNotes = text.GetRandomText(1, 1, 1, 3, 8);
// wi.PriorityID = priors[rand.Next(priors.Count)].ID;
// wi.TypeID = woitypes[rand.Next(woitypes.Count)].ID;
// wi.WorkorderStatusID = wspl[rand.Next(wspl.Count)].ID;
// wi.WarrantyService = rand.Next(101) > 50 ? true : false;
// wi.RequestDate = dtStart;
// //Unit? 20percent chance
// if (rand.Next(101) > 80)
// {
// wi.UnitID = UnitPickList.GetListByClient(w.ClientID)[0].ID;
// }
// //sched users 1 or as many as 4
// int nMaxSchedUsers = rand.Next(1, 5);
// for (int nSchedUsers = 0; nSchedUsers < nMaxSchedUsers; nSchedUsers++)
// {
// WorkorderItemScheduledUser su = wi.ScheduledUsers.Add(wi);
// su.EstimatedQuantity = 1;
// su.UserID = upl[rand.Next(upl.Count)].ID;
// su.ServiceRateID = serviceRates[rand.Next(serviceRates.Count)];
// su.StartDate = dtStart;
// su.StopDate = dtStop;
// }
// //parts 0 to 5
// int nMaxParts = rand.Next(0, 6);
// for (int nParts = 0; nParts < nMaxParts; nParts++)
// {
// WorkorderItemPart p = wi.Parts.Add(wi);
// p.PartID = ppl[rand.Next(ppl.Count)].ID;
// p.Quantity = rand.Next(1, 11);
// p.TaxPartSaleID = tcl[0].ID;
// p.Used = true;
// }
// //Labor
// foreach (WorkorderItemScheduledUser scheduser in wi.ScheduledUsers)
// {
// w.CreateLaborFromScheduledUser(wi.ID, scheduser.ID);
// }
// foreach (WorkorderItemLabor labor in wi.Labors)
// {
// labor.ServiceDetails=text.GetRandomText(2, 1, 4, 5, 15);
// }
// //travel
// //travel 0 or as many as 4
// int nMaxTravel = rand.Next(0, 5);
// for (int nTravel = 0; nTravel < nMaxTravel; nTravel++)
// {
// WorkorderItemTravel su = wi.Travels.Add(wi);
// su.UserID = upl[rand.Next(upl.Count)].ID;
// su.TravelRateID = travelRates[rand.Next(travelRates.Count)];
// su.TravelStartDate = dtStart;
// su.TravelStopDate = dtStop;
// su.TravelDetails = text.GetRandomSentence(5);
// }
// //closed? 20percent chance
// if (rand.Next(101) > 80)
// {
// w.ServiceCompleted = true;
// w.Closed = true;
// }
//System.Diagnostics.Debug.Assert(w.IsSavable);
// w.Save();
// nCount++;
// }
////schedule markers
//RandomText text = new RandomText();
//UserListScheduleable schedUserList = UserListScheduleable.GetList();
//DateTime dt=new DateTime(2009,9,1);
//for (int x = 0; x < 1000; x++)
//{
// ScheduleMarker sm = ScheduleMarker.NewItem();
// sm.ARGB = rand.Next(0, 10000);
// sm.dtStartDate=dt.AddDays(rand.Next(120)).AddHours(rand.Next(8,18));
// sm.dtStopDate = sm.dtStartDate.AddHours(1);
// sm.Name = text.GetRandomSentence(5);
// sm.Notes = text.GetRandomText(1, 1, 5, 3, 8);
// sm.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.User;
// sm.SourceID = schedUserList[rand.Next(schedUserList.Count)].ID;
// sm.Save();
//}
#endregion generate huge tracts o' data
#region ayascript to update and close selected workorders
//System.Collections.Generic.List<Guid> l= new System.Collections.Generic.List<Guid>();
// l.Add(new Guid("c9d07183-89d6-4dc0-bacb-e46a6c7a1b9a"));
// l.Add(new Guid("d3eea5a5-6181-4484-afc6-20279aa9670d"));
// l.Add(new Guid("06afffc4-5d6c-4e0d-bc44-de996a69f69d"));
// l.Add(new Guid("7da89c49-c94e-4d57-94ef-d25507e5e512"));
// l.Add(new Guid("83e1ed3e-f831-445f-b3cd-5caac218d383"));
// //Reserve a place to store any errors during operation
// System.Text.StringBuilder sbErrors=new StringBuilder();
// foreach (Guid i in l)
// {
// //Fetch the workorder object from it's ID and do not place it in the most recently used object list (NoMRU)
// Workorder w = Workorder.GetItemNoMRU(i);
// //Already closed?
// if (w.Closed)
// continue;//It's already closed so move on to next one
// //If we're here it's not closed so let's close it..
// //SET WORKORDER STATUS
// //Note: There is no need to set the workorder status to the global settings automatical status on close
// //as that will be done automatically when you set it to closed=true below, however if for some reason you want to do it
// //anyway, it would be done here like this:
// w.WorkorderService.WorkorderStatusID = AyaBizUtils.GlobalSettings.WorkorderClosedStatus;
// //First set it to service completed as that is a prerequisite to close it
// w.ServiceCompleted = true;
// //Now close it. No need to set closed workorder status since it automatically will do it here
// w.Closed = true;
// //Make sure there are no broken rules and it can be saved
// if (w.IsSavable)
// w.Save();
// else
// {
// sbErrors.AppendLine("Workorder " + w.WorkorderService.ServiceNumber.ToString() + " is not saveable:");
// sbErrors.AppendLine(w.BrokenRulesText);
// sbErrors.AppendLine("****************************************");
// }
// }
// //display errors if necessary
// if (sbErrors.Length > 0)
// {
// MessageBox.Show(sbErrors.ToString());
// }
// MessageBox.Show("Done!");
#endregion
#region ayascript to updated selected workorders
////============== START OF SCRIPT =========================
//string WorkorderNumberMustBeLessThanThis = "3025";//<--Set your maximum work order number to set closed here
//WorkorderServiceList wsl = WorkorderServiceList.GetList("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?> \r\n" +
//"<GRIDCRITERIA> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderService.aServiceNumber\" UI=\"LT_O_Workorder\" PIN=\"0\" WIDTH=\"92\" SORT=\"ASC\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorder.aServiceCompleted\" UI=\"LT_Workorder_Label_ServiceCompleted\" PIN=\"0\" WIDTH=\"143\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorder.aClosed\" UI=\"LT_Workorder_Label_Closed\" PIN=\"0\" WIDTH=\"82\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderService.aServiceDate\" UI=\"LT_WorkorderService_Label_ServiceDate\" PIN=\"0\" WIDTH=\"170\" /> \r\n" +
//" <COLUMNITEM CM=\"aClient.aName\" UI=\"LT_O_Client\" PIN=\"0\" WIDTH=\"148\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderStatus.aName\" UI=\"LT_O_WorkorderStatus\" PIN=\"0\" WIDTH=\"133\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorder.aSummary\" UI=\"LT_Workorder_Label_Summary\" PIN=\"0\" WIDTH=\"235\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderPreventiveMaintenance.aPreventiveMaintenanceNumber\" UI=\"LT_Workorder_Label_FromPMID\" PIN=\"0\" WIDTH=\"106\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderQuote.aQuoteNumber\" UI=\"LT_Workorder_Label_FromQuoteID\" PIN=\"0\" WIDTH=\"99\" /> \r\n" +
//" <COLUMNITEM CM=\"aWorkorderService.aInvoiceNumber\" UI=\"LT_WorkorderService_Label_InvoiceNumber\" PIN=\"0\" WIDTH=\"126\" /> \r\n" +
//" <WHEREITEMGROUP GROUPLOGICALOPERATOR=\"And\" UI=\"LT_O_Workorder\"> \r\n" +
//" <WHEREITEM COMPAREOPERATOR=\"LessThan\" CM=\"aWorkorderService.aServiceNumber\" TYPE=\"System.Int32\" UICOMPAREVALUE=\"" +
//WorkorderNumberMustBeLessThanThis + "\" COMPAREVALUE=\"" + WorkorderNumberMustBeLessThanThis + "\" /> \r\n" +
//" </WHEREITEMGROUP> \r\n" +
//"</GRIDCRITERIA> ");
////Reserve a place to store any errors during operation
//System.Text.StringBuilder sbErrors = new StringBuilder();
////WORKORDER STATUS TO SET ALL ITEMS AND WORKORDER
////"Closed" status Id
//Guid workorderStatusIdToSet = new Guid("9E818C52-074D-441E-AB12-825BF8C126DD");
//foreach (WorkorderServiceList.WorkorderServiceListInfo i in wsl)
//{
// //placeholder to keep track of current workorder in case an error ensues
// string currentWorkorder = string.Empty;
// try
// {
// //Fetch the workorder object from it's ID and do not place it in the most recently used object list (NoMRU)
// Workorder w = Workorder.GetItemNoMRU(i.LT_O_Workorder.Value);
// //get the workorder number in case we need to report an error with it
// currentWorkorder = w.WorkorderService.ServiceNumber.ToString();
// //Already closed or service completed?
// if (w.Closed || w.ServiceCompleted)
// {
// //Scan the workorder and all items to see if it's already set correctly...
// bool alreadySetCorrectly = true;
// //check the workorder header status
// if (w.WorkorderService.WorkorderStatusID == workorderStatusIdToSet)
// {
// //header matched so check all workorder item's status
// foreach (WorkorderItem wi in w.WorkorderItems)
// {
// if (wi.WorkorderStatusID != workorderStatusIdToSet)
// {
// //Status is not set correctly so no need to continue checking
// alreadySetCorrectly = false;
// break;
// }
// }
// }
// else
// alreadySetCorrectly = false;
// //Respond to the results of the workorder scan..
// if (alreadySetCorrectly)
// continue; //We got through the entire workorder and it's all correct so we can skip this one
// else
// {
// //something doesn't match so reopen the workorder and allow it to be set below
// w.Closed = false;
// w.ServiceCompleted = false;
// }
// }
// //If we're here it needs status set and closed...
// //SET WORKORDER AND ITEMS STATUS
// w.WorkorderService.WorkorderStatusID = workorderStatusIdToSet;
// foreach (WorkorderItem wi in w.WorkorderItems)
// wi.WorkorderStatusID = workorderStatusIdToSet;
// //Set it to service completed as that is a prerequisite to close it
// w.ServiceCompleted = true;
// //Now close it and save it
// w.Closed = true;
// w.Save();
// }
// catch (Exception ex)
// {
// sbErrors.AppendLine("Error processing workorder " + currentWorkorder);
// sbErrors.AppendLine(ex.Message);
// while (ex.InnerException != null)
// {
// ex = ex.InnerException;
// if (!string.IsNullOrWhiteSpace(ex.InnerException.Message))
// sbErrors.AppendLine(ex.Message);
// }
// sbErrors.AppendLine("****************************************");
// }
//}
////display errors if necessary
//if (sbErrors.Length > 0)
//{
// MessageBox.Show(sbErrors.ToString());
//}
//MessageBox.Show("Done!");
////=============END OF SCRIPT ===============
#endregion
}
if (keyData == Keys.F11)
{
// ____ ___ ___ ____ __ _ _ __
//(_ _)( _)/ __)(_ _)( )( \( )/ _)
// )( ) _)\__ \ )( )( ) (( (/\
// (__) (___)(___/ (__) (__)(_)\_)\__/
//ctrl-alt-g for GRID FILTER CRITERIA
#region gen workorders COMMENTED OUT
//==============================================================================
//Workorders
//Random rand=new Random();
//ClientPickList cpl = ClientPickList.GetList();
//UserPickList upl = UserPickList.GetList(false);
//WorkorderStatusPickList wspl = WorkorderStatusPickList.GetList();
//ProjectList projects = ProjectList.GetList("");
//WorkorderCategories wocats = WorkorderCategories.GetItems();
//PriorityPickList priors = PriorityPickList.GetList();
//WorkorderItemTypePickList woitypes = WorkorderItemTypePickList.GetList();
//RandomText text = new RandomText();
//RatePickList rl = RatePickList.GetListAllActiveRates();
//System.Collections.Generic.List<Guid> serviceRates = new System.Collections.Generic.List<Guid>();
//System.Collections.Generic.List<Guid> travelRates = new System.Collections.Generic.List<Guid>();
//PartPickList ppl = PartPickList.GetAllParts();
//foreach(RatePickList.RatePickListInfo i in rl)
//{
// if(i.RateType == RateTypes.Service)
// serviceRates.Add(i.ID);
// else
// travelRates.Add(i.ID);
//}
//TaxCodeList tcl = TaxCodeList.GetList();
//int nCount = 1;
////for(int year = 2012; year < 2013; year++)
//// for(int month = 1; month < 13; month++)
//// for(int day = 1; day < 29; day++)
//// for(int hour = 9; hour < 18; hour++)
// for(int n=0;n<10001;n++)
// {
// int year = 2012;
// int month = rand.Next(1, 13);
// int day = rand.Next(1, 29);
// int hour = rand.Next(9, 18);
// DateTime dtStart = new DateTime(year, month, day, hour, 0, 0);
// DateTime dtStop = dtStart.AddHours(1);
// Workorder w = Workorder.NewItem(WorkorderTypes.Service);
// w.ClientID = cpl[rand.Next(cpl.Count)].ID;
// w.WorkorderCategoryID = wocats[rand.Next(wocats.Count)].ID;
// w.WorkorderService.WorkorderStatusID = wspl[rand.Next(wspl.Count)].ID;
// w.ProjectID = projects[rand.Next(projects.Count)].LT_O_Project.Value;
// w.Summary = text.GetRandomSentence(5);
// w.WorkorderService.CloseByDate = dtStart.AddDays(1);
// w.WorkorderService.ServiceDate = dtStart;
// w.CustomerReferenceNumber = text.GetRandomSentence(1);
// w.InternalReferenceNumber = "Generated data " + nCount.ToString();
// w.Onsite = true;
// WorkorderItem wi = w.WorkorderItems[0];
// wi.Summary = text.GetRandomText(1, 1, 2, 3, 8);
// wi.TechNotes = text.GetRandomText(1, 1, 1, 3, 8);
// wi.PriorityID = priors[rand.Next(priors.Count)].ID;
// wi.TypeID = woitypes[rand.Next(woitypes.Count)].ID;
// wi.WorkorderStatusID = wspl[rand.Next(wspl.Count)].ID;
// wi.WarrantyService = rand.Next(101) > 50 ? true : false;
// wi.RequestDate = dtStart;
// //Unit? 20percent chance
// //If the client has any units
// {
// UnitPickList clientUnitList = UnitPickList.GetListByClient(w.ClientID);
// if(clientUnitList.Count > 0 && rand.Next(101) > 80)
// {
// wi.UnitID = clientUnitList[0].ID;
// }
// }
// //sched users 1 or as many as 4
// int nMaxSchedUsers = rand.Next(1, 5);
// for(int nSchedUsers = 0; nSchedUsers < nMaxSchedUsers; nSchedUsers++)
// {
// WorkorderItemScheduledUser su = wi.ScheduledUsers.Add(wi);
// su.EstimatedQuantity = 1;
// UserPickList.UserPickListInfo upi = upl[rand.Next(upl.Count)];
// //ensure it's a scheduleable user
// while(upi.Type != UserTypes.Schedulable)
// upi = upl[rand.Next(upl.Count)];
// su.UserID = upi.ID;
// su.ServiceRateID = serviceRates[rand.Next(serviceRates.Count)];
// su.StartDate = dtStart;
// su.StopDate = dtStop;
// }
// //parts 0 to 5
// //int nMaxParts = rand.Next(0, 6);
// //for(int nParts = 0; nParts < nMaxParts; nParts++)
// //{
// // WorkorderItemPart p = wi.Parts.Add(wi);
// // //get non serialized parts only for this action
// // p.PartID = ppl[rand.Next(ppl.Count)].ID;
// // p.Quantity = rand.Next(1, 11);
// // p.TaxPartSaleID = tcl[0].ID;
// // p.Used = true;
// //}
// //Labor
// foreach(WorkorderItemScheduledUser scheduser in wi.ScheduledUsers)
// {
// w.CreateLaborFromScheduledUser(wi.ID, scheduser.ID);
// }
// foreach(WorkorderItemLabor labor in wi.Labors)
// {
// labor.ServiceDetails = text.GetRandomText(2, 1, 4, 5, 15);
// }
// //travel
// //travel 0 or as many as 4
// int nMaxTravel = rand.Next(0, 5);
// for(int nTravel = 0; nTravel < nMaxTravel; nTravel++)
// {
// WorkorderItemTravel su = wi.Travels.Add(wi);
// su.UserID = upl[rand.Next(upl.Count)].ID;
// su.TravelRateID = travelRates[rand.Next(travelRates.Count)];
// su.TravelStartDate = dtStart;
// su.TravelStopDate = dtStop;
// su.TravelDetails = text.GetRandomSentence(5);
// }
// //closed? 80percent chance
// if(rand.Next(101) > 20)
// {
// w.ServiceCompleted = true;
// w.Closed = true;
// }
// if(!w.IsSavable)
// {
// CopyableMessageBox cm = new CopyableMessageBox(w.WhatsBroken);
// System.Diagnostics.Debugger.Break();
// }
// w.Save();
// nCount++;
// }
//===============================================================================
#endregion
#region Import utility COMMENTED OUT
////==============================================================================
////Lists to contain item Id's to compare to and ensure no duplicates imported
//System.Collections.Generic.Dictionary<string, Guid> allUnits = new System.Collections.Generic.Dictionary<string, Guid>();
//System.Collections.Generic.Dictionary<string, Guid> allUnitModels = new System.Collections.Generic.Dictionary<string, Guid>();
//System.Collections.Generic.Dictionary<string, Guid> allClients = new System.Collections.Generic.Dictionary<string, Guid>();
//{
// //Get lists of items that are already pre-entered in AyaNova and need to be matched by name
// ClientPickList clientList = ClientPickList.GetList();
// UnitPickList unitList = UnitPickList.GetListOfAll();
// UnitModelPickList unitModelList = UnitModelPickList.GetList();
// //Populate the lists from items already in the AyaNova database
// foreach(ClientPickList.ClientPickListInfo i in clientList)
// allClients.Add(i.Name.Trim(), i.ID);
// foreach(UnitModelPickList.UnitModelPickListInfo i in unitModelList)
// allUnitModels.Add(i.Name.Trim(), i.ID);
// foreach(UnitPickList.UnitPickListInfo i in unitList)
// allUnits.Add(i.Serial.Trim(), i.ID);
// //free up the temporary list objects fetched
// clientList = null;
// unitList = null;
// unitModelList = null;
//}
////Read the data from the csv file "units.csv" located in c:\temp, change below to your file name and path as required
//string[] rawLines = System.IO.File.ReadAllLines(@"c:\temp\units.csv");
////warning
//if(MessageBox.Show("Warning: There is no Undo, your AyaNova database will be changed permanently!\r\nBe *certain* you have a backup of your database before proceeding.\r\n\r\nAre you sure you want to continue?", "Import", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
// return false;
////hourglass cursor
//Cursor.Current = Cursors.WaitCursor;
////Iterate through the raw data, break it into fields and try to match with existing data and generate pm's accordingly
//long recordsImported = 0;
//bool firstRow = true;
//foreach(string rawItem in rawLines)
//{
// //skip first row that has column names not actual data
// if(firstRow)
// {
// firstRow = false;
// continue;
// }
// //split current row into fields
// string[] row = rawItem.Split(',');
// if(row.GetLength(0) != 10)
// throw new System.ApplicationException("Import failed (restore DB, fix problem and try again): Current import row doesn't have expected 10 fields. Row data:\r\n" + rawItem);
// //##### Field 0 Unit Serial number #####
// string sn = row[0].Trim();
// if(string.IsNullOrWhiteSpace(sn))
// throw new System.ApplicationException("Import failed (restore DB, fix problem and try again): Current import row doesn't have a serial number. Row data:\r\n" + rawItem);
// //Has it already been imported?
// if(allUnits.ContainsKey(sn))
// continue;//skip to the next record
// //Not there already so import unit but first get a client id...
// //##### Field 1 Client #####
// string ClientName = row[1].Trim();
// if(string.IsNullOrWhiteSpace(ClientName))
// throw new System.ApplicationException("Import failed (restore DB, fix problem and try again): Current import row doesn't have a client. Row data:\r\n" + rawItem);
// Guid ClientId = Guid.Empty;
// if(allClients.ContainsKey(ClientName))
// ClientId = allClients[ClientName];
// if(ClientId == Guid.Empty)
// {
// //Create a new client
// Client c = Client.NewItem();
// c.Name = ClientName;
// ClientId = c.ID;
// if(!c.IsSavable)
// throw new System.ApplicationException("Import failed (restore DB, fix problem and try again): Current import row Client record can not be saved. Row data:\r\n" + rawItem);
// c.Save();
// //add to list so it won't try to import client again next time
// allClients.Add(ClientName, ClientId);
// }
// //##### Field 2 UnitModel #####
// Guid UnitModelId = Guid.Empty;
// string UnitModelName = row[2].Trim();
// //If unit model name is not empty then deal with it (Unitmodel is optional for a unit)
// if(!string.IsNullOrWhiteSpace(UnitModelName))
// {
// //see if we already have it
// if(allUnitModels.ContainsKey(UnitModelName))
// UnitModelId = allUnitModels[UnitModelName];
// if(UnitModelId == Guid.Empty)
// {
// //Create a new UnitModel
// UnitModel c = UnitModel.NewItem();
// c.Name = UnitModelName;
// UnitModelId = c.ID;
// if(!c.IsSavable)
// throw new System.ApplicationException("Import failed (restore DB, fix problem and try again): Current import row UnitModel record can not be saved. Row data:\r\n" + rawItem);
// c.Save();
// allUnitModels.Add(UnitModelName, UnitModelId);
// }
// }
// //##### Field 3 Text1 #####
// string text1 = row[3].Trim();
// //##### Field 4 PurchaseDate #####
// string purchaseDate = row[4].Trim();
// DateTime dtPurchaseDate = DateTime.MinValue;//MinValue means no date
// if(!string.IsNullOrWhiteSpace(purchaseDate))
// {
// DateTime.TryParse(purchaseDate, out dtPurchaseDate);
// }
// //##### Field 5 Description #####
// string description = row[5].Trim();
// //##### Field 6 Receipt number #####
// string receipt = row[6].Trim();
// //##### Field 7 Text2 #####
// string text2 = row[7].Trim();
// //##### Field 8 Text3 #####
// string text3 = row[8].Trim();
// //##### Field 9 Text4 #####
// string text4 = row[9].Trim();
// //Import the unit now that we have all the info required
// Unit u = Unit.NewItem();
// u.ClientID = ClientId;
// u.UnitModelID = UnitModelId;
// u.Serial = sn;
// u.Text1 = text1;
// if(dtPurchaseDate != DateTime.MinValue)
// u.PurchasedDate = dtPurchaseDate;
// u.Text2 = text2;
// u.Description = description;
// u.Receipt = receipt;
// u.Text2 = text2;
// u.Text3 = text3;
// u.Text4 = text4;
// Guid unitId = u.ID;
// u.Save();
// allUnits.Add(sn, unitId);
// recordsImported++;
//}
//Cursor.Current = Cursors.Default;
//MessageBox.Show("Finished importing " + recordsImported.ToString() + " records");
////Done.
////===============================================================================
#endregion import util
#region Close selected workorders by criteria COMMENTED OUT
////**** CLOSE SELECTED WORKORDERS THAT MATCH THE FOLLOWING ******
////Change these values as required
//string WorkorderStatusName = "Service is Completed";
//string ClientName = "ABC Accounting";
////**************************************************************
////No need to change anything below here if different status or client in future
////Reserve a place to store any errors during operation
//System.Text.StringBuilder sbErrors = new StringBuilder();
////GET THE STATUS ID
////placeholder for status once it's found
//Guid workorderStatusId = Guid.Empty;
//WorkorderStatusPickList wospl = WorkorderStatusPickList.GetList();
//try
//{
// //try to fetch the status by name and get the Id from it
// workorderStatusId = wospl[WorkorderStatusName].ID;
//}
//catch
//{
// sbErrors.AppendLine("Status of \"" + WorkorderStatusName + "\" was not found in the database, can't proceed!");
//}
////GET THE CLIENT ID
////placeholder for client Id once it's found
//Guid clientId = Guid.Empty;
//ClientPickList cpl = ClientPickList.GetList();
//foreach (ClientPickList.ClientPickListInfo i in cpl)
//{
// if (i.Name.Equals(ClientName))
// {
// clientId = i.ID;
// break;
// }
//}
//if (clientId == Guid.Empty)
// sbErrors.AppendLine("Client called \"" + ClientName + "\" was not found in the database, can't proceed!");
////counter of successfully closed and saved workorders
//long workordersClosed = 0;
////do we have a status and client Id?
//if (workorderStatusId != Guid.Empty && clientId != Guid.Empty)
//{
// //Yup, so continue...
// //GET APPLICABLE WORKORDERS VIA WORKORDER SERVICE LIST AND CRITERIA
// WorkorderServiceList wsl = WorkorderServiceList.GetList("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?> \r\n" +
// "<GRIDCRITERIA> \r\n" +
// " <COLUMNITEM CM=\"aClient.aName\" UI=\"LT_O_Client\" PIN=\"0\" WIDTH=\"148\" SORT=\"ASC\" /> \r\n" +
// " <COLUMNITEM CM=\"aWorkorder.aServiceCompleted\" UI=\"LT_Workorder_Label_ServiceCompleted\" PIN=\"0\" WIDTH=\"143\" /> \r\n" +
// " <COLUMNITEM CM=\"aWorkorderStatus.aName\" UI=\"LT_O_WorkorderStatus\" PIN=\"0\" WIDTH=\"133\" /> \r\n" +
// " <COLUMNITEM CM=\"aWorkorder.aClosed\" UI=\"LT_Workorder_Label_Closed\" PIN=\"0\" WIDTH=\"82\" /> \r\n" +
// " <COLUMNITEM CM=\"aWorkorderService.aServiceNumber\" UI=\"LT_O_Workorder\" PIN=\"0\" WIDTH=\"92\" /> \r\n" +
// " <WHEREITEMGROUP GROUPLOGICALOPERATOR=\"And\" UI=\"LT_O_Client\"> \r\n" +
// " <WHEREITEM COMPAREOPERATOR=\"Equals\" CM=\"aClient.aID\" UICOMPAREVALUE=\"\" TYPE=\"System.Guid\" COMPAREVALUE=\"{" + clientId.ToString().ToUpperInvariant() + "}\" /> \r\n" + //belongs to client specified
// " </WHEREITEMGROUP> \r\n" +
// " <WHEREITEMGROUP GROUPLOGICALOPERATOR=\"And\" UI=\"LT_O_WorkorderStatus\"> \r\n" +
// " <WHEREITEM COMPAREOPERATOR=\"Equals\" CM=\"aWorkorderService.aWorkorderStatusID\" UICOMPAREVALUE=\"\" TYPE=\"System.Guid\" COMPAREVALUE=\"{" + workorderStatusId.ToString().ToUpperInvariant() + "}\" /> \r\n" + //has status specified
// " </WHEREITEMGROUP> \r\n" +
// " <WHEREITEMGROUP GROUPLOGICALOPERATOR=\"And\" UI=\"LT_Workorder_Label_ServiceCompleted\"> \r\n" +
// " <WHEREITEM COMPAREOPERATOR=\"Equals\" CM=\"aWorkorder.aServiceCompleted\" UI=\"LT_Workorder_Label_ServiceCompleted\" TYPE=\"System.Boolean\" UICOMPAREVALUE=\"\" COMPAREVALUE=\"True\" /> \r\n" + //is service completed
// " </WHEREITEMGROUP> \r\n" +
// " <WHEREITEMGROUP GROUPLOGICALOPERATOR=\"And\" UI=\"LT_Workorder_Label_Closed\"> \r\n" +
// " <WHEREITEM COMPAREOPERATOR=\"Equals\" CM=\"aWorkorder.aClosed\" UI=\"LT_Workorder_Label_Closed\" TYPE=\"System.Boolean\" UICOMPAREVALUE=\"\" COMPAREVALUE=\"False\" /> \r\n" + //is not closed
// " </WHEREITEMGROUP> \r\n" +
// "</GRIDCRITERIA> " );
// //Iterate the resulting list and close accordingly
// foreach (WorkorderServiceList.WorkorderServiceListInfo i in wsl)
// {
// //placeholder to keep track of current workorder number
// //in case an error ensues and we have to report it later
// string currentWorkorderNumber = string.Empty;
// try
// {
// //Fetch the workorder object from it's ID and do not place it in the most recently used object list (NoMRU)
// Workorder w = Workorder.GetItemNoMRU(i.LT_O_Workorder.Value);
// //get the workorder number in case we need to report an error with it
// currentWorkorderNumber = w.WorkorderService.ServiceNumber.ToString();
// //try to close it
// if (w.IsCloseAllowed)
// {
// w.Closed = true;
// if (w.IsSavable)
// {
// w.Save();
// workordersClosed++;
// }
// else
// sbErrors.AppendLine("Error processing workorder " + currentWorkorderNumber + " not saveable for some reason.");
// }
// else
// {
// sbErrors.AppendLine("Error processing workorder " + currentWorkorderNumber + " not closeable for some reason.");
// }
// }
// catch (Exception ex)
// {
// //Save failed for some reason so report it...
// sbErrors.AppendLine("Error processing workorder " + currentWorkorderNumber);
// sbErrors.AppendLine(ex.Message);
// while (ex.InnerException != null)
// {
// ex = ex.InnerException;
// if (!string.IsNullOrWhiteSpace(ex.InnerException.Message))
// sbErrors.AppendLine(ex.Message);
// }
// sbErrors.AppendLine("****************************************");
// }
// }
//}
////display errors if necessary
//if (sbErrors.Length > 0)
//{
// MessageBox.Show(sbErrors.ToString());
//}
//MessageBox.Show("Finished, " + workordersClosed.ToString() + " workorders were closed and saved");
#endregion
#region Generator on demand COMMENTED OUT
//try
//{
// AyaBizUtils.TG = true;
// Cursor.Current = Cursors.WaitCursor;
// Status("Processing PM workorders...");
// GenProcessPM.GeneratePMWorkorders();
//}
//catch
//{
// throw;
//}
//finally
//{
// AyaBizUtils.TG = false;
//}
#endregion generator on demand
#region Generate serialized inventory for a single part COMMENTED OUT
//Random rand = new Random();
//int snCount = 0;
////get all active warehouses without exception
//PartWarehousePickList whsList = PartWarehousePickList.GetActiveOnlyListWithExceptions(new System.Collections.Generic.List<Guid>());
//for (int x = 0; x < 500; x++)
//{
// PartInventoryAdjustment p = PartInventoryAdjustment.NewItem();
// p.DateAdjusted = DateTime.Now;
// p.ReasonForAdjustment = "coding test";
// PartInventoryAdjustmentItem i = p.Items.Add(p);
// //HUB
// i.PartID = new Guid("A54B1C5D-8EF7-43AB-A35C-C9FE2A875A46");
// i.PartWarehouseID = whsList[rand.Next(whsList.Count)].ID;
// i.QuantityAdjustment = 1;
// snCount++;
// PartSerial ps = i.SerialNumbers[0];
// ps.PartID = i.PartID;
// ps.PartWarehouseID = i.PartWarehouseID;
// ps.SerialNumber = "TESTSN_" + snCount.ToString();
// if (p.IsSavable)
// p.Save();
// else
// {
// MessageBox.Show("Error with item " + snCount.ToString() + "\r\n" + p.BrokenRulesText);
// System.Diagnostics.Debugger.Break();
// break;
// }
//}
#endregion generate serialized inventory
//============== START OF SCRIPT =========================
StringBuilder sbRet = new StringBuilder();
ClientPickList cpl = ClientPickList.GetList();
foreach (ClientPickList.ClientPickListInfo theClient in cpl)
{
try
{
sbRet.AppendLine("Attempting to delete client " + theClient.Name);
sbRet.AppendLine("WORKORDERS");
sbRet.AppendLine(Client.DeleteAllClientWorkorders(theClient.ID));
sbRet.AppendLine("UNITS");
Client.DeleteAllClientUnits(theClient.ID);
sbRet.AppendLine("CLIENT RECORD");
Client.DeleteItem(theClient.ID);
}
catch { }
}
CopyableMessageBox d = new CopyableMessageBox(sbRet.ToString());
d.ShowDialog();
//=============END OF SCRIPT ===============
//END OF TESTING
}
#endif
//Short circuit:
//Only process modified keystrokes (i.e. when a modifier like ctrl-alt-or shift is also
//being held down
if (ModifierKeys == Keys.None) return base.ProcessCmdKey(ref msg, keyData);
switch (Util.HotKeys(keyData))
{
//Close form
case HotKeyAction.CloseForm:
this.Close();
return true;
//case 776
case HotKeyAction.GridFilterCriteria://ctrl-alt-g
CopyableMessageBox cp = new CopyableMessageBox(frmMainGrid.CurrentGridFilterCriteria);
cp.ShowDialog();
return true;
case HotKeyAction.NewWorkorder:
case HotKeyAction.NewQuote:
case HotKeyAction.NewPreventiveMaintenance:
{
//Get which client first...
WorkorderTypes wotype = WorkorderTypes.Unknown;
if (Util.HotKeys(keyData) == HotKeyAction.NewWorkorder)
wotype = WorkorderTypes.Service;
if (Util.HotKeys(keyData) == HotKeyAction.NewPreventiveMaintenance)
wotype = WorkorderTypes.PreventiveMaintenance;
if (Util.HotKeys(keyData) == HotKeyAction.NewQuote)
wotype = WorkorderTypes.Quote;
if (AyaBizUtils.Lite && wotype != WorkorderTypes.Service) return true;//case 1206
ClientSelector c = new ClientSelector(wotype);
DialogResult result = c.ShowDialog();
if (result == DialogResult.Cancel) return true;
Workorder w = null;
try
{
if (c.SelectedTemplateID != Guid.Empty)
w = Workorder.NewItem(c.SelectedTemplateID, c.SelectedClientID);
else
{
switch (Util.HotKeys(keyData))
{
case HotKeyAction.NewWorkorder:
w = Workorder.NewItem(WorkorderTypes.Service);
break;
case HotKeyAction.NewQuote:
w = Workorder.NewItem(WorkorderTypes.Quote);
break;
case HotKeyAction.NewPreventiveMaintenance:
w = Workorder.NewItem(WorkorderTypes.PreventiveMaintenance);
break;
}
}
}
catch (TrialException ex)
{
ex.ToString();
Util.PromptRestricted();
return true;
}
w.ClientID = c.SelectedClientID;
c.Dispose();
if (AyaBizUtils.Lite)//case 1172
{
WorkorderFormLite wfl = new WorkorderFormLite();
wfl.WorkorderToEdit = w;
wfl.ShowDialog();
wfl.Dispose();
}
else
{
WorkorderForm wf = new WorkorderForm();
wf.WorkorderToEdit = w;
//Case 677
wf.Show();
}
//wf.Dispose();
}
return true;
case HotKeyAction.NewClient:
{
Util.EditRecord(RootObjectTypes.Client, AyaBizUtils.NewObjectGuid);
}
return true;
case HotKeyAction.NewUnit:
{
if (AyaBizUtils.Lite) return true;//case 1206
Util.EditRecord(RootObjectTypes.Unit, AyaBizUtils.NewObjectGuid);
}
return true;
case HotKeyAction.NewPart:
{
Util.EditRecord(RootObjectTypes.Part, AyaBizUtils.NewObjectGuid);
}
return true;
case HotKeyAction.EmptyWorkingSet:
{
Util.EmptyWorkingSet();
MessageBox.Show(
"Note: doing this slows AyaNova down temporarily.\r\n" +
"Only use this option for diagnostic purposes.\r\n" +
"(If Windows gets low on memory it will automatically \r\n" +
"take back what it requires from .net applications like AyaNova if required)", "All cached memory freed to operating system");
}
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
#endregion
//************************************************************
}
#region main and application class
public class clsMain
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public clsMain()
{
//
// TODO: Add constructor logic here
//
}
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.DoEvents();
//case 2094 related
try
{
new MyApp().Run(args);
}
catch (System.NullReferenceException )
{
;//no operation, this was found to be happening when an old db is updated to a new db, maybe
//an attempt to show something that doesn't exist yet in db or...?
//it's so obscure I'm just going to swallow it here (but only that specific one)
}
}
//These changes added for case 1157
public class MyApp : Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
{
protected override void OnCreateSplashScreen()
{
//case 1389
this.MinimumSplashScreenDisplayTime = 3000;
this.SplashScreen = new Splish();
}
protected override void OnCreateMainForm()
{
//bugbug begininvoke error could it be because something is happening in this event
//handler that shouldn't such as a dialog box or something, need to research OnCreatemainForm for more
//possibilities...
// Do your time consuming stuff here...
#region .net 4 full profile check
//case 1571
if (Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full") == null)
{
MessageBox.Show("AyaNova was unable to start\r\n\r\n" +
"This release of AyaNova requires the .net 4.0 Full profile not the lesser Client profile\r\n\r\n" +
"Normally the installer ensures it's present, did you copy the AyaNova program files without running setup?\r\n",
"Fatal Error",
MessageBoxButtons.OK,
MessageBoxIcon.Stop);
return;
}
#endregion
#region Log environment
//OK, we can start logging now and continue initialization...
if (log.IsDebugEnabled)
{
log.Info("AyaNova start - full environment:\r\n" +
Util.FullSupportInfo());
}
else
{
log.Info("AyaNova start - brief environment:\r\n" +
Util.BriefSupportInfo());
}
#endregion log environment
#region Initialization and integrity checks...
try
{
GZTW.AyaNova.BLL.AyaBizUtils.Initialize();
string s = AyaBizUtils.View();
log.Info("\r\n" + s);
log.Info(s.GetHashCode().ToString());
}
catch (Exception ex)
{
//splash.CloseForm();
string path;
path = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
string errorMessage = "";
if (ex.InnerException == null)
{
//log the exception
log.Fatal("First initialization and connect attempt", ex);
if (ex is LiteDBTypeInvalidException)
errorMessage = "Error: AyaNova Lite can only be used with a standalone single user Firebird database";
else if (ex is AyNotSubscribedForThisVersionException)
{
//Give user further options to enter a new license or to quit
//after login
this.MainForm = new Form1();
((Form1)this.MainForm).LicenseRequired = true;
return;
}
else
errorMessage = "Unhandled exception:\r\n" + ex.Message + "\r\n" +
ex.GetType() +
"\r\n\r\n\r\nStack Trace:\r\n" +
ex.StackTrace;
}
else
{
//log the exception
log.Fatal("First initialization and connect attempt", ex.InnerException);
//Display a plain exception in case of a license violation
//without the stack trace
if (ex.InnerException.Message.IndexOf("LICENSE") != -1)
{
ExceptionDialog dl = new ExceptionDialog(ex.InnerException.Message, true);
dl.ShowDialog();
Application.Exit();
return;
}
//case 1466
if (ex.InnerException != null && ex.InnerException is FirebirdSql.Data.FirebirdClient.FbException)//] {"I/O error for file \"C:\\data\\AyaNova\\database\\AYANOVA.FDB\"\r\nError while trying to open file"} FirebirdSql.Data.FirebirdClient.FbException
{
if (ex.InnerException.Message.Contains("I/O"))
{
if (AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection)
{
errorMessage =
ex.InnerException.Message + "\r\n\r\n" +
"You are seeing this error for one of two possible reasons:\r\n\r\n" +
"1) AyaNova couldn't open the database file specified in the config.txt file. Check the setting.\r\n" +
"2) You are attempting to open the AyaNova database file more than once at the same time.\r\n" +
"This is a single user installation of AyaNova and can only be opened once at a time.\r\n" +
"If you need to open more than one copy of AyaNova simultaneously switch to a database server installation.";
}
else
{//Multi user so only one reason to see this
errorMessage =
ex.InnerException.Message + "\r\n\r\n" +
"AyaNova couldn't open the database file specified in the config.txt file. Check the setting.\r\n";
}
}
else
{//inner exception doesn't contain the string IO meaning it's a firebird error probably
//related to network firebird server problem
errorMessage =
"Unhandled Exception:\r\n" +
ex.Message + "\r\n" +
"Inner exception type: " +
ex.InnerException.GetType() +
"\r\nInner exception message: " + ex.InnerException.Message;
}
}
else//Inner exception is null or it's not a firebird exception
{
//We get here in the case of being unable to connect.
if (ex.InnerException != null)
{
errorMessage =
"Unhandled Exception:\r\n" +
ex.Message + "\r\n" +
"Inner exception type: " +
ex.InnerException.GetType() +
"\r\nInner exception message: " + ex.InnerException.Message;
}
else
{
errorMessage =
"Unhandled Exception:\r\n" +
ex.Message + "\r\nException type:" +
ex.GetType();
}
}
}
ExceptionDialog d = new ExceptionDialog(
"AyaNova was unable to start\r\n\r\n" +
"Depending on how early in startup the problem occurred,\r\n" +
"a detailed log of the problem with suggestions *may* have\r\n" +
"been saved to the file AyaLog.txt \r\n" +
"located at: " + path +
"\r\n\r\nError details:\r\n" + errorMessage, true);
d.TopMost = true;
d.BringToFront();
d.ShowDialog();
//splash.CloseForm();
// Splash2.Fadeout();
//rethrow it
throw (ex);
}//end catch block
//NOTE: SCHEMA CHECK NOW MOVED TO JUST AFTER LOGIN IS DONE BY USER
#endregion init and integrity check
// Create the main form, the splash screen will close automatically
this.MainForm = new Form1();
//this.MainForm.Visible = true;
//this.MainForm.Visible = false;
}
} //end of class
#endregion mainclass
}
}//end namespace