コード例 #1
0
ファイル: FBXInfo.cs プロジェクト: eksotama/FBXpert
        private void timer1_Tick(object sender, EventArgs e)
        {
            aktduro++;
            if ((this.Left > 280) && ((this.Left + this.Width) < FbXpertMainForm.Instance().Width))
            {
                this.Left += hdirection - 1;
            }
            else
            {
                // MoveRandom();
            }
            if ((this.Top > 0) && ((this.Top + this.Height) < FbXpertMainForm.Instance().Height))
            {
                this.Top += vdirection - 1;
            }
            else
            {
                //  MoveRandom();
            }

            if (aktduro > duration)
            {
                MoveRandom();
            }
        }
コード例 #2
0
ファイル: FBXInfo.cs プロジェクト: eksotama/FBXpert
        private void MoveRandom()
        {
            Random rd = new Random();

            hdirection = rd.Next(3);
            vdirection = rd.Next(3);
            duration   = rd.Next((FbXpertMainForm.Instance().Width + FbXpertMainForm.Instance().Height) / 4);
            aktduro    = 0;
        }
コード例 #3
0
        private void rbCreateDatabase_CheckedChanged(object sender, EventArgs e)
        {
            FileInfo fi = new FileInfo(txtRestoreDetinationDatabasePath.Text);

            if (fi.Exists && rbCreateDatabase.Checked)
            {
                SEMessageBox.ShowMDIDialog(FbXpertMainForm.Instance(), "DatabaseExceptionCaption", "DatabaseFileExistsNoCreate", SEMessageBoxButtons.OK, SEMessageBoxIcon.Exclamation, null, null);
                rbReplaceDatabase.Checked = true;
            }
        }
コード例 #4
0
 public static FbXpertMainForm Instance()
 {
     if (_instance != null)
     {
         return(_instance);
     }
     lock (_lock_this)
     {
         _instance = new FbXpertMainForm();
     }
     return(_instance);
 }
コード例 #5
0
        public static FbXpertMainForm CreateInstance(string[] args)
        {
            if (_instance != null)
            {
                return(_instance);
            }
            lock (_lock_this)
            {
                _instance = (args.Length > 0) ? new FbXpertMainForm(args[0]) : new FbXpertMainForm($@"{ApplicationPathClass.Instance.ApplicationPath}\config\AppSettings.json");
            }

            return(_instance);
        }
コード例 #6
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(FbXpertMainForm.Instance());
 }
コード例 #7
0
 static void Main(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(FbXpertMainForm.CreateInstance(args));
 }
コード例 #8
0
        private void FBXpertMainForm_Load(object sender, EventArgs e)
        {
            //   LanguageClass.Instance.InitEmbedded(this,"FBXpert.Languages","Language","de");
            ProgramAttributes.Instance.Init(System.Reflection.Assembly.GetExecutingAssembly());
            LanguageClass.Instance.InitFile(this.GetType().Assembly, $@"{ApplicationPathClass.Instance.ApplicationPath}\Languages\", "Language", ".", "de");
            LanguageClass.Instance.OnRaiseLanguageExceptionHandler += FbXpertMainForm_OnRaiseLanguageExceptionHandler;
            LanguageClass.Instance.ChangeLanguage(LanguageConsts.Deutsch);
            string test = LanguageClass.Instance.GetString("test");


            this.Text = $@"{ProgramAttributes.Instance.GetAppName()} V {ProgramAttributes.Instance.GetAppVersion()}";

            Application.DoEvents();

            FBXInfo.Instance.MdiParent = this;
            FBXInfo.Instance.Show();

            _dbe = DbExplorerForm.Instance(this);

            string pf = $@"{AppSettingsClass.Instance.PathSettings.DatabasesConfigPath}\{AppSettingsClass.Instance.PathSettings.DatabaseConfigFile}";
            bool   dz = DatabaseDefinitions.Instance.Deserialize(pf);

            SetLastLoadedDefinition(pf);
            if (dz)
            {
                Application.DoEvents();
                NotifiesClass.Instance.InfoGranularity = eMessageGranularity.normal;
                _dbe.SetCaption();
                _dbe.Show();
                _dbe.Enabled = false;
                _dbe.MakeDatabaseTree(false);
                int n = DatabaseDefinitions.Instance.CountToOpen();
                if (n > AppSettingsClass.Instance.DatabaseSettings.OpenDatabaseCount)
                {
                    object[] p = { n, Environment.NewLine };
                    if (SEMessageBox.ShowMDIDialog(FbXpertMainForm.Instance(), "OpenDatabases", "DoYouWantOpenDatabases", FormStartPosition.CenterScreen,
                                                   SEMessageBoxButtons.NoYes, SEMessageBoxIcon.Exclamation, null, p) == SEDialogResult.Yes)
                    {
                        _dbe.OpenActiveDatabases();
                    }
                    else
                    {
                        DatabaseDefinitions.Instance.DataState = EditStateClass.eDataState.UnSaved;
                        DatabaseDefinitions.Instance.MarkDatabasesActiv(false);
                    }
                }
                else
                {
                    _dbe.OpenActiveDatabases();
                }
                if (NotificationsForm.Instance().Visible)
                {
                    NotificationsForm.Instance().Close();
                }
                NotifiesClass.Instance.InfoGranularity = eMessageGranularity.few;
            }
            DbExplorerForm.Instance().Enabled = true;
            LanguageClass.Instance.ChangeLanguage(LanguageConsts.Deutsch);
            SEHotSpot.Controller.Instance.NewKeyboardHooks(this);
            DbExplorerForm.Instance().Select();
        }