Exemple #1
1
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.Opacity = 0;
            this.BackgroundImageLayout = ImageLayout.Stretch;
            this.WindowState = FormWindowState.Maximized;
            this.FormBorderStyle = FormBorderStyle.None;

            SplashForm sf = new SplashForm();
            sf.ShowDialog();

            this.panel1.AutoScroll = true;
            this.panel1.HorizontalScroll.Enabled = true;
            this.panel1.VerticalScroll.Enabled = true;

            MidiFile midiFile = new MidiFile("E:/Mozart__Rondo_Alla_Turca.mid");
            MidiOptions options = new MidiOptions(midiFile);
            sheetMusic1.Load(midiFile, options);
            float zoom = (float)sheetMusic1.Width / SheetMusic.PageWidth;
            sheetMusic1.SetZoom(zoom);

            this.Opacity = 1;
        }
Exemple #2
0
        void MainFormShown(object sender, EventArgs e)
        {
            waitForm = new WaitForm();

            SplashForm f = new SplashForm();

            f.ShowDialog();

            if (AppConfig.ReadBoolean("reader_reconnect"))
            {
                ReaderList = new SCardReaderList();
                if (ReaderList != null)
                {
                    string reader_name = AppConfig.ReadString("reader_name");
                    if (ReaderList.Contains(reader_name))
                    {
                        Reader = new SCardReader(reader_name);
                        DisplayReaderPresent();
                        Reader.StartMonitor(new SCardReader.StatusChangeCallback(ReaderStatusChanged));
                        return;
                    }
                    ReaderList = null;
                }
            }

            SelectReader();
        }
Exemple #3
0
        private static void Main(string[] pArgs)
        {
            AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;

            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (var splashForm = new SplashForm()) {
                if (splashForm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                if (!Config.Instance.LoadedFromFile)
                {
                    var setupForm = new SetupForm();
                    if (setupForm.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }

                    // Since this is the first-time setup we can apply the theme right away.
                    Config.Instance.LoadTheme();
                }

                var mainForm = new MainForm(pArgs);
                Application.Run(mainForm);
            }
        }
Exemple #4
0
 private static void Open(object speed)
 {
     _form             = new SplashForm(_image);
     _form.Speed       = (int)speed;
     _form.MessageRect = _messageRect;
     _form.ShowDialog();
 }
Exemple #5
0
 private static void InternalShow(object progressStepCount)
 {
     Debug.Assert(__Form == null);
     __Form = new SplashForm();
     __Form.progressBar1.Maximum = PROGRESS_STEP_ITEM_COUNT * (int)progressStepCount;
     __Form.Shown += (s, e) => __FormCreatedEvent.Set();
     __Form.ShowDialog();
 }
Exemple #6
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            SplashForm splash = new SplashForm(ref provider);
            splash.ShowDialog();

            DatabaseInfoForm dbInfoForm = new DatabaseInfoForm(provider);
            dbInfoForm.Show(dockPanel1, DockState.DockRight);
        }
Exemple #7
0
 private void AboutPictureBox_Click(object sender, EventArgs e)
 {
     if (m_splash_form == null)
     {
         m_splash_form = new SplashForm();
     }
     if (m_splash_form != null)
     {
         m_splash_form.ShowDialog();
     }
 }
        public MainForm0()
        {
            this.Visible = false;
            InitializeComponent();

            ThreadPool.QueueUserWorkItem(delegate(object state)
            {
                SplashForm splash = new SplashForm();
                splash.ShowDialog();
                this.Invoke(new SetVisibleDelegate(SetVisible));
            });
        }
Exemple #9
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Settings.Load();

            SplashForm splash = new SplashForm();
            splash.ShowDialog();

            Application.Run(new Form1());
        }
        private void SplashTestButton_Click(object sender, EventArgs e)
        {
            Program.IsProgramReady = false;
            Task SplashTask = Task.Run(() =>
            {
                SplashForm SF = new SplashForm(10);
                SF.ShowDialog();
                SF.Dispose();
            });

            Thread.Sleep(9999);
            Program.IsProgramReady = true;
        }
    static void Main(string[] args)
    {
        DialogResult dr;

        using (var splash = new SplashForm())
        {
            dr = splash.ShowDialog();
        }
        if (dr == DialogResult.OK)
        {
            Application.Run(new HauntedHouse());
        }
    }
Exemple #12
0
        private static void ShowSplashScreen(Version appVersion, Progress <double> progress, ILogger logger)
        {
            var thread = new Thread(() =>
            {
                _splash = new SplashForm(appVersion, progress);

                _splash.ShowDialog();
            });

            thread.SetApartmentState(ApartmentState.STA);
            thread.IsBackground = true;
            thread.Start();

            _splashThread = thread;
        }
        static void Main()
        {
            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
            System.Windows.Forms.Application.DoEvents();
            using (var appContext = new AppContext())
            {
                // Globaler Context
                AppContext = appContext;

                // Initialisierung
                using (var splash = new SplashForm())
                {
                    if (splash.ShowDialog() == DialogResult.OK)
                    {
                        System.Windows.Forms.Application.Run(new FrameForm());
                    }
                }
            }
        }
Exemple #14
0
        void MainFormShown(object sender, EventArgs e)
        {
            SplashForm f = new SplashForm();

            f.ShowDialog();

            /* Check if run by admin (to allow adding ATR into registry)	*/
            WindowsIdentity  identity  = WindowsIdentity.GetCurrent();
            WindowsPrincipal principal = new WindowsPrincipal(identity);
            bool             isAdmin   = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (isAdmin)
            {
                miATRRegistry.Enabled = true;
            }
            else
            {
                miATRRegistry.Enabled = false;
            }

            StartReaderMonitor();
        }
Exemple #15
0
        private static void ShowSplashScreen(Version appVersion, Progress<double> progress, ILogger logger)
        {
            var thread = new Thread(() =>
            {
                _splash = new SplashForm(appVersion, progress);

                _splash.ShowDialog();
            });
           
            thread.SetApartmentState(ApartmentState.STA);
            thread.IsBackground = true;
            thread.Start();

            _splashThread = thread;
        }
Exemple #16
0
 // Token: 0x060002C3 RID: 707 RVA: 0x0000F5A0 File Offset: 0x0000D7A0
 public override void Apply(ref ScrapBase scrap)
 {
     var splashForm = new SplashForm();
     splashForm.ShowDialog();
 }
 private void ShowSplash()
 {
     // show/hide splash screen
     SplashForm splashForm = new SplashForm();
     try
     {
         splashForm.ShowDialog();
     }
     finally
     {
         splashForm.Dispose();
     }
 }
Exemple #18
0
        static void Main(string[] args)
        {
            Assembly execAssembly = System.Reflection.Assembly.GetExecutingAssembly();
            CreateDebugListener();

            Trace.WriteLine("Arguments: " + args.ToString(), "Viking");
            Trace.WriteLine("Current Directory: " + System.Environment.CurrentDirectory, "Viking");
            Trace.WriteLine("Application Directory: " + System.IO.Path.GetDirectoryName(execAssembly.CodeBase), "Viking");
            #if DEBUG
              //          System.Diagnostics.Debugger.Break();
            #endif

            //Change to the executing assemblies directory so we can load modules correctly
              //  System.Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

            int workThreads;
            int portThreads;
            System.Threading.ThreadPool.GetMaxThreads(out workThreads, out portThreads);
            System.Net.ServicePointManager.DefaultConnectionLimit = workThreads;

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

            string website = null;

            if (args.Length > 0)
            {
                website = args[0];
            }
            else
            {
                bool ShowUsage = true;
                if (AppDomain.CurrentDomain.SetupInformation.ActivationArguments != null)
                {
                    string[] ClickOnceArgs = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
                    if (ClickOnceArgs != null && ClickOnceArgs.Length > 0)
                    {
                        Trace.WriteLine("ActivationArguments: ");
                        foreach (string arg in ClickOnceArgs)
                            Trace.WriteLine(arg, "Viking");

                        string FirstArg = System.Web.HttpUtility.HtmlDecode(ClickOnceArgs[0]);
                        string[] Args = FirstArg.Split('?');

                        Program.AppWebsite = Args[0]; //The website we use to launch Viking
                        Trace.WriteLine("Application Website: " + Program.AppWebsite, "Viking");

                        if (Args.Length == 0)
                        {
                            //Sometimes the only argument passed is the application directory
                            if (!Args[0].ToLower().EndsWith(".application"))
                            {
                                website = Args[1];
                                ShowUsage = false;
                            }
                        }
                        //Parse the arguments
                        else if (Args.Length > 1)
                        {
                            System.Collections.Specialized.NameValueCollection QueryTable = System.Web.HttpUtility.ParseQueryString(Args[1]);

                            if (QueryTable.HasKeys())
                            {
                                UI.State.StartupArguments = QueryTable;
                                string VolumeValue = QueryTable["Volume"];
                                if (VolumeValue != null)
                                {
                                    website = VolumeValue;
                                    ShowUsage = false;
                                }
                            }
                            else
                            {
                                website = Args[1];
                                ShowUsage = false;
                            }
                        }
                    }
                }

                if(ShowUsage)
                {
                    //Launch the viking home page and exit
                    //System.Windows.Forms.MessageBox.Show("No volume definition file was specified.  Loading RC1 by default.  You can pass a website as the first argument to launch a different volume, or select a volume definition from the website: http://connectomes.utah.edu/", "Viking", MessageBoxButtons.OK);
                    //System.Diagnostics.Process WebBrowser = new System.Diagnostics.Process();
                    //WebBrowser.StartInfo.FileName = homepage;
                    //WebBrowser.Start();
                }
            }

            // ----------------------------------------------------------------------------
            //   Logon nag screen, I've only added this tiny code here, and made a logon form in
            //  Viking/UI/forms

            using (Logon vikingLogon = new Logon("https://connectomes.utah.edu/Viz/Account/Authenticate", website))
            {
                vikingLogon.ShowDialog();

                if (vikingLogon.Result == DialogResult.Cancel)
                {
                    return;
                }

                website = vikingLogon.VolumeURL;
                UI.State.UserCredentials = vikingLogon.Credentials;

            }

            //Make sure the website includes a file, if it does not then include Volume.VikingXML by default
            Uri WebsiteURI = new Uri(website);
            string path = WebsiteURI.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped);
            if (path.Contains(".") == false)
            {
                if (website.EndsWith("/") == false)
                    website = website + "/";

                website = website + "volume.VikingXML";
            }

            // --------------------------------------------------------------------------------------

            Trace.WriteLine("Loading: " + website, "Viking");

            using (SplashForm Splash = new SplashForm(website))
            {

                Splash.ShowDialog();
                DialogResult splashResult = Splash.Result;

                if (splashResult == DialogResult.Cancel)
                {
                    return;
                }
            }

            Application.Run(new VikingMain());

            if (SynchronizedDebugWriter != null)
                SynchronizedDebugWriter.Close();

            if (DebugLogFile != null)
                DebugLogFile.Close();
        }
 // this is called by the new thread to show the splash screen
 private static void MySplashThreadFunc()
 {
     m_instance = new SplashForm(m_imageFile, m_transColor);
     m_instance.TopMost = false;
     m_instance.ShowDialog();
 }
Exemple #20
0
 private void menuItem_about_Activate(object sender, EventArgs e)
 {
     using (SplashForm splashForm = new SplashForm())
     {
         splashForm.AboutMode = true;
         splashForm.ShowDialog(this);
     }
 }
Exemple #21
0
 void Show()
 {
     m_SplashForm = new SplashForm(m_SplashImage);
     m_SplashForm.ShowDialog();
 }
Exemple #22
0
 void Show()
 {
    m_SplashForm = new SplashForm(m_SplashImage);
    m_SplashForm.Location = m_Location;
    m_FromCreated.Set();
    m_SplashForm.ShowDialog();
 }
Exemple #23
0
 void Show()
 {
    m_SplashForm = new SplashForm(m_SplashImage);
    m_SplashForm.ShowDialog();
 }
Exemple #24
0
 private void Login_Load(object sender, EventArgs e)
 {
     SplashForm splashForm = new SplashForm();
     splashForm.ShowDialog(this);
 }
Exemple #25
0
 private static void ShowSplash()
 {
     form = new SplashForm();
     form.ShowDialog();
 }