コード例 #1
0
ファイル: ttcmn.cs プロジェクト: h7ga40/PeachCamWin
 internal static void ChangeDefaultSet(TTTSet ts, TKeyMap km)
 {
     if ((ts != null) &&
         (String.Compare(ts.SetupFName, pm.ts.SetupFName, true) == 0))
     {
         ts.CopyTo(pm.ts);
     }
     if (km != null)
     {
         km.CopyTo(pm.km);
     }
 }
コード例 #2
0
ファイル: ttcmn.cs プロジェクト: h7ga40/PeachCamWin
        internal static bool StartTeraTerm(TTTSet ts)
        {
            string Temp;

            if (FirstInstance)
            {
                // init window list
                pm.NWin = 0;
            }
            else
            {
                /* only the first instance uses saved position */
                pm.ts.VTPos.X  = CW_USEDEFAULT;
                pm.ts.VTPos.Y  = CW_USEDEFAULT;
                pm.ts.TEKPos.X = CW_USEDEFAULT;
                pm.ts.TEKPos.Y = CW_USEDEFAULT;
            }

            pm.ts.CopyTo(ts);

            // if (FirstInstance) { の部分から移動 (2008.3.13 maya)
            // 起動時には、共有メモリの HomeDir と SetupFName は空になる
            /* Get home directory */
            ts.HomeDir = Path.GetDirectoryName(Application.ExecutablePath);
            Environment.CurrentDirectory = ts.HomeDir;

            if (FirstInstance)
            {
                FirstInstance = false;
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
ファイル: ttwinman.cs プロジェクト: h7ga40/PeachCamWin
 internal void Init(ProgramDatas datas)
 {
     ts = datas.TTTSet;
 }
コード例 #4
0
ファイル: keyboard.cs プロジェクト: h7ga40/PeachCamWin
 internal void Init(ProgramDatas datas)
 {
     ttwinman = datas.ttwinman;
     ts       = datas.TTTSet;
     cv       = datas.TComVar;
 }
コード例 #5
0
 internal static bool ChooseFontDlg(System.Windows.Forms.Control control, System.Drawing.Font VTlf, TTTSet ts)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
ファイル: commlib.cs プロジェクト: h7ga40/PeachCamWin
 internal static void CommResetSerial(ref TTTSet ts, ref TComVar cv, bool p)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
        internal static void ReadIniFile(string p, TTTSet ts)
        {
            ts.Minimize   = 0;
            ts.HideWindow = 0;
            ts.LogFlag    = 0;                  // Log flags
            ts.FTFlag     = 0;                  // File transfer flags
            ts.MenuFlag   = 0;                  // Menu flags
            ts.TermFlag   = 0;                  // Terminal flag
            ts.ColorFlag  = 0;                  // ANSI/Attribute color flags
            ts.FontFlag   = 0;                  // Font flag
            ts.PortFlag   = 0;                  // Port flags
            ts.WindowFlag = 0;                  // Window flags
            ts.TelPort    = 23;

            ts.DisableTCPEchoCR = false;

            /* VT terminal size  */
            ts.TerminalWidth  = 80;
            ts.TerminalHeight = 24;

            /* Terminal size = Window size */
            ts.TermIsWin = true;

            /* Auto window resize flag */
            ts.AutoWinResize = true;

            /* CR Receive */
            ts.CRReceive = NewLineModes.IdCR;
            /* CR Send */
            ts.CRSend     = NewLineModes.IdCR;
            ts.CRSend_ini = ts.CRSend;

            /* Local echo */
            ts.LocalEcho     = false;
            ts.LocalEcho_ini = false;

            /* Answerback */
            ts.AnswerbackLen = 0;

            /* Cursor shape */
            ts.CursorShape = CursorShapes.IdBlkCur;

            /* xterm style 256 colors mode */
            ts.ColorFlag |= ColorFlags.CF_XTERM256;

            /* Enable scroll buffer */
            ts.EnableScrollBuff = 1;

            /* Scroll buffer size */
            ts.ScrollBuffMax = 10000;

            /* VT Color */
            ts.VTColor[0] = Color.Black;
            ts.VTColor[1] = Color.White;

            /* VT Bold Color */
            ts.VTBoldColor[0] = Color.Blue;
            ts.VTBoldColor[1] = Color.White;
            //ts.ColorFlag |= AnsiAttributeColorFlags.CF_BOLDCOLOR;

            /* VT Blink Color */
            ts.VTBlinkColor[0] = Color.Red;
            ts.VTBlinkColor[1] = Color.White;
            //ts.ColorFlag |= AnsiAttributeColorFlags.CF_BLINKCOLOR;

            /* VT Reverse Color */
            ts.VTReverseColor[0] = Color.White;
            ts.VTReverseColor[1] = Color.Black;
            //ts.ColorFlag |= AnsiAttributeColorFlags.CF_REVERSECOLOR;

            /* ANSI color */
            ts.ANSIColor[(int)ColorCodes.IdBack]        = Color.FromArgb(0, 0, 0);
            ts.ANSIColor[(int)ColorCodes.IdRed]         = Color.FromArgb(255, 0, 0);
            ts.ANSIColor[(int)ColorCodes.IdGreen]       = Color.FromArgb(0, 255, 0);
            ts.ANSIColor[(int)ColorCodes.IdYellow]      = Color.FromArgb(255, 255, 0);
            ts.ANSIColor[(int)ColorCodes.IdBlue]        = Color.FromArgb(0, 0, 255);
            ts.ANSIColor[(int)ColorCodes.IdMagenta]     = Color.FromArgb(255, 0, 255);
            ts.ANSIColor[(int)ColorCodes.IdCyan]        = Color.FromArgb(0, 255, 255);
            ts.ANSIColor[(int)ColorCodes.IdFore]        = Color.FromArgb(255, 255, 255);
            ts.ANSIColor[(int)ColorCodes.IdBack + 8]    = Color.FromArgb(128, 128, 128);
            ts.ANSIColor[(int)ColorCodes.IdRed + 8]     = Color.FromArgb(128, 0, 0);
            ts.ANSIColor[(int)ColorCodes.IdGreen + 8]   = Color.FromArgb(0, 128, 0);
            ts.ANSIColor[(int)ColorCodes.IdYellow + 8]  = Color.FromArgb(128, 128, 0);
            ts.ANSIColor[(int)ColorCodes.IdBlue + 8]    = Color.FromArgb(0, 0, 128);
            ts.ANSIColor[(int)ColorCodes.IdMagenta + 8] = Color.FromArgb(128, 0, 128);
            ts.ANSIColor[(int)ColorCodes.IdCyan + 8]    = Color.FromArgb(0, 128, 128);
            ts.ANSIColor[(int)ColorCodes.IdFore + 8]    = Color.FromArgb(192, 192, 192);
            ts.ColorFlag |= ColorFlags.CF_ANSICOLOR;

            /* VT Font */
            //ts.VTFont = new Font("Terminal", 10);

            /* Bold font flag */
            ts.FontFlag |= FontFlags.FF_BOLD;

            /* BS key */
            ts.BSKey = DelId.IdBS;

            /* IME Flag  -- special option */
            ts.UseIME = true;

            /* IME-inline Flag  -- special option */
            ts.IMEInline = true;

            // フォーカス無効時のポリゴンカーソル (2008.1.24 yutaka)
            ts.KillFocusCursor = true;

            ts.MouseCursorName = Cursors.IBeam;
        }
コード例 #8
0
ファイル: tttypes.cs プロジェクト: h7ga40/PeachCamWin
 internal void CopyTo(TTTSet dest)
 {
     dest.HomeDir    = HomeDir;
     dest.SetupFName = SetupFName;
     dest.KeyCnfFN   = KeyCnfFN;
     dest.VTPos      = VTPos;
     dest.VTFont     = VTFont;
     System.Buffer.BlockCopy(PrnFont, 0, dest.PrnFont, 0, PrnFont.Length);
     System.Buffer.BlockCopy(PrnMargin, 0, dest.PrnMargin, 0, PrnMargin.Length);
     System.Buffer.BlockCopy(PrnDev, 0, dest.PrnDev, 0, PrnDev.Length);
     dest.FontFlag = FontFlag;
     dest.LogFlag  = LogFlag;
     dest.FTFlag   = FTFlag;
     System.Buffer.BlockCopy(FileDir, 0, dest.FileDir, 0, FileDir.Length);
     System.Buffer.BlockCopy(FileSendFilter, 0, dest.FileSendFilter, 0, FileSendFilter.Length);
     System.Buffer.BlockCopy(DelimList, 0, dest.DelimList, 0, DelimList.Length);
     dest.Minimize       = Minimize;
     dest.HideWindow     = HideWindow;
     dest.MenuFlag       = MenuFlag;
     dest.TerminalWidth  = TerminalWidth;
     dest.TerminalHeight = TerminalHeight;
     dest.CRSend         = CRSend;
     dest.CRReceive      = CRReceive;
     dest.LocalEcho      = LocalEcho;
     System.Buffer.BlockCopy(Answerback, 0, dest.Answerback, 0, Answerback.Length);
     dest.AnswerbackLen = AnswerbackLen;
     dest.TermFlag      = TermFlag;
     dest.VTFlag        = VTFlag;
     System.Buffer.BlockCopy(TmpColor, 0, dest.TmpColor, 0, TmpColor.Length);
     System.Buffer.BlockCopy(Title, 0, dest.Title, 0, Title.Length);
     dest.CursorShape       = CursorShape;
     dest.NonblinkingCursor = NonblinkingCursor;
     dest.EnableScrollBuff  = EnableScrollBuff;
     dest.ScrollBuffSize    = ScrollBuffSize;
     dest.ScrollBuffMax     = ScrollBuffMax;
     dest.ColorFlag         = ColorFlag;
     BlockCopy(VTColor, 0, dest.VTColor, 0, VTColor.Length);
     BlockCopy(TEKColor, 0, dest.TEKColor, 0, TEKColor.Length);
     BlockCopy(URLColor, 0, dest.URLColor, 0, URLColor.Length);
     BlockCopy(VTBoldColor, 0, dest.VTBoldColor, 0, VTBoldColor.Length);                   // SGR 1
     BlockCopy(VTFaintColor, 0, dest.VTFaintColor, 0, VTFaintColor.Length);                // SGR 2
     BlockCopy(VTItalicColor, 0, dest.VTItalicColor, 0, VTItalicColor.Length);             // SGR 3
     BlockCopy(VTUnderlineColor, 0, dest.VTUnderlineColor, 0, VTUnderlineColor.Length);    // SGR 4
     BlockCopy(VTBlinkColor, 0, dest.VTBlinkColor, 0, VTBlinkColor.Length);                // SGR 5
     BlockCopy(VTRapidBlinkColor, 0, dest.VTRapidBlinkColor, 0, VTRapidBlinkColor.Length); // SGR 6
     BlockCopy(VTReverseColor, 0, dest.VTReverseColor, 0, VTReverseColor.Length);          // SGR 7
     BlockCopy(VTInvisibleColor, 0, dest.VTInvisibleColor, 0, VTInvisibleColor.Length);    // SGR 8
     BlockCopy(VTStrikeoutColor, 0, dest.VTStrikeoutColor, 0, VTStrikeoutColor.Length);    // SGR 9
     BlockCopy(DummyColor, 0, dest.DummyColor, 0, DummyColor.Length);
     dest.BSKey    = BSKey;
     dest.UseIME   = UseIME;
     dest.TelPort  = TelPort;
     dest.PortFlag = PortFlag;
     BlockCopy(ANSIColor, 0, dest.ANSIColor, 0, sizeof(ANSIColors));
     dest.MouseCursorName = MouseCursorName;
     System.Buffer.BlockCopy(CygwinDirectory, 0, dest.CygwinDirectory, 0, CygwinDirectory.Length);
     System.Buffer.BlockCopy(Locale, 0, dest.Locale, 0, Locale.Length);
     System.Buffer.BlockCopy(ViewlogEditor, 0, dest.ViewlogEditor, 0, ViewlogEditor.Length);
     System.Buffer.BlockCopy(LogDefaultName, 0, dest.LogDefaultName, 0, LogDefaultName.Length);
     System.Buffer.BlockCopy(LogDefaultPath, 0, dest.LogDefaultPath, 0, LogDefaultPath.Length);
     System.Buffer.BlockCopy(UILanguageFile, 0, dest.UILanguageFile, 0, UILanguageFile.Length);
     System.Buffer.BlockCopy(UIMsg, 0, dest.UIMsg, 0, UIMsg.Length);
     dest.DisableTCPEchoCR  = DisableTCPEchoCR;             // TCPLocalEcho/TCPCRSend を無効にする (maya 2007.4.25)
     dest.TerminalOldWidth  = TerminalOldWidth;
     dest.TerminalOldHeight = TerminalOldHeight;
     dest.CRSend_ini        = CRSend_ini;
     dest.LocalEcho_ini     = LocalEcho_ini;
     System.Buffer.BlockCopy(YModemRcvCommand, 0, dest.YModemRcvCommand, 0, YModemRcvCommand.Length);
     System.Buffer.BlockCopy(TerminalUID, 0, dest.TerminalUID, 0, TerminalUID.Length);
 }
コード例 #9
0
 internal static void TTXInit(TTTSet ts, TComVar cv)
 {
 }