Example #1
0
        private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e)
        {
            frmSettings  frmSettings = new frmSettings();
            DialogResult res         = frmSettings.ShowDialog();

            if (res != DialogResult.OK)
            {
                throw new ApplicationException("Settings window canceled, please run the setup again and fill in all fields");
            }
        }
Example #2
0
        private void ShowSettings()
        {
            frmSettings settings = new frmSettings();

            settings.ShowDialog();
            if (settings.ModsFolderChanged())
            {
                RefreshMods();
            }
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectHeroCommand"/> class.
        /// Adds our command handlers for menu (commands must exist in the command table file)
        /// </summary>
        /// <param name="package">Owner package, not null.</param>
        private ProjectHeroCommand(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            this.package = package;

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                commandService.AddCommand(new MenuCommand(delegate(object sender, EventArgs e) {
                    window = (ProjectHeroToolWindow)this.package.FindToolWindow(typeof(ProjectHeroToolWindow), 0, true);
                    if ((window == null) || (window.Frame == null))
                    {
                        throw new NotSupportedException("Cannot create tool window for Project Hero");
                    }

                    IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame;
                    Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show());
                }, new CommandID(CommandSet, ShowProjectHeroCommandId)));

                commandService.AddCommand(new MenuCommand(delegate(object sender, EventArgs e)
                {
                    using (frmSettings hwndSettings = new frmSettings())
                    {
                        hwndSettings.ShowDialog();
                    }
                }, new CommandID(CommandSet, ShowProjectHeroSettingsCommandId)));

                commandService.AddCommand(new MenuCommand(delegate(object sender, EventArgs e)
                {
                    using (frmAbout about = new frmAbout())
                        about.ShowDialog();

                    //StringBuilder builder = new StringBuilder();
                    //builder.AppendLine("Coded by:");
                    //builder.AppendLine();
                    //builder.AppendLine("   Fonzie");
                    //builder.AppendLine();
                    //builder.AppendLine("Copyright © 2019. All Rights Reserved");

                    //VsShellUtilities.ShowMessageBox(
                    //    this.ServiceProvider,
                    //    builder.ToString(),
                    //    "About Project Hero 2",
                    //    OLEMSGICON.OLEMSGICON_INFO,
                    //    OLEMSGBUTTON.OLEMSGBUTTON_OK,
                    //    OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST
                    //);
                }, new CommandID(CommandSet, ShowProjectHeroAboutCommandId)));
            }
        }
        private void OpenSettingsManager()
        {
            //show settings dialog
            frmSettings newSettings = new frmSettings(this);

            newSettings.ShowDialog();

            //reload app settings
            _appSettings = new ApplicationSettings();
            _appSettings = _appSettings.GetOrCreateApplicationSettings();
        }
Example #5
0
        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {
            frmSettings dlg = new frmSettings();

            dlg.Settings = _settings.Clone() as Settings;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _settings = dlg.Settings;
                _settings.Save();
            }
        }
Example #6
0
 private void btnSetting_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmSettings();
         frm.ShowDialog(this);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
Example #7
0
 private void scannerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmSettings form   = new frmSettings();
         var         result = form.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void OpenSettingsManager()
        {
            //show settings dialog
            frmSettings newSettings = new frmSettings(AContainer);

            newSettings.ShowDialog();

            //reload app settings
            _appSettings = new ApplicationSettings().GetOrCreateApplicationSettings();

            newSettings.Dispose();
        }
Example #9
0
        private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            _onClick       = false;
            _otherformopen = true;
            Hide();
            _fSettings = new frmSettings();
            _fSettings.ShowDialog();

            pbSelection.Visible = false;
            CaptureControl.GetBackgroundImage();
            Show();
            RefreshAccountList();
            RefreshFolderList();
        }
        private void OpenSettingsManager()
        {
            //show settings dialog
            frmSettings newSettings = new frmSettings(this);

            newSettings.ShowDialog();

            //reload app settings
            _appSettings = new ApplicationSettings();
            _appSettings = _appSettings.GetOrCreateApplicationSettings();

            //reinit
            HttpServerClient.InitializeScriptEngine(new frmScriptEngine());
            HttpServerClient.Initialize();
        }
Example #11
0
        private void bSettings_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmSettings frm = new frmSettings();

            //frmTesting frm = new frmTesting();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.ShopName  = frm.ShopName;
                Properties.Settings.Default.Address   = frm.Address;
                Properties.Settings.Default.Phone     = frm.PhoneNo;
                Properties.Settings.Default.Email     = frm.Email;
                Properties.Settings.Default.Website   = frm.Website;
                Properties.Settings.Default.ShortName = frm.ShortName;
                Properties.Settings.Default.Save();
            }
        }
Example #12
0
        private void Init()
        {
            try
            {
                _cred          = Helper.LoadFromJson();
                WebImageFolder = _cred.WebImageFolder;
                _ftpPath       = _cred.FTPServer;
                _ftpUsername   = _cred.FTPUsername;
                _ftpPassword   = _cred.FTPPassword;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message);
                MessageBox.Show("We can't find the settings file.\nPlease set your settings before use the app.", "Error while load file...", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                frmSettings frmSettings = new frmSettings();
                frmSettings.ShowDialog();
            }

            fillList();
            loadComboBox(cbx_AnimeList);
        }
        void frmLogin_RequestEditDBSettings()
        {
            frmSettings toShow = new frmSettings(true);

            toShow.ShowDialog(this);
        }
Example #14
0
 public void ShowForm()
 {
     _form.ShowDialog();
 }
Example #15
0
        private void pbSettings_Click(object sender, EventArgs e)
        {
            frmSettings settings = new frmSettings();

            settings.ShowDialog();
        }
Example #16
0
        private void barButtonItem18_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmSettings set = new frmSettings();
            m_appSettings = new AppSettings();
            set.AppSettings = m_appSettings;
            set.Symbols = GetRealtimeNotificationSymbols();
            set.InterpolateLogWorksTimescale = m_appSettings.InterpolateLogWorksTimescale;
            //set.AutoGenerateLogWorksFile = m_appSettings.AutoGenerateLogWorks;
            set.OnlyPBus = m_appSettings.OnlyPBus;
            set.ResetRealtimeSymbolOnTabPageSwitch = m_appSettings.ResetRealtimeSymbolOnTabPageSwitch;
            set.AutoSizeNewWindows = m_appSettings.AutoSizeNewWindows;
            set.AutoSizeColumnsInViewer = m_appSettings.AutoSizeColumnsInWindows;
            set.AutoUpdateChecksum = m_appSettings.AutoChecksum;
            set.ShowAddressesInHex = m_appSettings.ShowAddressesInHex;
            set.HideSymbolWindow = m_appSettings.HideSymbolTable;
            set.ShowGraphsInMapViewer = m_appSettings.ShowGraphs;
            set.AutoMapDetectionActive = m_appSettings.MapDetectionActive;
            set.ViewTablesInHex = m_appSettings.Viewinhex;
            set.AutoDockSameFile = m_appSettings.AutoDockSameFile;
            set.AutoDockSameSymbol = m_appSettings.AutoDockSameSymbol;
            set.DisableMapviewerColors = m_appSettings.DisableMapviewerColors;
            set.ShowMapViewersInWindows = m_appSettings.ShowViewerInWindows;
            set.NewPanelsFloating = m_appSettings.NewPanelsFloating;
            set.AutoLoadLastFile = m_appSettings.AutoLoadLastFile;
            set.ShowMapPreviewPopup = m_appSettings.ShowMapPreviewPopup;
            set.DefaultViewType = m_appSettings.DefaultViewType;
            set.DefaultViewSize = m_appSettings.DefaultViewSize;
            set.SynchronizeMapviewers = m_appSettings.SynchronizeMapviewers;
            set.FancyDocking = m_appSettings.FancyDocking;
            set.ShowTablesUpsideDown = m_appSettings.ShowTablesUpsideDown;
            set.UseNewMapViewer = m_appSettings.UseNewMapViewer;
            set.UseRedAndWhiteMaps = m_appSettings.ShowRedWhite;
            set.RequestProjectNotes = m_appSettings.RequestProjectNotes;
            set.ProjectFolder = m_appSettings.ProjectFolder;
            set.UseDigitalWidebandLambda = m_appSettings.UseDigitalWidebandLambda;
            set.WidebandDevice = m_appSettings.WidebandDevice;
            set.WidebandComPort = m_appSettings.WbPort;
            set.AdapterType = m_appSettings.AdapterType;
            set.Adapter = m_appSettings.Adapter;

            if (set.ShowDialog() == DialogResult.OK)
            {
                m_appSettings.InterpolateLogWorksTimescale = set.InterpolateLogWorksTimescale;
                m_appSettings.AutoSizeNewWindows = set.AutoSizeNewWindows;
                m_appSettings.AutoSizeColumnsInWindows = set.AutoSizeColumnsInViewer;
                m_appSettings.AutoChecksum = set.AutoUpdateChecksum;
                m_appSettings.ShowAddressesInHex = set.ShowAddressesInHex;
                //m_appSettings.AutoGenerateLogWorks = set.AutoGenerateLogWorksFile;
                m_appSettings.HideSymbolTable = set.HideSymbolWindow;
                m_appSettings.ShowGraphs = set.ShowGraphsInMapViewer;
                m_appSettings.MapDetectionActive = set.AutoMapDetectionActive;
                m_appSettings.Viewinhex = set.ViewTablesInHex;
                m_appSettings.DisableMapviewerColors = set.DisableMapviewerColors;
                m_appSettings.AutoDockSameFile = set.AutoDockSameFile;
                m_appSettings.AutoDockSameSymbol = set.AutoDockSameSymbol;
                m_appSettings.ShowViewerInWindows = set.ShowMapViewersInWindows;
                m_appSettings.NewPanelsFloating = set.NewPanelsFloating;
                m_appSettings.OnlyPBus = set.OnlyPBus;
                m_appSettings.ShowRedWhite = set.UseRedAndWhiteMaps;
                m_appSettings.UseNewMapViewer = set.UseNewMapViewer;
                m_appSettings.ResetRealtimeSymbolOnTabPageSwitch = set.ResetRealtimeSymbolOnTabPageSwitch;
                m_appSettings.DefaultViewType = set.DefaultViewType;
                m_appSettings.DefaultViewSize = set.DefaultViewSize;
                m_appSettings.AutoLoadLastFile = set.AutoLoadLastFile;
                m_appSettings.FancyDocking = set.FancyDocking;
                m_appSettings.ShowTablesUpsideDown = set.ShowTablesUpsideDown;
                m_appSettings.ShowMapPreviewPopup = set.ShowMapPreviewPopup;
                m_appSettings.SynchronizeMapviewers = set.SynchronizeMapviewers;
                m_appSettings.RequestProjectNotes = set.RequestProjectNotes;
                m_appSettings.ProjectFolder = set.ProjectFolder;
                m_appSettings.UseDigitalWidebandLambda = set.UseDigitalWidebandLambda;
                m_appSettings.WidebandDevice = set.WidebandDevice;
                m_appSettings.WbPort = set.WidebandComPort;
                m_appSettings.AdapterType = set.AdapterType;
                m_appSettings.Adapter = set.Adapter;

                SetupMeasureAFRorLambda();
                SetupDocking();
                SetupDisplayOptions();
            }
        }
Example #17
0
        // Menu Settings
        private void menuItemSettings_Click(object sender, EventArgs e)
        {
            frmSettings formSettings = new frmSettings();

            formSettings.ShowDialog();
        }
Example #18
0
 private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var settings = new frmSettings();
     settings.ShowDialog();
     settings.Dispose();
 }
Example #19
0
        public void OpenSettingsForm(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmSettings settings = new frmSettings();

            settings.ShowDialog();
        }
        private void backgroundLoader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                if (_error)
                {
                    if (this.Visible)
                    {
                        frmStartMessageBoxError frmError = new frmStartMessageBoxError();
                        frmError.ErrorMessages = _errorMessage.ToArray <string>();
                        if (_errorMessage.Count > 0)
                        {
                            if (_errorMessage[0].IndexOf("NOT_FOUND") > -1)
                            {
                                frmError.ContinueEnabled = false;
                            }
                        }
                        frmError.ShowDialog();

                        switch (frmError.StartMessageBoxErorrResult)
                        {
                        case frmStartMessageBoxError.STARTMESSAGEBOXERROR_RESULT.NONE:
                            Application.Exit();
                            break;

                        case frmStartMessageBoxError.STARTMESSAGEBOXERROR_RESULT.CONTINUE:
                            frmMain MainForm = new frmMain();
                            MainForm.Show();
                            backgroundLoader.CancelAsync();
                            this.Visible     = false;
                            StatusLabel.Text = "Continue without errors fixing!";
                            break;

                        case frmStartMessageBoxError.STARTMESSAGEBOXERROR_RESULT.EXIT:
                            Application.Exit();
                            break;

                        case frmStartMessageBoxError.STARTMESSAGEBOXERROR_RESULT.OPENSETTINGS:
                            frmSettings frmSet = new frmSettings();
                            if (frmSet.ShowDialog() == DialogResult.OK)
                            {
                                frmSplashScreen_Load(null, null);
                                StatusLabel.Text = "Settings updated!";
                            }
                            else
                            {
                                MainForm = new frmMain();
                                MainForm.Show();
                                backgroundLoader.CancelAsync();
                                this.Visible     = false;
                                StatusLabel.Text = "Settings not updated, continue without errors fixing!";
                            }
                            break;
                        }
                    }
                }
                else
                {
                    frmMain MainForm = new frmMain();
                    MainForm.Show();
                    backgroundLoader.CancelAsync();
                    this.Visible = false;
                }
            }
            catch (Exception ex)
            {
                CommonItem.ErrManger.ErrorManagement(ex, false, this);
            }
        }
Example #21
0
 private void tsmSettings_Click(object sender, EventArgs e)
 {
     Debug.Print(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name); //---------
     Network.ReceiveMessageEvent -= new EventHandler(MSG_Recived);
     Network.ServerStop();
     if (sender != null)
     {
         frmSettings fSettings = new frmSettings();
         if (sender.ToString() == "FirstStart")
         {
             fSettings.StartPosition = FormStartPosition.CenterScreen;
         }
         fSettings.ShowDialog();
     }
     StartReceive();
     SetWindowsSize();
 }