예제 #1
0
        static void Main()
        {
            bool __startOldApp = false;
            int __windowsVersion = Environment.OSVersion.Version.Major;

            if(__windowsVersion < 6) {
                StaticWindows.InfoBox(
                    "MovieMatic2: Windows Vista Not Found",
                    "This program requires Windows Vista or later to run,"
                    + "\nbut for compatibility reason we start the old version."
                );

                __startOldApp = true;
            }

            if(__startOldApp) {
                string mmPath = Application.ResourceAssembly.Location;
                mmPath = mmPath.Replace(Application.ResourceAssembly.ManifestModule.Name, "MovieMatic.exe");

                if(File.Exists(mmPath)) {
                    AppLoader loader = new AppLoader();
                    loader.LoadApp(mmPath);
                }
                else {
                    StaticWindows.ErrorBox(
                        "MovieMatic2: MovieMatic version 1.x not found",
                        "MovieMatic version 1.x cannot start then the program was not found."
                    );
                }
            }
            else {
                App.Main();
            }
        }
예제 #2
0
        /// <summary>
        /// _export_s the excel export finish.
        /// </summary>
        /// <param name="successfull">if set to <c>true</c> [successfull].</param>
        /// <param name="text">The text.</param>
        void _export_ExcelExportFinish(bool successfull, string text)
        {
            this.btnOK.Enabled = true;
            this.btnCancel.Enabled = true;

            this.txtFilename.Enabled = true;
            this.txtTargetPath.Enabled = true;
            this.txtSheettitle.Enabled = true;

            this.cbExport.Enabled = true;

            foreach(CheckBox chk in this.colsPanel.Controls) {
                chk.Enabled = true;
            }

            if(this._filename.Trim() != ""
            && successfull) {
                this.pbState.Value = this.pbState.Maximum;
                this.lblState.Text = text;

                this.lblState.Refresh();
                this.lblState.Update();

                try {
                    AppLoader loader = new AppLoader();
                    loader.LoadApp(this._filename);
                }
                catch(Exception ex) {
                    StaticWindows.ErrorBox(ex.Message);
                }

                this.pbState.Value = 0;
                this.lblState.Text = "";

                this.lblState.Refresh();
                this.lblState.Update();
            }
            else {
                StaticWindows.ErrorBox("Es trat ein unbekannter Fehler während des Exports auf!");
            }

            this.pbState.Maximum = this._movies.Count;

            foreach(CheckBox chk in this.colsPanel.Controls) {
                this.pbState.Maximum += 1;
            }
        }