private void FormMain_Shown(object sender, EventArgs e) { Utilities.ActivatePowerPoint(AppManager.Instance.PowerPointManager.Processor.PowerPointObject); Controls.Add(TabSlidesMainPage.Instance); TabSlidesMainPage.Instance.BringToFront(); AppManager.Instance.ActivateMainForm(); }
private static void Main() { bool firstInstance; const string uniqueIdentifier = "Local\\NewBizWizApplication"; _mutex = new Mutex(false, uniqueIdentifier, out firstInstance); if (firstInstance) { AppDomain.CurrentDomain.AssemblyResolve += SharedAssemblyHelper.OnAssemblyResolve; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppManager.Instance.RunForm(); } else { Utilities.ActivatePowerPoint(AppManager.Instance.PowerPointManager.Processor.PowerPointObject); AppManager.Instance.ActivateMainForm(); } }
static void Main(string[] args) { var force = args != null && args.Length > 0 && args[0].ToLower().Equals("force"); bool firstInstance; var mutex = new Mutex(false, "Local\\TVSellerApplication", out firstInstance); if (firstInstance || force) { AppDomain.CurrentDomain.AssemblyResolve += SharedAssemblyHelper.OnAssemblyResolve; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppManager.Instance.RunApplication(MediaDataType.TVSchedule); } else { Utilities.ActivatePowerPoint(BusinessObjects.Instance.PowerPointManager.Processor.PowerPointObject); AppManager.Instance.ActivateMainForm(); } GC.KeepAlive(mutex); }
private void OnFormMainShown(object sender, EventArgs e) { Utilities.ActivatePowerPoint(BusinessObjects.Instance.PowerPointManager.Processor.PowerPointObject); UpdateFormTitle(); itemContainerStatusBarMainContentInfo.SubItems.Clear(); var appInfoLabel = new LabelItem(); appInfoLabel.Text = String.Format("{0} v{1}", PopupMessageHelper.Instance.Title, FileStorageManager.Instance.Version ); if (BusinessObjects.Instance.FormStyleManager.Style.StatusBarTextColor.HasValue) { appInfoLabel.ForeColor = BusinessObjects.Instance.FormStyleManager.Style.StatusBarTextColor.Value; } itemContainerStatusBarMainContentInfo.SubItems.Add(appInfoLabel); barBottom.RecalcLayout(); AppManager.Instance.ActivateMainForm(WindowState == FormWindowState.Maximized); BusinessObjects.Instance.IdleManager.LinkToApplication(this); BusinessObjects.Instance.IdleManager.BeforeCloseOnTimerExpired -= OnCloseOnIdleTimerExpired; BusinessObjects.Instance.IdleManager.BeforeCloseOnTimerExpired += OnCloseOnIdleTimerExpired; using (Form formStart = BusinessObjects.Instance.ConfigManager.UserQuickSchedules ? (Form) new FormStartExtended() : (Form) new FormStartSimple()) { var result = formStart.ShowDialog(this); if (result == DialogResult.Yes) { AddNewRegularSchedule(); } else if (result == DialogResult.No) { OpenSchedule(); } else if (result == DialogResult.Abort) { AddNewQuickEditSchedule(); } Application.DoEvents(); if (BusinessObjects.Instance.ScheduleManager.ActiveSchedule != null) { emptySpaceItem.Visibility = LayoutVisibility.Always; layoutControlItemDefaultLogo.Visibility = LayoutVisibility.Never; LoadData(result == DialogResult.Yes); ribbonControl.Expanded = Controller.Instance.ContentController.ActiveControl != null && !Controller.Instance.ContentController.ActiveControl.RibbonAlwaysCollapsed; ribbonControl.Enabled = true; } else { Close(); } } _processAppClosing = true; }
private void FormMain_Shown(object sender, EventArgs e) { Utilities.ActivatePowerPoint(AppManager.Instance.PowerPointManager.Processor.PowerPointObject); AppManager.Instance.ActivateMainForm(); }