public CharacterWidthCache(WordWrapOptionsOld options)
 {
     templateFontName = options.TemplateFontName;
     templateFontSize = options.TemplateFontSize;
     templateFontBold = options.TemplateFontBold;
     kanjiWidthRaw    = options.TemplateKanjiWidth;
     Init();
 }
Beispiel #2
0
        void item_Click(object sender, EventArgs e)
        {
            var    item = (ToolStripItem)sender;
            var    otherWordWrapOptions = new WordWrapOptionsOld();
            string path = "WordWrapOptions\\" + item.Tag;

            RegistryUtility.GetObject(path, otherWordWrapOptions);
            this.WordWrapOptions.AssignFrom(otherWordWrapOptions);
            this.bindingSource.ResetBindings(false);
        }
 public Replacer(AinFile ainFile, string outputFileName, WordWrapOptionsOld wordWrapOptions)
 {
     this.ainFile         = ainFile;
     this.originalAinFile = ainFile;
     this.outputFileName  = outputFileName;
     this.wordWrapOptions = wordWrapOptions;
     if (this.wordWrapOptions != null)
     {
         this.WordWrap    = true;
         this.wordWrapper = new WordWrapperOld(ainFile, wordWrapOptions);
     }
 }
Beispiel #4
0
        public WordWrapperOld(AinFile ainFile, WordWrapOptionsOld wordWrapOptions)
        {
            this.wordWrapOptions = wordWrapOptions;
            characterWidthCache  = new CharacterWidthCache(wordWrapOptions);
            this.ainFile         = ainFile;

            //this.NextLineFunctionName = "R";
            //this.NextLineFunctionCode = " CALLFUNC R ";
            //this.ReduceMarginFunctionName = "顔";
            //this.NextMessageFunctionName = "A";
            //this.NextMessageFunctionCode = " S_PUSH \"\"" + Environment.NewLine +
            //    "\t" + " CALLFUNC A ";
            //this.MaxCharactersPerLineNormal = 56 + 1; //one more
            //this.MaxCharactersPerLineReduced = 41 + 1; //one more
            //this.MaxLinesPerMessage = 3;

            this.maxCharactersPerLine = this.MaxCharactersPerLineNormal;
        }
Beispiel #5
0
 public WordWrapForm(WordWrapOptionsOld wordWrapOptions) : this()
 {
     this.WordWrapOptions = wordWrapOptions;
 }