Example #1
0
        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            #region Settings
            StiSettings.Load();
            StiFormSettings.Save(this);

            StiSettings.Save();
            #endregion
        }
        public MainPage()
        {
            if (StiOptions.Silverlight.Themes.UseDefaultTheme && StiOptions.Silverlight.Themes.CurrentTheme == null)
            {
                StiOptions.Silverlight.Themes.CurrentTheme = (StiSilverlightThemes)StiSettings.Get("StimulsoftApplication", "Theme", StiOptions.Silverlight.Themes.DefaultTheme);
            }
            StiThemesHelper.LoadTheme();

            InitializeComponent();
        }
        public MainPage()
        {
            if (StiOptions.Silverlight.Themes.CurrentTheme == null)
            {
                StiOptions.Silverlight.Themes.CurrentTheme = (StiSilverlightThemes)StiSettings.Get("StimulsoftApplication", "Theme", StiSilverlightThemes.Office2010Silver);
            }
            StiThemesHelper.LoadTheme();

            InitializeComponent();
            stiReport1 = new Stimulsoft.Report.StiReport();
        }
Example #4
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            #region Settings
            StiSettings.Load();
            StiFormSettings.Load(this);
            #endregion
        }
        protected async override void OnLaunched(LaunchActivatedEventArgs args)
        {
            // Отключаем интеграцию в SettingsPane контролами
            StiSettingsInternalHelper.IntegrateToTheSettingsPane = false;
            // Сами инициализируем интеграцию в SettingsPane
            StiSettingsPaneHelper.Initialize();

            if (StiSettings.GetBool("NavigatorWinRT", "IsFirstLaunch", true))
            {
                StiSettings.Set("NavigatorWinRT", "IsFirstLaunch", false);

                var key = System.Globalization.CultureInfo.CurrentCulture.Name;

                #region Cultures
                if (key.StartsWith("de"))
                {
                    key = "de";
                }
                else if (key.StartsWith("ru"))
                {
                    key = "ru";
                }
                else if (key == "zh-Hans")
                {
                    key = "zh-CHS";
                }
                else if (key == "zh-Hant")
                {
                    key = "zh-CHT";
                }
                else
                {
                    key = "en";
                }
                #endregion

                StiSettings.Set("Localization", "Current", key);
            }

            StiThemesHelper.LoadTheme();
            await StiLocalizationHelper.LoadDefaulLocalizationAsync();

            Window.Current.Content = new StiSplashControl(args.Arguments, null);
            Window.Current.Activate();
        }
Example #6
0
        static StiReportHelper()
        {
            ReportDir = Application.StartupPath + "\\Report\\";
            if (!Directory.Exists(ReportDir))
            {
                Directory.CreateDirectory(ReportDir);
            }

            StiOptions.Configuration.SearchLocalizationFromRegistry = false;

            string stiPath = Application.StartupPath + "\\Report\\Localization";

            StiLocalization.DirectoryLocalization = stiPath;
            StiLocalization.Localization          = "zh-CHS.xml";

            StiSettings.Set("Localization", "FileName", "zh-CHS.xml");//设置中文菜单
            StiSettings.Save();
        }
        public MainPage()
        {
            #region Load Localizations
            var asm = System.Reflection.Assembly.GetExecutingAssembly();

            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ar.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.be.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.bg.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.cro.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.cz.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.de.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.en.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.es.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.fa.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.fr.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.hu.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.it.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ka.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.lt.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.nl.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.pl.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.pt-BR.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ro.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ru.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ser.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.sk.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.sv.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.tr.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.ua.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.zh-CHS.xml");
            StiConfig.LoadLocalization(asm, "ViewerLocalization.Localization.zh-CHT.xml");
            #endregion

            // Set Localization
            StiSettings.Set("Localization", "Current", "de");

            InitializeComponent();
        }
Example #8
0
 protected override void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     Stimulsoft.Report.Helpers.StiFormHelper.SaveStateForm(this, "DemoWindow");
     StiSettings.Save();
 }
Example #9
0
        public StiDemoForm()
        {
            InitializeComponent();

            #region Read Data
            if (File.Exists(applicationPath + "Data\\Demo.xsd"))
            {
                dataSet1.ReadXmlSchema(applicationPath + "Data\\Demo.xsd");
            }
            else
            {
                MessageBox.Show("File \"Demo.xsd\" not found");
            }

            if (File.Exists(applicationPath + "Data\\Demo.xml"))
            {
                dataSet1.ReadXml(applicationPath + "Data\\Demo.xml");
            }
            else
            {
                MessageBox.Show("File \"Demo.xml\" not found");
            }

            dataSet1.DataSetName = "Demo";
            #endregion

            ReadReportsInfo();
            tvReports.SelectedNode = tvReports.Nodes[0];

#if Debug
            btTest.Visible = true;
#endif

            #region Create Welcome Screen
            this.welcomeScreen          = new StiWelcomeScreenControl();
            this.welcomeScreen.Location = new Point(50, 50);
            this.welcomeScreen.Size     = new Size(900, 550);
            this.welcomeScreen.Visible  = false;
            this.Controls.Add(this.welcomeScreen);

            StiSettings.Load();
            bool displayWelcomeScreenAgain = StiSettings.GetBool(this.Name, "DisplayWelcomeScreenAgain", true);
            this.welcomeScreen.checkBoxDisplayWelcomeScreenAgain.Checked         = displayWelcomeScreenAgain;
            this.welcomeScreen.checkBoxDisplayWelcomeScreenAgain.CheckedChanged += new EventHandler(checkBoxDisplayWelcomeScreenAgain_CheckedChanged);

            this.welcomeScreen.buttonDemo.Click += new EventHandler(buttonDemo_Click);

            this.welcomeScreen.welcome            = (string)demoLocalization["Welcome"];
            this.welcomeScreen.welcomeDescription = (string)demoLocalization["WelcomeDesc"];

            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonDemo, (string)demoLocalization["DescDemo"]);
            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonSupport, (string)demoLocalization["DescSupport"]);
            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonVideo, (string)demoLocalization["DescVideo"]);
            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonDocumentation, (string)demoLocalization["DescDocumentation"]);
            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonForum, (string)demoLocalization["DescForum"]);
            this.welcomeScreen.SetDemoButtonText(this.welcomeScreen.buttonSampleProject, (string)demoLocalization["DescSampleProject"]);

            this.welcomeScreen.checkBoxDisplayWelcomeScreenAgain.Text = (string)demoLocalization["DisplayWelcomeScreenAgain"];
            #endregion

            #region Viewer
            this.viewerControl.IgnoreApplyStyle       = true;
            this.viewerControl.View.BorderStyle       = BorderStyle.None;
            this.viewerControl.ToolBar.RoundCorners   = true;
            this.viewerControl.StatusBar.RoundCorners = true;
            this.viewerControl.FindBar.RoundCorners   = true;
            viewerControl.Close += new EventHandler(viewerControl_Close);
            this.viewerControl.GlobalGuiStyleChanged += delegate
            {
                ApplyStyle();
            };
            ApplyStyle();

            CreateHelpResourcesMenu();
            #endregion

            #region Get Position
            Point position = Point.Empty;
            Size  size     = new Size(960, 588);
            Stimulsoft.Report.Helpers.StiFormHelper.LoadStateForm(this, "DemoWindow", ref position, ref size);
            this.StartPosition = FormStartPosition.Manual;
            base.SetBoundsCore(position.X, position.Y, size.Width, size.Height, BoundsSpecified.All);
            #endregion

            if (displayWelcomeScreenAgain)
            {
                ShowStartPage();
            }
            else
            {
                ShowViewerControl();
            }
        }
Example #10
0
 private void checkBoxDisplayWelcomeScreenAgain_CheckedChanged(object sender, EventArgs e)
 {
     StiSettings.Set(this.Name, "DisplayWelcomeScreenAgain", welcomeScreen.checkBoxDisplayWelcomeScreenAgain.Checked);
     StiSettings.Save();
 }