Пример #1
0
        public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
        {
            fKey.FKeyTextAlign  = System.Drawing.ContentAlignment.BottomLeft;
            fKey.FKeyImageAlign = System.Drawing.ContentAlignment.TopRight;

            fKey.FKeyText(1, tclm.GetString("FormMaschPara.tcFKey1[1]", "Help"), Image.FromFile(Application.StartupPath + "\\Bitmap\\Help.ico"));
            fKey.FKeyText(6, tclm.GetString("FormMaschPara.tcFKey1[6]", "Save"), Image.FromFile(Application.StartupPath + "\\Bitmap\\Save.ico"));
            fKey.FKeyText(7, tclm.GetString("FormMaschPara.tcFKey1[7]", "Write to PLC"));
        }
Пример #2
0
        public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
        {
            fKey.FKeyTextAlign  = System.Drawing.ContentAlignment.BottomLeft;
            fKey.FKeyImageAlign = System.Drawing.ContentAlignment.MiddleCenter;

            RestoreChannelStatus();
            fKey.FKeyText(4, tclm["FormCnc.tcFKey1[4]"]);
            fKey.FKeyText(5, tclm["FormCnc.tcFKey1[5]"], Image.FromFile(Application.StartupPath + "\\Bitmap\\State\\ChStart.ico"));
            fKey.FKeyText(6, tclm["FormCnc.tcFKey1[6]"], Image.FromFile(Application.StartupPath + "\\Bitmap\\State\\ChStop.ico"));
            fKey.FKeyText(7, tclm["FormCnc.tcFKey1[7]"], Image.FromFile(Application.StartupPath + "\\Bitmap\\State\\ChReset.ico"));
            //fKey.FKeyText(8, tclm["FormCnc.tcFKey1[8]"]);
            //fKey.FKeyText(9, tclm["FormCnc.tcFKey1[9]"]);
            //fKey.FKeyText(10, tclm["FormCnc.tcFKey1[10]"]);
            //fKey.FKeyText(11, tclm["FormCnc.tcFKey1[11]"]);
            fKey.FKeyText(12, tclm["FormCnc.tcFKey1[12]"]);
        }
Пример #3
0
 public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
 {
     if (enableFKeyFunc)
     {
         fKey.FKeyText(7, "Save", Image.FromFile(Application.StartupPath + "\\Bitmap\\Save.ico"));
     }
     fKey.FKeyImageAlign = System.Drawing.ContentAlignment.TopRight;
 }
Пример #4
0
        private void SetFKeyOpModeStatus(int nIdx)
        {
            bool bAutomaticMode = false;
            bool bManualMode    = false;
            bool bMDIMode       = false;

            tcFKeyOpMode.FKeyBackColor(1, Beckhoff.App.TcColor.Gray);
            tcFKeyOpMode.FKeyBackColor(2, Beckhoff.App.TcColor.Gray);
            tcFKeyOpMode.FKeyBackColor(3, Beckhoff.App.TcColor.Gray);
            tcFKeyOpMode.FKeyBackColor(4, Beckhoff.App.TcColor.Gray);
            tcFKeyOpMode.FKeyBackColor(nIdx, MainApp.GetDoc().ColorCaption);

            Beckhoff.App.TcFKey fkey = MainApp.GetDoc().tcFKey1;
            fkey.FKeyText(1, "", null, Color.Empty);
            fkey.FKeyText(2, "", null, Color.Empty);
            fkey.FKeyText(3, "", null, Color.Empty);

            switch (nIdx)
            {
            case 1:                     // Automatic
                bAutomaticMode = true;
                break;

            case 2:                     // Manual
                fkey.FKeyText(1, "", Image.FromFile(Application.StartupPath + "\\Bitmap\\Key_M.ico"), Color.Yellow);
                fkey.FKeyText(2, "", Image.FromFile(Application.StartupPath + "\\Bitmap\\Eilgang.ico"));
                fkey.FKeyText(3, "", Image.FromFile(Application.StartupPath + "\\Bitmap\\Key_P.ico"), Color.Yellow);
                if (SpecialFunc.ManualModeRapidFeed)
                {
                    fkey.FKeyBackColor(2, Color.Orange);
                }
                else
                {
                    fkey.FKeyBackColor(2, Color.Yellow);
                }
                bManualMode = true;
                break;

            case 3:                     // MDI
                bMDIMode = true;
                break;

            case 4:                     // Reference
                break;
            }

            // selects the right screen
            ManualModeSelected(bManualMode);
            opModeAuto1.Visible   = bAutomaticMode;
            opModeManual1.Visible = bManualMode;
            opModeMDI1.Visible    = bMDIMode;
        }
Пример #5
0
        public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
        {
            fKey.FKeyText(1, tclm.GetString("FormMessages.tcFKey1[1]", "View Active"));
            fKey.FKeyText(2, tclm.GetString("FormMessages.tcFKey1[2]", "View Logged"));
            fKey.FKeyText(3, tclm.GetString("FormMessages.tcFKey1[3]", "Show Details"));
            fKey.FKeyText(5, tclm.GetString("FormMessages.tcFKey1[5]", "Clear Active"));
            fKey.FKeyText(6, tclm.GetString("FormMessages.tcFKey1[6]", "Clear Logged"));
            fKey.FKeyText(7, tclm.GetString("FormMessages.tcFKey1[7]", "Save Logged"));

            fKey.FKeyEnabled(5, false);
            fKey.FKeyEnabled(6, tcLog4NetView1.Visible);
            fKey.FKeyEnabled(7, tcLog4NetView1.Visible);
        }
Пример #6
0
        public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
        {
            fKey.FKeySelectedMode = true;

            int pageNr = (pageNumber - 1) * 20;

            for (int group = 1; group < 12; group++)
            {
                string sIdx = (pageNr + group).ToString();
                string tmp  = tclm.GetString("FormManual.tcFKey1[" + sIdx + "]", "Group " + sIdx, true);
                fKey.FKeyText(group, tmp);
                fKey.FKeyEnabled(group, !tmp.StartsWith(" "));
            }

            if (fKey.FKeySelectedMode)
            {
                fKey.FKeyBtnSelected = groupSelected;
            }
        }
Пример #7
0
 public override void SetFKeyText(Beckhoff.App.TcFKey fKey)
 {
     fKey.FKeyTextAlign  = System.Drawing.ContentAlignment.BottomLeft;
     fKey.FKeyImageAlign = System.Drawing.ContentAlignment.TopCenter;
     fKey.FKeyText(11, tclm.GetString("FormMain.tcFKey1[11]", "Exit"), null, System.Drawing.Color.Red);
 }