Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HTMLExport"/> class.
 /// </summary>
 public HTMLExport()
 {
     Zoom                = 1.0f;
     FLayers             = false;
     FWysiwyg            = true;
     FPictures           = true;
     FWebMode            = false;
     FSubFolder          = true;
     FNavigator          = true;
     FSinglePage         = false;
     FThreaded           = false;
     FWidthUnits         = HtmlSizeUnits.Pixel;
     FHeightUnits        = HtmlSizeUnits.Pixel;
     FImageFormat        = ImageFormat.Png;
     FTemplates          = new HtmlTemplates();
     FFormat             = HTMLExportFormat.HTML;
     FPicsArchive        = new List <PicsArchiveItem>();
     FPrevStyleList      = null;
     FPrevStyleListIndex = 0;
     FPageBreaks         = true;
     FPrint              = false;
     FNumberFormat       = new NumberFormatInfo();
     FNumberFormat.NumberGroupSeparator   = String.Empty;
     FNumberFormat.NumberDecimalSeparator = ".";
     Res = new MyRes("Export,Html");
 }
Exemplo n.º 2
0
        private void SettingUpFonts()
        {
            PrivateFonts = new PrivateFontCollection();
            PrivateFonts.AddFontFile(ThereIsConstants.Path.Datas_Path +
                                     ThereIsConstants.Path.DoubleSlash +
                                     MyRes.GetString(SAOFontFileNameInRes));
            PrivateFonts.AddFontFile(ThereIsConstants.Path.Datas_Path +
                                     ThereIsConstants.Path.DoubleSlash +
                                     MyRes.GetString(OldStoryFileNameInRes));


            /*
             * //Create your private font collection object.
             * PrivateFonts = new PrivateFontCollection();
             *
             * //Select your font from the resources.
             * //My font here is "Digireu.ttf"
             * int fontLength = Properties.Resources.SAOWelcomeTT_Bold.Length;
             *
             * // create a buffer to read in to
             * byte[] fontdata = Properties.Resources.SAOWelcomeTT_Bold;
             *
             * // create an unsafe memory block for the font data
             * IntPtr data = Marshal.AllocCoTaskMem(fontLength);
             *
             * // copy the bytes to the unsafe memory block
             * Marshal.Copy(fontdata, 0, data, fontLength);
             *
             * // pass the font to the font collection
             * PrivateFonts.AddMemoryFont(data, fontLength);
             */
        }
Exemplo n.º 3
0
        public override void Localize()
        {
            MyRes res = new MyRes("Designer,Toolbar,Layout");

            Text = res.Get("");

            SetItemText(btnAlignToGrid, res.Get("AlignToGrid"));
            SetItemText(btnLeft, res.Get("Left"));
            SetItemText(btnCenter, res.Get("Center"));
            SetItemText(btnRight, res.Get("Right"));
            SetItemText(btnTop, res.Get("Top"));
            SetItemText(btnMiddle, res.Get("Middle"));
            SetItemText(btnBottom, res.Get("Bottom"));
            SetItemText(btnSameWidth, res.Get("SameWidth"));
            SetItemText(btnSameHeight, res.Get("SameHeight"));
            SetItemText(btnSameSize, res.Get("SameSize"));
            SetItemText(btnSizeToGrid, res.Get("SizeToGrid"));
            SetItemText(btnSpaceHorizontally, res.Get("SpaceHorizontally"));
            SetItemText(btnIncreaseHorizontalSpacing, res.Get("IncreaseHorizontalSpacing"));
            SetItemText(btnDecreaseHorizontalSpacing, res.Get("DecreaseHorizontalSpacing"));
            SetItemText(btnRemoveHorizontalSpacing, res.Get("RemoveHorizontalSpacing"));
            SetItemText(btnSpaceVertically, res.Get("SpaceVertically"));
            SetItemText(btnIncreaseVerticalSpacing, res.Get("IncreaseVerticalSpacing"));
            SetItemText(btnDecreaseVerticalSpacing, res.Get("DecreaseVerticalSpacing"));
            SetItemText(btnRemoveVerticalSpacing, res.Get("RemoveVerticalSpacing"));
            SetItemText(btnCenterHorizontally, res.Get("CenterHorizontally"));
            SetItemText(btnCenterVertically, res.Get("CenterVertically"));
            SetItemText(btnBringToFront, res.Get("BringToFront"));
            SetItemText(btnSendToBack, res.Get("SendToBack"));
        }
Exemplo n.º 4
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,StandardReportWizard");

            Text = res.Get("");

            panGroups.Text            = res.Get("GroupsPage");
            lblCreateGroups.Text      = res.Get("CreateGroups");
            lblAvailableColumns1.Text = Res.Get("Forms,BaseReportWizard,AvailableColumns");
            lblGroups.Text            = res.Get("Groups");
            panLayout.Text            = res.Get("LayoutPage");
            lblLayout.Text            = res.Get("DefineLayout");
            gbOrientation.Text        = res.Get("Orientation");
            rbPortrait.Text           = res.Get("Portrait");
            rbLandscape.Text          = res.Get("Landscape");
            gbLayout.Text             = res.Get("Layout");
            rbTabular.Text            = res.Get("Tabular");
            rbColumnar.Text           = res.Get("Columnar");
            panStyle.Text             = res.Get("StylePage");
            lblStyles.Text            = res.Get("Styles");

            picIcon.Image      = ResourceLoader.GetBitmap("reportwizard.png");
            btnGroupUp.Image   = Res.GetImage(208);
            btnGroupDown.Image = Res.GetImage(209);
        }
Exemplo n.º 5
0
        public BarcodeObjectMenu(Designer designer) : base(designer)
        {
            FSelection = Designer.SelectedObjects;

            MyRes res = new MyRes("ComponentMenu,Barcode");

            miBarcodeType            = CreateMenuItem(res.Get("BarcodeType"));
            miBarcodeType.BeginGroup = true;
            miAutoSize                  = CreateMenuItem(res.Get("AutoSize"), new EventHandler(miAutoSize_Click));
            miAutoSize.BeginGroup       = true;
            miAutoSize.AutoCheckOnClick = true;
            miShowText                  = CreateMenuItem(res.Get("ShowText"), new EventHandler(miShowText_Click));
            miShowText.AutoCheckOnClick = true;

            int insertPos = Items.IndexOf(miCut);

            Items.Insert(insertPos, miBarcodeType);
            Items.Insert(insertPos + 1, miAutoSize);
            Items.Insert(insertPos + 2, miShowText);

            BarcodeObject barcode = FSelection[0] as BarcodeObject;

            CreateBarcodeTypes(barcode.Barcode);

            bool enabled = !barcode.HasRestriction(Restrictions.DontModify);

            miBarcodeType.Enabled = enabled;
            miAutoSize.Enabled    = enabled;
            miShowText.Enabled    = enabled;
            if (enabled)
            {
                miAutoSize.Checked = barcode.AutoSize;
                miShowText.Checked = barcode.ShowText;
            }
        }
Exemplo n.º 6
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,PageSetup");

            Text = res.Get("");

            pnPaper.Text   = res.Get("Paper");
            pnMargins.Text = res.Get("Margins");
            pnSource.Text  = res.Get("Source");
            pnColumns.Text = res.Get("Columns");
            pnOther.Text   = res.Get("Other");

            lblWidth.Text        = res.Get("Width");
            lblHeight.Text       = res.Get("Height");
            gbOrientation.Text   = res.Get("Orientation");
            rbPortrait.Text      = res.Get("Portrait");
            rbLandscape.Text     = res.Get("Landscape");
            lblLeft.Text         = res.Get("Left");
            lblRight.Text        = res.Get("Right");
            lblTop.Text          = res.Get("Top");
            lblBottom.Text       = res.Get("Bottom");
            cbMirrorMargins.Text = res.Get("MirrorMargins");
            lblFirstPage.Text    = res.Get("FirstPage");
            lblOtherPages.Text   = res.Get("OtherPages");
            lblCount.Text        = res.Get("Count");
            lblColumnWidth.Text  = res.Get("ColumnWidth");
            lblPositions.Text    = res.Get("Positions");
            lblDuplex.Text       = res.Get("Duplex");
            btnEdit.Text         = res.Get("EditWatermark");
            cbExtraWidth.Text    = res.Get("ExtraWidth");
        }
Exemplo n.º 7
0
        /// <inheritdoc/>
        public override void Localize()
        {
            MyRes res = new MyRes("Designer,ToolWindow,Dictionary");

            Text                       = res.Get("");
            btnActions.Text            = Res.Get("Buttons,Actions");
            btnEdit.Tooltip            = res.Get("Edit");
            btnDelete.Tooltip          = res.Get("Delete");
            btnView.Tooltip            = res.Get("View");
            miNew.Text                 = res.Get("New");
            miOpen.Text                = res.Get("Open");
            miMerge.Text               = res.Get("Merge");
            miSave.Text                = res.Get("Save");
            miChooseData.Text          = Res.Get("Designer,Menu,Data,Choose");
            miNewDataSource.Text       = res.Get("NewDataSource");
            miNewRelation.Text         = res.Get("NewRelation");
            miNewParameter.Text        = res.Get("NewParameter");
            miNewTotal.Text            = res.Get("NewTotal");
            miNewCalculatedColumn.Text = res.Get("NewCalculatedColumn");
            miRename.Text              = res.Get("Rename");
            miEdit.Text                = res.Get("Edit");
            miDelete.Text              = res.Get("Delete");
            miDeleteAlias.Text         = res.Get("DeleteAlias");
            miView.Text                = res.Get("View");
            UpdateTree();
        }
Exemplo n.º 8
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Export,Xps");

            Text = res.Get("");
        }
Exemplo n.º 9
0
            /// <summary>
            /// Creates a reference object which must be passed to the SwissQrCode instance
            /// </summary>
            /// <param name="referenceType">Type of the reference (QRR, SCOR or NON)</param>
            /// <param name="reference">Reference text</param>
            /// <param name="referenceTextType">Type of the reference text (QR-reference or Creditor Reference)</param>
            public Reference(ReferenceType referenceType, string reference, ReferenceTextType?referenceTextType)
            {
                MyRes res = new MyRes("Messages,Swiss");

                this.referenceType     = referenceType;
                this.referenceTextType = referenceTextType;

                if (referenceType == ReferenceType.NON && reference != null)
                {
                    throw new SwissQrCodeException(res.Get("SwissRefTypeNon"));
                }
                if (referenceType != ReferenceType.NON && reference != null && referenceTextType == null)
                {
                    throw new SwissQrCodeException(res.Get("SwissRefTextTypeNon"));
                }
                if (referenceTextType == ReferenceTextType.QrReference && reference != null && (reference.Length > 27))
                {
                    throw new SwissQrCodeException(res.Get("SwissRefQRLength"));
                }
                if (referenceTextType == ReferenceTextType.QrReference && reference != null && !Regex.IsMatch(reference, @"^[0-9]+$"))
                {
                    throw new SwissQrCodeException(res.Get("SwissRefQRNotOnlyDigits"));
                }
                if (referenceTextType == ReferenceTextType.QrReference && reference != null && !ChecksumMod10(reference))
                {
                    throw new SwissQrCodeException(res.Get("SwissRefQRCheckSum"));
                }
                if (referenceTextType == ReferenceTextType.CreditorReferenceIso11649 && reference != null && (reference.Length > 25))
                {
                    throw new SwissQrCodeException(res.Get("SwissRefISOLength"));
                }

                this.reference = reference;
            }
Exemplo n.º 10
0
        /// <summary>
        /// Initializes a new instance of the <b>TextObjectMenu</b>
        /// class with default settings.
        /// </summary>
        /// <param name="designer">The reference to a report designer.</param>
        public TextObjectMenu(Designer designer) : base(designer)
        {
            FTextObjects = new SelectedTextObjects(designer);
            FTextObjects.Update();

            MyRes res = new MyRes("ComponentMenu,TextObject");

            miClear                      = CreateMenuItem(res.Get("Clear"), new EventHandler(miClear_Click));
            miAutoWidth                  = CreateMenuItem(res.Get("AutoWidth"), new EventHandler(miAutoWidth_Click));
            miAutoWidth.BeginGroup       = true;
            miAutoWidth.AutoCheckOnClick = true;
            miWordWrap                   = CreateMenuItem(res.Get("WordWrap"), new EventHandler(miWordWrap_Click));
            miWordWrap.AutoCheckOnClick  = true;

            miAllowExpressions.BeginGroup = false;

            int insertPos = Items.IndexOf(miFormat) + 1;

            Items.Insert(insertPos, miClear);
            insertPos = Items.IndexOf(miAllowExpressions);
            Items.Insert(insertPos, miAutoWidth);
            Items.Insert(insertPos + 1, miWordWrap);

            bool enabled = FTextObjects.Enabled;

            miAutoWidth.Enabled = enabled;
            miWordWrap.Enabled  = enabled;

            TextObject obj = FTextObjects.First;

            miAutoWidth.Checked = obj.AutoWidth;
            miWordWrap.Checked  = obj.WordWrap;
        }
Exemplo n.º 11
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,Style");

            Text = res.Get("");

            gbStyles.Text  = res.Get("Styles");
            btnAdd.Text    = res.Get("Add");
            btnDelete.Text = res.Get("Delete");
            btnEdit.Text   = res.Get("Edit");
            btnUp.Image    = Res.GetImage(208);
            btnDown.Image  = Res.GetImage(209);
            btnLoad.Text   = res.Get("Load");
            btnSave.Text   = res.Get("Save");

            gbSettings.Text    = res.Get("Settings");
            btnBorder.Image    = Res.GetImage(36);
            btnBorder.Text     = res.Get("Border");
            btnFill.Image      = Res.GetImage(38);
            btnFill.Text       = res.Get("Fill");
            btnFont.Image      = Res.GetImage(59);
            btnFont.Text       = res.Get("Font");
            btnTextColor.Image = Res.GetImage(23);
            btnTextColor.Text  = res.Get("TextColor");
            FSample.Text       = Res.Get("Misc,Sample");
        }
Exemplo n.º 12
0
        public static string[] GetYValuesNames(SeriesChartType chartType)
        {
            MyRes res = new MyRes("Forms,ChartEditor,SeriesEditorControl,Data,SeriesValues");

            switch (chartType)
            {
            case SeriesChartType.Stock:
            case SeriesChartType.Candlestick:
                return(new string[] { res.Get("High"), res.Get("Low"), res.Get("Open"), res.Get("Close") });

            case SeriesChartType.Range:
            case SeriesChartType.RangeBar:
            case SeriesChartType.RangeColumn:
            case SeriesChartType.SplineRange:
                return(new string[] { res.Get("RangeBegin"), res.Get("RangeEnd") });

            case SeriesChartType.Bubble:
                return(new string[] { res.Get("YValue"), res.Get("Size") });

            case SeriesChartType.PointAndFigure:
                return(new string[] { res.Get("YValue1"), res.Get("YValue2") });
            }

            return(new string[] { res.Get("YValue") });
        }
Exemplo n.º 13
0
        private void LocalizeMenuItems()
        {
            if (miViewGrid != null)
            {
                MyRes res = new MyRes("Designer,Menu,View");
                miViewGrid.Text          = res.Get("Grid");
                miViewGuides.Text        = res.Get("Guides");
                miViewAutoGuides.Text    = res.Get("AutoGuides");
                miViewDeleteHGuides.Text = res.Get("DeleteHGuides");
                miViewDeleteVGuides.Text = res.Get("DeleteVGuides");
                miViewUnits.Text         = res.Get("Units");

                res = new MyRes("Forms,ReportPageOptions");
                miViewUnitsMillimeters.Text     = res.Get("Millimeters");
                miViewUnitsCentimeters.Text     = res.Get("Centimeters");
                miViewUnitsInches.Text          = res.Get("Inches");
                miViewUnitsHundrethsOfInch.Text = res.Get("HundrethsOfInch");

                res = new MyRes("Designer,Menu,Report");
                miReportBands.Text       = res.Get("Bands");
                miReportGroupExpert.Text = res.Get("GroupExpert");
                miReportStyles.Text      = res.Get("Styles");

                res = new MyRes("Objects,Bands");
                miReportTitle.Text   = res.Get("ReportTitle");
                miReportSummary.Text = res.Get("ReportSummary");
                miPageHeader.Text    = res.Get("PageHeader");
                miPageFooter.Text    = res.Get("PageFooter");
                miColumnHeader.Text  = res.Get("ColumnHeader");
                miColumnFooter.Text  = res.Get("ColumnFooter");
                miOverlay.Text       = res.Get("Overlay");
            }
        }
Exemplo n.º 14
0
        private void Localize()
        {
            MyRes res = new MyRes("ConnectionEditors,OleDb");

            gbConnection.Text = res.Get("ConnectionString");
            btnBuild.Text     = res.Get("Build");
        }
Exemplo n.º 15
0
        //-------------------------------------------------
        #region TheFirstChurch Showing Design Region
        /// <summary>
        /// Use this method when player has already selected his
        /// Kingdom and he wants to See The Part: discussion In The Church
        /// or he just
        /// logged in to the game and you want him
        /// to See The Part: discussion In The Church.
        /// </summary>
        /// <param name="justLogin"></param>
        public void ShowFirstChurch(bool justLogin = false)
        {
            if (justLogin)
            {
                this.GameCurrentMusic.Next(Album.GenerateAlbum(
                                               wotoMusic.GenerateWotoMusic(Musics.FirstChurchMusic)
                                               ), true);
                //this.GameCurrentMusic.PlayLooping();
                this.BackgroundImage = Image.FromFile(ThereIsConstants.Path.Datas_Path + "\\" +
                                                      MyRes.GetString(FirstChurchBGMFileNameInRes));
            }
            else
            {
                this.TheMap.DisposeAllElements();
                this.GameCurrentMusic.Next(Album.GenerateAlbum(
                                               wotoMusic.GenerateWotoMusic(Musics.FirstChurchMusic)), true);
                //this.GameCurrentMusic.PlayLooping();
                this.BackgroundImage = Image.FromFile(ThereIsConstants.Path.Datas_Path + "\\" +
                                                      MyRes.GetString(FirstChurchBGMFileNameInRes));
            }
            DialogContext myCon = new DialogContext(Dialogs.Dialog1_1_4);

            this.IsShowingDialogBox = true;
            this.DialogBoxProvider  = new DialogBoxProvider(this.Controls, ref myCon);
            this.DialogBoxProvider.AfterDialogEndedEvent += FirstChurch_AfterDialogEndedEvent;
            this.DialogBoxProvider.SettingUpDialogWorks();
        }
Exemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HTMLExport"/> class.
 /// </summary>
 public HTMLExport()
 {
     Zoom               = 1.0f;
     HasMultipleFiles   = true;
     layers             = false;
     wysiwyg            = true;
     pictures           = true;
     webMode            = false;
     subFolder          = true;
     navigator          = true;
     singlePage         = false;
     widthUnits         = HtmlSizeUnits.Pixel;
     heightUnits        = HtmlSizeUnits.Pixel;
     imageFormat        = ImageFormat.Png;
     templates          = new HtmlTemplates();
     format             = HTMLExportFormat.HTML;
     prevStyleList      = null;
     prevStyleListIndex = 0;
     pageBreaks         = true;
     print              = false;
     preview            = false;
     saveStreams        = false;
     numberFormat       = new NumberFormatInfo();
     numberFormat.NumberGroupSeparator   = String.Empty;
     numberFormat.NumberDecimalSeparator = ".";
     exportMode = ExportType.Export;
     res        = new MyRes("Export,Html");
 }
Exemplo n.º 17
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,PrinterSetup");

            Text                 = res.Get("PrinterSetup");
            gbPrinter.Text       = res.Get("Printer");
            cbSavePrinter.Text   = res.Get("SavePrinter");
            btnSettings.Text     = res.Get("Settings");
            cbPrintToFile.Text   = res.Get("PrintToFile");
            gbPageRange.Text     = res.Get("PageRange");
            rbAll.Text           = res.Get("All");
            rbCurrent.Text       = res.Get("Current");
            rbNumbers.Text       = res.Get("Numbers");
            lblHint.Text         = res.Get("Hint");
            gbCopies.Text        = res.Get("Copies");
            lblCount.Text        = res.Get("Count");
            cbCollate.Text       = res.Get("Collate");
            gbOther.Text         = res.Get("Other");
            lblOddEven.Text      = res.Get("OddEven");
            lblOrder.Text        = res.Get("Order");
            lblDuplex.Text       = res.Get("Duplex");
            lblSource.Text       = res.Get("Source");
            gbPrintMode.Text     = res.Get("PrintMode");
            lblPrintOnSheet.Text = res.Get("PrintOnSheet");
            lblPagesOnSheet.Text = res.Get("PagesOnSheet");
        }
Exemplo n.º 18
0
        /// <inheritdoc/>
        public void Localize()
        {
            MyRes res = new MyRes("Designer,Toolbar,Objects");

            Text = res.Get("");
            btnSelect.Tooltip = res.Get("Select");
        }
Exemplo n.º 19
0
        public MatrixObjectMenu(Designer designer) : base(designer)
        {
            FMatrix = Designer.SelectedObjects[0] as MatrixObject;
            MyRes res = new MyRes("ComponentMenu,MatrixObject");

            miAutoSize                         = CreateMenuItem(Res.Get("ComponentMenu,TableRow,AutoSize"), new EventHandler(miAutoSize_Click));
            miAutoSize.BeginGroup              = true;
            miAutoSize.AutoCheckOnClick        = true;
            miShowTitle                        = CreateMenuItem(res.Get("ShowTitle"), new EventHandler(miShowTitle_Click));
            miShowTitle.AutoCheckOnClick       = true;
            miCellsSideBySide                  = CreateMenuItem(res.Get("CellsSideBySide"), new EventHandler(miCellsSideBySide_Click));
            miCellsSideBySide.AutoCheckOnClick = true;
            miStyle            = CreateMenuItem(Res.GetImage(87), res.Get("Style"), null);
            miStyle.BeginGroup = true;

            int insertIndex = Items.IndexOf(miRepeatHeaders);

            Items.Insert(insertIndex, miAutoSize);
            Items.Insert(insertIndex + 1, miShowTitle);
            Items.Insert(insertIndex + 3, miCellsSideBySide);
            Items.Insert(insertIndex + 4, miStyle);

            miRepeatHeaders.BeginGroup = false;
            miCanBreak.Visible         = false;
            miGrowToBottom.Visible     = false;

            miAutoSize.Checked        = FMatrix.AutoSize;
            miShowTitle.Checked       = FMatrix.ShowTitle;
            miCellsSideBySide.Checked = FMatrix.CellsSideBySide;
            BuildStyleMenu();
        }
Exemplo n.º 20
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,WatermarkEditor");

            Text           = res.Get("");
            cbEnabled.Text = res.Get("Enabled");
            pgText.Text    = res.Get("Text");
            lblText.Text   = res.Get("Text");
            cbxText.Items.AddRange(res.Get("TextItems").Split(new char[] { ',' }));
            cbxText.Items.Add("[COPYNAME#]");
            lblRotation.Text = res.Get("Rotation");
            cbxRotation.Items.AddRange(new string[] {
                res.Get("Horizontal"), res.Get("Vertical"), res.Get("ForwardDiagonal"), res.Get("BackwardDiagonal")
            });
            btnFont.Text   = res.Get("Font");
            btnColor.Text  = res.Get("Color");
            pgPicture.Text = res.Get("Picture");
            btnLoad.Text   = res.Get("Load");
            btnClear.Text  = res.Get("Clear");
            lblSize.Text   = res.Get("Size");
            cbxSize.Items.AddRange(new string[] {
                res.Get("Normal"), res.Get("Center"), res.Get("Stretch"), res.Get("Zoom"), res.Get("Tile")
            });
            lblTransparency.Text = res.Get("Transparency");
            gbZorder.Text        = res.Get("Zorder");
            cbTextOnTop.Text     = res.Get("TextOnTop");
            cbPictureOnTop.Text  = res.Get("PictureOnTop");
            cbApplyToAll.Text    = res.Get("ApplyToAll");

            btnFont.Image  = Res.GetImage(59);
            btnColor.Image = Res.GetImage(23);
            btnLoad.Image  = Res.GetImage(1);
            btnClear.Image = Res.GetImage(51);
        }
Exemplo n.º 21
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,HighlightEditor");

            Text = res.Get("");

            gbConditions.Text = res.Get("Conditions");
            btnAdd.Text       = res.Get("Add");
            btnDelete.Text    = res.Get("Delete");
            btnEdit.Text      = res.Get("Edit");
            btnUp.Image       = Res.GetImage(208);
            btnDown.Image     = Res.GetImage(209);

            gbStyle.Text       = res.Get("Style");
            btnBorder.Image    = Res.GetImage(36);
            btnBorder.Text     = Res.Get("Forms,Style,Border");
            btnFill.Image      = Res.GetImage(38);
            btnFill.Text       = res.Get("Fill");
            btnTextColor.Image = Res.GetImage(23);
            btnTextColor.Text  = res.Get("TextColor");
            btnFont.Text       = res.Get("Font");
            btnFont.Image      = Res.GetImage(59);
            cbVisible.Text     = res.Get("Visible");
        }
Exemplo n.º 22
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,SelectDataSource");

            Text = res.Get("");
        }
Exemplo n.º 23
0
 /// <summary>
 /// Set the <see cref="PictureBox.Image"/> Property with
 /// <see cref="Control.Name"/> propert (It should return the Image name in the Data folder.)
 /// look: <see cref="PictureBoxControl.MyRes"/>.
 /// </summary>
 public void SetPicture()
 {
     if (HasIcon && TheIcon != null)
     {
         this.ElementImage = this.OriginalImage =
             TheIcon.OriginalImage;
     }
     else
     {
         if (!DontUseClickedImage)
         {
             this.OriginalImage = Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                                 ThereIsConstants.Path.DoubleSlash +
                                                 MyRes.GetString(
                                                     MyRes.GetString(Name) + ThereIsConstants.ResourcesName.Separate_Character +
                                                     ThereIsConstants.AppSettings.Language +
                                                     this.CurrentStatus.ToString()));
             this.ElementImage = OriginalImage;
         }
         else
         {
             this.ElementImage = Image.FromFile(ThereIsConstants.Path.Datas_Path +
                                                ThereIsConstants.Path.DoubleSlash +
                                                MyRes.GetString(
                                                    MyRes.GetString(Name) + ThereIsConstants.ResourcesName.Separate_Character +
                                                    ThereIsConstants.AppSettings.Language +
                                                    this.CurrentStatus.ToString()));
         }
     }
 }
Exemplo n.º 24
0
        //-------------------------------------------------
        #region mrwoto Designing Region

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            this.components    = new System.ComponentModel.Container();
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Size          = Screen.PrimaryScreen.Bounds.Size;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true);
            this.BackgroundImageLayout = ImageLayout.Stretch;
            this.SetAutoSizeMode(AutoSizeMode.GrowAndShrink);
            this.KeyPreview      = true;
            this.FormBorderStyle = FormBorderStyle.None;
            this.BackColor       = Color.Black;
            this.MyRes           = new WotoRes(typeof(MainForm));
            this.BackgroundImage = (Image)MyRes.GetObject(EntryPicNameInRes +
                                                          ((DateTime.Now.Second % EntryCount)).ToString());
            this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
            SettingUpFonts();
            //-----------------------------------
            this.FirstLabel  = new GameControls.LabelControl(this);
            this.SoundPlayer = new SoundPlayer(this, this);
            //-----------------------------------
            //Names:
            this.FirstLabel.SetLabelName(FirstLabelNameInRes);
            //TabIndexes:
            this.FirstLabel.TabIndex = 0;
            //FontAndTextAligns:
            this.FirstLabel.Font = new Font(PrivateFonts.Families[1]
                                            , 19, FontStyle.Bold);
            this.FirstLabel.TextAlign = ContentAlignment.MiddleCenter;
            //Sizes:
            this.FirstLabel.Size =
                new Size(Width / 6, Height / 6);
            //Locations:
            this.FirstLabel.Location = new Point((Width - FirstLabel.Width) -
                                                 (2 * SandBoxBase.from_the_edge),
                                                 (Height - FirstLabel.Height) - SandBoxBase.from_the_edge);
            //Colors:
            this.FirstLabel.ForeColor = Color.DarkSeaGreen;
            this.FirstLabel.BackColor = Color.Transparent;
            //ComboBoxes:
            //Enableds:
            //Texts:
            this.FirstLabel.SetLabelText();
            //MessageBox.Show(FirstLabel.Name);
            this.Text = "-- Sword Art Online --";
            //AddRanges:
            //ToolTipSettings:
            //-----------------------------------
            //Events:
            this.KeyDown  += MainForm_KeyDown;
            this.Shown    += MainForm_Shown;
            this.GotFocus += MainForm_GotFocus;
            this.KeyDown  += Form1_KeyDown;
            this.Closing  += MainForm_Closing;
            //----------------------------------
            //Controls:
            //----------------------------------
            this.ResumeLayout();
        }
Exemplo n.º 25
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,TextEditor");

            Text            = res.Get("");
            cbWordWrap.Text = res.Get("WordWrap");
        }
Exemplo n.º 26
0
        public override void Localize()
        {
            base.Localize();
            MyRes res = new MyRes("Forms,AskPassword");

            Text             = res.Get("");
            lblPassword.Text = res.Get("Password");
        }
Exemplo n.º 27
0
        private void UpdateControls()
        {
            MyRes res = new MyRes("Forms,PrinterSetup");

            // Printer
            string savePrinter = FPrinterSettings.PrinterName;

            FPrinterSettings.PrinterName = Report.PrintSettings.Printer;
            if (!FPrinterSettings.IsValid)
            {
                FPrinterSettings.PrinterName = savePrinter;
            }
            foreach (string printer in PrinterSettings.InstalledPrinters)
            {
                cbxPrinter.Items.Add(printer);
            }
            cbxPrinter.SelectedItem = FPrinterSettings.PrinterName;
            cbSavePrinter.Checked   = Report.PrintSettings.SavePrinterWithReport;
            cbPrintToFile.Checked   = Report.PrintSettings.PrintToFile;

            // Page range
            rbAll.Checked     = Report.PrintSettings.PageRange == PageRange.All;
            rbCurrent.Checked = Report.PrintSettings.PageRange == PageRange.Current;
            rbNumbers.Checked = Report.PrintSettings.PageRange == PageRange.PageNumbers;
            tbNumbers.Text    = Report.PrintSettings.PageNumbers;

            // Copies
            udCount.Value     = Report.PrintSettings.Copies;
            cbCollate.Checked = Report.PrintSettings.Collate;

            // Other
            cbxOddEven.Items.Add(res.Get("AllPages"));
            cbxOddEven.Items.Add(res.Get("OddPages"));
            cbxOddEven.Items.Add(res.Get("EvenPages"));
            cbxOddEven.SelectedIndex = (int)Report.PrintSettings.PrintPages;

            cbxOrder.Items.Add(res.Get("OrderDirect"));
            cbxOrder.Items.Add(res.Get("OrderReverse"));
            cbxOrder.SelectedIndex = Report.PrintSettings.Reverse ? 1 : 0;

            cbxDuplex.Items.Add(Res.Get("Forms,PageSetup,DupDefault"));
            cbxDuplex.Items.Add(Res.Get("Forms,PageSetup,DupSimplex"));
            cbxDuplex.Items.Add(Res.Get("Forms,PageSetup,DupVertical"));
            cbxDuplex.Items.Add(Res.Get("Forms,PageSetup,DupHorizontal"));
            cbxDuplex.SelectedIndex = Report.PrintSettings.Duplex == Duplex.Default ? 0 : (int)Report.PrintSettings.Duplex;

            // Print mode
            cbxPrintMode.Items.Add(res.Get("PrintModeDefault"));
            cbxPrintMode.Items.Add(res.Get("PrintModeSplit"));
            cbxPrintMode.Items.Add(res.Get("PrintModeScale"));
            cbxPrintMode.SelectedIndex = (int)Report.PrintSettings.PrintMode;

            cbxPagesOnSheet.Items.Add(res.Get("PagesOnSheet1"));
            cbxPagesOnSheet.Items.Add(res.Get("PagesOnSheet2"));
            cbxPagesOnSheet.Items.Add(res.Get("PagesOnSheet4"));
            cbxPagesOnSheet.Items.Add(res.Get("PagesOnSheet8"));
            cbxPagesOnSheet.SelectedIndex = (int)Report.PrintSettings.PagesOnSheet;
        }
Exemplo n.º 28
0
        public override void Init(ExportBase export)
        {
            base.Init(export);
            TextExport textExport = Export as TextExport;

            report = textExport.Report;

            ProfessionalColorTable vs2005ColorTable = new ProfessionalColorTable();

            vs2005ColorTable.UseSystemColors = true;
            toolStrip.Renderer = new ToolStripProfessionalRenderer(vs2005ColorTable);

            cbPageBreaks.Checked = textExport.PageBreaks;
            cbEmptyLines.Checked = textExport.EmptyLines;
            if (textExport.Frames && textExport.TextFrames)
            {
                cbbFrames.SelectedIndex = 1;
            }
            else if (textExport.Frames && !textExport.TextFrames)
            {
                cbbFrames.SelectedIndex = 2;
            }
            else
            {
                cbbFrames.SelectedIndex = 0;
            }
            cbDataOnly.Checked = textExport.DataOnly;
            if (textExport.Encoding == Encoding.Default)
            {
                cbbCodepage.SelectedIndex = 0;
            }
            else if (textExport.Encoding == Encoding.UTF8)
            {
                cbbCodepage.SelectedIndex = 1;
            }
            else if (textExport.Encoding == Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage))
            {
                cbbCodepage.SelectedIndex = 2;
            }
            udX.Value = (decimal)textExport.ScaleX;
            udY.Value = (decimal)textExport.ScaleY;

            udX.ValueChanged += new EventHandler(udX_ValueChanged);
            udY.ValueChanged += new EventHandler(udX_ValueChanged);
            cbbFrames.SelectedIndexChanged += new EventHandler(cbbFrames_SelectedIndexChanged);

            MyRes res = new MyRes("Preview");

            tbPage.Text        = "1";
            prevPage           = 1;
            lblTotalPages.Text = String.Format(Res.Get("Misc,ofM"), report.PreparedPages.Count);

            cbFontSize.SelectedIndex = 4;

            previewExport             = new TextExport();
            previewExport.PreviewMode = true;
            CalcScale();
        }
Exemplo n.º 29
0
        private void Localize()
        {
            tab1.Text = Res.Get("Forms,DialogPageOptions");
            MyRes res = new MyRes("Forms,ReportPageOptions");

            cbShowGrid.Text   = res.Get("ShowGrid");
            cbSnapToGrid.Text = res.Get("SnapToGrid");
            lblSnapSize.Text  = res.Get("Size");
        }
Exemplo n.º 30
0
 //-------------------------------------------------
 #region Constructors Region
 /// <summary>
 /// Look, you should use the character blank name +
 /// <see cref="DialogContext.CharacterNameSeparater"/> +
 /// Status. so I can set <see cref="Character.CharacterBlankName"/>
 /// in this characterInfo.
 /// </summary>
 /// <param name="CharNameValue"></param>
 public CharacterInfo(string CharNameValue)
 {
     string[] myStrings =
         CharNameValue.Split(DialogContext.CharacterNameSeparater.ToCharArray(),
                             StringSplitOptions.RemoveEmptyEntries);
     CharacterName      = myStrings[0] + myStrings[1];
     CharacterBlankName = MyRes.GetString(strName: CharacterName);
     Status             = Convert.ToUInt32(myStrings[1]);
 }