Exemple #1
0
        private object CreateSingularTab(SoheilEntityType type)
        {
			Cursor openhand = new System.Windows.Input.Cursor(System.IO.Path.Combine(Environment.CurrentDirectory, "Images\\openhand.cur"));
			Cursor closehand = new System.Windows.Input.Cursor(System.IO.Path.Combine(Environment.CurrentDirectory, "Images\\closehand.cur"));
			object itemToAdd = new SoheilSingularView(SingularList, AccessList, openhand, closehand);

            Interlocked.Increment(ref _newTabNumber);

            itemToAdd = new ChromeTabItem
            {
                Header = GetTabHeader(type),
                Content = itemToAdd,
                Tag = type
            };

            return itemToAdd;
        }
Exemple #2
0
		/// <summary>
		/// Returns the header tab of a SoheilEntityType for showing in MDI tabs
		/// </summary>
		/// <param name="type"></param>
		/// <returns></returns>
        private string GetTabHeader(SoheilEntityType type)
        {
            switch (type)
            {
                case SoheilEntityType.None:
                    return string.Empty;
                case SoheilEntityType.UsersMenu:
                    return Common.Properties.Resources.txtUsersAccess;
                case SoheilEntityType.UserAccessSubMenu:
                    return Common.Properties.Resources.txtUsersAccess;
                case SoheilEntityType.Users:
                    return Common.Properties.Resources.txtUsers;
                case SoheilEntityType.Positions:
                    return Common.Properties.Resources.txtPositions;
				case SoheilEntityType.OrganizationCharts:
					return Common.Properties.Resources.txtOrgCharts;
				case SoheilEntityType.Holidays:
					return Common.Properties.Resources.txtHolidays;
				case SoheilEntityType.WorkProfiles:
					return Common.Properties.Resources.txtWorkProfiles;
				case SoheilEntityType.WorkProfilePlan:
					return Common.Properties.Resources.txtWorkProfilePlan;
				case SoheilEntityType.OrganizationCalendar:
					return Common.Properties.Resources.txtOrganizationCalendar;
				case SoheilEntityType.ModulesSubMenu:
                    return Common.Properties.Resources.txtModules;
                case SoheilEntityType.Modules:
                    return Common.Properties.Resources.txtModules;
                case SoheilEntityType.DefinitionsMenu:
                    return Common.Properties.Resources.txtDefinitions;
                case SoheilEntityType.ProductsSubMenu:
                    return Common.Properties.Resources.txtProducts;
                case SoheilEntityType.Products:
                    return Common.Properties.Resources.txtProducts;
                case SoheilEntityType.Reworks:
                    return Common.Properties.Resources.txtReworks;
                case SoheilEntityType.DiagnosisSubMenu:
                    return Common.Properties.Resources.txtDiagnosis;
                case SoheilEntityType.Defections:
                    return Common.Properties.Resources.txtDefections;
                case SoheilEntityType.Roots:
                    return Common.Properties.Resources.txtRoots;
                case SoheilEntityType.ActionPlans:
                    return Common.Properties.Resources.txtActionPlans;
                case SoheilEntityType.Causes:
                    return Common.Properties.Resources.txtCauses;
                case SoheilEntityType.FpcSubMenu:
                    return Common.Properties.Resources.txtFPC;
                case SoheilEntityType.Fpc:
                    return Common.Properties.Resources.txtFPC;
                case SoheilEntityType.Stations:
                    return Common.Properties.Resources.txtStations;
                case SoheilEntityType.Machines:
                    return Common.Properties.Resources.txtMachines;
                case SoheilEntityType.Activities:
                    return Common.Properties.Resources.txtActivities;
                case SoheilEntityType.OperatorsSubMenu:
                    return Common.Properties.Resources.txtOperators;
                case SoheilEntityType.Operators:
                    return Common.Properties.Resources.txtOperators;
				case SoheilEntityType.GeneralSkills:
					return Common.Properties.Resources.txtGenSkills;
				case SoheilEntityType.SpecialSkills:
                    return Common.Properties.Resources.txtSpeSkills;
				case SoheilEntityType.SkillCenter:
					return Common.Properties.Resources.txtSkillCenter;
				case SoheilEntityType.SetupTimes:
					return Common.Properties.Resources.txtSetupTimes;

                case SoheilEntityType.CostsSubMenu:
                    return Common.Properties.Resources.txtCosts;
                case SoheilEntityType.Costs:
                    return Common.Properties.Resources.txtCosts;
                case SoheilEntityType.Warehouses:
                    return Common.Properties.Resources.txtPartWarehouses;
                case SoheilEntityType.ControlMenu:
                    return Common.Properties.Resources.txtControl;
                case SoheilEntityType.ProductPlanSubMenu:
                    return Common.Properties.Resources.txtProductPlan;
                case SoheilEntityType.PerformanceSubMenu:
                    return Common.Properties.Resources.txtPerformance;
                case SoheilEntityType.IndicesSubMenu:
                    return Common.Properties.Resources.txtIndices;
                case SoheilEntityType.CostReportsSubMenu:
                    return Common.Properties.Resources.txtCostReports;
                case SoheilEntityType.ActualCostReportsSubMenu:
                    return Common.Properties.Resources.txtActualCostReports;
                case SoheilEntityType.OperationReportsSubMenu:
                    return Common.Properties.Resources.txtOperationReports;
                case SoheilEntityType.SettingsSubMenu:
                    return Common.Properties.Resources.txtSettings;
                case SoheilEntityType.HelpSubMenu:
                    return Common.Properties.Resources.txtHelp;
                case SoheilEntityType.AboutSubMenu:
                    return Common.Properties.Resources.txtAbout;
                default:
                    return string.Empty;
            }
        }
Exemple #3
0
        private object CreateSplitTab(SoheilEntityType type)
        {
            object itemToAdd = new SoheilSplitView(SplitList, AccessList);

            Interlocked.Increment(ref _newTabNumber);

            itemToAdd = new ChromeTabItem
                            {
                                Header = GetTabHeader(type),
                                Content = itemToAdd,
                                Tag = type
                            };

            return itemToAdd;
        }