public LayoutStartUpForm(environmentVarsCore _envarsCore, ref environmentVarsCore.updateMainLayoutDelegate _updateMainApp) { // This call is required by the designer. InitializeComponent(); // Add any initialization after the InitializeComponent() call. enVars = _envarsCore; updateMainApp = _updateMainApp; startupBackgroundTasks = new startupBackgroundTasksClass(enVars); _VersionLabel.Name = "VersionLabel"; _cancelCard_lbl.Name = "cancelCard_lbl"; _statusMessage.Name = "statusMessage"; _titleLabel.Name = "titleLabel"; _locationLabel.Name = "locationLabel"; _quoteOfTheDaySentenceLabel.Name = "quoteOfTheDaySentenceLabel"; _versionTitleLabel.Name = "versionTitleLabel"; _TitleFlavourLabel.Name = "TitleFlavourLabel"; _websiteLink.Name = "websiteLink"; _progressbar.Name = "progressbar"; _panelLogin.Name = "panelLogin"; _loginBtn.Name = "loginBtn"; _cardId_lbl.Name = "cardId_lbl"; _cardId.Name = "cardId"; _access_code.Name = "access_code"; _codetxt.Name = "codetxt"; _show_password.Name = "show_password"; _PanelLocationText.Name = "PanelLocationText"; _animatedBackGround.Name = "animatedBackGround"; }
public mainAppLayoutForm(environmentVarsCore _envars = default) { bwChangeBackground = new BackgroundWorker(); Application.AddMessageFilter((IMessageFilter)this); ErrorLoading = false; // This call is required by the designer. this.SuspendLayout(); InitializeComponent(); if (_envars is object) { enVars = _envars; } enVars.layoutDesign.menu.properties.ClosedStateSize = LATERAL_MENU_OPEN_WIDTH; resources = new ResourceManager(GetType().Namespace + ".config.strings", Assembly.GetExecutingAssembly()); // ASSIGN ASSEMBLIES TO PANELS assignControlToAssembly(); // çheck if external files exist enVars = LayoutSettings.loadExternalFilesInUse(enVars); if (enVars is null) { ErrorLoading = true; Application.Exit(); return; } // Instantiating the delegate for update data from child forms updateMainApp = updateMainAppLayout; // Me.InactivityTimeOut = enVars.AutomaticLogoutTime this.Visible = false; this.Opacity = 0; this.Refresh(); registerConfigurableLayoutControls(); addToolTips(); if (ENABLE_TESTING_ENVIRONMENT) { enVars = TestingVars.loadTestingEnvironmentVars(enVars); } this.ResumeLayout(); // ' needs to be the last if (!this.IsDisposed & !ErrorLoading) { this.Show(); } }
public lateralSettingsForm(environmentVarsCore _envars, ref environmentVarsCore.updateMainLayoutDelegate _updateMainApp) { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); envars = _envars; updateMainApp = _updateMainApp; // This call is required by the designer. SuspendLayout(); InitializeComponent(); System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(envars.currentLang); var backGroundImageToolTip = new ToolTip(); backGroundImageToolTip.SetToolTip(selectBackGroundImage, resources.GetString("backGroundImage", CultureInfo.CurrentCulture)); var colorPalleteToolTip = new ToolTip(); colorPalleteToolTip.SetToolTip(selectPanelBackColor, resources.GetString("colorPallete", CultureInfo.CurrentCulture)); panelForm.BackColor = Color.FromArgb(Convert.ToInt32(envars.layoutDesign.PanelTransparencyIndex), envars.layoutDesign.PanelBackColor); ResumeLayout(); }
public MenuBuilderClass(Form _mainform, PanelDoubleBuffer _menuPanel, environmentVarsCore _envars, int _menuOrientation, ref environmentVarsCore.updateMainLayoutDelegate _updateMainApp) { resources = new ResourceManager(GetType().Namespace + ".config.strings", Assembly.GetExecutingAssembly()); updateMainApp = _updateMainApp; mainForm = _mainform; enVars = _envars; menuOrientation = _menuOrientation; menuPanel = _menuPanel; if (enVars.layoutDesign.fontTitle.Families.Count() < 1) { Interaction.MsgBox("Font files not loaded properly:" + ToString()); return; } var fontToMeasure = new Font(enVars.layoutDesign.fontTitle.Families[0], enVars.layoutDesign.subMenuTitleFontSize, FontStyle.Regular); var g = mainForm.CreateGraphics(); sizeOfString = g.MeasureString("PQWER", fontToMeasure); previousPanelTimer.Interval = 300; previousPanelTimer.Tick += (_, __) => delayActiveBar(); }
static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); enVars = new environmentVarsCore(); // Instantiating the delegate for update data from child forms updateMainApp = updateMain; // set customization option enVars.customization.hasCodedCustomizationSettings = true; // check for customization file if (!LoadCustomizationFile()) { return; } // check if local settings files exists FileInfo settingsFile; settingsFile = new FileInfo(Path.Combine(enVars.libraryPath, "settings.eon")); settingsFile.Refresh(); if (enVars.customization.hasLocalSettings & settingsFile.Exists) { // LOAD LOCAL SETTING loadLocalSettings(); } // LOAD CONFIG MENU TREE var loadMenu = new menuOptions(); enVars = loadMenu.Load(enVars); // TODO: LOAD USER DEFINED MENU TREE // Load assemblies across multiple locations var loadAssemblies = new assembliesToLoadClass(); enVars = loadAssemblies.Load(enVars); // TODO: LOAD USER BOUGHT ASSEMBLIES (PACKAGES, WIDGETS, LAYOUTS) // loadUserAssemblies() // TODO REVIEW // LOAD CONFIG API CALL IDS loadAPItasksIDs(); // LOAD CONFIG STATIC TEMPLATE FILES AUTHORIZED loadAuthorizedFileTemplates(); // TODO: CHECK CORE FILES UPDATES // check if there are any downloaded core files to be updated // LOAD STARTUP FORM loadStartupForm(); // LOAD MAIN LAYOUT ASSEMBLY EnvironmentAssembliesLoadClass AssembliesLoader = new EnvironmentAssembliesLoadClass(enVars); Type loadedType; FormCustomized mainForm; loadedType = AssembliesLoader.LoadObjectTypeFromAssembly(enVars.customization.designLayoutCustomAssemblyFileName, enVars.customization.designLayoutCustomAssemblyNameSpace, "mainAppLayoutForm"); if (loadedType is null) { loadedType = AssembliesLoader.LoadObjectTypeFromAssembly(enVars.customization.designLayoutAssemblyFileName, enVars.customization.designLayoutAssemblyNameSpace, "mainAppLayoutForm"); if (loadedType is null) { MessageBox.Show("Error initializing main layout:" + AssembliesLoader.errorMessage); Application.Exit(); return; } } //mainForm = Activator.CreateInstance(loadedType, enVars) as FormCustomized; // start the main layout Application.Run(new mainAppLayoutForm(enVars)); }