Example #1
0
        public HyPanel()
        {
            InitializeComponent();

            conf_compiler = new CompilerConf();
            conf_compiler.compilerPath = @"C:\proj\hayat\vcproj\hayatc.exe";
            conf_compiler.memSize = 16;
            conf_compiler.inputCharset = "SJIS";
            conf_compiler.outputCharset = "SJIS";
            conf_compiler.includePaths = new string[] {
                @"C:\proj\hayat\hyznlib\hyznlib\out",
                @"C:\proj\hayat\stdlib\out"
            };
            conf_compiler.warnLabelScope = 0;
            conf_compiler.warnLabelLevel = 1;
            conf_compiler.warnNumsayLimit = 0;
            conf_compiler.warnNumsayLevel = 0;
            conf_compiler.warnUnknownLevel = 1;
            conf_compiler.flagVerbose = false;
            conf_compiler.flagPrintSyntaxTree = false;
            conf_compiler.debugPrintParse = 0;

            conf_engine = new EngineConf();
            conf_engine.memSize = 16;
            conf_engine.debugMemSize = 16;
            conf_engine.flagReadDebugInfo = true;
            conf_engine.includePaths = new string[] {
                @"C:\proj\hayat\hyznlib\hyznlib\out",
                @"C:\proj\hayat\stdlib\out"
            };
            conf_engine.additionalPATH = new string[] {};

            m_engineOptionDialog = new EngineOption();
            m_engineOptionDialog.OK += this.engineOptionDialog_OK_Click;

            m_compileOptionDialog = new CompileOption();
            m_compileOptionDialog.OK += this.compileOptionDialog_OK_Click;

            m_scriptThread = null;

            // Console出力をTextBoxに書き出す
            Encoding enc = Encoding.GetEncoding("UTF-8");
            StreamWriter sw = new StreamWriter(new TextBoxStream(logBox, enc));
            sw.AutoFlush = true;
            TextWriter tw = TextWriter.Synchronized(sw);
            m_tw = tw;
            Console.SetOut(tw);

            Console.WriteLine("HyPanel起動");

            // DLL側の標準出力/標準エラー出力をConsoleにリダイレクトする
            HyW32.redirectStdOutputs();
        }
Example #2
0
 private void openConfDialog_FileOk(object sender, CancelEventArgs e)
 {
     if (String.IsNullOrEmpty(openConfDialog.FileName)) {
         return;
     }
     Console.Write("環境を {0} からロード", openConfDialog.FileName);
     try {
         TextReader rd = new StreamReader(openConfDialog.FileName);
         XmlSerializer ser = new XmlSerializer(typeof(Confs));
         Confs confs = (Confs)ser.Deserialize(rd);
         rd.Close();
         conf_compiler = confs.conf_compiler;
         conf_engine = confs.conf_engine;
         hayatFileName.Text = confs.conf_panel.scriptPath;
         checkBox_initOnReload.Checked = confs.conf_panel.flagInitOnReload;
     } catch {
         Console.WriteLine("... 失敗");
         return;
     }
     Console.WriteLine("... 成功");
     saveConfDialog.FileName = openConfDialog.FileName;
 }
Example #3
0
 private void engineOptionDialog_OK_Click()
 {
     conf_engine = m_engineOptionDialog.conf;
 }