Exemple #1
0
        private void tsmiAbout_Click(object sender, EventArgs e)
        {
            AssemblyName assemblyName = Assembly.GetExecutingAssembly().GetName();
            string       version      = assemblyName.Version.ToString();

            AboutForm aboutForm = new AboutForm("虚拟交易所清算柜台服务程序", version);

            aboutForm.ShowDialog();
            aboutForm.Close();
        }
Exemple #2
0
        public static AboutForm Instance()
        {
            if (sForm == null)
            {
                sForm = new AboutForm();
            }

            else
            {
                sForm.Close();
                sForm = new AboutForm();
            }

            return(sForm);
        }
Exemple #3
0
        private static void AddCompleteAnimations(PowerPointSlide currentSlide, PowerPointSlide nextSlide)
        {
            var addedSlide = currentSlide.CreateAutoAnimateSlide() as PowerPointAutoAnimateSlide;

            Globals.ThisAddIn.Application.ActiveWindow.View.GotoSlide(addedSlide.Index);

            AboutForm progressForm = new AboutForm();

            progressForm.Visible = true;

            addedSlide.MoveMotionAnimation(); //Move shapes with motion animation already added
            addedSlide.PrepareForAutoAnimate();
            RenameCurrentSlide(currentSlide);
            PrepareNextSlide(nextSlide);
            addedSlide.AddAutoAnimation(currentSlideShapes, nextSlideShapes, matchingShapeIDs);
            Globals.ThisAddIn.Application.CommandBars.ExecuteMso("AnimationPreview");
            PowerPointPresentation.Current.AddAckSlide();

            progressForm.Close();
        }
Exemple #4
0
        private void btnAbout_Click(object sender, EventArgs e)
        {
            AboutForm frm = new AboutForm();
            frm.SetVersions(TheGhostCore.AppVersion, TheGhostCore.CoreVersion);

            frm.ShowDialog(this);
            frm.Close();
            frm = null;
        }
Exemple #5
0
        /// <summary>
        /// Starts the IDE
        /// </summary>
        /// <param name="f">the hosting form</param>
        public static bool KickStart(Form f)
        {
            args = new IdeArgs();

            if (args.listermode)
            {
                ST.Mutex m = null;
                try
                {
                    m = ST.Mutex.OpenExisting("XACCIDE");
                }
                catch
                {
                    // must assign, else GC will clean up
                    real = new System.Threading.Mutex(true, "XACCIDE");
                }

                if (m != null)
                {
                    if (InvokeClient())
                    {
                        return(false);
                    }
                    else
                    {
                        real.WaitOne();
                    }
                }
            }

#if !DEBUG
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            try
            {
#endif
            System.Threading.Thread.CurrentThread.CurrentCulture       =
                System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture;

            if (args.listermode)
            {
                IpcServerChannel server = new IpcServerChannel("XACCIDE");
                ChannelServices.RegisterChannel(server, false);

                RemotingConfiguration.RegisterWellKnownServiceType(typeof(ServerService), "ss", WellKnownObjectMode.Singleton);
            }

            Application.EnableVisualStyles();
            SettingsService.idemode                  = true;
            Application.ApplicationExit             += new EventHandler(AppExit);
            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
            AppDomain.CurrentDomain.SetupInformation.LoaderOptimization = LoaderOptimization.MultiDomainHost;

            about = new AboutForm();
            about.StartPosition = f.StartPosition = FormStartPosition.CenterScreen;
            about.Show();
            Application.DoEvents();

            f.KeyPreview = true;

            IWindowService ws = new WindowService(f);

            about.progressBar1.Value += 10;

            Assembly thisass = typeof(IdeSupport).Assembly;

            new PluginManager().LoadAssembly(thisass);

            ((SettingsService)ServiceHost.Settings).args = args;

            IMenuService ms = ServiceHost.Menu;

            MenuStrip mm = ms.MainMenu;

            f.Font      = SystemInformation.MenuFont;
            f.Closing  += new CancelEventHandler(f_Closing);
            f.AllowDrop = true;

            f.DragEnter += new DragEventHandler(f_DragEnter);
            f.DragDrop  += new DragEventHandler(f_DragDrop);

            Version ver = typeof(IdeSupport).Assembly.GetName().Version;

            string verstr = ver.ToString(4);

            f.Text = "xacc.ide " + verstr + (args.debug ? " - DEBUG MODE" : string.Empty);
            f.Size = new Size(900, 650);

            ToolStripMenuItem view = ms["View"];

            f.Icon = new Icon(
                thisass.GetManifestResourceStream(
#if VS
                    "Xacc.Resources." +
#endif
                    "atb.ico"));

            ServiceHost.Window.Document.AllowDrop  = true;
            ServiceHost.Window.Document.DragEnter += new DragEventHandler(f_DragEnter);
            ServiceHost.Window.Document.DragDrop  += new DragEventHandler(f_DragDrop);

            ServiceHost.Window.Document.BringToFront();
            new ViewService();
            about.progressBar1.Value += 5;
            new KeyboardHandler();

            ServiceHost.State = ApplicationState.Normal;

            about.progressBar1.Value += 5; //65


            //after everything has been loaded
            ServiceHost.Initialize();

            about.progressBar1.Value += 5;

            try
            {
                ServiceHost.Scripting.InitCommand();
                ServiceHost.Shell.InitCommand();
            }
            catch (Exception ex) // MONO
            {
                Trace.WriteLine(ex);
            }

            (ServiceHost.ToolBar as ToolBarService).ValidateToolBarButtons();

            //ToolStripManager.LoadSettings(f);

            //ServiceHost.ToolBar.Load();

            if (args.open != null)
            {
                foreach (string of in args.open)
                {
                    if (File.Exists(of))
                    {
                        StringBuilder sb  = new StringBuilder(256);
                        int           len = kernel32.GetLongPathName(of, sb, 255);
                        try
                        {
                            ServiceHost.File.Open(sb.ToString());
                        }
                        catch (Exception ex)
                        {
                            Trace.WriteLine("Could not load file: " + sb + @" Message:
" + ex);
                        }
                    }
                    else
                    {
                        Trace.WriteLine("Could not open missing file: " + of);
                    }
                }
            }
#if !DEBUG
        }

        catch (Exception ex)
        {
            HandleException(ex, true);
            return(false);
        }
#endif
            f.WindowState = args.form;

            if (args.listermode)
            {
                f.WindowState = FormWindowState.Maximized;
            }

            about.Close();
            return(true);
        }
Exemple #6
0
        private void ShowAbout()
        {
            using (AboutForm a = new AboutForm())
            {
                IsLoaded = false;
                statList.Visible = false;
                a.ShowDialog();

                this.Visible = true;

                statList.Visible = true;
                IsLoaded = true;
                string ReqedUser = a.AskedToSeeUser;
                a.Close();

                if (!string.IsNullOrEmpty(ReqedUser))
                {
                    statList.IgnoreMouse = true;
                    SwitchToUserTimeLine(a.AskedToSeeUser);
                }
            }
        }
Exemple #7
0
 /// <summary>
 /// Shows current version information
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var af = new AboutForm();
     af.ShowDialog();
     af.Close();
     af.Dispose();
 }