Пример #1
0
        private static void UpdateOnFirstRun()
        {
            if (!IsFirstLaunch())
            {
                return;
            }

            using (var form = new Splash())
            {
                form.ShowInTaskbar      = true;
                form.Icon               = Resources.qsp_icon;
                form.SmallTitleLbl.Text = "Checking for updates ...";
                form.SmallTitleLbl.Font =
                    new Font("Segoe UI", 12F, FontStyle.Italic, GraphicsUnit.Point, 0);

                form.Shown += (s, e) =>
                {
                    form.Refresh();

                    var status = new Updater().Update();
                    if (status.Status == Updater.Status.Success)
                    {
                        form.Close();
                        MsgBoxHelper.ShowInfo(null, "QSimPlanner has been successfully updated" +
                                              " and will restart now.");
                        StartLauncher();
                        Environment.Exit(0);
                    }

                    form.Close();
                };

                form.ShowDialog();
            }
        }
Пример #2
0
        public frmMain()
        {
            //Constructor
            try {
                //Required designer support
                InitializeComponent();
                this.Text = "Argix Direct " + App.Product;
                buildHelpMenu();
                Splash.Start(App.Product, Assembly.GetExecutingAssembly(), App.Copyright);
                Thread.Sleep(3000);
                #region Set window docking
                this.msMain.Dock  = DockStyle.Top;
                this.tsMain.Dock  = DockStyle.Top;
                this.stbMain.Dock = DockStyle.Bottom;
                this.Controls.AddRange(new Control[] { this.tsMain, this.msMain, this.stbMain });
                #endregion

                //Create data and UI services
                this.mToolTip    = new System.Windows.Forms.ToolTip();
                this.mMessageMgr = new MessageManager(this.stbMain.Panels[0], 3000);
                this.icon_idle   = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("Argix.Resources._idle.ico"));
                this.icon_on     = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("Argix.Resources._on.ico"));
                this.icon_off    = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("Argix.Resources._off.ico"));
                configApplication();
            }
            catch (Exception ex) { Splash.Close(); throw new ApplicationException("Startup Failure", ex); }
        }
Пример #3
0
        private void OnBackgroundInitComplete(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null)
            {
                m_logger.Error("Error during initialization.");
                if (e.Error != null && m_logger != null)
                {
                    m_logger.Error(e.Error.Message);
                    m_logger.Error(e.Error.StackTrace);
                }

                Current.Shutdown(-1);
                return;
            }

            Current.Dispatcher.BeginInvoke(
                System.Windows.Threading.DispatcherPriority.Normal,
                (Action) delegate()
            {
                Exit += OnApplicationShutdown;

                // Must be done or our single instance enforcement is going to bug out.
                // https://github.com/TechnikEmpire/StahpIt-WPF/issues/2
                m_splashScreen.Close();
                m_splashScreen = null;
                //

                m_primaryWindow.Show();
                OnViewChangeRequest(this, new ViewChangeRequestArgs(View.Dashboard));
            }
                );

            // Check for updates, always.
            WinSparkle.CheckUpdateWithoutUI();
        }
Пример #4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            Splash.Show();
            //var knownWords = new List<String>();
            //var words = new List<SubtitleWord>();
            Splash.Status = "保存单词中...";
            IList <Vocabulary> vocabularies = new List <Vocabulary>();

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                var c1 = Convert.ToBoolean(row.Cells[1].Value);
                var c2 = row.Cells[2].Value.ToString();
                var c4 = row.Cells[2].Value.ToString();
                if (!c1)//已经记住了的词
                {
                    vocabularies.Add(new Vocabulary()
                    {
                        Word = c2, IsKnown = true
                    });                                                          //,Source = "生词预习",CreateTime = DateTime.Now});
                }
            }
            DbOperator.Instance.SaveUserVocabulary(vocabularies, "生词预习");
            Splash.Close();

            DialogResult = DialogResult.OK;
            this.Close();
        }
Пример #5
0
        //Interface
        public winMain()
        {
            //Constructor
            try {
                //Required for Windows Form Designer support
                InitializeComponent();
                InitializeToolbox();
                this.Text = "Argix Logistics " + App.Product;
                buildHelpMenu();
                #region Splash Screen Support
                Splash.Start(App.Product, Assembly.GetExecutingAssembly(), App.Copyright);
                Thread.Sleep(3000);
                #endregion
                #region Set window docking
                this.msMain.Dock = DockStyle.Top;
                this.tsMain.Dock = DockStyle.Top;
                this.ssMain.Dock = DockStyle.Bottom;
                this.Controls.AddRange(new Control[] { this.tsMain, this.msMain, this.ssMain });
                #endregion

                //Create data and UI servicesv
                this.mToolTip    = new System.Windows.Forms.ToolTip();
                this.mMessageMgr = new MessageManager(this.ssMain.Panels[0], 1000, 3000);
            }
            catch (Exception ex) { Splash.Close(); throw new ApplicationException("Startup Failure", ex); }
        }
Пример #6
0
        private void btnRemark_Click(object sender, EventArgs e)
        {
            if (subtitle == null || subtitle.Bodies.Count == 0)
            {
                MessageBox.Show("请先点击“载入字幕”按钮打开字幕文件");
                return;
            }

            Splash.Show("解析字幕中...");

            sentenceParse = new SentenceParse();
            var subtitleWords = PickNewWords(subtitle.Bodies.Values);

            if (subtitleWords.Count > 0)
            {
                NewWordConfirmForm form = new NewWordConfirmForm();
                form.DataSource       = subtitleWords.Values.ToList();
                form.SubtitleFileName = Path.GetFileName(txbSubtitleFilePath.Text);
                form.OnClickOkButton += RemarkSubtitle;
                form.Show();
                form.Activate();
                //if (form.ShowDialog() == DialogResult.OK)
                //{

                //  form.SelectedNewWords
                //}
            }
            Splash.Close();
        }
Пример #7
0
 public static void AnonymousLogin()
 {
     LoginProvider provider = LoginProvider.AnonymousLogin(Server,
                                                           new LoginProvider.LoginResultDelegate((hasPassword, errorMessage) =>
     {
         TestingMainForm.CurrentForm.Invoke((Action)(() =>
         {
             if (hasPassword)
             {
                 if (!_isFirstTime)
                 {
                     return;
                 }
                 _isFirstTime = false;
                 Splash.Close();
                 TestingMainForm.CurrentForm.ShowMainForm();
                 FirstTF.MdiParent = TestingMainForm.CurrentForm;
                 FirstTF.Show();
             }
             else
             {
                 Splash.Close();
                 SystemMessage.ShowServerErrorMessage(errorMessage);
                 TestingMainForm.CurrentForm.Close();
             }
         }));
     }), SEND_TIMEOUT);
 }
Пример #8
0
        private void LoadEmployeeData()
        {
            Splash.Status        = "载入已签到员工列表……";
            GlobalData.Employees = AnnualPartySqlHelper.Instance.GetAllCheckInEmployee(false);
            Splash.Status        = "载入已签到员工照片……";
            int i     = 0;
            int count = GlobalData.Employees.Count;

            foreach (string number in GlobalData.Employees.Keys)
            {
                var photo = AnnualPartySqlHelper.Instance.GetEmployeePhoto(number);
                if (photo == null)
                {
                    //photo = ResourceLib.NoPhoto;
                }
                GlobalData.Employees[number].Photo = photo;
                GlobalData.EmployeeList.Add(GlobalData.Employees[number]);
                i++;
                Splash.Status = "载入员工照片 " + i + "/" + count;
            }
            Splash.Status = "载入数据完毕,初始化界面";

            Splash.Close();
            this.WindowState = FormWindowState.Maximized;
            SetF(this.Handle);
        }
Пример #9
0
        private void btnPlay_Click(object sender, RoutedEventArgs e)
        {
            Splash splash = new Splash();

            splash.Show();
            Level1 gameWindow = new Level1();

            MainWindow main = new MainWindow();

            for (int i = 0; i < 100; i++)
            {
                Thread.Sleep(i);
            }

            gameWindow.Show();
            new Level1();
            for (int i = 0; i < 5; i++)
            {
                Thread.Sleep(i);
            }

            splash.Close();


            this.Close();
        }
Пример #10
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            Splash.Show();
            Splash.Status = "生成用户词汇表中...";

            var userRank = numUserVocabularyRank.Value;
            //DbOperator dbOperator= DbOperator.Instance;
            //var words = dbOperator.FindAll<VocabularyRank>(v => v.RankValue >= numUserVocabularyRank.Value);
            var words = InnerDictionaryHelper.GetAllVocabularyRanks();

            var vocabulary = new List <Vocabulary>();

            foreach (var vocabularyRank in words)
            {
                if (vocabularyRank.Value >= userRank)
                {
                    vocabulary.Add(new Vocabulary()
                    {
                        Word = vocabularyRank.Key, IsKnown = true
                    });
                }
            }
            DbOperator.Instance.SaveUserVocabulary(vocabulary, "柯林斯词频分级");
            logger.Debug("柯林斯词频分级保存成功");
            Splash.Close();
            MessageBox.Show("用户词频设置保存成功");
            //RegistryHelper.WTRegedit("Used","Yes");
            DialogResult = DialogResult.OK;
            this.Close();
        }
Пример #11
0
 public static void CloseSplash()
 {
     introSC = new IntroScreen();
     splashSC.Hide();
     splashSC.Close();
     introSC.ShowDialog();
 }
Пример #12
0
        private static void Main()
        {
            // if already running, activate it
            if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location)).Length > 1)
            {
                IntPtr handle = User32Interop.FindWindow(null, _title);
                if (handle != IntPtr.Zero)
                {
                    User32Interop.ShowWindow(handle.ToInt32(), User32Interop.SW_SHOW);
                }
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FileUtils.LogAssemblyInfo();

            Splash splash = new Splash(1000);

            splash.Show();

            splash.Close();

            DashboardSettings.PreferencesFilePath = FileUtils.GetFullPathRelativeToApp(_settingsFileName);

            Settings = DashboardSettings.Load();

            var form = new DashboardForm {
                Text = _title
            };

            Application.Run(form);
        }
Пример #13
0
 void Splash_Close()
 {
     if (splsh != null)
     {
         splsh.Close();
     }
 }
Пример #14
0
        private void OnFormLoad(object sender, EventArgs e)
        {
            //Event handler for form load event
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Argix.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Argix.Properties.Settings.Default.Location;
                        this.Size     = global::Argix.Properties.Settings.Default.Size;
                        break;
                    }
                    this.Font = this.msMain.Font = this.tsMain.Font = this.tsNav.Font = this.ssMain.Font = global::Argix.Properties.Settings.Default.Font;
                    this.msViewToolbar.Checked   = this.tsMain.Visible = global::Argix.Properties.Settings.Default.Toolbar;
                    this.msViewStatusBar.Checked = this.ssMain.Visible = global::Argix.Properties.Settings.Default.StatusBar;
                    this.msViewTemplates.Checked = global::Argix.Properties.Settings.Default.Templates;
                    App.CheckVersion();
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;              //Even when form is inactve
                #endregion

                //Navigation services
                this.tsClientInbound.Enabled = this.tsInbound.Enabled = this.tsOutbound.Enabled = this.tsPickupLog.Enabled = this.tsTrailerTracking.Enabled = true;

                //Set control defaults
                string      terminal = Program.TerminalCode;
                ServiceInfo si       = FreightGateway.GetServiceInfo();
                this.ssMain.SetTerminalPanel(si.TerminalID.ToString(), si.Description);
                this.ssMain.User1Panel.Width       = 144;
                this.ssMain.User1Panel.Text        = RoleServiceGateway.GetRoleForCurrentUser();
                this.ssMain.User1Panel.ToolTipText = "User role";
                this.ssMain.User2Panel.Width       = 48;
                this.ssMain.User2Panel.Text        = Program.TerminalCode.Trim().Length > 0 ? Program.TerminalCode : "All";
                this.ssMain.User2Panel.ToolTipText = "Operating terminal";

                //Toolbox
                OnLeaveToolbox(null, EventArgs.Empty);
                this.mAutoRefreshSvc.Start();
            }
            catch (Exception ex) { App.ReportError(ex); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
Пример #15
0
        private void btnPickupNewWords_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialog1.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            SentenceParse sentenceParse = new SentenceParse();
            DirectoryInfo directoryInfo = new DirectoryInfo(folderBrowserDialog1.SelectedPath);
            List <string> sentences     = new List <string>();

            foreach (FileInfo fileInfo in directoryInfo.GetFiles())
            {
                string filePath   = fileInfo.FullName;
                var    txt        = FileOperationHelper.ReadFile(filePath);
                var    stOperator = SubtitleHelper.GetOperatorByFileName(filePath);
                var    srts       = stOperator.Parse(txt);

                srts = stOperator.RemoveChinese(srts);
                sentences.AddRange(srts.Bodies.Values.Select(l => l.EnglishText));
            }

            Splash.Show();
            Splash.Status = "解析字幕中...";
            IDictionary <string, VPreviewWord> previewWords = new Dictionary <string, VPreviewWord>();

            foreach (var sentence in sentences)
            {
                var newWords = sentenceParse.Pickup(sentence);
                foreach (KeyValuePair <string, string> keyValuePair in newWords)
                {
                    string original = keyValuePair.Key;
                    string word     = keyValuePair.Value;
                    if (previewWords.ContainsKey(original))
                    {
                        previewWords[original].Rank++;
                    }
                    else
                    {
                        var mean = sentenceParse.RemarkWord(sentence, word, original);
                        if (mean != null)
                        {
                            var wd = new VPreviewWord()
                            {
                                Word     = mean.Word,
                                Rank     = 1,
                                Sentence = sentence,
                                Mean     =
                                    mean.DefaultMean == null ? mean.Means[0].ToString() : mean.DefaultMean.ToString()
                            };
                            previewWords.Add(original, wd);
                        }
                    }
                }
            }
            DisplayPreviewWords(previewWords.Values);

            Splash.Close();
        }
Пример #16
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Splash.Show();
            Application.Run(new DrawLotteryForm());
            Splash.Close();
        }
Пример #17
0
        public async void InitCore()
        {
            var splash = new Splash();

            splash.Show();

            var pluginDir = Path.Combine(Assembly.GetExecutingAssembly().AssemblyDirectory(), "plugins");

            NyxBoot.With()
            .NyxBorg()
            .AndPlugins(pluginDir)
            .Start(RxAppAutofacExtension.UseAutofacDependencyResolver);

            IConfigManager config;

            try
            {
                config = NyxBoot.Container.Resolve <IConfigManager>();
                config.Setup(Path.Combine(GetType().Assembly.AssemblyDirectory(), "nyx.cfg"));
                _borg = NyxBoot.Container.Resolve <INyxBorg>();
                NyxBoot.Container.Resolve <ILogger <App> >();
                _borg.HostApp = "enslaver";
            }
            catch (Exception ex)
            {
                MessageBox.Show("[Nyx] Error building container ...\n" + ex);
                Shutdown();
                return;
            }
            var shellViewModel = NyxBoot.Container.Resolve <IShellViewModel>();

            MainWindow = new MainWindow {
                Content = new ShellView(shellViewModel)
            };
            await Task.Delay(TimeSpan.FromSeconds(1.5));

            splash.Close();
            MainWindow.Show();

            // Sets the default hub.
            string hubAddress;
            string hubPort;

            if (_commandLineArgs.TryGetValue("c", out hubAddress))
            {
                config.Set("borg", "hubIp", hubAddress);
            }
            if (_commandLineArgs.TryGetValue("p", out hubPort))
            {
                int port;
                if (int.TryParse(hubPort, out port))
                {
                    config.Set("hub", "port", port);
                }
            }
            await _borg.Start();
        }
Пример #18
0
        private void OnFormLoad(object sender, System.EventArgs e)
        {
            //Event handler for form load event
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Argix.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Argix.Properties.Settings.Default.Location;
                        this.Size     = global::Argix.Properties.Settings.Default.Size;
                        break;
                    }
                    this.msViewToolbar.Checked   = this.tsMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.Toolbar);
                    this.msViewStatusbar.Checked = this.ssMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.StatusBar);
                    App.CheckVersion();
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;              //Even when form is inactve
                #endregion

                //Set control defaults
                #region Grid Initialization
                this.grdMain.DisplayLayout.Bands[0].Columns["Load"].SortIndicator = SortIndicator.Ascending;
                #endregion
                ServiceInfo si = TsortGateway.GetServiceInfo();
                this.ssMain.SetTerminalPanel(si.TerminalID.ToString(), si.Description);
                this.ssMain.User1Panel.Width = 144;

                this.mClientDS.Merge(TsortGateway.GetClients());
                if (this.cboClient.Items.Count > 0)
                {
                    this.cboClient.SelectedIndex = 0;
                }
                this.dtpFrom.Value = DateTime.Today.AddDays(-7);
                this.dtpTo.Value   = DateTime.Today;
                this.grdMain.Focus();
            }
            catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
Пример #19
0
        internal static void CloseSplash(Splash splash)
        {
            if (!ConfigUtil.GetBoolParameter("ShowSplashScreen"))
            {
                return;
            }
            Application.DoEvents();

            splash.Close();
        }
 public static void CloseSplash()
 {
     if (_splash == null || _thread == null)
     {
         return;
     }
     _splash.Dispatcher.Invoke(new Action(() => { _splash.Close(); }));
     _splash.Dispatcher.InvokeShutdown();
     _splash = null;
 }
Пример #21
0
        private void OnFormLoad(object sender, System.EventArgs e)
        {
            //Event handler for form load event
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Argix.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Argix.Properties.Settings.Default.Location;
                        this.Size     = global::Argix.Properties.Settings.Default.Size;
                        break;
                    }
                    this.mnuViewToolbar.Checked     = this.tlbMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.Toolbar);
                    this.mnuViewStatusBar.Checked   = this.stbMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.StatusBar);
                    this.mnuViewTermConfigs.Checked = !global::Argix.Properties.Settings.Default.TermConfigWindow;
                    this.mnuViewEquip.Checked       = !global::Argix.Properties.Settings.Default.DriverEquipWindow;
                    this.mnuViewRates.Checked       = !global::Argix.Properties.Settings.Default.DriverRatesWindow;

                    if (global::Argix.Properties.Settings.Default.LastVersion != App.Version)
                    {
                        //New release
                        App.ReportError(new ApplicationException("This is a new release of Driver Compensation. Please contact the IT department immediately if you have a problem."), true, LogLevel.None);
                    }
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;              //Even when form is inactve
                #endregion

                //Set control defaults
                this.ctlTerminalConfiguration1.DataSource = FinanceFactory.TerminalConfigurations;
                this.ctlDriverEquipment1.DataSource       = FinanceFactory.DriverEquipment;
                this.tabMain.TabPages.Clear();
                this.mnuViewTermConfigs.PerformClick();
                this.mnuViewEquip.PerformClick();
                this.mnuViewRates.PerformClick();
            }
            catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
Пример #22
0
        private void OnFormLoad(object sender, System.EventArgs e)
        {
            //Event handler for form load event
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Argix.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Argix.Properties.Settings.Default.Location;
                        this.Size     = global::Argix.Properties.Settings.Default.Size;
                        break;
                    }
                    this.Font = this.msMain.Font = this.tsMain.Font = this.ssMain.Font = global::Argix.Properties.Settings.Default.Font;
                    this.msViewToolbar.Checked     = this.tsMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.Toolbar);
                    this.msViewStatusBar.Checked   = this.ssMain.Visible = Convert.ToBoolean(global::Argix.Properties.Settings.Default.StatusBar);
                    this.msViewTermConfigs.Checked = !global::Argix.Properties.Settings.Default.TermConfigWindow;
                    this.msViewEquip.Checked       = !global::Argix.Properties.Settings.Default.DriverEquipWindow;
                    this.msViewRates.Checked       = !global::Argix.Properties.Settings.Default.DriverRatesWindow;
                    App.CheckVersion();
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;              //Even when form is inactve
                #endregion

                //Set control defaults
                ServiceInfo t = FinanceGateway.GetServiceInfo();
                this.ssMain.SetTerminalPanel(t.TerminalID.ToString(), t.Description);
                this.ssMain.User1Panel.Width       = 144;
                this.ssMain.User1Panel.Text        = RoleServiceGateway.GetRoleForCurrentUser();
                this.ssMain.User1Panel.ToolTipText = "User role";

                this.tabMain.TabPages.Clear();
                this.msViewTermConfigs.PerformClick();
                this.msViewEquip.PerformClick();
                this.msViewRates.PerformClick();
            }
            catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
        private static void MainForm_LoadCompleted(object sender, EventArgs e)
        {
            if (SplashScreen != null && !SplashScreen.Disposing && !SplashScreen.IsDisposed)
            {
                SplashScreen.Invoke(new Action(() => SplashScreen.Close()));
            }

            MainForm.TopMost = true;
            MainForm.Activate();
            MainForm.TopMost = false;
        }
Пример #24
0
 //Interface
 public frmMain()
 {
     //Constructor
     try {
         //Required for Windows Form Designer support
         InitializeComponent();
         Splash.Start(App.Product, Assembly.GetExecutingAssembly(), App.Copyright);
         Thread.Sleep(3000);
         this.mMessageMgr = new MessageManager(this.ssMain.Panels[0], 500, 3000);
     }
     catch (Exception ex) { Splash.Close(); throw new ApplicationException("Startup Failure", ex); }
 }
Пример #25
0
        private static void Main()
        {
            if (AppCommon.OtherInstancesRunning())
            {
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FileUtils.LogAssemblyInfo();

            AppCommon.LoadGlobalSettings();

            AppCommon.SetUserName();
            AppCommon.SetProfileName();

            if (!AppCommon.CreateUserAndProfile())
            {
                return;
            }

            if (!AppCommon.LoadUserPreferences())
            {
                return;
            }

            Log.SetupListeners();

            CommandDescriptors.Init();

            if (!AppCommon.SetCulture())
            {
                return;
            }

            Common.PreInit();
            Common.Init();

            Splash splash = new Splash(1000);

            splash.Show();

            splash.Close();

            var form = new PreferencesCategoriesForm();

            form.EvtLanguageChanged += form_EvtLanguageChanged;
            form.EvtThemeChanged    += Form_EvtThemeChanged;
            Application.Run(form);
        }
Пример #26
0
        private void OnStartup(object sender, StartupEventArgs e)
        {
            var splash = new Splash();

            splash.Show();

            Thread.Sleep(10000);

            var mainWindow = new MainWindow();

            mainWindow.Show();

            splash.Close();
        }
Пример #27
0
        private void OnFormLoad(object sender, System.EventArgs e)
        {
            //Load conditions
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Argix.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Argix.Properties.Settings.Default.Location;
                        this.Size     = global::Argix.Properties.Settings.Default.Size;
                        break;
                    }
                    this.Font = this.msMain.Font = this.tsMain.Font = this.ssMain.Font = global::Argix.Properties.Settings.Default.Font;
                    this.msViewToolbar.Checked   = this.tsMain.Visible = global::Argix.Properties.Settings.Default.Toolbar;
                    this.msViewStatusBar.Checked = this.ssMain.Visible = global::Argix.Properties.Settings.Default.StatusBar;
                    App.CheckVersion();
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;              //Even when form is inactve
                #endregion

                //Navigation services
                this.tsClients.Enabled = this.tsShippers.Enabled = this.tsConsignees.Enabled = this.tsShipments.Enabled = this.tsQuickQuote.Enabled = this.tsReports.Enabled = true;

                //Set control defaults
                ServiceInfo si = FreightGateway.GetServiceInfo();
                this.ssMain.SetTerminalPanel(si.TerminalID.ToString(), si.Description);
                this.ssMain.User1Panel.Width       = 144;
                this.ssMain.User1Panel.Text        = RoleServiceGateway.GetRoleForCurrentUser();
                this.ssMain.User1Panel.ToolTipText = "User role";
            }
            catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
Пример #28
0
        protected override async void OnStartup(StartupEventArgs e)
        {
            //  ログの初期化
            var log = LogManager.GetLogger("app_log");

            App1.Logging.Initialize(new WinLog(log));
            App1.Logging.info("起動");
            Splash wnd = new Splash();

            wnd.Show();
            await RunTaskSync();

            wnd.Close();
            base.OnStartup(e);
        }
Пример #29
0
    public DxMain()
    {
        InitializeComponent();
        Splash sp = new Splash();
        sp.Show();

        timer1.Interval = 2000;
        timer1.Start();
        while(flag == false)
        {
            Application.DoEvents();
        }
        sp.Close();
        details.Show();
    }
Пример #30
0
        //Interface
        public frmMain()
        {
            try {
                InitializeComponent();
                this.Text = "Argix Direct " + App.Product;
                #region Menu identities: maps menu item to OnMenuClick() handler
                this.mnuNewPallet.Text        = MNU_FILE_NEW_PALLET;
                this.mnuRemoveCarton.Text     = MNU_FILE_REMOVECARTON;
                this.mnuFileExit.Text         = MNU_FILE_EXIT;
                this.mnuViewToolbar.Text      = MNU_VIEW_TOOLBAR;
                this.mnuViewStatusBar.Text    = MNU_VIEW_STATUSBAR;
                this.mnuToolsConfig.Text      = MNU_TOOLS_CONFIG;
                this.mnuToolsDiagnostics.Text = MNU_TOOLS_DIAGNOSTICS;
                this.mnuToolsTrace.Text       = MNU_TOOLS_TRACE;
                this.mnuToolsUseWebSvc.Text   = MNU_TOOLS_USEWEBSVC;
                this.mnuHelpAbout.Text        = MNU_HELP_ABOUT;
                buildHelpMenu();
                #endregion
                #region Splash screen; Diagnostics support
                Splash.ITEvent += new EventHandler(OnITEvent);
                Splash.Start(App.Product, Assembly.GetExecutingAssembly(), App.Copyright);
                Thread.Sleep(3000);
                if (ITEventOn)
                {
                    Splash.Close();
                    this.mnuToolsDiagnostics.PerformClick();
                }
                #endregion
                #region Window docking
                this.mnuMain.Dock = DockStyle.Top;
                this.tlbMain.Dock = DockStyle.Top;
                this.Controls.AddRange(new Control[] { this.tlbMain, this.stbMain, this.mnuMain });
                #endregion

                //Create data and UI services
                this.mToolTip    = new System.Windows.Forms.ToolTip();
                this.mMessageMgr = new MessageManager(this.stbMain.Panels[0], 3000);

                //Set application configuration
                configApplication();
            }
            catch (Exception ex) { Splash.Close(); if (!frmMain.ITEventOn)
                                   {
                                       throw new ApplicationException("Startup Failure", ex);
                                   }
            }
        }
Пример #31
0
        private void OnFormLoad(object sender, System.EventArgs e)
        {
            //Load conditions
            this.Cursor = Cursors.WaitCursor;
            try {
                //Initialize controls
                Splash.Close();
                this.Visible = true;
                Application.DoEvents();
                #region Set user preferences
                try {
                    this.WindowState = global::Tsort.Properties.Settings.Default.WindowState;
                    switch (this.WindowState)
                    {
                    case FormWindowState.Maximized: break;

                    case FormWindowState.Minimized: break;

                    case FormWindowState.Normal:
                        this.Location = global::Tsort.Properties.Settings.Default.Location;
                        this.Size     = global::Tsort.Properties.Settings.Default.Size;
                        break;
                    }
                    this.mnuViewToolbar.Checked   = this.tlbMain.Visible = Convert.ToBoolean(global::Tsort.Properties.Settings.Default.Toolbar);
                    this.mnuViewStatusBar.Checked = this.stbMain.Visible = Convert.ToBoolean(global::Tsort.Properties.Settings.Default.StatusBar);
                    //if(global::Tsort.Properties.Settings.Default.LastVersion != App.Version) {
                    //    //New release
                    //    App.ReportError(new ApplicationException("This is an updated version of BMCPallet. Please refer to Help\\Release Notes for release information."), true, LogLevel.None);
                    //}
                }
                catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
                #endregion
                #region Set tooltips
                this.mToolTip.InitialDelay = 500;
                this.mToolTip.AutoPopDelay = 3000;
                this.mToolTip.ReshowDelay  = 1000;
                this.mToolTip.ShowAlways   = true;                              //Even when form is inactve
                //this.mToolTip.SetToolTip(this.cboTerminals, "Select an enterprise terminal for the TL and Agent Summary views.");
                #endregion

                //Set control defaults
                userProcess = USER_PROCESS_NEW_PALLET;
                this.setUserServices();
            }
            catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); }
            finally { setUserServices(); this.Cursor = Cursors.Default; }
        }
Пример #32
0
        private void GrinGlobalClient_Load(object sender, EventArgs e)
        {
            bool validLogin = false;
            //            bool connectedToWebService = false;
            //            int selectedCNOIndex = -1;
            //string selectedNodeFullPath = "";
            //username = "";
            //password = "";
            _usernameCooperatorID = "";// "117534";
            _currentCooperatorID = "";// "117534";
            site = "";// "NC7";
            languageCode = "";
            lastFullPath = "";
            lastTabName = "";
            commonUserApplicationDataPath = System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\GRIN-Global\Curator Tool";
            roamingUserApplicationDataPath = System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\GRIN-Global\Curator Tool";
            userSettingsXMLFilePath = roamingUserApplicationDataPath + @"\UserSettings_v" + System.Reflection.Assembly.GetEntryAssembly().GetName().Version.Build.ToString() + ".xml";

            // Wireup the binding navigator and the Main datagridview...
            // NOTE:(right now the binding source is empty - but later on it will get bound to a data table)...
            defaultBindingSource = new BindingSource();
            defaultBindingSource.DataSource = new DataTable();
            ux_bindingnavigatorMain.BindingSource = defaultBindingSource;
            ux_datagridviewMain.DataSource = defaultBindingSource;

            //// Load the images for the tree view(s)...
            //navigatorTreeViewImages.ColorDepth = ColorDepth.Depth32Bit;
            //navigatorTreeViewImages.Images.Add("active_folder", Icon.ExtractAssociatedIcon(@"Images\active_Folder.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_folder", Icon.ExtractAssociatedIcon(@"Images\inactive_Folder.ico"));
            //navigatorTreeViewImages.Images.Add("active_INVENTORY_ID", Icon.ExtractAssociatedIcon(@"Images\active_INVENTORY_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_INVENTORY_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_INVENTORY_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_ACCESSION_ID", Icon.ExtractAssociatedIcon(@"Images\active_ACCESSION_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_ACCESSION_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_ACCESSION_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_ORDER_REQUEST_ID", Icon.ExtractAssociatedIcon(@"Images\active_ORDER_REQUEST_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_ORDER_REQUEST_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_ORDER_REQUEST_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_COOPERATOR_ID", Icon.ExtractAssociatedIcon(@"Images\active_COOPERATOR_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_COOPERATOR_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_COOPERATOR_ID.ico"));

            //navigatorTreeViewImages.Images.Add("active_GEOGRAPHY_ID", Icon.ExtractAssociatedIcon(@"Images\active_GEOGRAPHY_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_GEOGRAPHY_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_GEOGRAPHY_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_TAXONOMY_GENUS_ID", Icon.ExtractAssociatedIcon(@"Images\active_TAXONOMY_GENUS_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_TAXONOMY_GENUS_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_TAXONOMY_GENUS_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_CROP_ID", Icon.ExtractAssociatedIcon(@"Images\active_CROP_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_CROP_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_CROP_ID.ico"));
            //navigatorTreeViewImages.Images.Add("active_CROP_TRAIT_ID", Icon.ExtractAssociatedIcon(@"Images\active_CROP_TRAIT_ID.ico"));
            //navigatorTreeViewImages.Images.Add("inactive_CROP_TRAIT_ID", Icon.ExtractAssociatedIcon(@"Images\inactive_CROP_TRAIT_ID.ico"));

            //navigatorTreeViewImages.Images.Add("new_tab", Icon.ExtractAssociatedIcon(@"Images\GG_newtab.ico"));
            //navigatorTreeViewImages.Images.Add("search", Icon.ExtractAssociatedIcon(@"Images\GG_search.ico"));

            try
            {
                // Load the wizards from the same directory (and all subdirectories) where the Curator Tool was launched...
                System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(System.IO.Directory.GetCurrentDirectory());
                System.IO.FileInfo[] dllFiles = di.GetFiles("Wizards\\*.dll", System.IO.SearchOption.AllDirectories);
                if (dllFiles != null && dllFiles.Length > 0)
                {
                    for (int i = 0; i < dllFiles.Length; i++)
                    {
                        System.Reflection.Assembly newAssembly = System.Reflection.Assembly.LoadFile(dllFiles[i].FullName);
                        foreach (System.Type t in newAssembly.GetTypes())
                        {
                            if (t.GetInterface("IGRINGlobalDataWizard", true) != null)
                            {
                                System.Reflection.ConstructorInfo constInfo = t.GetConstructor(new Type[] { typeof(string), typeof(SharedUtils) });

                                if (constInfo != null)
                                {
                                    string pkeyCollection = ":accessionid=; :inventoryid=; :orderrequestid=; :cooperatorid=; :geographyid=; :taxonomygenusid=; :cropid=";
                                    // Instantiate an object of this type to load...
                                    Form wizardForm = (Form)constInfo.Invoke(new object[] { pkeyCollection, _sharedUtils });
                                    // Get the Form Name and button with this name...
                                    System.Reflection.PropertyInfo propInfo = t.GetProperty("FormName", typeof(string));
                                    string formName = (string)propInfo.GetValue(wizardForm, null);
                                    if (string.IsNullOrEmpty(formName)) formName = t.Name;
                                    ToolStripButton tsbWizard = new ToolStripButton(formName, Icon.ExtractAssociatedIcon(newAssembly.ManifestModule.FullyQualifiedName).ToBitmap(), ux_buttonWizard_Click, "toolStripButton" + newAssembly.ManifestModule.Name);
                                    tsbWizard.Tag = "Wizards\\" + newAssembly.ManifestModule.Name;
                                    toolStrip1.Items.Add(tsbWizard);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception err)
            {
            GRINGlobal.Client.Common.GGMessageBox ggMessageBox = new GRINGlobal.Client.Common.GGMessageBox("Error binding to Wizard Form.\nError Message: {0}", "Wizard Binding Error", MessageBoxButtons.OK, MessageBoxDefaultButton.Button1);
            ggMessageBox.Name = "GrinGlobalClient_LoadMessage2";
            _sharedUtils.UpdateControls(ggMessageBox.Controls, ggMessageBox.Name);
            if (ggMessageBox.MessageText.Contains("{0}")) ggMessageBox.MessageText = string.Format(ggMessageBox.MessageText, err.Message);
            ggMessageBox.ShowDialog();
            }

            // Create the middle tier utilities class and connect to the web services...
            _sharedUtils = new SharedUtils(url, username, passwordClearText, false);

            // Display the splash page to let the user know that things are happening...
            Splash splash = new Splash();
            splash.StartPosition = FormStartPosition.CenterScreen;
            splash.Show();
            splash.Update();

            //if (validLogin)
            if (_sharedUtils.IsConnected)
            {
                localDBInstance = _sharedUtils.Url.ToLower().Replace("http://", "").Replace("/gringlobal/gui.asmx", "").Replace('-', '_').Replace('.', '_').Replace(':', '_');
                localDBInstance = "GRINGlobal_" + localDBInstance;
            //_sharedUtils = new SharedUtils(GRINGlobalWebServices.Url, username, password, localDBInstance, cno);
                username = _sharedUtils.Username;
                password = _sharedUtils.Password;
                passwordClearText = _sharedUtils.Password_ClearText;
                url = _sharedUtils.Url;
                _usernameCooperatorID = _sharedUtils.UserCooperatorID;
            //_currentCooperatorID = _sharedUtils.UserCooperatorID;
                site = _sharedUtils.UserSite;
                languageCode = _sharedUtils.UserLanguageCode.ToString();

                // Load the application data...
                LoadApplicationData();

            // Check the status of lookup tables and warn the user if some tables are missing data...
            LookupTableStatusCheck();

                // Wire up the list of valid GG servers to the combobox...
                ux_comboboxActiveWebService.DataSource = new BindingSource(_sharedUtils.WebServiceURLs, null);
                ux_comboboxActiveWebService.DisplayMember = "Key";
                ux_comboboxActiveWebService.ValueMember = "Value";
                ux_comboboxActiveWebService.SelectedValue = _sharedUtils.Url;
            // Indicate to the user which URL is the active GG server...
            if (ux_statusCenterMessage.Tag != null)
            {
            if (ux_statusCenterMessage.Tag.ToString().Contains("{0}"))
            {
            ux_statusCenterMessage.Text = string.Format(ux_statusCenterMessage.Tag.ToString(), _sharedUtils.Url);
            }
            else
            {
            ux_statusCenterMessage.Text = ux_statusCenterMessage.Tag.ToString() + " (" + _sharedUtils.Url + ")";
            }
            }
            else
            {
            ux_statusCenterMessage.Text = ux_statusCenterMessage.Text + " (" + _sharedUtils.Url + ")";
            }

            // Get the list of Dataview Forms embedded in assemblies in the CT Forms directiory...
            localFormsAssemblies = _sharedUtils.GetDataviewFormsData();

                // Save the list of valid web service urls...
                // But first make sure the roaming profile directory exists...
                if (!System.IO.Directory.Exists(roamingUserApplicationDataPath)) System.IO.Directory.CreateDirectory(roamingUserApplicationDataPath);
                // Now save the list of GRIN-Global servers...
                System.IO.StreamWriter sw = new System.IO.StreamWriter(roamingUserApplicationDataPath + @"\WebServiceURL.txt");
                foreach (KeyValuePair<string, string> kv in ux_comboboxActiveWebService.Items)
                {
                    if (kv.Key != "New...")
                    {
                        sw.WriteLine(kv.Key + "\t" + kv.Value);
                    }
                }
                sw.Close();
                sw.Dispose();

                // Load the cursors for the DGV...
                _cursorGG = _sharedUtils.LoadCursor(@"Images\cursor_GG.cur");
                if (_cursorGG == null) _cursorGG = Cursors.Default;
                _cursorLUT = _sharedUtils.LoadCursor(@"Images\cursor_LUT.cur");
                if (_cursorLUT == null) _cursorLUT = Cursors.Default;
                _cursorREQ = _sharedUtils.LoadCursor(@"Images\cursor_REQ.cur");
                if (_cursorREQ == null) _cursorREQ = Cursors.Default;
            //this.Cursor = _cursorGG;
            ux_datagridviewMain.Cursor = _cursorGG;
            }
            else
            {
                // Login aborted - disable controls...
                ux_tabcontrolDataviewOptions.Enabled = false;
                ux_tabcontrolCTDataviews.Enabled = false;
                ux_datagridviewMain.Enabled = false;
                ux_comboboxCNO.Enabled = false;
                ux_buttonEditData.Enabled = false;
                // Close the application???
                this.Close();
            }

            // Close the splash page...
            splash.Close();
        }
Пример #33
0
 //private void BuildDataviewTabControl()
 //{
 //    int numDataviewTabs = -1;
 //    // Clear the dataview tabs...
 //    ux_tabcontrolDataview.TabPages.Clear();
 //    // Now add back in the tabpage for adding new tabpages...
 //    if (!ux_tabcontrolGroupListNavigator.TabPages.ContainsKey("ux_tabpageDataviewNewTab"))
 //    {
 //        ux_tabcontrolDataview.TabPages.Add(ux_tabpageDataviewNewTab);
 //    }
 //    // Get the number of tabpages saved in the current user's settings...
 //    int.TryParse(_sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages.Count", "-1"), out numDataviewTabs);
 //    // Create the dataview tabs...
 //    if (numDataviewTabs > 0)
 //    {
 //        for (int i = 0; i < numDataviewTabs; i++)
 //        {
 //            //string tabText = GetUserSetting(cno, "ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].Text", "Accessions");
 //            //string tabTag = GetUserSetting(cno, "ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].Tag", "GET_ACCESSION");
 //            //string tabText = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].Text"];
 //            //string tabTag = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].Tag"];
 //            DataviewProperties dp = new DataviewProperties();
 //            //dp.TabName = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].TabName"];
 //            //dp.DataviewName = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].DataviewName"];
 //            //dp.StrongFormName = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].FormName"];
 //            //dp.ViewerStyle = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].ViewerStyle"];
 //            //dp.AlwaysOnTop = userSettings["ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].AlwaysOnTop"];
 //            dp.TabName = _sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].TabName", "");
 //            dp.DataviewName = _sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].DataviewName", "");
 //            dp.StrongFormName = _sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].FormName", "");
 //            dp.ViewerStyle = _sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].ViewerStyle", "");
 //            dp.AlwaysOnTop = _sharedUtils.GetUserSetting("ux_tabcontrolDataview", "TabPages[" + i.ToString() + "].AlwaysOnTop", "");
 //            _sharedUtils.ux_tabcontrolAddTab(ux_tabcontrolDataview, dp.TabName, dp, Math.Min(i, ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab)));
 //        }
 //    }
 //    else
 //    {
 //        //ux_tabcontrolDataview.TabPages.Insert(ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab), tabPage1);
 //        // Make the default Accession dataview tab...
 //        DataviewProperties dp = new DataviewProperties();
 //        dp.TabName = tabPage1.Text;
 //        dp.DataviewName = "get_accession";
 //        dp.StrongFormName = "";
 //        dp.ViewerStyle = "Spreadsheet";
 //        dp.AlwaysOnTop = "false";
 //        _sharedUtils.ux_tabcontrolAddTab(ux_tabcontrolDataview, dp.TabName, dp, Math.Min(0, ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab)));
 //        //ux_tabcontrolDataview.TabPages.Insert(ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab), tabPage2);
 //        // Make the default Inventory dataview tab...
 //        dp = new DataviewProperties();
 //        dp.TabName = tabPage2.Text;
 //        dp.DataviewName = "get_inventory";
 //        dp.StrongFormName = "";
 //        dp.ViewerStyle = "Spreadsheet";
 //        dp.AlwaysOnTop = "false";
 //        _sharedUtils.ux_tabcontrolAddTab(ux_tabcontrolDataview, dp.TabName, dp, Math.Min(1, ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab)));
 //        //ux_tabcontrolDataview.TabPages.Insert(ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab), tabPage3);
 //        // Make the default Orders dataview tab...
 //        dp = new DataviewProperties();
 //        dp.TabName = tabPage3.Text;
 //        dp.DataviewName = "get_order_request";
 //        dp.StrongFormName = "";
 //        dp.ViewerStyle = "Spreadsheet";
 //        dp.AlwaysOnTop = "false";
 //        _sharedUtils.ux_tabcontrolAddTab(ux_tabcontrolDataview, dp.TabName, dp, Math.Min(2, ux_tabcontrolDataview.TabPages.IndexOf(ux_tabpageDataviewNewTab)));
 //    }
 //    // Make the first tab active...
 //    ux_tabcontrolDataview.SelectedTab = ux_tabcontrolDataview.TabPages[0];
 //    // Set the image for the New Tab tab(s)...
 //    ux_tabcontrolDataview.ImageList = navigatorTreeViewImages;
 //    ux_tabpageDataviewNewTab.ImageKey = "new_tab";
 //}
 //        private LookupTables LoadStandardTables(object localDBInstance)
 //        {
 ////LocalDatabase localData = new LocalDatabase((string)localDBInstance);
 ////LookupTables standardTables = new LookupTables(GRINGlobalWebServices, localData);
 //            // Load the lookup code values tables...
 //            //if (!localData.TableExists("code_value_lookup"))
 //            if (!_sharedUtils.LocalDatabaseTableExists("code_value_lookup"))
 //            {
 //                // Looks like the code_value lookup table is not downloaded to the local machine and because it is really needed
 //                // and we can't count on the user to load it manually, we will automatically load it for them...
 //                Splash splash = new Splash();
 //                splash.StartPosition = FormStartPosition.CenterScreen;
 //                splash.Show();
 //                splash.Update();
 ////standardTables.LoadTableFromDatabase("code_value");
 //                _sharedUtils.LookupTablesLoadTableFromDatabase("code_value");
 //                splash.Close();
 //            }
 //            // Okay we *should* be fairly certain that the code_value table has been downloaded to the local machine now
 //            // so let's load it into memory for fast lookups...
 ////DataTable localDBCodeValueLookupTable = localData.GetData("SELECT * FROM code_value_lookup");
 //            DataTable localDBCodeValueLookupTable = _sharedUtils.GetLocalData("SELECT * FROM code_value_lookup");
 //            if (localDBCodeValueLookupTable.Rows.Count > 0)
 //            {
 //                // Since the MRU tables are never saved to the local database, we need to add them to the memory dataset each time...
 //                localDBCodeValueLookupTable.TableName = "MRU_code_value_lookup";
 //                standardTables.Tables.Add(localDBCodeValueLookupTable);
 //                standardTables.Tables["MRU_code_value_lookup"].AcceptChanges();
 //            }
 //            return standardTables;
 //        }
 private void LoadStandardTables()
 {
     if (!_sharedUtils.LocalDatabaseTableExists("code_value_lookup") ||
         !_sharedUtils.LocalDatabaseTableExists("cooperator_lookup"))
     {
         // Looks like the code_value lookup table is not downloaded to the local machine and because it is really needed
         // and we can't count on the user to load it manually, we will automatically load it for them...
         Splash splash = new Splash();
         splash.StartPosition = FormStartPosition.CenterScreen;
         splash.Show();
         splash.Update();
         //standardTables.LoadTableFromDatabase("code_value");
         _sharedUtils.LookupTablesLoadTableFromDatabase("code_value_lookup");
         _sharedUtils.LookupTablesLoadTableFromDatabase("cooperator_lookup");
         splash.Close();
     }
     else
     {
         // The code_value and cooperator LU tables exist so let's update them right now...
         _sharedUtils.LookupTablesUpdateTable("code_value_lookup", false);
         _sharedUtils.LookupTablesUpdateTable("cooperator_lookup", true);
     }
     //// Okay we *should* be fairly certain that the code_value table has been downloaded to the local machine now
     //// so let's load it into memory for fast lookups...
     ////DataTable localDBCodeValueLookupTable = _sharedUtils.GetLocalData("SELECT * FROM code_value_lookup");
     //DataTable localDBCodeValueLookupTable = _sharedUtils.GetLocalData("SELECT * FROM code_value_lookup", "");
     //if (localDBCodeValueLookupTable.Rows.Count > 0)
     //{
     //    // Since the MRU tables are never saved to the local database, we need to add them to the memory dataset each time...
     //    _sharedUtils.LookupTablesCacheMRUTable(localDBCodeValueLookupTable);
     //}
 }