Пример #1
0
        // load
        internal static bool Load(string RouteFile, Encoding RouteEncoding, string TrainFolder, Encoding TrainEncoding)
        {
            // members
            RouteProgress              = 0.0;
            TrainProgress              = 0.0;
            TrainProgressCurrentSum    = 0.0;
            TrainProgressCurrentWeight = 1.0;
            Cancel               = false;
            Complete             = false;
            CurrentRouteFile     = RouteFile;
            CurrentRouteEncoding = RouteEncoding;
            CurrentTrainFolder   = TrainFolder;
            CurrentTrainEncoding = TrainEncoding;
            // thread
            Loader = new Thread(new ThreadStart(LoadThreaded));
            Loader.IsBackground = true;
            Loader.Start();
            // dialog
            formLoading Dialog = new formLoading();

            System.Windows.Forms.DialogResult Result = Dialog.ShowDialog();
            Dialog.Dispose();
            // finalize
            return(Result == DialogResult.OK);
        }
Пример #2
0
        // show loading dialog
        internal static bool ShowLoadingDialog()
        {
            formLoading  Dialog = new formLoading();
            DialogResult Result = Dialog.ShowDialog();

            Dialog.Dispose();
            return(Result == DialogResult.OK);
        }